/*
Theme Name:   Heart to Home
Theme URI:    https://heart2home.shop
Description:  Heart to Home child theme for Astra. Carries the Heart to Home design system
              (gold / burgundy / cream, Playfair Display + Inter) and maps WooCommerce's
              default markup onto the existing site's component styles.
Author:       ADONE PTY LTD
Author URI:   https://heart2home.shop
Template:     astra
Version:      1.0.0
Text Domain:  heart-to-home
*/

/*
 * The full design system lives in assets/css/h2h.css — a copy of the original site's
 * css/style.css, enqueued by functions.php. This file only carries what that stylesheet
 * cannot know about: WooCommerce's own markup.
 *
 * Design tokens (defined in h2h.css :root, restated here for reference only):
 *   --gold #C5A55A   --burgundy #722F37   --black #1C1917   --cream #FAFAF9
 *   --font-serif 'Playfair Display'       --font-sans 'Inter'
 */

/* ---------------------------------------------------------------------------
   1. Astra resets — let the H2H system win
   --------------------------------------------------------------------------- */

.ast-container,
.ast-container-fluid {
  max-width: var(--container-width, 1280px);
}

/* Astra sets its own body font stack; ours must take precedence. */
body,
button,
input,
select,
textarea {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: var(--cream);
}

/*
 * Headings inherit their colour rather than hardcoding it. h2h.css sets light
 * text on .section-burgundy and other dark surfaces; a fixed dark colour here
 * would win over that inheritance and leave headings unreadable on them.
 */
h1, h2, h3, h4, h5, h6,
.entry-title,
.woocommerce-loop-product__title,
.product_title {
  font-family: var(--font-serif);
  color: inherit;
}

/* ---------------------------------------------------------------------------
   2. WooCommerce buttons → .btn / .btn-primary
   --------------------------------------------------------------------------- */

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.wp-block-woocommerce-checkout-actions-block button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 36px;
  min-height: 48px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 2px solid var(--gold);
  background: var(--gold);
  color: var(--black);
  text-shadow: none;
  cursor: pointer;
  transition:
    background var(--duration-fast) ease,
    border-color var(--duration-fast) ease,
    color var(--duration-fast) ease,
    transform var(--duration-base) var(--ease-out-back),
    box-shadow var(--duration-base) var(--ease-out-expo);
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--black);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(197, 165, 90, 0.35);
}

/* Secondary / outline actions (continue shopping, update cart) */
.woocommerce a.button.wc-backward,
.woocommerce button[name="update_cart"] {
  background: transparent;
  color: var(--burgundy);
  border-color: rgba(114, 47, 55, 0.4);
}

.woocommerce a.button.wc-backward:hover,
.woocommerce button[name="update_cart"]:hover {
  background: var(--burgundy);
  color: var(--text-light);
  border-color: var(--burgundy);
}

/* Disabled update-cart shouldn't read as a live gold CTA */
.woocommerce button[name="update_cart"]:disabled,
.woocommerce button.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------------------------------------------------------------------------
   3. Product loop → .product-card
   --------------------------------------------------------------------------- */

.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Woo floats its list items and sets percentage widths; grid needs them cleared. */
.woocommerce ul.products li.product {
  width: 100%;
  margin: 0;
  float: none;
  clear: none;
  display: flex;
  flex-direction: column;

  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  transition:
    transform var(--duration-base) var(--ease-out-expo),
    box-shadow var(--duration-base) var(--ease-out-expo);
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.woocommerce ul.products li.product a img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin: 0;
  display: block;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-serif);
  font-size: var(--font-size-lg);
  padding: 24px 24px 8px;
  margin: 0;
}

.woocommerce ul.products li.product .price {
  display: block;
  padding: 0 24px;
  color: var(--burgundy);
  font-family: var(--font-serif);
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.woocommerce ul.products li.product .button {
  margin: 16px 24px 24px;
}

/* Push the CTA to the bottom so cards with different copy lengths still align. */
.woocommerce ul.products li.product .button {
  margin-top: auto;
}

/* Sale / featured flash → .product-badge */
.woocommerce span.onsale {
  position: absolute;
  top: 16px;
  left: 16px;
  right: auto;
  margin: 0;
  min-height: 0;
  min-width: 0;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--burgundy);
  color: var(--text-light);
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.4;
}

/* ---------------------------------------------------------------------------
   4. Single product
   --------------------------------------------------------------------------- */

.woocommerce div.product .product_title {
  font-size: var(--font-size-xl);
  margin-bottom: 12px;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--burgundy);
  font-family: var(--font-serif);
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
  background: var(--cream);
  border-bottom-color: var(--cream);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
  color: var(--burgundy);
}

/* ---------------------------------------------------------------------------
   5. Heart to Home commerce affordances
   --------------------------------------------------------------------------- */

/* Afterpay line — rendered under the price by functions.php */
.h2h-afterpay {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin: 4px 0 16px;
}

.h2h-afterpay strong {
  color: var(--burgundy);
}

/* SKU + item-count meta row */
.h2h-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 8px 24px 0;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/*
 * Dietary badge for festival SKUs.
 * This is a conversion element, not fine print — a Rakhi buyer scanning for
 * "is this safe to send" should find the answer without opening the description.
 */
.h2h-dietary-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--sage);
  border: 1px solid rgba(45, 106, 79, 0.25);
  color: var(--success);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.h2h-dietary-badge::before {
  content: "\2713";
  font-weight: 700;
}

/* Free-shipping threshold nudge */
.h2h-shipping-note {
  font-size: var(--font-size-sm);
  color: var(--success);
  font-weight: 500;
}

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

.woocommerce-cart table.cart,
.woocommerce-checkout .woocommerce-checkout-review-order-table {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.woocommerce table.shop_table th {
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.woocommerce-info,
.woocommerce-message {
  border-top-color: var(--gold);
  background: var(--cream-dark);
}

.woocommerce-info::before,
.woocommerce-message::before {
  color: var(--gold);
}

.woocommerce-error {
  border-top-color: var(--urgency);
  background: var(--cream-dark);
}

.woocommerce-error::before {
  color: var(--urgency);
}

/* ---------------------------------------------------------------------------
   7. Campaign pages (Rakhi, and Diwali / Christmas after it)
   --------------------------------------------------------------------------- */

/* Site-wide campaign banner, sits above the hero on the homepage. */
.h2h-campaign-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
  padding: 12px 24px;
  background: var(--burgundy);
  color: var(--text-light);
  text-decoration: none;
  font-size: var(--font-size-sm);
  text-align: center;
  transition: background var(--duration-fast) ease;
}

.h2h-campaign-banner:hover,
.h2h-campaign-banner:focus {
  background: var(--burgundy-light);
  color: var(--text-light);
}

.h2h-campaign-banner strong {
  color: var(--gold);
  letter-spacing: 0.5px;
}

.h2h-campaign-banner__cta {
  transition: transform var(--duration-fast) ease;
}

.h2h-campaign-banner:hover .h2h-campaign-banner__cta {
  transform: translateX(4px);
}

/*
 * Body copy in full-width sections. Unconstrained, the founding-promise
 * paragraph ran to ~150 characters per line, which is roughly twice a
 * comfortable measure.
 */
.h2h-founding p,
.h2h-newsletter p,
.h2h-how > p,
.h2h-featured > p {
  max-width: 68ch;
  margin-left: auto;
  margin-right: auto;
}

/*
 * Centre these button rows in CSS rather than leaving it to the block's
 * justifyContent layout attribute, so alignment does not depend on Gutenberg
 * emitting its layout stylesheet.
 */
.h2h-featured .wp-block-buttons,
.h2h-newsletter .wp-block-buttons,
.h2h-page-cta .wp-block-buttons {
  justify-content: center;
}

/* Sat left while every section around it was centred. */
.h2h-custom-cta {
  text-align: center;
}

.h2h-custom-cta .wp-block-buttons {
  justify-content: center;
}

.h2h-custom-cta p {
  max-width: 68ch;
  margin-left: auto;
  margin-right: auto;
}

/*
 * Occasion grid. h2h.css uses auto-fit, which wrapped six tiles unevenly and
 * left one stranded on its own row. Fixed column counts keep it balanced.
 */
.h2h-occasions {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .h2h-occasions {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .h2h-occasions {
    grid-template-columns: 1fr;
  }
}

/*
 * The Rakhi tile carries no photograph — there is no Rakhi hamper shot yet, and
 * borrowing another hamper's image would misrepresent what is in the box. A
 * burgundy campaign tile is honest and pulls the eye harder than a stock photo.
 */
.occasion-card--campaign {
  background: linear-gradient(160deg, var(--burgundy), var(--burgundy-dark));
  display: flex;
  align-items: flex-end;
}

.occasion-card--campaign .occasion-overlay {
  background: none;
  position: static;
  width: 100%;
}

.occasion-card--campaign h3,
.occasion-card--campaign p {
  color: var(--text-light);
}

.occasion-card__flag {
  display: inline-block;
  margin-bottom: 8px;
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
}

.h2h-campaign-hero {
  text-align: center;
  padding: 64px 24px 48px;
}

.h2h-eyebrow {
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 16px;
}

.h2h-campaign-hero h1 {
  font-size: var(--font-size-2xl);
  margin: 0 0 20px;
}

.h2h-lede {
  font-size: var(--font-size-md);
  color: var(--text-muted);
  max-width: 62ch;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* Countdown ------------------------------------------------------------- */

.h2h-countdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin: 0 auto 28px;
}

.h2h-countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 84px;
  padding: 16px 12px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border-gold);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.h2h-countdown__value {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--burgundy);
  /* Digits change every second; tabular figures stop the box jittering. */
  font-variant-numeric: tabular-nums;
}

.h2h-countdown__label {
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Once the date passes the JS replaces the contents with a plain sentence. */
.h2h-countdown[data-countdown-state="passed"] {
  display: block;
  font-size: var(--font-size-md);
  color: var(--text-muted);
}

/* Centre the dietary badge when it sits in a campaign hero. */
.h2h-campaign-hero .h2h-dietary-badge {
  margin-left: auto;
  margin-right: auto;
}

/* Sections --------------------------------------------------------------- */

.h2h-why-local,
.h2h-cutoffs,
.h2h-ritual,
.h2h-campaign-products,
.h2h-campaign-cta {
  padding: 48px 24px;
}

.h2h-campaign-cta {
  text-align: center;
  background: var(--cream-dark);
  border-radius: var(--radius-lg);
}

.h2h-why-local h3,
.h2h-ritual h3 {
  font-size: var(--font-size-lg);
  color: var(--burgundy);
  margin-bottom: 8px;
}

/* Order-by table --------------------------------------------------------- */

.h2h-cutoff-table table {
  border-collapse: collapse;
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.h2h-cutoff-table th {
  background: var(--burgundy);
  color: var(--text-light);
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px 18px;
  text-align: left;
}

.h2h-cutoff-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--cream-dark);
}

.h2h-cutoff-table tr:last-child td {
  border-bottom: none;
}

.h2h-cutoff-table td:last-child {
  color: var(--burgundy);
  white-space: nowrap;
}

/*
 * h2h.css strips list markers globally for nav and footer lists. Editorial
 * lists inside page content need them back, or "what's in the box" reads as
 * loose indented text.
 */
.wp-block-list {
  list-style: disc outside;
  padding-left: 1.4em;
  margin: 0 0 16px;
}

.wp-block-list li {
  margin-bottom: 6px;
  list-style: inherit;
}

/* Dietary assurance ------------------------------------------------------ */

.h2h-dietary-note {
  margin-top: 32px;
  padding: 20px 24px;
  border-left: 3px solid var(--success);
  background: var(--sage);
  border-radius: var(--radius);
  color: var(--text-dark);
}

.h2h-empty-note {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  text-align: center;
  margin-top: 24px;
}

/* ---------------------------------------------------------------------------
   8. Content pages (about, delivery, faq, contact, shop)
   --------------------------------------------------------------------------- */

.h2h-page-hero {
  text-align: center;
  padding: 56px 24px 32px;
}

.h2h-page-hero h1 {
  font-size: var(--font-size-xl);
  margin: 0 0 16px;
}

.h2h-section {
  padding: 40px 24px;
}

.h2h-section > h2 {
  margin-bottom: 16px;
}

.h2h-page-cta {
  text-align: center;
  border-radius: var(--radius-lg);
}

.h2h-rounded img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Rate tables (delivery zones, shipping) --------------------------------- */

.h2h-rate-table table {
  border-collapse: collapse;
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.h2h-rate-table th {
  background: var(--burgundy);
  color: var(--text-light);
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px 18px;
  text-align: left;
}

.h2h-rate-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--cream-dark);
}

.h2h-rate-table tr:last-child td {
  border-bottom: none;
}

/* Shop category chips ---------------------------------------------------- */

.h2h-filter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.h2h-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  border-radius: 100px;
  border: 1px solid var(--glass-border-gold);
  background: var(--white);
  color: var(--text-dark);
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-decoration: none;
  transition:
    background var(--duration-fast) ease,
    color var(--duration-fast) ease,
    border-color var(--duration-fast) ease;
}

.h2h-filter-chip:hover,
.h2h-filter-chip:focus {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
}

.h2h-filter-chip.is-active {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--text-light);
}

/* FAQ accordion ---------------------------------------------------------- */

.h2h-faq .wp-block-details {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
}

.h2h-faq .wp-block-details > summary {
  cursor: pointer;
  padding: 18px 22px;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text-dark);
  list-style: none;
  position: relative;
  padding-right: 52px;
}

/* Replace the native disclosure triangle with a chevron that rotates open. */
.h2h-faq .wp-block-details > summary::-webkit-details-marker {
  display: none;
}

.h2h-faq .wp-block-details > summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--gold-dark);
  border-bottom: 2px solid var(--gold-dark);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--duration-fast) ease;
}

.h2h-faq .wp-block-details[open] > summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.h2h-faq .wp-block-details[open] > summary {
  color: var(--burgundy);
}

.h2h-faq .wp-block-details > summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.h2h-faq .wp-block-details > *:not(summary) {
  padding: 0 22px;
}

.h2h-faq .wp-block-details > *:last-child {
  padding-bottom: 20px;
}

.h2h-faq > h2 {
  margin-top: 40px;
}

.h2h-faq > h2:first-child {
  margin-top: 0;
}

/* Legal pages ------------------------------------------------------------ */

/*
 * Long-form policy text. Narrower measure and looser leading than the rest of
 * the site — this is read, not scanned.
 */
.h2h-legal {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.h2h-legal h2 {
  font-size: var(--font-size-lg);
  color: var(--charcoal);
  margin: 2rem 0 1rem;
}

.h2h-legal h2:first-of-type {
  margin-top: 0;
}

.h2h-legal h3 {
  font-size: var(--font-size-md);
  color: var(--charcoal);
  margin: 1.5rem 0 0.75rem;
}

.h2h-legal p {
  margin-bottom: 1rem;
}

/* The "Last updated / ADONE PTY LTD" line that opens every policy. */
.h2h-legal > p:first-child {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  margin-bottom: 2rem;
}

.h2h-legal ul,
.h2h-legal ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.h2h-legal li {
  margin-bottom: 0.4rem;
}

.h2h-legal a {
  color: var(--burgundy);
  text-decoration: underline;
}

/*
 * Policy pages carry rate tables (shipping zones, refund windows). They must
 * scroll inside their own container — otherwise they push the whole page
 * sideways on a phone, which is how the shipping page was overflowing.
 */
.h2h-legal .wp-block-table,
.h2h-legal figure {
  max-width: 100%;
  overflow-x: auto;
  margin: 0 0 1.5rem;
}

.h2h-legal table {
  border-collapse: collapse;
  width: 100%;
}

.h2h-legal th,
.h2h-legal td {
  padding: 10px 14px;
  border: 1px solid var(--cream-dark);
  text-align: left;
}

.h2h-legal th {
  background: var(--cream-dark);
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
}

/* Contact form placeholder ----------------------------------------------- */

.h2h-form-placeholder {
  padding: 20px 24px;
  border-left: 3px solid var(--gold);
  background: var(--cream-dark);
  border-radius: var(--radius);
}

.disclaimer-text {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-top: 24px;
}

/* ---------------------------------------------------------------------------
   9. Mobile — the majority of this traffic arrives from Instagram on a phone
   --------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
  }

  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button,
  .woocommerce #respond input#submit {
    width: 100%;
    padding: 14px 24px;
  }

  .h2h-product-meta {
    padding: 8px 16px 0;
  }

  .h2h-campaign-hero {
    padding: 40px 16px 32px;
  }

  .h2h-why-local,
  .h2h-cutoffs,
  .h2h-ritual,
  .h2h-campaign-products,
  .h2h-campaign-cta {
    padding: 32px 16px;
  }

  /* Four countdown boxes across is too tight below ~420px; two-by-two reads better. */
  .h2h-countdown__unit {
    min-width: 68px;
    padding: 12px 8px;
    flex: 1 1 calc(50% - 16px);
  }

  .h2h-countdown__value {
    font-size: 1.6rem;
  }

  /*
   * The order-by dates are the most important thing on the campaign page.
   * Horizontal scrolling hid half of them, so on narrow screens each row
   * stacks into a labelled block instead — nothing is clipped and nothing
   * needs to be scrolled to.
   */
  .h2h-cutoff-table table,
  .h2h-cutoff-table tbody,
  .h2h-cutoff-table tr,
  .h2h-cutoff-table td {
    display: block;
    width: 100%;
  }

  .h2h-cutoff-table thead {
    /* Visually hidden — the stacked rows are self-describing. */
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .h2h-cutoff-table tr {
    padding: 14px 16px;
    border-bottom: 1px solid var(--cream-dark);
  }

  .h2h-cutoff-table tr:last-child {
    border-bottom: none;
  }

  .h2h-cutoff-table td {
    padding: 0;
    border-bottom: none;
  }

  .h2h-cutoff-table td:first-child {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: 4px;
  }

  .h2h-cutoff-table td:last-child {
    font-family: var(--font-serif);
    font-size: var(--font-size-md);
    /* Must wrap rather than clip — this is the date the sale depends on. */
    white-space: normal;
  }

  .h2h-page-hero {
    padding: 36px 16px 24px;
  }

  .h2h-section {
    padding: 28px 16px;
  }

  /* Delivery rate tables have four columns; let them scroll rather than
     squash the zone names into single characters. */
  .h2h-rate-table {
    overflow-x: auto;
  }

  .h2h-rate-table table {
    min-width: 460px;
  }

  .h2h-faq .wp-block-details > summary {
    padding: 16px 46px 16px 18px;
  }

  .h2h-faq .wp-block-details > *:not(summary) {
    padding: 0 18px;
  }

  /*
   * The builder's 3D preview panels sit in a grid whose gap pushed them a
   * pixel past the viewport. Border-box plus a hard max-width keeps them in.
   */
  .builder-3d-layout,
  .builder-steps-panel,
  .builder-preview-panel,
  .hamper-3d-container,
  .builder-price-bar {
    max-width: 100%;
    box-sizing: border-box;
  }

  .builder-3d-layout {
    overflow-x: hidden;
  }
}

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

/* Respect reduced-motion for the card lift and button transforms. */
@media (prefers-reduced-motion: reduce) {
  .woocommerce ul.products li.product,
  .woocommerce ul.products li.product:hover,
  .woocommerce a.button,
  .woocommerce button.button {
    transition: none;
    transform: none;
  }
}
