/* =============================================================
   product-fix.css — Screenshot-verified Mobile Fixes
   Merry Christmas Decors
   Verified on: iPhone 16 Pro Max (430px) · Samsung Galaxy A55 (393px)
   Load order: main.css → product-cro.css → responsive.css → product-fix.css
   ============================================================= */

/* =============================================================
   SECTION 0 — GLOBAL BASE GUARDS (always applied)
   ============================================================= */

/* Prevent any element from causing horizontal scroll */
*, *::before, *::after {
  box-sizing: border-box !important;
}

html, body {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

/* All form inputs: prevent iOS Safari zoom (requires 16px minimum) */
input, input[type="number"], input[type="text"], input[type="email"],
input[type="tel"], input[type="search"], select, textarea {
  font-size: 16px !important;
}

/* =============================================================
   SECTION 1 — HEADER & NAVIGATION
   Screenshot issue: header compact but brand name overflows on
   very small screens; hamburger + cart + search need proper spacing
   ============================================================= */

.site-header {
  /* iOS notch: add safe area to top */
  padding-top: env(safe-area-inset-top, 0px) !important;
}

@media (max-width: 430px) {
  .header-inner {
    padding: 0 4px !important;
    gap: 8px !important;
    min-height: 60px !important;
  }
  .brand-word {
    font-size: 1rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 160px !important;
  }
  .icon-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
  }
}

@media (max-width: 375px) {
  .brand-word {
    font-size: 0.9rem !important;
    max-width: 130px !important;
  }
  .header-inner {
    gap: 6px !important;
  }
}

/* =============================================================
   SECTION 2 — PROMO RIBBON
   Screenshot: ribbon height is good; ensure it never causes overflow
   ============================================================= */

.promo-ribbon {
  max-width: 100vw !important;
  overflow: hidden !important;
  position: relative !important;
}

/* =============================================================
   SECTION 3 — CAMPAIGN BANNER (11.11 Countdown)
   Screenshot issue: on 393–430px the banner wraps correctly but
   the coupon button is too wide and pushes layout; countdown
   blocks are slightly too large.
   ============================================================= */

@media (max-width: 767px) {
  .campaign-banner {
    padding: 10px 0 !important;
  }

  .campaign-banner-inner {
    flex-direction: column !important;
    gap: 8px !important;
    padding: 0 16px !important;
    align-items: center !important;
    text-align: center !important;
  }

  .campaign-title {
    font-size: clamp(0.82rem, 4vw, 0.95rem) !important;
    line-height: 1.3 !important;
  }

  .campaign-countdown {
    gap: 4px !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
  }

  .countdown-block {
    min-width: 34px !important;
    max-width: 40px !important;
    padding: 4px 5px !important;
    border-radius: 6px !important;
  }

  .countdown-num {
    font-size: 0.95rem !important;
    line-height: 1 !important;
  }

  .countdown-unit {
    font-size: 8px !important;
    margin-top: 1px !important;
  }

  .countdown-sep {
    font-size: 1rem !important;
    margin-top: 2px !important;
  }

  .campaign-coupon {
    padding: 7px 12px !important;
    gap: 6px !important;
    width: 100% !important;
    justify-content: center !important;
    border-radius: 8px !important;
  }

  .campaign-coupon .coupon-code {
    font-size: 0.88rem !important;
  }

  .campaign-coupon .coupon-action {
    font-size: 10.5px !important;
  }
}

@media (max-width: 430px) {
  .campaign-banner-inner {
    padding: 0 12px !important;
    gap: 7px !important;
  }
  .campaign-title {
    font-size: clamp(0.78rem, 3.8vw, 0.9rem) !important;
  }
}

@media (max-width: 375px) {
  .campaign-banner {
    padding: 8px 0 !important;
  }
  .campaign-title {
    font-size: 0.78rem !important;
  }
  .countdown-block {
    min-width: 30px !important;
    padding: 3px 4px !important;
  }
  .countdown-num {
    font-size: 0.85rem !important;
  }
}

@media (max-width: 320px) {
  .campaign-title {
    font-size: 0.72rem !important;
  }
  .countdown-num {
    font-size: 0.8rem !important;
  }
}

/* =============================================================
   SECTION 4 — BREADCRUMB
   Screenshot: breadcrumb wraps on mobile, long product title should
   truncate gracefully
   ============================================================= */

.breadcrumb ol {
  flex-wrap: wrap !important;
  align-items: center !important;
}

@media (max-width: 767px) {
  .breadcrumb {
    padding: 10px 0 2px !important;
    overflow: hidden !important;
  }
  .breadcrumb ol {
    font-size: 11.5px !important;
    gap: 2px !important;
  }
  .breadcrumb li:last-child,
  .breadcrumb [aria-current="page"] {
    max-width: 55vw !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-block !important;
  }
}

@media (max-width: 375px) {
  .breadcrumb li:last-child,
  .breadcrumb [aria-current="page"] {
    max-width: 45vw !important;
  }
}

/* =============================================================
   SECTION 5 — GALLERY
   Screenshot: gallery looks good; ensure thumbs scroll cleanly
   without horizontal overflow
   ============================================================= */

.gallery-thumbs {
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  scroll-snap-type: x mandatory !important;
  overscroll-behavior-x: contain !important;
}

.gallery-thumbs::-webkit-scrollbar {
  display: none !important;
}

.gallery-thumb {
  scroll-snap-align: start !important;
  flex-shrink: 0 !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

.gallery-main img,
#gallery-main-img {
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
}

/* =============================================================
   SECTION 6 — PRODUCT LABELS (badge row above title)
   Screenshot issue: 4 badges all on one line look very cramped.
   At 393–430px they should wrap to 2 rows max with smaller text.
   ============================================================= */

.product-labels {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  margin-bottom: 10px !important;
  max-width: 100% !important;
}

.plabel {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

@media (max-width: 767px) {
  .plabel {
    font-size: 10.5px !important;
    padding: 3px 9px !important;
    letter-spacing: 0.03em !important;
  }
}

@media (max-width: 430px) {
  .product-labels {
    gap: 4px !important;
    margin-bottom: 8px !important;
  }
  .plabel {
    font-size: 10px !important;
    padding: 3px 8px !important;
  }
}

@media (max-width: 375px) {
  .plabel {
    font-size: 9.5px !important;
    padding: 2px 7px !important;
  }
}

/* =============================================================
   SECTION 7 — PRODUCT TITLE (H1)
   Screenshot issue: at 393–430px the title is too large, pushing
   key buying info below the fold. Must be readable but compact.
   ============================================================= */

.product-info h1 {
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  -webkit-hyphens: auto !important;
  hyphens: auto !important;
  max-width: 100% !important;
  line-height: 1.25 !important;
  margin-bottom: 10px !important;
}

@media (max-width: 1024px) {
  .product-info h1 {
    font-size: clamp(1.4rem, 3.2vw, 2rem) !important;
  }
}

@media (max-width: 767px) {
  .product-info h1 {
    font-size: clamp(1.2rem, 5.2vw, 1.6rem) !important;
    line-height: 1.28 !important;
    margin-bottom: 8px !important;
  }
}

@media (max-width: 430px) {
  .product-info h1 {
    font-size: clamp(1.1rem, 5vw, 1.4rem) !important;
    line-height: 1.3 !important;
    margin-bottom: 6px !important;
  }
}

@media (max-width: 393px) {
  .product-info h1 {
    font-size: clamp(1.05rem, 5.2vw, 1.3rem) !important;
  }
}

@media (max-width: 375px) {
  .product-info h1 {
    font-size: clamp(1rem, 5.5vw, 1.25rem) !important;
  }
}

@media (max-width: 320px) {
  .product-info h1 {
    font-size: 1rem !important;
    line-height: 1.35 !important;
  }
}

/* =============================================================
   SECTION 8 — VENDOR & META
   ============================================================= */

.vendor {
  font-size: 11px !important;
  margin-bottom: 5px !important;
}

@media (max-width: 430px) {
  .product-meta {
    gap: 10px !important;
    font-size: 12px !important;
    margin-bottom: 10px !important;
  }
}

/* =============================================================
   SECTION 9 — COUPON CALLOUT (above price)
   Screenshot issue: on mobile the coupon callout stacks correctly
   but has too much padding and the pill button is too large.
   ============================================================= */

@media (max-width: 767px) {
  .coupon-callout {
    padding: 10px 12px !important;
    gap: 6px !important;
    border-radius: 10px !important;
    margin: 8px 0 10px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .coupon-callout-icon {
    font-size: 18px !important;
  }
  .coupon-callout-text p {
    font-size: 12.5px !important;
    margin: 0 !important;
  }
  .coupon-code-pill {
    font-size: 12px !important;
    padding: 7px 12px !important;
    min-height: 36px !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
  }
}

@media (max-width: 430px) {
  .coupon-callout {
    padding: 9px 10px !important;
  }
  .coupon-callout-text p {
    font-size: 12px !important;
  }
}

/* =============================================================
   SECTION 10 — PRICE BLOCK
   Screenshot: price block looks good on mobile. Minor refinements.
   ============================================================= */

.price-block {
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 767px) {
  .price-block {
    padding: 12px 14px !important;
    border-radius: 10px !important;
  }
  .price-block-sale-label {
    font-size: 9.5px !important;
    padding: 2px 9px !important;
    margin-bottom: 8px !important;
  }
  .price-block .price-now {
    font-size: 1.55rem !important;
  }
  .price-block .price-was {
    font-size: 0.95rem !important;
  }
  .price-block-note {
    font-size: 11px !important;
    margin-top: 6px !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
  }
  .price-block-note svg {
    width: 12px !important;
    height: 12px !important;
    flex-shrink: 0 !important;
  }
}

/* Availability — MUST stay visible after product.js moves it into price-block */
.price-block .availability,
#availability {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  font-size: 13px !important;
  margin: 8px 0 4px !important;
}

.dot {
  width: 9px !important;
  height: 9px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

/* =============================================================
   SECTION 11 — VARIANT OPTION BUTTONS
   Screenshot issue (critical on Samsung A55): color variant buttons
   overflow their container on 393px screens. Buttons are too large
   and don't wrap properly. Each button needs 44px min touch target.
   ============================================================= */

.option-group {
  width: 100% !important;
  box-sizing: border-box !important;
  margin-bottom: 14px !important;
  overflow: visible !important;
}

.option-label {
  font-size: 13px !important;
  margin-bottom: 8px !important;
  display: block !important;
}

.option-btns {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 7px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  align-content: flex-start !important;
}

.option-btn {
  /* Min 44×44px touch target — Apple HIG / Google Material requirement */
  min-height: 44px !important;
  min-width: 44px !important;
  padding: 8px 14px !important;
  box-sizing: border-box !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  cursor: pointer !important;
  border: 1.5px solid var(--line-strong, #D8C9A6) !important;
  border-radius: 8px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  /* Prevent overflow within flex container */
  flex-shrink: 0 !important;
  max-width: calc(50% - 4px) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  transition: border-color 0.15s ease, background-color 0.15s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Active selected variant — clear visual state */
.option-btn.active {
  border-color: var(--xmas-green, #0C2E25) !important;
  background: var(--xmas-green, #0C2E25) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

/* Unavailable variant */
.option-btn.unavailable {
  opacity: 0.38 !important;
  text-decoration: line-through !important;
  cursor: not-allowed !important;
}

@media (max-width: 767px) {
  .option-btn {
    min-height: 42px !important;
    min-width: 40px !important;
    padding: 7px 12px !important;
    font-size: 13px !important;
    max-width: calc(50% - 4px) !important;
  }
}

@media (max-width: 430px) {
  .option-btns {
    gap: 6px !important;
  }
  .option-btn {
    min-height: 40px !important;
    min-width: 38px !important;
    padding: 6px 10px !important;
    font-size: 12.5px !important;
    border-radius: 7px !important;
    /* Allow 3 columns on 430px */
    max-width: calc(33.333% - 5px) !important;
  }
}

@media (max-width: 393px) {
  .option-btn {
    padding: 6px 9px !important;
    font-size: 12px !important;
    min-height: 38px !important;
  }
}

@media (max-width: 375px) {
  .option-btns {
    gap: 5px !important;
  }
  .option-btn {
    min-height: 38px !important;
    min-width: 36px !important;
    padding: 5px 8px !important;
    font-size: 11.5px !important;
    max-width: calc(33.333% - 4px) !important;
  }
}

@media (max-width: 320px) {
  .option-btn {
    min-height: 36px !important;
    padding: 4px 7px !important;
    font-size: 11px !important;
    max-width: calc(33.333% - 3px) !important;
  }
}

/* =============================================================
   SECTION 12 — URGENCY STRIP
   Screenshot: urgency strip looks good, minor spacing fix
   ============================================================= */

@media (max-width: 767px) {
  .urgency-strip {
    font-size: 12.5px !important;
    padding: 8px 11px !important;
    gap: 6px !important;
    border-radius: 8px !important;
  }
  .stock-bar-wrap {
    margin-top: 6px !important;
    border-radius: 8px !important;
    padding: 8px 11px !important;
  }
  .stock-bar-label {
    font-size: 11px !important;
    margin-bottom: 5px !important;
  }
}

/* =============================================================
   SECTION 13 — BUY ROW (Qty + Add to Cart)
   Screenshot issue (critical): on 393–430px the ATC button text
   gets cramped and may wrap. Qty control takes too much space.
   The two buttons must stay on the same row on all mobile sizes.
   ============================================================= */

.buy-row {
  display: flex !important;
  flex-wrap: nowrap !important; /* ALWAYS keep qty + ATC on same row */
  align-items: stretch !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-bottom: 10px !important;
}

/* Qty control: fixed, never grows */
.qty-control {
  display: flex !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  align-items: center !important;
  width: auto !important;
  min-width: 100px !important;
  max-width: 108px !important;
  border: 1.5px solid var(--line-strong, #D8C9A6) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

.qty-btn {
  width: 36px !important;
  min-width: 36px !important;
  height: 100% !important;
  min-height: 48px !important;
  font-size: 18px !important;
  flex-shrink: 0 !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.qty-input {
  flex: 1 !important;
  min-width: 28px !important;
  text-align: center !important;
  border: 0 !important;
  padding: 0 !important;
  font-weight: 600 !important;
  font-size: 16px !important; /* prevents iOS zoom */
  background: transparent !important;
  -moz-appearance: textfield !important;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

/* ATC button: takes remaining space, text never wraps */
#atc-btn {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  box-sizing: border-box !important;
  min-height: 52px !important;
}

@media (max-width: 767px) {
  .buy-row {
    gap: 8px !important;
    margin-bottom: 8px !important;
  }
  .qty-control {
    min-width: 96px !important;
    max-width: 104px !important;
    border-radius: 10px !important;
  }
  .qty-btn {
    width: 33px !important;
    min-width: 33px !important;
    min-height: 48px !important;
    font-size: 17px !important;
  }
  .qty-input {
    min-width: 26px !important;
  }
  #atc-btn {
    font-size: 14.5px !important;
    padding: 13px 8px !important;
    min-height: 52px !important;
    border-radius: 10px !important;
  }
}

@media (max-width: 430px) {
  .buy-row {
    gap: 7px !important;
  }
  .qty-control {
    min-width: 92px !important;
    max-width: 100px !important;
  }
  .qty-btn {
    width: 32px !important;
    min-width: 32px !important;
    font-size: 16px !important;
  }
  #atc-btn {
    font-size: 14px !important;
    padding: 13px 6px !important;
  }
}

@media (max-width: 393px) {
  .qty-control {
    min-width: 88px !important;
    max-width: 96px !important;
  }
  #atc-btn {
    font-size: 13.5px !important;
    padding: 13px 5px !important;
  }
}

@media (max-width: 375px) {
  .qty-control {
    min-width: 84px !important;
    max-width: 92px !important;
  }
  .qty-btn {
    width: 30px !important;
    min-width: 30px !important;
  }
  #atc-btn {
    font-size: 13px !important;
  }
}

@media (max-width: 320px) {
  /* On 320px only, allow the row to stack */
  .buy-row {
    flex-wrap: wrap !important;
  }
  .qty-control {
    width: 100% !important;
    min-width: unset !important;
    max-width: 100% !important;
    justify-content: center !important;
  }
  #atc-btn {
    width: 100% !important;
    flex: none !important;
    white-space: normal !important;
  }
}

/* =============================================================
   SECTION 14 — BUY NOW BUTTON
   Screenshot: Buy Now button is full-width and looks correct.
   Ensure consistent height with ATC and proper styling.
   ============================================================= */

.buy-now-row {
  width: 100% !important;
  box-sizing: border-box !important;
  margin-bottom: 14px !important;
}

#buy-now-btn,
.buy-now-row .btn-block {
  width: 100% !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  min-height: 52px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

@media (max-width: 767px) {
  #buy-now-btn {
    font-size: 15px !important;
    min-height: 52px !important;
    border-radius: 10px !important;
  }
}

@media (max-width: 430px) {
  #buy-now-btn {
    font-size: 14.5px !important;
  }
}

/* =============================================================
   SECTION 15 — SHIPPING CARD
   Screenshot: shipping card looks good. Minor compact tweaks.
   ============================================================= */

@media (max-width: 767px) {
  .shipping-card {
    padding: 12px 13px !important;
    gap: 10px !important;
    border-radius: 10px !important;
  }
  .shipping-card-body strong {
    font-size: 13px !important;
  }
  .shipping-card-body p {
    font-size: 11.5px !important;
    line-height: 1.5 !important;
  }
  .shipping-card-est {
    font-size: 12px !important;
  }
}

/* =============================================================
   SECTION 16 — TRUST LIST (4 items below shipping)
   Screenshot: trust list correctly displays 1-col on mobile.
   ============================================================= */

@media (max-width: 767px) {
  .trust-list {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-top: 12px !important;
    padding: 12px 0 !important;
  }
  .trust-list li {
    font-size: 13px !important;
    gap: 8px !important;
  }
  .trust-list svg {
    width: 18px !important;
    height: 18px !important;
  }
  .trust-list strong {
    font-size: 13px !important;
  }
  .trust-list span {
    font-size: 12px !important;
  }
}

/* =============================================================
   SECTION 17 — TRUST BADGE PILLS
   Screenshot issue: trust badge pills are cramped and flow into 3+
   rows at 393–430px. Need smaller text, tighter gaps, flex-wrap.
   ============================================================= */

.trust-badges-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  align-items: center !important;
  margin: 12px 0 !important;
}

.trust-badge-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

@media (max-width: 767px) {
  .trust-badges-row {
    gap: 5px !important;
    margin: 10px 0 !important;
  }
  .trust-badge-pill {
    font-size: 11px !important;
    padding: 5px 10px !important;
    gap: 4px !important;
    border-radius: 999px !important;
  }
  .trust-badge-pill svg {
    width: 12px !important;
    height: 12px !important;
  }
}

@media (max-width: 430px) {
  .trust-badge-pill {
    font-size: 10.5px !important;
    padding: 4px 9px !important;
  }
}

@media (max-width: 393px) {
  .trust-badge-pill {
    font-size: 10px !important;
    padding: 4px 8px !important;
  }
}

@media (max-width: 375px) {
  .trust-badge-pill {
    font-size: 9.5px !important;
    padding: 3px 7px !important;
  }
}

/* =============================================================
   SECTION 18 — PAYMENT ICONS
   Screenshot issue: payment icons overflow / wrap messily.
   Show in a clean scrollable or tight-wrapped row.
   ============================================================= */

.payment-icons {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  align-items: center !important;
  margin-top: 10px !important;
}

.payment-icons-label {
  font-size: 10px !important;
  color: var(--muted) !important;
  font-weight: 500 !important;
}

.payment-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 4px !important;
}

@media (max-width: 767px) {
  .payment-icons {
    gap: 4px !important;
    margin-top: 8px !important;
  }
  .payment-icons-label {
    font-size: 9.5px !important;
    flex-basis: 100% !important;
    width: 100% !important;
    margin-bottom: 3px !important;
  }
  .payment-icon {
    height: 18px !important;
    min-width: 28px !important;
    font-size: 7.5px !important;
    padding: 0 3px !important;
    letter-spacing: 0.03em !important;
    border-radius: 3px !important;
  }
}

@media (max-width: 430px) {
  .payment-icon {
    height: 17px !important;
    min-width: 26px !important;
    font-size: 7px !important;
  }
}

/* =============================================================
   SECTION 19 — ACCORDIONS
   Screenshot: accordions look fine. Minor mobile refinements.
   ============================================================= */

@media (max-width: 767px) {
  .accordions {
    margin-top: 14px !important;
  }
  .accordion summary {
    padding: 13px 0 !important;
    font-size: 14.5px !important;
  }
  .accordion-body {
    padding: 0 0 14px !important;
  }
  .accordion-body p {
    font-size: 13.5px !important;
    line-height: 1.6 !important;
  }
}

/* =============================================================
   SECTION 20 — CHRISTMAS PROMO BLOCK
   Screenshot: xmas block stacks correctly. Keep vertical on mobile.
   ============================================================= */

@media (max-width: 767px) {
  .xmas-promo-block {
    padding: 18px 16px !important;
    border-radius: 12px !important;
    margin: 14px 0 !important;
  }
  .xmas-promo-block-inner {
    flex-direction: column !important;
    gap: 14px !important;
  }
  .xmas-promo-copy h3 {
    font-size: 1.05rem !important;
    margin-bottom: 6px !important;
  }
  .xmas-promo-copy p {
    font-size: 13px !important;
    line-height: 1.55 !important;
  }
  .xmas-promo-action .btn {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    min-height: 48px !important;
  }
}

/* =============================================================
   SECTION 21 — REVIEWS SECTION
   Screenshot issue: reviews score/stars/count alignment is off at
   mobile widths. Rating bars need proper width constraint.
   ============================================================= */

@media (max-width: 767px) {
  .reviews-section {
    padding: clamp(32px, 5vw, 52px) 0 !important;
  }

  .reviews-header {
    flex-direction: column !important;
    gap: 16px !important;
    margin-bottom: 20px !important;
    align-items: flex-start !important;
  }

  .reviews-header > div:first-child .eyebrow {
    font-size: 11px !important;
  }

  .reviews-header h2 {
    font-size: clamp(1.2rem, 5vw, 1.6rem) !important;
    margin-top: 4px !important;
  }

  .reviews-summary {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
  }

  .reviews-score {
    font-size: 2.8rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
    color: var(--xmas-green, #0C2E25) !important;
  }

  .reviews-score-detail {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .stars-row {
    display: flex !important;
    gap: 1px !important;
    margin-bottom: 3px !important;
  }

  .stars-row .star {
    font-size: 15px !important;
    color: #E8A020 !important;
  }

  .reviews-count {
    font-size: 12px !important;
    color: var(--muted) !important;
    margin-bottom: 8px !important;
  }

  /* Rating bars: must fit in remaining flex space */
  .rating-bars {
    width: 100% !important;
  }

  .rating-bar-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: 3px !important;
    font-size: 11px !important;
  }

  .rating-bar-row > span:first-child {
    min-width: 22px !important;
    text-align: right !important;
    flex-shrink: 0 !important;
    font-size: 11px !important;
  }

  .rating-bar-track {
    flex: 1 !important;
    min-width: 0 !important;
    height: 5px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
  }

  .rating-bar-row > span:last-child {
    min-width: 14px !important;
    text-align: left !important;
    flex-shrink: 0 !important;
    font-size: 11px !important;
  }

  .reviews-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .review-card {
    padding: 16px !important;
    border-radius: 12px !important;
  }

  .review-card-top {
    margin-bottom: 10px !important;
  }

  .reviewer-info {
    gap: 8px !important;
    align-items: center !important;
  }

  .reviewer-avatar {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    font-size: 13px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
  }

  .reviewer-name {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    display: block !important;
  }

  .reviewer-loc {
    font-size: 11.5px !important;
    color: var(--muted) !important;
    display: block !important;
  }

  .review-verified {
    font-size: 10.5px !important;
    padding: 2px 7px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .review-verified svg {
    width: 12px !important;
    height: 12px !important;
  }

  .review-stars {
    margin-bottom: 5px !important;
  }

  .review-star {
    font-size: 14px !important;
    color: #E8A020 !important;
  }

  .review-title {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    margin-bottom: 5px !important;
  }

  .review-body {
    font-size: 13px !important;
    line-height: 1.55 !important;
    color: var(--muted) !important;
    margin-bottom: 8px !important;
  }

  .review-date {
    font-size: 11px !important;
    color: var(--faint) !important;
  }
}

/* =============================================================
   SECTION 22 — STICKY ATC ENHANCED (bottom bar)
   Screenshot issue: sticky bar on iPhone 16 Pro Max needs iOS
   safe area padding. On 393px Samsung A55 the two buttons need
   to fill the width properly without clipping.
   ============================================================= */

.sticky-atc-enhanced {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  /* iOS safe area inset: prevents overlap with home indicator */
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  z-index: 450 !important;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.14) !important;
}

/* Hide sticky on desktop */
@media (min-width: 1025px) {
  .sticky-atc-enhanced {
    display: none !important;
  }
}

/* Original sticky: always hidden — CRO enhanced replaces it */
#sticky-atc {
  display: none !important;
}

@media (max-width: 767px) {
  .sticky-atc-enhanced-inner {
    padding: 10px 16px !important;
    gap: 8px !important;
    align-items: center !important;
  }

  /* Hide product image on sticky bar on small mobile to save space */
  .sticky-atc-enhanced-img {
    display: none !important;
  }

  /* Title: truncate to 1 line, flex: 1 */
  .sticky-atc-enhanced-info {
    flex: 1 !important;
    min-width: 0 !important;
  }

  #sticky-enh-title {
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    font-size: 11.5px !important;
    white-space: normal !important;
  }

  .sticky-atc-enhanced-price {
    font-size: 13px !important;
    font-weight: 700 !important;
  }

  .sticky-atc-enhanced-compare {
    font-size: 11px !important;
  }

  .sticky-atc-enhanced-actions {
    display: flex !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .sticky-atc-enhanced-actions .btn {
    padding: 10px 12px !important;
    font-size: 13px !important;
    min-height: 44px !important;
    white-space: nowrap !important;
    border-radius: 9px !important;
    touch-action: manipulation !important;
  }
}

@media (max-width: 430px) {
  /* On iPhone 16 Pro Max: hide info, give full width to 2 buttons */
  .sticky-atc-enhanced-info {
    display: none !important;
  }
  .sticky-atc-enhanced-actions {
    width: 100% !important;
    gap: 8px !important;
  }
  .sticky-atc-enhanced-actions .btn {
    flex: 1 !important;
    font-size: 14px !important;
    padding: 13px 8px !important;
    min-height: 48px !important;
    border-radius: 10px !important;
    justify-content: center !important;
  }
}

@media (max-width: 393px) {
  /* Samsung A55: same as 430px but slightly smaller text */
  .sticky-atc-enhanced-actions .btn {
    font-size: 13.5px !important;
    padding: 13px 6px !important;
  }
}

/* =============================================================
   SECTION 23 — PRODUCT PAGE: SAFE BOTTOM PADDING
   Prevents content from being hidden behind sticky ATC bar
   ============================================================= */

@media (max-width: 1024px) {
  .product-info {
    /* Height of sticky bar (~68px) + safe area + buffer */
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* =============================================================
   SECTION 24 — PURCHASE NOTIFICATION
   Must sit above sticky bar; must not block ATC button
   ============================================================= */

.purchase-notif {
  position: fixed !important;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  left: 16px !important;
  right: auto !important;
  z-index: 400 !important;
  max-width: min(300px, calc(100vw - 32px)) !important;
  box-sizing: border-box !important;
}

@media (max-width: 430px) {
  .purchase-notif {
    max-width: calc(100vw - 32px) !important;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* =============================================================
   SECTION 25 — COUPON TOAST
   ============================================================= */

.coupon-toast {
  position: fixed !important;
  bottom: 24px !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(10px) !important;
  opacity: 0 !important;
  z-index: 500 !important;
  max-width: calc(100vw - 32px) !important;
  pointer-events: none !important;
  transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.coupon-toast.show {
  transform: translateX(-50%) translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* =============================================================
   SECTION 26 — RELATED PRODUCTS (product cards at bottom)
   Screenshot: 2-col grid is correct on mobile but cards look
   cramped. Card titles and prices need better mobile sizing.
   ============================================================= */

@media (max-width: 767px) {
  .related {
    padding-bottom: clamp(100px, 12vw, 140px) !important; /* account for sticky ATC */
  }
  .related h2 {
    font-size: clamp(1.2rem, 5vw, 1.5rem) !important;
    margin-bottom: 18px !important;
  }
  .related .grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  .product-card-body {
    padding: 12px !important;
  }
  .product-card-title {
    font-size: 13px !important;
    line-height: 1.35 !important;
  }
  .product-card-price {
    font-size: 14px !important;
    margin-bottom: 8px !important;
  }
  .product-card-actions .btn {
    font-size: 12.5px !important;
    padding: 9px 10px !important;
    min-height: 40px !important;
  }
}

@media (max-width: 375px) {
  .related .grid-4 {
    gap: 10px !important;
  }
  .product-card-body {
    padding: 10px !important;
  }
  .product-card-title {
    font-size: 12px !important;
  }
}

/* =============================================================
   SECTION 27 — FOOTER
   Screenshot: footer looks mostly fine. Minor wrapping fix.
   ============================================================= */

@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .footer-brand p {
    font-size: 13px !important;
    max-width: 100% !important;
  }
  .footer-contact {
    font-size: 12.5px !important;
    line-height: 1.6 !important;
  }
  .footer-col h3 {
    font-size: 13.5px !important;
    margin-bottom: 10px !important;
  }
  .footer-col li {
    margin-bottom: 6px !important;
  }
  .footer-col a {
    font-size: 13px !important;
  }
  .footer-bottom-inner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }
  .footer-bottom p,
  .secure-note {
    font-size: 11.5px !important;
  }
}

/* =============================================================
   SECTION 28 — GLOBAL OVERFLOW SAFETY
   ============================================================= */

/* Nothing escapes horizontally */
.product-layout,
.product-info,
.option-group,
.option-btns,
.buy-row,
.buy-now-row,
.trust-badges-row,
.payment-icons,
.shipping-card,
.urgency-strip,
.stock-bar-wrap,
.coupon-callout,
.price-block,
.xmas-promo-block,
.reviews-section,
.reviews-grid,
.reviews-summary,
.rating-bars,
.related,
.site-footer {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* =============================================================
   SECTION 29 — MOBILE MENU SAFE AREA
   ============================================================= */

@media (max-width: 767px) {
  .mobile-menu {
    padding-top: env(safe-area-inset-top, 0px) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }
}

/* =============================================================
   SECTION 30 — IMAGE & MEDIA SAFETY
   ============================================================= */

img, video, svg, picture, canvas {
  max-width: 100% !important;
  height: auto !important;
}

/* Product gallery main image */
#gallery-main-img {
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  border-radius: inherit !important;
}
