/* ==========================================================================
   David Lane — Precious Oils
   woocommerce.css — maps WooCommerce's markup onto the design's tokens

   Loaded only when WooCommerce is active, and loaded after Woo's own sheets
   (the dependency is declared in inc/woocommerce.php) so these rules win.
   Woo's `woocommerce-general` is deliberately left enqueued underneath: it
   covers a long tail of small components that would otherwise be unstyled.

   Everything below uses the tokens from theme.css — no new colours.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. The page shell Woo's content sits in
   -------------------------------------------------------------------------- */

.woo-page .woocommerce {
  font-family: var(--font);
  color: var(--ink);
}

/* Woo wraps shortcode output in its own div; stop it adding a second column. */
.woo-page .woocommerce::after {
  content: "";
  display: table;
  clear: both;
}

/* --------------------------------------------------------------------------
   2. Buttons

   Woo paints every action with .button. Rather than restyle each one, .button
   inherits the design's .btn so a Woo page and a theme page use one button.
   -------------------------------------------------------------------------- */

.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button,
.woocommerce #respond input#submit,
.woocommerce .woocommerce-Button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.9rem 2rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-family: var(--font);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--track-button);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease-soft), transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button:hover,
.woocommerce #respond input#submit:hover {
  background: #3c4553;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

/* The one that takes the money is the accent colour. */
.woocommerce .button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce a.button.alt,
.woocommerce #place_order,
.woocommerce .checkout-button {
  background: var(--lime);
  color: var(--ink);
}

.woocommerce .button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce #place_order:hover,
.woocommerce .checkout-button:hover {
  background: #d4ef1a;
  color: var(--ink);
}

.woocommerce .button:disabled,
.woocommerce .button.disabled,
.woocommerce button.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* The add-to-cart anchors the theme's own product tiles render already carry
   .btn, so stop Woo's rules from doubling up on them. */
.product-card__actions .add_to_cart_button,
.product-card__actions .added_to_cart {
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  font-size: var(--fs-xs);
}

/* Woo appends a "View cart" link after an AJAX add. */
.added_to_cart {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--track-button);
  text-transform: uppercase;
  color: var(--deep-green);
}

/* --------------------------------------------------------------------------
   3. Notices
   -------------------------------------------------------------------------- */

.woocommerce-notices-wrapper:empty {
  display: none;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 0 0 2rem;
  padding: 1.1rem 1.4rem;
  border: 1px solid var(--ink-12);
  border-left: 4px solid var(--green);
  border-radius: var(--radius-sm);
  background: var(--surface);
  list-style: none;
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
}

.woocommerce-info { border-left-color: var(--gold); }
.woocommerce-error { border-left-color: #c0392b; }

/*
 * Woo prefixes every notice with a glyph from its own icon font. That font is
 * not part of this design and was rendering as a missing-character box, so the
 * glyph goes and the coloured left edge carries the meaning instead.
 */
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before,
.woocommerce .woocommerce-message::before,
.woocommerce .woocommerce-info::before,
.woocommerce .woocommerce-error::before {
  content: none;
}

.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button {
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  margin-left: auto;
}

/* --------------------------------------------------------------------------
   4. Shop and archive grids

   Woo's loop uses ul.products > li.product. The design's grid is .product-grid,
   so the loop is given the same geometry rather than a second grid system.
   -------------------------------------------------------------------------- */

.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
  content: none;
}

@media (max-width: 1000px) {
  .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 340px) {
  .woocommerce ul.products { grid-template-columns: 1fr; }
}

.woocommerce ul.products li.product {
  display: flex;
  flex-direction: column;
  width: auto;
  margin: 0;
  padding: 0;
  float: none;
  text-align: center;
}

/* Titles wrap to different depths, so the buttons would otherwise sit at
   different heights across a row. */
.woocommerce ul.products li.product .button {
  margin-top: auto;
  align-self: center;
}

.woocommerce ul.products li.product a img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  margin: 0 0 1rem;
  background: var(--bg);
  border: 1px solid var(--ink);
  padding: 1.5rem;
  box-shadow: none;
  transition: transform var(--dur-slow) var(--ease-out);
}

.woocommerce ul.products li.product:hover a img {
  transform: scale(1.04);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  padding: 0;
  font-size: var(--fs-h4);
  font-weight: 700;
  line-height: var(--lh-snug);
  color: var(--ink);
}

.woocommerce ul.products li.product .price {
  display: block;
  margin: 0.35rem 0 0.9rem;
  font-size: var(--fs-h4);
  font-weight: 800;
  color: var(--deep-green);
}

.woocommerce ul.products li.product .price del {
  margin-right: 0.4rem;
  font-weight: 400;
  color: var(--muted);
}

.woocommerce ul.products li.product .onsale,
.woocommerce span.onsale {
  top: 12px;
  left: 12px;
  right: auto;
  min-height: 0;
  min-width: 0;
  margin: 0;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  background: var(--lime);
  color: var(--ink);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
  margin-bottom: 2rem;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.woocommerce .woocommerce-ordering select {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--ink-12);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font);
  font-size: var(--fs-sm);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   5. Single product

   Gallery left, buy box right, everything else full width underneath. Woo's
   layout sheet floats the two halves at 48%; this replaces that with a grid so
   the columns can be aligned and the tabs can span properly.
   -------------------------------------------------------------------------- */

.woocommerce-breadcrumb {
  margin: 0 0 1.75rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  color: var(--muted);
}

.woocommerce-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
  color: var(--deep-green);
}

@media (min-width: 900px) {
  .single-product div.product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 1rem + 3vw, 4rem);
    align-items: start;
  }

  /*
   * The `div.` qualifiers are load-bearing. Woo sizes these halves with
   * `.woocommerce div.product div.images { width: 48% }`, and without matching
   * that specificity each column collapsed to 48% of its own grid track — a
   * 288px gallery in a 600px column.
   */
  .single-product div.product div.woocommerce-product-gallery {
    grid-column: 1;
    grid-row: 1;
    float: none;
    width: 100%;
    margin: 0;
  }

  .single-product div.product div.summary {
    grid-column: 2;
    grid-row: 1;
    float: none;
    width: 100%;
    margin: 0;
  }

  /* Tabs, related and upsells run the full width beneath both columns. */
  .single-product div.product .woocommerce-tabs,
  .single-product div.product .related,
  .single-product div.product .upsells,
  .single-product div.product .woocommerce-product-gallery + .summary ~ * {
    grid-column: 1 / -1;
  }
}

/* ---- gallery ------------------------------------------------------------ */

.woocommerce div.product div.images {
  margin: 0;
}

.woocommerce div.product div.images img {
  background: var(--bg);
  border: 1px solid var(--ink);
  padding: 2.5rem;
}

.woocommerce div.product div.images .woocommerce-product-gallery__trigger {
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  font-size: 1rem;
  text-decoration: none;
}

.woocommerce div.product div.images .flex-control-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.woocommerce div.product div.images .flex-control-thumbs li {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.woocommerce div.product div.images .flex-control-thumbs img {
  width: 100%;
  aspect-ratio: 1;
  padding: 0.4rem;
  border: 1px solid var(--ink-12);
  object-fit: contain;
  opacity: 0.55;
  transition: opacity var(--dur) var(--ease-soft), border-color var(--dur) var(--ease-soft);
}

.woocommerce div.product div.images .flex-control-thumbs img:hover,
.woocommerce div.product div.images .flex-control-thumbs img.flex-active {
  border-color: var(--ink);
  opacity: 1;
}

/* ---- the buy box -------------------------------------------------------- */

.woocommerce div.product .product_title {
  margin: 0 0 0.75rem;
  /* The h1 scale tops out at 56px, which a four-line supplier product name
     turns into a wall. One step down reads as a product, not a headline. */
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: var(--lh-tight);
  color: var(--ink);
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
  margin: 0 0 1.25rem;
  font-size: var(--fs-h2);
  font-weight: 800;
  color: var(--deep-green);
}

.woocommerce div.product p.price del {
  margin-right: 0.5rem;
  font-size: var(--fs-h4);
  font-weight: 400;
  color: var(--muted);
}

.woocommerce div.product .woocommerce-product-rating {
  margin: 0 0 1.25rem;
}

.woocommerce div.product .woocommerce-product-details__short-description {
  margin-bottom: 1.5rem;
  font-size: var(--fs-lead);
  line-height: var(--lh-body);
  color: var(--ink-80);
}

.woocommerce div.product .stock {
  margin: 0 0 1rem;
  font-size: var(--fs-sm);
  font-weight: 700;
}

.woocommerce div.product .stock.in-stock { color: var(--green); }
.woocommerce div.product .stock.out-of-stock { color: #c0392b; }

/* ---- variations --------------------------------------------------------- */

.woocommerce div.product form.cart {
  margin: 1.75rem 0 0;
}

/* A simple product's form is one row. A variable product's is a stack, so only
   the row that actually holds quantity + button becomes a flex row. */
.woocommerce div.product form.cart:not(.variations_form),
.woocommerce div.product .woocommerce-variation-add-to-cart {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.woocommerce div.product form.cart table.variations {
  width: 100%;
  margin: 0 0 1.5rem;
  border: 0;
  background: transparent;
}

.woocommerce div.product form.cart table.variations tbody,
.woocommerce div.product form.cart table.variations tr {
  display: grid;
  gap: 0.4rem;
}

.woocommerce div.product form.cart table.variations tr + tr {
  margin-top: 1rem;
}

.woocommerce div.product form.cart table.variations th,
.woocommerce div.product form.cart table.variations td {
  display: block;
  padding: 0;
  border: 0;
  text-align: left;
}

.woocommerce div.product form.cart table.variations th.label label {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink);
}

.woocommerce div.product form.cart table.variations select {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--ink-12);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font);
  font-size: var(--fs-body);
  color: var(--ink);
}

.woocommerce div.product form.cart table.variations select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(131, 165, 77, 0.18);
  outline: none;
}

.woocommerce div.product form.cart .reset_variations {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--deep-green);
}

.woocommerce div.product .woocommerce-variation-price {
  margin-bottom: 1rem;
}

/* Woo prints these whether or not the variation has anything to say, which
   left a band of dead space between the dropdown and the buy button. */
.woocommerce div.product .woocommerce-variation.single_variation:empty,
.woocommerce div.product .woocommerce-variation-description:empty,
.woocommerce div.product .woocommerce-variation-price:empty,
.woocommerce div.product .woocommerce-variation-availability:empty {
  display: none;
}

.woocommerce div.product .woocommerce-variation-price .price {
  margin: 0;
  font-size: var(--fs-h3);
}

/* ---- quantity + add to cart --------------------------------------------- */

.woocommerce div.product form.cart div.quantity {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--ink-12);
  border-radius: var(--radius-pill);
  background: var(--surface);
}

.woocommerce div.product form.cart .quantity input.qty {
  width: 56px;
  min-height: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 700;
  text-align: center;
  color: var(--ink);
  -moz-appearance: textfield;
}

.woocommerce div.product form.cart .quantity input.qty::-webkit-outer-spin-button,
.woocommerce div.product form.cart .quantity input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.single-product .po-qty-btn {
  height: 52px;
}

.woocommerce div.product form.cart .single_add_to_cart_button {
  flex: 1 1 220px;
  min-height: 52px;
}

/*
 * Woo paints a disabled .button.alt in its own purple, with a selector heavy
 * enough to beat the plain .alt rule in section 2 — which is why the button
 * read as lilac while a variation was still unchosen. State it explicitly.
 */
.woocommerce div.product form.cart button.single_add_to_cart_button.alt.disabled,
.woocommerce div.product form.cart button.single_add_to_cart_button.alt:disabled,
.woocommerce div.product form.cart button.single_add_to_cart_button.alt.wc-variation-selection-needed {
  background: var(--ink-12);
  color: var(--muted);
  opacity: 1;
  cursor: not-allowed;
}

.woocommerce div.product form.cart button.single_add_to_cart_button.alt.disabled:hover,
.woocommerce div.product form.cart button.single_add_to_cart_button.alt:disabled:hover,
.woocommerce div.product form.cart button.single_add_to_cart_button.alt.wc-variation-selection-needed:hover {
  background: var(--ink-12);
  color: var(--muted);
  transform: none;
  box-shadow: none;
}

.woocommerce div.product .ppc-button-wrapper {
  width: 100%;
  margin-top: 1rem;
}

/* ---- meta --------------------------------------------------------------- */

.woocommerce div.product .product_meta {
  display: grid;
  gap: 0.4rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ink-12);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--muted);
}

.woocommerce div.product .product_meta > span {
  display: block;
}

.woocommerce div.product .product_meta a {
  color: var(--deep-green);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

/* ---- tabs --------------------------------------------------------------- */

.woocommerce div.product .woocommerce-tabs {
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
  margin: 0 0 2rem;
  padding: 0;
  border-bottom: 1px solid var(--ink-12);
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before {
  border: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
  margin: 0 0.25rem 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after {
  content: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  display: inline-block;
  padding: 0.9rem 1.25rem;
  border-bottom: 2px solid transparent;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--track-button);
  text-transform: uppercase;
  color: var(--muted);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
  border-bottom-color: var(--lime);
  color: var(--ink);
}

/* Supplier descriptions run to thousands of words and a stack of images.
   Hold them to a readable measure instead of the full 1340px. */
.woocommerce div.product .woocommerce-Tabs-panel {
  max-width: 80ch;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink-80);
}

.woocommerce div.product .woocommerce-Tabs-panel > h2 {
  margin: 0 0 1.25rem;
  font-size: var(--fs-h3);
  font-weight: 800;
  color: var(--ink);
}

.woocommerce div.product .woocommerce-Tabs-panel p {
  margin: 0 0 1.25rem;
}

.woocommerce div.product .woocommerce-Tabs-panel img {
  height: auto;
  max-width: 100%;
}

.woocommerce div.product .woocommerce-Tabs-panel table.shop_attributes th,
.woocommerce div.product .woocommerce-Tabs-panel table.shop_attributes td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--ink-12);
  font-size: var(--fs-sm);
}

.woocommerce div.product .woocommerce-Tabs-panel table.shop_attributes th {
  font-weight: 700;
  color: var(--ink);
}

/* ---- related / upsells -------------------------------------------------- */

.woocommerce div.product .related,
.woocommerce div.product .upsells {
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

.woocommerce div.product .related > h2,
.woocommerce div.product .upsells > h2 {
  margin-bottom: 2rem;
  font-size: var(--fs-h2);
  font-weight: 800;
  color: var(--ink);
}

@media (max-width: 899px) {
  .woocommerce div.product div.images,
  .woocommerce div.product .summary {
    float: none;
    width: 100%;
    margin-bottom: 2rem;
  }
}

/* --------------------------------------------------------------------------
   6. Cart

   WooCommerce ships the cart as a <table>. Rather than live with a data table,
   the table is re-laid out with CSS grid into the card rows a modern cart uses:
   image, name, unit price, a stepper, a line total. No template is overridden,
   so every Woo hook, nonce and script still works exactly as shipped — which
   matters on the one page that is about to take somebody's money.

   Scoped to body.woocommerce-cart so the checkout's own shop_table is untouched.
   -------------------------------------------------------------------------- */

/* The items on the left, a summary that follows you down the page on the right. */
@media (min-width: 900px) {
  .woocommerce-cart .woo-page > .woocommerce {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 1rem + 2vw, 3rem);
    align-items: start;
  }

  .woocommerce-cart .woo-page > .woocommerce > .woocommerce-notices-wrapper {
    grid-column: 1 / -1;
  }

  .woocommerce-cart .cart-collaterals {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
  }
}

/* ---- the items ---------------------------------------------------------- */

.woocommerce-cart table.cart {
  display: block;
  margin: 0;
  border: 0;
  background: transparent;
}

.woocommerce-cart table.cart thead {
  display: none;
}

.woocommerce-cart table.cart tbody {
  display: grid;
  gap: 0.85rem;
}

.woocommerce-cart table.cart tbody tr {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto auto 2rem;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0.3rem 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--ink-12);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color var(--dur) var(--ease-soft), box-shadow var(--dur) var(--ease-out);
}

.woocommerce-cart table.cart tbody tr:hover {
  border-color: rgba(45, 52, 63, 0.22);
  box-shadow: var(--shadow-card);
}

.woocommerce-cart table.cart td {
  display: block;
  padding: 0;
  border: 0;
}

.woocommerce-cart table.cart td::before {
  content: none;
}

.woocommerce-cart table.cart td.product-thumbnail { grid-column: 1; grid-row: 1 / 3; }
.woocommerce-cart table.cart td.product-name      { grid-column: 2; grid-row: 1; }
.woocommerce-cart table.cart td.product-price     { grid-column: 2; grid-row: 2; }
.woocommerce-cart table.cart td.product-quantity  { grid-column: 3; grid-row: 1 / 3; }
.woocommerce-cart table.cart td.product-subtotal  { grid-column: 4; grid-row: 1 / 3; text-align: right; }
.woocommerce-cart table.cart td.product-remove    { grid-column: 5; grid-row: 1 / 3; text-align: right; }

.woocommerce-cart table.cart td.product-thumbnail img {
  width: 92px;
  height: 92px;
  padding: 0.5rem;
  border: 0;
  border-radius: 8px;
  background: var(--bg);
  object-fit: contain;
}

.woocommerce-cart table.cart td.product-name a {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: var(--lh-snug);
  color: var(--ink);
  text-decoration: none;
}

.woocommerce-cart table.cart td.product-name a:hover {
  color: var(--green);
}

.woocommerce-cart table.cart td.product-name .variation {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  margin: 0.3rem 0 0;
  font-size: var(--fs-xs);
  color: var(--muted);
}

.woocommerce-cart table.cart td.product-name .variation dt,
.woocommerce-cart table.cart td.product-name .variation dd {
  margin: 0;
  font-weight: 400;
}

.woocommerce-cart table.cart td.product-price {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.woocommerce-cart table.cart td.product-subtotal {
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--deep-green);
  white-space: nowrap;
}

.woocommerce-cart table.cart td.product-remove a.remove {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border-radius: 50%;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--muted) !important;
  background: transparent;
}

.woocommerce-cart table.cart td.product-remove a.remove:hover {
  background: #c0392b;
  color: #fff !important;
}

/* ---- the quantity stepper ----------------------------------------------
   The minus and plus buttons are injected by assets/js/woo-cart.js; the bare
   number input is styled to match on its own, so a no-JS cart still looks
   deliberate rather than half-built.
   ------------------------------------------------------------------------ */

.woocommerce-cart table.cart td.product-quantity .quantity {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--ink-12);
  border-radius: var(--radius-pill);
  background: var(--surface);
}

.po-qty-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--font);
  font-size: 1.15rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  transition: background var(--dur) var(--ease-soft);
}

.po-qty-btn:hover { background: var(--bg); }
.po-qty-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.po-qty-btn:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }

.woocommerce-cart table.cart td.product-quantity input.qty {
  width: 46px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 700;
  text-align: center;
  color: var(--ink);
  -moz-appearance: textfield;
}

.woocommerce-cart table.cart td.product-quantity input.qty::-webkit-outer-spin-button,
.woocommerce-cart table.cart td.product-quantity input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ---- coupon + update row ------------------------------------------------ */

.woocommerce-cart table.cart tbody tr:last-child {
  display: block;
  padding: 1rem 1.25rem;
}

.woocommerce-cart table.cart tbody tr:last-child:hover {
  border-color: var(--ink-12);
  box-shadow: none;
}

.woocommerce-cart td.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.woocommerce-cart td.actions .coupon {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
}

.woocommerce-cart .woocommerce table.cart td.actions .coupon,
.woocommerce-cart .woocommerce table.cart td.actions .coupon .input-text {
  float: none;
}

/* Woo pins this field to 100px with a selector heavy enough to need matching. */
.woocommerce-cart .woocommerce table.cart td.actions .coupon .input-text {
  width: 220px;
  min-height: 48px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--ink-12);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font);
  font-size: var(--fs-sm);
  color: var(--ink);
}

.woocommerce-cart .woocommerce table.cart td.actions .coupon .input-text:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(131, 165, 77, 0.18);
  outline: none;
}

/* Secondary actions read as outlines, so the only filled button on the page is
   the one that proceeds to checkout. */
.woocommerce-cart td.actions .coupon .button,
.woocommerce-cart td.actions > button[name="update_cart"] {
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
}

.woocommerce-cart td.actions .coupon .button:hover,
.woocommerce-cart td.actions > button[name="update_cart"]:hover:not(:disabled) {
  background: var(--ink);
  color: #fff;
}

.woocommerce-cart td.actions > button[name="update_cart"] {
  margin-left: auto;
  border-color: var(--ink-12);
}

/* Woo disables "Update cart" until a quantity changes. Left to the generic
   disabled rule it rendered as an unexplained grey slab. */
.woocommerce-cart td.actions > button[name="update_cart"]:disabled {
  opacity: 1;
  color: var(--muted);
  border-color: var(--ink-12);
  background: transparent;
}

/* With the stepper script running, quantities save themselves and the button is
   redundant. It stays in the markup for the no-JS case. */
.po-cart-autoupdate td.actions > button[name="update_cart"] {
  display: none;
}

/* ---- the summary -------------------------------------------------------- */

.woocommerce-cart .cart-collaterals .cart_totals {
  float: none;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1.75rem;
  border: 1px solid var(--ink-12);
  border-radius: 12px;
  background: var(--surface);
}

.woocommerce-cart .cart_totals h2 {
  margin: 0 0 1.25rem;
  font-size: var(--fs-h3);
  font-weight: 800;
  color: var(--ink);
}

.woocommerce-cart .cart_totals table.shop_table {
  display: block;
  margin: 0;
  border: 0;
  background: transparent;
}

.woocommerce-cart .cart_totals table.shop_table tbody {
  display: grid;
}

.woocommerce-cart .cart_totals table.shop_table tr {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--ink-12);
}

.woocommerce-cart .cart_totals table.shop_table tr:first-child {
  padding-top: 0;
  border-top: 0;
}

.woocommerce-cart .cart_totals table.shop_table th,
.woocommerce-cart .cart_totals table.shop_table td {
  padding: 0;
  border: 0;
  font-size: var(--fs-sm);
  letter-spacing: 0;
  text-transform: none;
}

.woocommerce-cart .cart_totals table.shop_table th {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--muted);
  text-align: left;
}

.woocommerce-cart .cart_totals table.shop_table td {
  text-align: right;
}

.woocommerce-cart .cart_totals .order-total th {
  font-size: var(--fs-h4);
  font-weight: 800;
  color: var(--ink);
}

.woocommerce-cart .cart_totals .order-total td .amount {
  font-size: var(--fs-h3);
  font-weight: 800;
  color: var(--deep-green);
}

.woocommerce-cart .woocommerce-shipping-methods {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: right;
}

.woocommerce-cart .woocommerce-shipping-methods label {
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--ink);
}

.woocommerce-cart .woocommerce-shipping-destination {
  margin: 0.5rem 0 0;
  font-size: var(--fs-xs);
  line-height: var(--lh-snug);
  color: var(--muted);
}

.woocommerce-cart .shipping-calculator-button {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.woocommerce-cart .shipping-calculator-form {
  margin-top: 1rem;
  text-align: left;
}

.woocommerce-cart .wc-proceed-to-checkout {
  padding: 1.5rem 0 0;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  display: flex;
  width: 100%;
  min-height: 56px;
  margin: 0;
  font-size: var(--fs-sm);
}

.woocommerce-cart .ppc-button-wrapper {
  margin-top: 0.9rem;
}

.woocommerce-cart .ppc-button-wrapper:empty {
  margin-top: 0;
}

/* Reassurance and a way back to the shop, added on woocommerce_after_cart_totals. */
.po-cart-aside {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--ink-12);
  text-align: center;
}

.po-cart-aside p {
  margin: 0 0 0.6rem;
  font-size: var(--fs-xs);
  line-height: var(--lh-snug);
  color: var(--muted);
}

.po-cart-aside a {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--track-button);
  text-transform: uppercase;
  color: var(--deep-green);
  text-decoration: none;
}

/* ---- empty cart --------------------------------------------------------- */

.woocommerce-cart .cart-empty {
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: var(--fs-h3);
  font-weight: 800;
  color: var(--ink);
}

.woocommerce-cart .return-to-shop {
  margin: 0;
}

/* ---- narrow screens ----------------------------------------------------- */

@media (max-width: 680px) {
  .woocommerce-cart table.cart tbody tr {
    grid-template-columns: 76px minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    gap: 0.4rem 1rem;
    padding: 0.9rem 1rem;
  }

  .woocommerce-cart table.cart td.product-thumbnail { grid-column: 1; grid-row: 1 / 3; }
  .woocommerce-cart table.cart td.product-name      { grid-column: 2; grid-row: 1; }
  .woocommerce-cart table.cart td.product-price     { grid-column: 2; grid-row: 2; }
  .woocommerce-cart table.cart td.product-remove    { grid-column: 3; grid-row: 1; }
  .woocommerce-cart table.cart td.product-quantity  { grid-column: 1 / 3; grid-row: 3; }
  .woocommerce-cart table.cart td.product-subtotal  { grid-column: 3; grid-row: 3; align-self: center; }

  .woocommerce-cart table.cart td.product-thumbnail img {
    width: 76px;
    height: 76px;
  }

  .woocommerce-cart td.actions .coupon {
    width: 100%;
  }

  .woocommerce-cart .woocommerce table.cart td.actions .coupon .input-text {
    flex: 1 1 140px;
    width: auto;
  }

  .woocommerce-cart td.actions > button[name="update_cart"] {
    width: 100%;
    margin-left: 0;
  }
}

/* --------------------------------------------------------------------------
   7. Checkout

   Two columns on desktop: the form on the left, one summary card on the right
   holding the items, the totals, the payment methods and the place-order
   button — the order a shopper reads them in.
   -------------------------------------------------------------------------- */

.woocommerce .woocommerce-billing-fields h3,
.woocommerce .woocommerce-shipping-fields h3,
.woocommerce .woocommerce-additional-fields h3,
.woocommerce-checkout h3#order_review_heading {
  margin: 0 0 1.5rem;
  font-size: var(--fs-h3);
  font-weight: 800;
  color: var(--ink);
}

.woocommerce form .form-row {
  margin: 0 0 1.25rem;
  padding: 0;
}

.woocommerce form .form-row label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink);
}

.woocommerce form .form-row .required {
  color: #c0392b;
  text-decoration: none;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce .select2-container .select2-selection--single {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--ink-12);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font);
  font-size: var(--fs-body);
  color: var(--ink);
  transition: border-color var(--dur) var(--ease-soft), box-shadow var(--dur) var(--ease-soft);
}

.woocommerce form .form-row textarea {
  min-height: 110px;
  line-height: var(--lh-body);
  resize: vertical;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(131, 165, 77, 0.18);
  outline: none;
}

.woocommerce form .form-row.woocommerce-invalid input.input-text,
.woocommerce form .form-row.woocommerce-invalid select {
  border-color: #c0392b;
}

.woocommerce .select2-container .select2-selection--single {
  display: flex;
  align-items: center;
}

/* The "Ship to a different address?" row is a checkbox, not a field. */
.woocommerce-checkout .woocommerce-shipping-fields h3 label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-size: var(--fs-h3);
  font-weight: 800;
}

/* ---- the coupon bar ----------------------------------------------------- */

.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info {
  margin-bottom: 1.5rem;
}

.woocommerce-checkout form.checkout_coupon {
  margin: 0 0 2rem;
  padding: 1.5rem;
  border: 1px solid var(--ink-12);
  border-radius: 12px;
  background: var(--surface);
}

.woocommerce-checkout form.checkout_coupon .form-row {
  margin-bottom: 0;
}

/* ---- the two columns ---------------------------------------------------- */

@media (min-width: 900px) {
  .woocommerce-checkout form.checkout.woocommerce-checkout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    /*
     * Row 1 holds the "Your order" heading; row 2 takes every remaining pixel.
     * That `1fr` is load-bearing: the billing form spans both rows, and a
     * spanning item grows the tracks it spans unless one of them can absorb
     * the slack. With two `auto` rows the summary was pushed a full screen
     * below its own heading.
     */
    grid-template-rows: auto 1fr;
    /* No row gap — the heading already carries its own margin. */
    gap: 0 clamp(2rem, 1rem + 3vw, 4rem);
    align-items: start;
  }

  /*
   * The form spans both rows on the left. Without this, the summary lands in
   * an implicit second row that cannot begin until the billing form ends —
   * which left the heading stranded at the top and the order itself a full
   * screen below it.
   */
  .woocommerce-checkout form.checkout #customer_details {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .woocommerce-checkout form.checkout h3#order_review_heading {
    grid-column: 2;
    grid-row: 1;
  }

  .woocommerce-checkout form.checkout #order_review {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }

  .woocommerce-checkout form.checkout .col2-set .col-1,
  .woocommerce-checkout form.checkout .col2-set .col-2 {
    float: none;
    width: 100%;
  }
}

/* ---- the summary card --------------------------------------------------- */

.woocommerce-checkout #order_review {
  padding: 1.75rem;
  border: 1px solid var(--ink-12);
  border-radius: 12px;
  background: var(--surface);
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table thead {
  display: none;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot {
  display: grid;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tr {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--ink-12);
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody tr:first-child {
  padding-top: 0;
  border-top: 0;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table th,
.woocommerce-checkout table.woocommerce-checkout-review-order-table td {
  padding: 0;
  border: 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  letter-spacing: 0;
  text-transform: none;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table td.product-name {
  font-weight: 700;
  color: var(--ink);
}

/* Woo prints the line quantity as "× 2" inside the name cell. */
.woocommerce-checkout table.woocommerce-checkout-review-order-table .product-quantity {
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table td.product-total,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot td {
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot th {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--muted);
  text-align: left;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot .order-total th {
  font-size: var(--fs-h4);
  font-weight: 800;
  color: var(--ink);
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot .order-total td .amount {
  font-size: var(--fs-h3);
  font-weight: 800;
  color: var(--deep-green);
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table .woocommerce-shipping-methods {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: right;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table .woocommerce-shipping-methods label {
  display: inline;
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--ink);
}

/* ---- payment ------------------------------------------------------------ */

/* Payment sits inside the summary card, so it brings no card of its own. */
.woocommerce-checkout #payment {
  margin-top: 1.25rem;
  padding: 1.25rem 0 0;
  border: 0;
  border-top: 1px solid var(--ink-12);
  border-radius: 0;
  background: transparent;
}

.woocommerce-checkout #payment ul.payment_methods {
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
}

.woocommerce-checkout #payment ul.payment_methods > li {
  margin: 0 0 0.6rem;
  padding: 0;
  font-size: var(--fs-sm);
}

/* A selectable gateway reads as a row you can click. */
.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method {
  padding: 0.9rem 1rem;
  border: 1px solid var(--ink-12);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease-soft);
}

.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method:hover {
  border-color: rgba(45, 52, 63, 0.25);
}

.woocommerce-checkout #payment ul.payment_methods > li label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-weight: 700;
  cursor: pointer;
}

.woocommerce-checkout #payment div.payment_box {
  margin: 0.75rem 0 0;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  color: var(--ink-80);
}

.woocommerce-checkout #payment div.payment_box::before {
  border-bottom-color: var(--bg);
}

.woocommerce-checkout #payment div.form-row.place-order {
  margin: 1.25rem 0 0;
  padding: 0;
}

.woocommerce-checkout #payment #place_order {
  float: none;
  width: 100%;
  min-height: 56px;
  margin: 0;
  font-size: var(--fs-sm);
}

.woocommerce .woocommerce-terms-and-conditions-wrapper {
  margin-bottom: 1.25rem;
  font-size: var(--fs-sm);
}

.woocommerce-checkout .woocommerce-privacy-policy-text p {
  margin: 0 0 1rem;
  font-size: var(--fs-xs);
  line-height: var(--lh-snug);
  color: var(--muted);
}

/* ---- order received ----------------------------------------------------- */

.woocommerce .woocommerce-order-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 0 0 2.5rem;
  padding: 1.5rem;
  border: 1px solid var(--ink-12);
  border-radius: 12px;
  background: var(--surface);
  list-style: none;
}

.woocommerce .woocommerce-order-overview li {
  border: 0;
  padding: 0;
  font-size: var(--fs-xs);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--muted);
}

.woocommerce .woocommerce-order-overview li strong {
  display: block;
  margin-top: 0.4rem;
  font-size: var(--fs-body);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   8. Account, orders, pagination
   -------------------------------------------------------------------------- */

.woocommerce-account .woocommerce-MyAccount-navigation {
  width: 26%;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--ink-12);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a {
  display: block;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--ink-12);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink);
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
  background: var(--bg);
  color: var(--deep-green);
}

.woocommerce-account .woocommerce-MyAccount-content {
  width: 70%;
}

.woocommerce nav.woocommerce-pagination ul {
  display: inline-flex;
  gap: 0.4rem;
  border: 0;
}

.woocommerce nav.woocommerce-pagination ul li {
  border: 0;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--ink-12);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink);
}

.woocommerce nav.woocommerce-pagination ul li span.current {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

@media (max-width: 768px) {
  .woocommerce-account .woocommerce-MyAccount-navigation,
  .woocommerce-account .woocommerce-MyAccount-content {
    float: none;
    width: 100%;
  }

  .woocommerce-account .woocommerce-MyAccount-content {
    margin-top: 2rem;
  }
}

/* --------------------------------------------------------------------------
   9. Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .woocommerce .button,
  .woocommerce ul.products li.product a img,
  .woocommerce form .form-row input.input-text {
    transition: none;
  }

  .woocommerce .button:hover,
  .woocommerce ul.products li.product:hover a img {
    transform: none;
  }
}
