/* ==========================================================================
   WooCommerce -> Linda's design

   This file adds no new design. Every value below is lifted from her existing
   stylesheet so the shop, cart and checkout read as the same site rather than a
   store bolted onto it. Where a number looks arbitrary it is hers:

     - field border  2px solid #f0e6d4  and radius 12px are literal values from
       her contact form. 12px is deliberately NOT --radius-sm (10px); using the
       token would be subtly wrong on every input on the site.
     - buttons are pill radius, Fredoka 600, 14px 28px, and every hover lifts
       translateY(-2px) and deepens the shadow. Woo's defaults do none of that.
     - shadows are tinted rgba(61,43,31,...), never neutral grey.
   ========================================================================== */

/* ---------- Buttons: map Woo's markup onto .btn / .btn-primary ---------- */
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.wc-block-components-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  background: var(--c-coral);
  color: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.wc-block-components-button:hover {
  background: var(--c-coral-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Secondary actions - "Update cart", "Continue shopping" - take the gold
   treatment so the coral stays reserved for the one action that matters. */
.woocommerce .cart .button[name="update_cart"],
.woocommerce a.button.wc-backward {
  background: var(--c-gold);
  color: var(--c-cocoa);
}
.woocommerce .cart .button[name="update_cart"]:hover,
.woocommerce a.button.wc-backward:hover {
  background: var(--c-gold-soft);
  color: var(--c-cocoa);
}

/* A disabled "Update cart" must not look clickable. */
.woocommerce .button:disabled,
.woocommerce .button[disabled] {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- Form fields: her contact-form styling, exactly ---------- */
.woocommerce form .form-row label,
.woocommerce-checkout label,
.woocommerce table.shop_table th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-cocoa);
  font-size: .95rem;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce .select2-container .select2-selection--single,
.woocommerce-page form .form-row input.input-text {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #f0e6d4;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--c-cream-soft);
  color: var(--c-cocoa);
  height: auto;
  transition: border-color .2s ease, background .2s ease;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus,
.woocommerce .select2-container--open .select2-selection--single {
  outline: none;
  border-color: var(--c-coral);
  background: #fff;
}
/* Select2 is injected by Woo and ignores the rules above without this. */
.woocommerce .select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 1.4;
  padding: 0;
  color: var(--c-cocoa);
}
.woocommerce .select2-container .select2-selection--single .select2-selection__arrow {
  top: 50%;
  transform: translateY(-50%);
}
.woocommerce form .form-row.woocommerce-invalid input.input-text {
  border-color: var(--c-coral);
}
.woocommerce form .form-row.woocommerce-validated input.input-text {
  border-color: var(--c-leaf);
}

/* ---------- Notices ---------- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-notice {
  border: none;
  border-left: 4px solid var(--c-leaf);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-cocoa);
  font-family: var(--font-body);
  padding: 16px 20px;
  margin: 0 0 24px;
  box-shadow: var(--shadow-sm);
  list-style: none;
}
.woocommerce-info { border-left-color: var(--c-sky); }
.woocommerce-error { border-left-color: var(--c-coral); }
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before { display: none; }
.woocommerce-error li { list-style: none; margin: 0; }

/* ---------- Cart ---------- */
.woocommerce table.shop_table {
  border: none;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}
.woocommerce table.shop_table th {
  background: var(--c-cream-soft);
  padding: 16px;
  border: none;
  text-align: left;
}
.woocommerce table.shop_table td {
  padding: 16px;
  border: none;
  border-top: 1px solid #f0e6d4;
  font-family: var(--font-body);
  color: var(--c-cocoa);
  vertical-align: middle;
}
.woocommerce table.cart img {
  width: 72px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.woocommerce table.cart td.product-name a {
  color: var(--c-cocoa);
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
}
.woocommerce table.cart td.product-name a:hover { color: var(--c-coral); }

/* The remove "x" is a bare link by default and reads as a typo on her site. */
.woocommerce a.remove {
  width: 26px;
  height: 26px;
  line-height: 24px;
  border-radius: 50%;
  color: var(--c-coral) !important;
  background: var(--c-cream-soft);
  font-weight: 600;
  text-align: center;
}
.woocommerce a.remove:hover {
  background: var(--c-coral) !important;
  color: #fff !important;
}

/* Quantity box matches the inputs rather than the browser default. */
.woocommerce .quantity .qty {
  width: 72px;
  padding: 10px;
  border: 2px solid #f0e6d4;
  border-radius: 12px;
  background: var(--c-cream-soft);
  font-family: var(--font-body);
  color: var(--c-cocoa);
  text-align: center;
}
.woocommerce .quantity .qty:focus {
  outline: none;
  border-color: var(--c-coral);
  background: #fff;
}

/* ---------- Cart totals / order review ---------- */
.woocommerce .cart-collaterals .cart_totals,
.woocommerce-checkout #order_review {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 28px;
}
.woocommerce .cart-collaterals h2,
.woocommerce-checkout h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-cocoa);
  margin: 0 0 18px;
}
.woocommerce .cart_totals table.shop_table,
.woocommerce-checkout #order_review table.shop_table {
  box-shadow: none;
  background: transparent;
}
.woocommerce .cart_totals .order-total .amount,
.woocommerce-checkout .order-total .amount {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--c-coral);
}
.woocommerce .woocommerce-Price-amount {
  font-family: var(--font-display);
  font-weight: 600;
}

/* Coupon field sits next to its button rather than under it. */
.woocommerce .coupon { display: flex; gap: 10px; flex-wrap: wrap; }
.woocommerce .coupon #coupon_code {
  flex: 1 1 180px;
  padding: 12px 16px;
  border: 2px solid #f0e6d4;
  border-radius: 12px;
  background: var(--c-cream-soft);
  font-family: var(--font-body);
  width: auto;
}

/* ---------- Shop listing ---------- */
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.woocommerce ul.products li.product {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.woocommerce ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.woocommerce ul.products li.product img {
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--c-cocoa);
  padding: 0;
}
.woocommerce ul.products li.product .price {
  color: var(--c-coral);
  font-family: var(--font-display);
  font-size: 1.15rem;
}
/* Woo prints the sale flash as a circle in the corner; keep it, restyle it. */
.woocommerce span.onsale {
  background: var(--c-gold);
  color: var(--c-cocoa);
  font-family: var(--font-display);
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  min-height: 0;
  min-width: 0;
  line-height: 1.4;
}
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering { color: var(--c-cocoa-soft); }

/* ---------- Single product ---------- */
.woocommerce div.product .product_title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--c-cocoa);
}
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--c-coral);
  font-family: var(--font-display);
  font-size: 1.6rem;
}
.woocommerce div.product .woocommerce-product-details__short-description {
  color: var(--c-cocoa-soft);
  line-height: 1.7;
}
.woocommerce div.product div.images img { border-radius: var(--radius-md); }
.woocommerce div.product form.cart { margin-top: 24px; }
.woocommerce div.product .woocommerce-tabs ul.tabs {
  padding: 0;
  margin: 0 0 24px;
}
.woocommerce div.product .woocommerce-tabs ul.tabs::before { border-bottom-color: #f0e6d4; }
.woocommerce div.product .woocommerce-tabs ul.tabs li {
  background: var(--c-cream-soft);
  border: 2px solid #f0e6d4;
  border-radius: var(--radius-pill);
  margin: 0 8px 0 0;
  padding: 0;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-cocoa);
  padding: 10px 22px;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
  background: var(--c-coral);
  border-color: var(--c-coral);
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: #fff; }

/* Variation dropdowns - the binding selector - are the main control on a
   product page here, so they get the full field treatment. */
.woocommerce div.product form.cart .variations td { padding: 8px 0; }
.woocommerce div.product form.cart .variations label {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-cocoa);
}
.woocommerce div.product form.cart .reset_variations {
  color: var(--c-coral);
  font-size: .9rem;
}

/* ---------- Checkout form rows ---------- */
/* WooCommerce computes .form-row to display:grid with TWO equal columns and
   leans on float:left/right for the two-up fields. Auto-placement then puts the
   label in column 2 and the input in column 1, so every label sits beside the
   wrong field rather than above its own. Measured on this install:
   grid-template-columns resolved to "122.391px 122.391px".

   Rather than patch Woo's grid, each row is forced back to a plain block and the
   two-up arrangement is done one level up, on the field wrapper, where it is
   explicit and cannot be re-ordered by auto-placement. */
.woocommerce form .form-row {
  display: block;
  float: none;
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
}
.woocommerce form .form-row label {
  display: block;
  margin-bottom: 6px;
}
.woocommerce form .form-row .woocommerce-input-wrapper {
  display: block;
  width: 100%;
}
.woocommerce .woocommerce-billing-fields__field-wrapper,
.woocommerce .woocommerce-shipping-fields__field-wrapper,
.woocommerce .woocommerce-additional-fields__field-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 18px;
}
/* Address, city, email and the order notes need the full width. */
.woocommerce form .form-row-wide,
.woocommerce form .form-row.notes {
  grid-column: 1 / -1;
}

/* ---------- Checkout layout ---------- */
/* form.checkout has exactly three children: #customer_details, the
   #order_review_heading <h3>, and #order_review. Left to auto-placement in a
   two-column grid the heading lands beside the billing card and the order
   review drops underneath it in the LEFT column - the right side then looks
   empty even though the markup is all there. Each child is therefore placed
   explicitly. */
.woocommerce-checkout form.checkout {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  column-gap: 40px;
  align-items: start;
}
.woocommerce-checkout form.checkout > #customer_details {
  grid-column: 1;
  grid-row: 1 / span 2;
  min-width: 0;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}
.woocommerce-checkout form.checkout > #order_review_heading { grid-column: 2; grid-row: 1; margin: 0 0 18px; }
.woocommerce-checkout form.checkout > #order_review { grid-column: 2; grid-row: 2; min-width: 0; }
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 { width: 100%; float: none; }
.woocommerce-checkout h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-cocoa);
}

/* ---------- Order review / payment ---------- */
.woocommerce-checkout #order_review {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 28px;
}
.woocommerce-checkout #order_review table.shop_table {
  box-shadow: none;
  background: transparent;
}
.woocommerce-checkout .order-total .amount {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--c-coral);
}
.woocommerce-checkout #payment {
  background: var(--c-cream-soft);
  border-radius: var(--radius-md);
  margin-top: 24px;
}
.woocommerce-checkout #payment ul.payment_methods {
  border-bottom: 1px solid #f0e6d4;
  padding: 20px;
  margin: 0;
}
.woocommerce-checkout #payment ul.payment_methods li {
  list-style: none;
  font-family: var(--font-body);
  color: var(--c-cocoa);
}
.woocommerce-checkout #payment div.payment_box {
  background: #fff;
  border-radius: var(--radius-sm);
  color: var(--c-cocoa-soft);
  font-size: .92rem;
}
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: #fff; }
.woocommerce-checkout #payment div.form-row.place-order { padding: 20px; margin: 0; }
.woocommerce-checkout #payment #place_order {
  width: 100%;
  justify-content: center;
  font-size: 1.05rem;
  padding: 16px 28px;
}
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
  font-size: .9rem;
  color: var(--c-cocoa-soft);
}

/* ---------- Block notices ---------- */
/* Even with the classic cart and checkout shortcodes, WooCommerce renders its
   "added to your cart" and coupon notices with the block notice banner, which
   ships its own blue border. These are the same notices as .woocommerce-message
   above, so they get the same treatment. */
.wc-block-components-notice-banner {
  border: none !important;
  border-left: 4px solid var(--c-leaf) !important;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-cocoa);
  font-family: var(--font-body);
  box-shadow: var(--shadow-sm);
}
.wc-block-components-notice-banner.is-error { border-left-color: var(--c-coral) !important; }
.wc-block-components-notice-banner.is-info { border-left-color: var(--c-sky) !important; }
.wc-block-components-notice-banner > svg { fill: var(--c-leaf); }
.wc-block-components-notice-banner.is-error > svg { fill: var(--c-coral); }

/* The shop sort dropdown sits outside any .form-row, so it misses the field
   rules above and would otherwise render as a raw browser select. */
.woocommerce .woocommerce-ordering select {
  padding: 10px 14px;
  border: 2px solid #f0e6d4;
  border-radius: 12px;
  background: var(--c-cream-soft);
  font-family: var(--font-body);
  color: var(--c-cocoa);
}
.woocommerce .woocommerce-ordering select:focus {
  outline: none;
  border-color: var(--c-coral);
  background: #fff;
}

/* ---------- Order received / account ---------- */
.woocommerce .woocommerce-order,
.woocommerce-account .woocommerce {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 32px;
}
.woocommerce ul.order_details {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 0;
  margin: 0 0 28px;
  list-style: none;
}
.woocommerce ul.order_details li {
  border: none;
  padding: 0;
  margin: 0;
  font-family: var(--font-body);
  color: var(--c-cocoa-soft);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.woocommerce ul.order_details li strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--c-cocoa);
  text-transform: none;
  letter-spacing: 0;
}
/* The downloads table is how her eBook buyers get their file - it must not look
   like an afterthought. */
.woocommerce table.order_details_table,
.woocommerce .woocommerce-table--order-downloads { margin-bottom: 28px; }

/* ---------- Breadcrumb ---------- */
.woocommerce .woocommerce-breadcrumb {
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--c-cocoa-soft);
  margin-bottom: 24px;
}
.woocommerce .woocommerce-breadcrumb a { color: var(--c-coral); text-decoration: none; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  /* Collapse to one column and release the explicit placements above, or the
     order review would stay pinned to a column that no longer exists. */
  .woocommerce-checkout form.checkout { grid-template-columns: 1fr; row-gap: 28px; }
  .woocommerce-checkout form.checkout > #customer_details,
  .woocommerce-checkout form.checkout > #order_review_heading,
  .woocommerce-checkout form.checkout > #order_review {
    grid-column: 1;
    grid-row: auto;
  }
  .woocommerce .woocommerce-billing-fields__field-wrapper,
  .woocommerce .woocommerce-shipping-fields__field-wrapper,
  .woocommerce .woocommerce-additional-fields__field-wrapper {
    grid-template-columns: 1fr;
  }
  .woocommerce-checkout form.checkout > #customer_details,
  .woocommerce-checkout #order_review,
  .woocommerce .cart-collaterals .cart_totals,
  .woocommerce .woocommerce-order { padding: 20px; }
  .woocommerce table.shop_table td,
  .woocommerce table.shop_table th { padding: 12px; }
  /* The cart table has six columns and will not fit; let it scroll rather than
     squeeze thumbnails and prices into unreadable slivers. */
  .woocommerce table.cart { display: block; overflow-x: auto; }
  .woocommerce .coupon { width: 100%; }
}

/* ==========================================================================
   Delivery-first checkout

   Classes used by woocommerce/checkout/form-checkout.php and form-shipping.php.
   Same structure as the Globalgood build, dressed in Linda's tokens.
   ========================================================================== */

/* WooCommerce still needs billing email/phone in the DOM - inc/checkout.php
   fills them from the delivery block - so they are hidden, never removed. */
.lindamazzia-hidden-field { display: none !important; }

/* The ship-to-different-address checkbox must EXIST and stay CHECKED or
   WooCommerce never posts the shipping address and the checkout offers no
   shipping methods at all. Hidden with CSS, because a CSS-hidden field still
   submits while a disabled or removed one does not. Do not switch this to
   display:none on the input's container, and never replace it with a hidden
   input - checkout.js tests it with :checked. */
.lm-ship-flag {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.lm-delivery-heading,
.lm-download-heading {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-cocoa);
  margin: 0 0 6px;
}

.lm-section-hint,
.lm-download-hint {
  font-size: .9rem;
  color: var(--c-cocoa-soft);
  margin: 0 0 20px;
}

/* "My billing address is different" - her field styling, so it reads as part
   of the form rather than a bolted-on control. */
.billing-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 22px 0 6px;
  padding: 14px 16px;
  background: var(--c-cream-soft);
  border: 2px solid #f0e6d4;
  border-radius: 12px;
}
.billing-toggle input {
  margin-top: 4px;
  flex-shrink: 0;
  accent-color: var(--c-coral);
}
.billing-toggle label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  color: var(--c-cocoa);
  cursor: pointer;
  margin: 0;
}
.billing-toggle small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: .85rem;
  color: var(--c-cocoa-soft);
  margin-top: 3px;
}
#lm-billing-wrap h3 { margin-top: 26px; }

/* Shipping method rows: name left, price right, on one line. */
.ship-name {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--c-cocoa);
}
.ship-price {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-coral);
  white-space: nowrap;
  margin-left: 8px;
}

/* An eBook order is delivered to the email address, so a typo there is a paid
   order that never arrives. The note is given weight deliberately. */
.lm-email-field .description {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  border-left: 3px solid var(--c-gold);
  background: rgba(245, 184, 46, .10);
  border-radius: var(--radius-sm);
  font-size: .86rem;
  line-height: 1.5;
  color: var(--c-cocoa-soft);
}
.lm-email-field input[type="email"] { font-weight: 600; }

/* Field hints under phone/email in the delivery block. */
.woocommerce form .form-row .description {
  display: block;
  margin-top: 6px;
  font-size: .84rem;
  color: var(--c-cocoa-soft);
}

/* ==========================================================================
   Delivery-first checkout

   Classes used by woocommerce/checkout/form-checkout.php and form-shipping.php.
   Same structure as the Globalgood build, dressed in Linda's tokens.
   ========================================================================== */

/* WooCommerce still needs billing email/phone in the DOM - inc/checkout.php
   fills them from the delivery block - so they are hidden, never removed. */
.lindamazzia-hidden-field { display: none !important; }

/* The ship-to-different-address checkbox must EXIST and stay CHECKED or
   WooCommerce never posts the shipping address and the checkout offers no
   shipping methods at all. Hidden with CSS, because a CSS-hidden field still
   submits while a disabled or removed one does not. Never replace it with an
   input type=hidden - checkout.js tests it with :checked. */
.lm-ship-flag {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.lm-delivery-heading,
.lm-download-heading {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-cocoa);
  margin: 0 0 6px;
}

.lm-section-hint,
.lm-download-hint {
  font-size: .9rem;
  color: var(--c-cocoa-soft);
  margin: 0 0 20px;
}

/* "My billing address is different" - her field styling, so it reads as part
   of the form rather than a bolted-on control. */
.billing-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 22px 0 6px;
  padding: 14px 16px;
  background: var(--c-cream-soft);
  border: 2px solid #f0e6d4;
  border-radius: 12px;
}
.billing-toggle input {
  margin-top: 4px;
  flex-shrink: 0;
  accent-color: var(--c-coral);
}
.billing-toggle label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  color: var(--c-cocoa);
  cursor: pointer;
  margin: 0;
}
.billing-toggle small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: .85rem;
  color: var(--c-cocoa-soft);
  margin-top: 3px;
}
#lm-billing-wrap h3 { margin-top: 26px; }

/* Shipping method rows: name left, price right, on one line. */
.ship-name {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--c-cocoa);
}
.ship-price {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-coral);
  white-space: nowrap;
  margin-left: 8px;
}

/* An eBook order is delivered to the email address, so a typo there is a paid
   order that never arrives. The note is given weight deliberately. */
.lm-email-field .description {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  border-left: 3px solid var(--c-gold);
  background: rgba(245, 184, 46, .10);
  border-radius: var(--radius-sm);
  font-size: .86rem;
  line-height: 1.5;
  color: var(--c-cocoa-soft);
}
.lm-email-field input[type="email"] { font-weight: 600; }

/* Field hints under phone/email in the delivery block. */
.woocommerce form .form-row .description {
  display: block;
  margin-top: 6px;
  font-size: .84rem;
  color: var(--c-cocoa-soft);
}

/* Field hints must be readable, not a tooltip.
   WooCommerce styles .description inside .woocommerce-input-wrapper as an
   absolutely-positioned popup that is display:none until the field is focused,
   with a selector that outranks a plain .form-row .description rule. These
   hints carry real instructions - "Required by our printer for delivery" - so
   they are pinned open underneath the field instead. */
.woocommerce form .form-row .woocommerce-input-wrapper .description {
  display: block;
  position: static;
  margin: 6px 0 0;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  color: var(--c-cocoa-soft);
  font-size: .84rem;
  line-height: 1.45;
}
.woocommerce form .form-row .woocommerce-input-wrapper .description::before { display: none; }

/* The Lulu phone rule sets form-row-wide and wins over the form-row-first set
   later, so the phone takes a full line. The email matches it rather than
   being left stranded at half width beside empty space - both are long values
   that read better on their own line anyway. */
#shipping_email_field,
#billing_email_field { grid-column: 1 / -1; }

/* ---------- What the customer typed ----------
   Their own answers should read weighted and dark; an empty field stays quiet.
   :placeholder-shown separates the two with no JavaScript. Carried over from
   the Globalgood checkout, where it was introduced for the same reason.

   Selects are weighted unconditionally because they always show a value, and a
   field with no placeholder attribute never matches :placeholder-shown - which
   is harmless, since an empty field has no letters to weight. */
.woocommerce form .form-row input.input-text:not(:placeholder-shown),
.woocommerce form .form-row textarea:not(:placeholder-shown),
.woocommerce form .form-row select,
.woocommerce .select2-container .select2-selection--single .select2-selection__rendered,
.woocommerce .quantity .qty,
.woocommerce .coupon #coupon_code:not(:placeholder-shown) {
  font-weight: 600;
  letter-spacing: .1px;
  color: var(--c-cocoa);
}

/* ---------- Variation selector (Format: Paperback / Hardcover / eBook) ----------
   This select lives in a <table class="variations"> inside form.cart, NOT in a
   .form-row, so the field rules further up never reach it and it renders as a
   bare browser dropdown. It is the single most important control on a product
   page here - it chooses the binding - so it gets the full field treatment. */
.woocommerce div.product form.cart .variations select {
  padding: 12px 16px;
  border: 2px solid #f0e6d4;
  border-radius: 12px;
  background: var(--c-cream-soft);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--c-cocoa);
  min-width: 230px;
  max-width: 100%;
}
.woocommerce div.product form.cart .variations select:focus {
  outline: none;
  border-color: var(--c-coral);
  background: #fff;
}
.woocommerce div.product form.cart .variations th.label label {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-cocoa);
}
/* The price that appears once a format is chosen. */
.woocommerce div.product .woocommerce-variation-price .price {
  font-family: var(--font-display);
  color: var(--c-coral);
}
/* Add to cart is disabled until a format is picked - make that read as waiting,
   not broken. */
.woocommerce div.product form.cart .button.disabled,
.woocommerce div.product form.cart .button:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- Covers read as BOOKS, not flat pictures ----------
   Same treatment as .live-book-inner img on the home page: a stack of 1px
   shadows down the right edge that reads as page thickness, a soft spine line
   on the left, and a floating drop shadow. Done in CSS rather than baked into
   the artwork so one flat cover file serves the shop, the product page and the
   cart without three separate exports.

   The gallery needs right-hand padding or the page edges are clipped by the
   wrapper's overflow. */
.woocommerce div.product div.images { padding-right: 16px; }
.woocommerce div.product div.images .woocommerce-product-gallery__image img,
.woocommerce div.product div.images img.wp-post-image {
  border-radius: 3px 10px 10px 3px;
  box-shadow:
    1px 0 0 #d4c3a5, 2px 0 0 #fdf6e3, 3px 0 0 #d4c3a5,
    4px 0 0 #fdf6e3, 5px 0 0 #d4c3a5, 6px 0 0 #fdf6e3,
    7px 0 0 #d4c3a5, 8px 0 0 #fdf6e3, 9px 0 0 #d4c3a5,
    10px 0 0 #fdf6e3, 11px 0 0 #c9b48f,
    inset 6px 0 8px -4px rgba(0,0,0,0.18),
    24px 38px 45px rgba(45,28,15,0.32);
}

/* Shop grid thumbnails get the same idea at a smaller scale - a full 11px
   stack on a 260px thumbnail would read as a border, not pages. */
.woocommerce ul.products li.product img {
  border-radius: 3px 8px 8px 3px;
  box-shadow:
    1px 0 0 #d4c3a5, 2px 0 0 #fdf6e3, 3px 0 0 #d4c3a5,
    4px 0 0 #fdf6e3, 5px 0 0 #d4c3a5, 6px 0 0 #c9b48f,
    inset 4px 0 6px -3px rgba(0,0,0,0.18),
    10px 16px 22px rgba(45,28,15,0.26);
}

/* Cart and checkout line-item thumbnails: a hint of the same, scaled right down. */
.woocommerce table.cart img,
.woocommerce-checkout #order_review img {
  border-radius: 2px 5px 5px 2px;
  box-shadow:
    1px 0 0 #d4c3a5, 2px 0 0 #fdf6e3, 3px 0 0 #c9b48f,
    4px 6px 10px rgba(45,28,15,0.22);
}

/* WooCommerce clears its float layout with ul.products::before/::after set to
   display:table. The shop grid above is CSS grid, and in a grid container those
   pseudo-elements become REAL GRID ITEMS - the ::before silently occupied cell
   one, pushing the first book into column two and wrapping the third onto a
   second row with an empty space where it should have been. */
.woocommerce ul.products::before,
.woocommerce ul.products::after { content: none; display: none; }

/* ---------- Format chooser buttons ----------
   The native select stays in the DOM (WooCommerce reads it to resolve the
   variation) but is hidden - see assets/js/variation-buttons.js. */
.lm-format-select-hidden {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  pointer-events: none !important;
}
.lm-format-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 2px 0 4px;
}
.lm-format-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 128px;
  padding: 12px 18px;
  cursor: pointer;
  background: var(--c-cream-soft);
  border: 2px solid #f0e6d4;
  border-radius: 14px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-cocoa);
  text-align: left;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.lm-format-btn:hover {
  border-color: var(--c-coral);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.lm-format-btn.is-selected {
  background: #fff;
  border-color: var(--c-coral);
  box-shadow: 0 0 0 3px rgba(233, 75, 60, .14), var(--shadow-sm);
}
.lm-format-name { font-size: 1rem; line-height: 1.2; }
.lm-format-price {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .95rem;
  color: var(--c-coral);
  line-height: 1.2;
}
/* WooCommerce prints a del/ins pair inside price_html; keep it on one line. */
.lm-format-price .woocommerce-Price-amount { font-family: var(--font-body); }
.lm-format-price del { opacity: .5; margin-right: 4px; }
.lm-format-price ins { text-decoration: none; }

/* With buttons doing the work, the variations table should not look like a form
   row any more. */
.woocommerce div.product form.cart .variations,
.woocommerce div.product form.cart .variations tbody,
.woocommerce div.product form.cart .variations tr,
.woocommerce div.product form.cart .variations td,
.woocommerce div.product form.cart .variations th {
  display: block;
  width: auto;
  padding: 0;
  border: none;
  background: none;
}
.woocommerce div.product form.cart .variations th.label { margin-bottom: 8px; }
.woocommerce div.product form.cart .variations .reset_variations {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--c-coral);
}

@media (max-width: 520px) {
  .lm-format-options { gap: 8px; }
  .lm-format-btn { flex: 1 1 100%; min-width: 0; }
}

/* "Your order" must sit directly under its heading.
   #customer_details spans both rows, so with implicit row sizing the browser
   splits ITS height across them: a 25px heading was getting a 249px row and the
   order table started a quarter of the way down the page. Sizing row 1 to its
   content and giving row 2 the remainder fixes it without touching the span. */
.woocommerce-checkout form.checkout { grid-template-rows: auto 1fr; }

/* Product, shop and cart images are now the book MOCKUPS from the home page
   shelf - they already carry their own page edges, spine and shadow in the
   artwork. The CSS page-edge stack earlier in this file would draw a second set
   on top, so it is switched off wherever the mockup is shown. Keep the CSS
   version in mind if a flat cover is ever used in these slots again. */
.woocommerce div.product div.images .woocommerce-product-gallery__image img,
.woocommerce div.product div.images img.wp-post-image,
.woocommerce ul.products li.product img,
.woocommerce table.cart img,
.woocommerce-checkout #order_review img {
  border-radius: var(--radius-sm);
  box-shadow: none;
}
.woocommerce div.product div.images { padding-right: 0; }

/* Book cover beside each line in the checkout order review. WooCommerce has no
   image column there, so the cover is prepended to the name - these rules put
   the two back into a row. */
.lm-review-item { display: flex; align-items: center; gap: 12px; }
.lm-review-thumb { flex: 0 0 auto; line-height: 0; }
.lm-review-thumb .lm-review-thumb-img,
.lm-review-thumb img {
  width: 52px;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 10px rgba(45, 28, 15, .22);
  display: block;
}
.lm-review-name { flex: 1 1 auto; min-width: 0; }
.woocommerce-checkout #order_review td.product-name { vertical-align: middle; }
