/* 1.5.121 — content-led storefront reflow. Commerce controls are unchanged. */
/* Shared desktop hamburger/header rules live in style.css so checkout
   receives the same navigation correction as the storefront. */
/* Collection names are meaningful content, including at wide desktop sizes. */
html body .hero-collections .category-info h3 {
  white-space: normal; overflow: visible; text-overflow: clip;
  overflow-wrap: anywhere; line-height: 1.4;
}
html body .hero-collections-header { gap: 12px; }
html body .hero-collections-header h2 { min-width: 0; }
html body .hero-collections-header .view-all-toggle { flex-shrink: 0; }
/* The hero becomes two columns at 1025px. Its nested grid must not retain
   the three-column full-width tablet rule in that narrow right-hand column. */
@media (min-width: 1025px) and (max-width: 1100px) {
  html body .hero-collections .categories-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Two readable cards on small tablets; preserve the shopper's comfortable
   density and the deliberately centred single-result catalogue layout. */
@media (min-width: 601px) and (max-width: 767px) {
  html body .products-grid:not([data-density="comfortable"]):not(.products-grid--single) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

/* Purchase shortcut remains usable with enlarged text and long native prices.
   Existing mobile-app ResizeObserver updates the page's bottom reserve. */
@media (max-width: 900px) {
  /* Reset to intrinsic sizing after crossing back from desktop sizing. */
  html body .site-header { height: auto; min-height: 60px; }
  html body .header-inner { height: auto; min-height: 60px; }
  html body .rtf-mobile-purchase { flex-wrap: wrap; gap: 8px 12px; }
  html body .rtf-mobile-purchase > div { flex: 1 1 8rem; overflow-wrap: anywhere; }
  html body .rtf-mobile-purchase .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
}

/* 1.5.126: mobile catalogue count is information, not a badge inside a card.
   Keep the native ordering control full-width and clearly interactive. */
@media (max-width: 600px) {
  html body .collection-page .collection-toolbar {
    display: block;
    padding: 0;
    margin-bottom: 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  html body .collection-page .collection-toolbar-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 0;
  }
  html body .collection-page .toolbar-summary { width: auto; margin: 0; min-width: 0; }
  html body .collection-page .toolbar-summary .catalogue-design-count {
    display: block;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ink-muted);
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  html body .collection-page .catalogue-sort,
  html body .collection-page .catalogue-sort .rtf-choice {
    min-width: 0;
    width: 100%;
  }
}

/* 1.5.127: actionable collection browsing instead of a detached Swipe badge. */
html body .collection-chips-wrap { display:flex; flex-direction:column; gap:8px; }
html body .collection-chips-controls {
  display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap; gap:8px 12px; min-width:0;
}
html body .collection-chips-controls[hidden] { display:none!important; }
.collection-chips-label { color:var(--ink-muted); font-size:.8125rem; font-weight:600; line-height:1.5; }
.collection-chips-arrows { display:flex; gap:8px; margin-inline-start:auto; }
html body .collection-chips-arrows button {
  display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px; padding:0; border:1px solid var(--line);
  border-radius:50%; background:var(--surface-raised); color:var(--ink); cursor:pointer;
}
html body .collection-chips-arrows button:disabled { opacity:.4; cursor:default; }
html body .collection-chips-arrows button:not(:disabled):hover { background:var(--brand-wash); border-color:var(--brand); }
html body .collection-chips-arrows button:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
html body .collection-chips { min-width:0; max-width:100%; scroll-padding-inline:4px; padding:4px; }
html body .collection-chip { scroll-snap-align:start; min-height:44px; }
html body .collection-chip:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
html[dir="rtl"] .collection-chips-arrows .icon { transform:rotate(180deg); }

/* 1.5.130: selected-base facts are supporting information, not another card. */
  html body.single-product .rtf-selected-base {
    margin: 4px 0 12px; padding: 4px 0; padding-inline-start: 12px;
    border: 0; border-inline-start: 2px solid var(--line-strong);
    border-radius: 0; background: transparent; box-shadow: none;
  }
  html body.single-product .rtf-selected-base > strong {
    display: block; font-size: .8125rem; font-weight: 600; line-height: 1.5;
    overflow-wrap: anywhere;
  }
  html body.single-product .rtf-selected-base p {
    margin: 2px 0 0; font-size: .8125rem; line-height: 1.5;
    color: var(--ink-muted); overflow-wrap: anywhere;
  }
  html body.single-product .rtf-selected-base button {
    display: inline-flex; align-items: center; min-height: 44px;
    max-width: 100%; margin-top: 2px; padding: 4px 0;
    font-size: .8125rem; line-height: 1.5; text-align: start;
    white-space: normal; overflow-wrap: anywhere;
  }
  html body.single-product .rtf-selected-base button:focus-visible {
    outline: 2px solid var(--brand); outline-offset: 2px;
  }


/* 1.5.133: compact flowing category metadata; keep every assigned name. */
html body .product-card .product-category.product-category-badges {
  display: block; min-height: 0; margin: 5px 0 0;
  font-size: .75rem; line-height: 1.45; letter-spacing: 0;
  text-transform: none; font-weight: 400; white-space: normal;
}
html body .product-card .product-category-badge {
  display: inline; min-width: 0; max-width: 100%; padding: 0;
  background: transparent; border: 0; border-radius: 0;
  white-space: normal; overflow-wrap: anywhere; line-height: inherit;
}
html body .product-card .product-category-badge:not(:last-child)::after {
  content: ', '; white-space: normal;
}

/* 1.5.131: shared wishlist-list menu, including its body-level portal. */
html body .rtf-choice-list.rtf-choice-list--wishlist-manager {
  box-sizing: border-box; max-width: calc(100vw - 24px);
  padding: 0; border-radius: 10px;
}
html body .rtf-choice-list--wishlist-manager .rtf-choice-list__scroller {
  margin: 4px; padding: 0; scrollbar-gutter: auto;
  max-height: calc(var(--rtf-choice-panel-height) - 10px);
}
html body .rtf-choice-list--wishlist-manager .rtf-choice-option {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border-radius: 6px; box-shadow: none;
  font-size: .875rem; line-height: 1.5; text-align: start;
}
html body .rtf-choice-list--wishlist-manager .rtf-choice-option-copy {
  font-size: inherit; color: inherit;
  display: flex; flex-direction: row; flex-wrap: wrap;
  align-items: baseline; justify-content: flex-start;
  min-width: 0; gap: 2px 8px;
}
html body .rtf-choice-list--wishlist-manager .rtf-choice-option strong {
  min-width: 0; max-width: 100%; overflow: visible;
  font-size: inherit; font-weight: 600; line-height: inherit;
  white-space: normal; overflow-wrap: anywhere; text-overflow: clip;
}
html body .rtf-choice-list--wishlist-manager .rtf-choice-option-meta {
  flex: 0 1 auto; max-width: 100%; padding: 0;
  border: 0; border-radius: 0; background: transparent;
  color: var(--ink-muted); font-size: inherit; font-weight: 400;
  line-height: inherit; white-space: normal; overflow-wrap: anywhere;
}
html body .rtf-choice-list--wishlist-manager .rtf-choice-option[aria-selected="true"] {
  background: var(--brand-wash); color: var(--ink);
}
html body .rtf-choice-list--wishlist-manager .rtf-choice-option:focus-visible {
  outline: 2px solid var(--brand); outline-offset: -2px;
}


/* 1.5.131: smaller edge gap without changing measured dock/purchase clearance. */
html body .back-to-top { --rtf-back-to-top-edge-gap: 8px; }
@media (max-width: 900px) {
  html body .back-to-top,
  html body.has-sticky-buy .back-to-top {
    bottom: max(calc(env(safe-area-inset-bottom, 0px) + 8px), calc(var(--rtf-fixed-height, 0px) + 4px)) !important;
  }
}

/* 1.5.134: desktop-only countdown placement. The wrapper creates no box
   below the existing desktop breakpoint, preserving the previous flow. */
html body .hero .hero-copy { display: contents; }
@media (min-width: 1025px) {
  html body .hero .hero-inner { row-gap: 24px; }
  html body .hero .hero-content { display: contents; }
  html body .hero .hero-copy {
    display: block; grid-column: 1; grid-row: 1 / span 2;
    min-width: 0; animation: heroIn 700ms var(--ease-out) both;
  }
  html body .hero #countdownWrap {
    grid-column: 2; grid-row: 1; align-self: start; justify-self: end;
    min-width: 0; max-width: 100%; margin-top: 0; box-sizing: border-box;
  }
  html body .hero #countdownWrap .countdown-label { flex-wrap: wrap; }
  html body .hero .hero-collections {
    grid-column: 2; grid-row: 2; min-width: 0;
  }
}

/* 1.5.135: quieter, content-sized catalogue actions at every viewport width.
   Auto-fit responds to the card width, not the device; enlarged text can stack. */
html body .product-card .product-card-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr));
  gap: 8px;
  padding-top: 12px;
  align-items: stretch;
}
html body .product-card .product-card-actions :is(.btn-view-product, .quick-add-trigger) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: auto;
  padding: 10px 8px;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: normal;
  border-radius: 10px;
  gap: 6px;
}
html body .product-card .product-card-actions .btn-view-product {
  background: transparent;
  border-color: transparent;
  color: var(--ink-muted);
}
html body .product-card .product-card-actions .btn-view-product .icon {
  display: none;
}
html body .product-card .product-card-actions .btn-view-product:hover {
  color: var(--brand);
  background: var(--brand-tint-soft);
  text-decoration: underline;
  text-underline-offset: .2em;
}
html body .product-card .product-card-actions :is(.btn-view-product, .quick-add-trigger):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -3px;
}
html body .product-card .product-card-actions .quick-add-trigger:focus-visible {
  outline-color: var(--ink-on-brand);
}
@media (forced-colors: active) {
  html body .product-card .product-card-actions :is(.btn-view-product, .quick-add-trigger):focus-visible {
    outline-color: Highlight;
  }
}
