/* R14 design tokens v2, tune here */
:root {
  /* scale */
  --cc-space-1: 0.25rem;
  --cc-space-2: 0.5rem;
  --cc-space-3: 0.75rem;
  --cc-space-4: 1rem;
  --cc-space-5: 1.5rem;
  --cc-space-6: 2rem;
  --cc-space-7: 2.5rem;
  --cc-space-8: 3rem;
  --cc-font-xs: 0.75rem;
  --cc-font-sm: 0.875rem;
  --cc-font-md: 1rem;
  --cc-font-lg: 1.125rem;
  --cc-font-xl: 1.375rem;
  --cc-font-2xl: 1.75rem;
  --cc-radius-sm: 0.25rem;
  --cc-radius-md: 0.5rem;
  --cc-radius-lg: 0.75rem;
  --cc-radius-pill: 62.5rem;
  /* layout */
  --cc-container-max: 120rem;
  --cc-container-gutter: clamp(1rem, 0.5rem + 2vw, 2.5rem);   /* v3.1: fluid, never touches the viewport edge */
  --cc-card-min: 18rem;
  --cc-grid-gap: 1rem;
  --cc-panel-w: clamp(15rem, 12rem + 6vw, 20rem);   /* v3: left panel, fluid */
  --cc-touch-min: 2.75rem;                          /* v3 */
  --cc-sheet-max-h: 60dvh;                          /* v3: mobile bottom sheet */
  --cc-border: rgba(0, 0, 0, 0.1);                  /* v3.2: neutral hairline colour (section divider) */
  --cc-card-img-ratio: 1 / 1;                       /* v3.1: product card image box */
  --cc-toolbar-h: 3rem;
  /* header geometry (contract header-offset v3) */
  --cc-header-main-h: 4.5rem;
  --cc-header-search-row-h: 0rem;
  --cc-header-nav-h: 2.5rem;
  --cc-header-h: 7rem;            /* = main + search-row + nav; MUST equal the rendered fixed header */
  --cc-logo-h: 2.5rem;
  --cc-search-h: 2.5rem;
  --cc-search-font: 1rem;
  --cc-nav-font: 1rem;
  --cc-nav-weight: 600;
  /* v1 names kept, converted to rem (same computed px at a 16 pixel root) */
  --cc-font-base: 1rem;
  --cc-content-max: 87.5rem;      /* product page only; shop/home/header use --cc-container-max */
  --cc-page-pad: 1.5rem;
  --cc-gap: 1rem;
  --cc-radius: 0.5rem;
  --cc-card-pad: 0.75rem;
  --cc-card-brand-size: 0.6875rem;
  --cc-card-title-size: 0.875rem;
  --cc-card-title-weight: 500;
  --cc-card-price-size: 1.125rem;
  --cc-card-btn-h: 2.125rem;
  --cc-hero-h: 20rem;
  --cc-hero-arrow: 2.5rem;
  --cc-section-gap: 2.5rem;
  --cc-pdp-title-size: 1.75rem;
  --cc-pdp-price-size: 1.75rem;
  --cc-pdp-btn-h: 3rem;
}

@media not all and (min-width: 48em) {
  :root {
    --cc-card-min: 9.5rem;
    --cc-grid-gap: 0.75rem;
    --cc-header-main-h: 3.25rem;
    --cc-header-search-row-h: 0rem;
    --cc-header-nav-h: 0rem;
    --cc-header-h: 3.25rem;
    --cc-logo-h: 1.875rem;
    --cc-page-pad: 1rem;
    --cc-gap: 0.75rem;
    --cc-hero-h: 12.5rem;
    --cc-section-gap: 1.5rem;
    --cc-pdp-title-size: 1.375rem;
    --cc-pdp-price-size: 1.5rem;
  }
}

body, button, input, select, textarea { font-size: var(--cc-font-base, 1rem); }

.cc-card-brand { font-size: var(--cc-card-brand-size, 0.6875rem); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #6b7280; line-height: 1.4; min-height: 1.4em; margin: 0 0 0.125rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; }

.xchange-price-display .xchange-msrp { text-decoration: line-through; color: #999; font-size: 1rem; font-weight: 400; margin-bottom: 0.25rem; }
.xchange-price-display .xchange-current-price { font-size: var(--cc-pdp-price-size, 1.75rem); font-weight: 700; color: #888888; margin-bottom: 0.5rem; line-height: 1.2; }
.xchange-price-display .xchange-savings { background: linear-gradient(135deg, #E53935 0%, #FF6600 100%); color: #fff; font-size: 0.875rem; font-weight: 700; padding: 0.375rem 0.75rem; border-radius: 0.375rem; display: inline-block; letter-spacing: 0.03125rem; }
.xchange-price-compact .xchange-msrp-compact { text-decoration: line-through; color: #999; font-size: 0.75rem; display: block; margin-bottom: 0.125rem; }
.xchange-price-compact .xchange-current-price-compact { font-size: var(--cc-card-price-size, 1.125rem); font-weight: 700; color: #333; display: block; line-height: 1.2; }
.xchange-price-compact .xchange-discount-badge { background: #E53935; color: #fff; font-size: 0.6875rem; font-weight: 700; padding: 0.125rem 0.375rem; border-radius: 0.1875rem; display: inline-block; margin-top: 0.25rem; }

/* R14 card actions row (contact-price v4): price left, button right; stacks on narrow cards. No nowrap/ellipsis/clamp on the label. */
ul.products li.product { container: cc-card / inline-size; }
.cc-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cc-space-2, 0.5rem); margin-top: auto; }
.cc-card-actions .price { flex: 1 1 100%; min-width: 0; margin: 0; }
.cc-card-actions .button { flex: 1 1 100%; margin: 0; }
/* Container queries measure the cc-card's CONTENT box, which is exactly the actions box (the li padding and border sit outside it).
   16rem is the measured minimum for a 2-line "Contact us for price" beside "View details" (D30, shop-layout v2.2a). */
@container cc-card (inline-size >= 16rem) {
  .cc-card-actions { flex-wrap: nowrap; }
  .cc-card-actions > .price { flex: 1 1 0; min-width: 0; margin: 0; }
  .cc-card-actions > .button { flex: 0 0 auto; white-space: nowrap; padding-inline: var(--cc-space-3, 0.75rem); }
}
