/* Shared colours and sizing keep the visual system easy to adjust. */
:root {
  --paper: #faf9f6;
  --ink: #282a2c;
  --muted: #686a6c;
  --line: #deddd8;
  --accent: #496782;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.container, .header-inner { width: min(1360px, 90%); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { font-size: 25px; font-weight: 800; letter-spacing: 3px; }
.wordmark span { color: var(--accent); }
nav { display: flex; align-items: center; gap: 34px; font-size: 14px; }
nav a { padding-block: 12px; }
nav .active { color: var(--accent); border-bottom: 2px solid var(--accent); }
nav button { border: 0; padding: 10px 0; background: none; color: var(--muted); opacity: 1; }
.language-switch, nav .language-switch { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 44px; min-height: 44px; padding: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.language-switch svg { display: block; }
.language-switch:hover { border-color: var(--accent); color: var(--accent); }
.welcome-caption { margin-left: auto; }
.cart { display: flex; align-items: center; gap: 6px; }
.cart-count { font-size: 12px; }
/* Catalogue-only preview. It touches the icon's hover area so it stays open
   while moving into the panel, and fits inside narrow viewports. */
.cart-preview-anchor { position: relative; }
.cart-preview { position: absolute; top: 100%; right: 0; z-index: 20; width: 340px; max-width: calc(100vw - 32px); padding: 20px; border: 1px solid var(--line); background: var(--paper); box-shadow: 0 12px 28px #282a2c1a; }
.cart-preview h2 { margin: 0 0 16px; font-size: 18px; font-weight: 600; }
.cart-preview-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start; }
.cart-preview-item img { display: block; width: 64px; height: 80px; object-fit: cover; }
.cart-preview-item h3 { margin: 0 0 8px; font-size: 14px; line-height: 1.4; font-weight: 600; }
.cart-preview p { margin: 0 0 8px; font-size: 13px; line-height: 1.5; }
.cart-preview-options { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 8px; margin-bottom: 10px; }
.cart-preview-options label { display: grid; gap: 4px; min-width: 0; font-size: 12px; color: var(--muted); }
.cart-preview-options select { width: 100%; min-width: 0; min-height: 44px; padding: 6px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; }
.cart-preview-remove { display: inline-flex; align-items: center; gap: 6px; padding: 0; font-size: 13px; }
.cart-preview-remove svg { flex-shrink: 0; }
#cart-preview-feedback { margin-top: 12px; }
#cart-preview-feedback:empty { display: none; }
.cart-preview .cart-preview-link { display: block; margin-top: 16px; text-align: center; }
.primary-button, .secondary-button { min-height: 44px; padding: 12px 20px; border: 1px solid var(--ink); cursor: pointer; }
.primary-button { background: var(--ink); color: var(--paper); }
.secondary-button { background: var(--paper); color: var(--ink); }
.primary-button:disabled { opacity: 0.55; cursor: not-allowed; }
.text-link, .text-button { text-decoration: underline; text-underline-offset: 4px; }
.text-button { min-height: 44px; border: 0; background: none; color: var(--ink); cursor: pointer; }
select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.collection-heading { padding: 66px 0 46px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 2px; }
h1 { margin: 18px 0; font-size: clamp(34px, 4vw, 52px); font-weight: 500; letter-spacing: -2px; }
.collection-heading > p:last-child { color: var(--muted); font-size: 16px; line-height: 1.6; }
.collection-bar { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-block: 8px; font-size: 13px; }
#product-count { color: var(--muted); }

/* Four columns on desktop, two on tablets, one on small phones. */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 42px 24px; margin: 12px 0 72px; padding: 0; list-style: none; }
.product-image { position: relative; background: #ebe9e4; aspect-ratio: 4 / 5; overflow: hidden; }
.product-card-link { display: block; }
.product-card-default { outline: 2px solid var(--accent); outline-offset: 8px; border-radius: 2px; }
.catalogue-default-note { margin: 14px 0 0; padding: 12px; border-left: 3px solid var(--accent); background: #edf1f5; color: var(--ink); font-size: 13px; line-height: 1.5; }
.product-card-link:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
.product-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-fit { margin: 19px 0 9px; font-size: 12px; color: var(--muted); }
.product-colour { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
/* Catalogue cards read as title/price, garment details, colours, then reviews. */
.product-card .product-title { margin-top: 16px; }
.product-card-details { margin: 7px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
/* Share the same colour swatches between catalogue cards and product options. */
.colour-swatch { display: inline-block; flex-shrink: 0; width: 16px; height: 16px; border: 1px solid #929492; border-radius: 50%; }
.swatch-white { background: #fff; }
.swatch-black { background: #222; }
.swatch-grey { background: #929292; }
.swatch-navy { background: #284b73; }
.swatch-burgundy { background: #782f40; }
.catalogue-colours { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; padding: 0; border: 0; min-width: 0; }
.catalogue-colour-option { display: inline-flex; align-items: center; justify-content: center; position: relative; width: 32px; height: 32px; cursor: pointer; }
.catalogue-colour-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.catalogue-colours .colour-swatch { width: 18px; height: 18px; }
.catalogue-colour-option:hover .colour-swatch { border-color: var(--ink); }
.catalogue-colour-option input:checked + .colour-swatch { outline: 1px solid var(--ink); outline-offset: 3px; }
.catalogue-colour-option input:focus-visible + .colour-swatch { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Quick add uses the preview colour and an explicit size, without opening the product. */
.catalogue-add-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: end; gap: 8px; margin-top: 14px; }
.catalogue-card-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.catalogue-card-actions .primary-button { flex: 1; }
.product-card-default .catalogue-add-form { grid-template-columns: minmax(0, 1fr); }
.catalogue-size-label { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 12px; }
.catalogue-size-label select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 0; background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; }
.catalogue-size-label select[aria-invalid="true"] { border-color: #a43b32; }
.catalogue-add-form button { padding: 10px 12px; font-size: 13px; }
.catalogue-cart-feedback { margin: 8px 0 0; font-size: 12px; line-height: 1.5; }
.catalogue-cart-feedback:empty { margin: 0; }
.catalogue-cart-result { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.catalogue-cart-result .catalogue-cart-feedback { flex: 1 1 160px; }
.catalogue-cart-result .catalogue-cart-feedback:empty { display: none; }
.catalogue-view-cart { margin-top: 8px; font-size: 13px; white-space: nowrap; }
/* Compact cues appear only on the target; badges do not change image sizing. */
.catalogue-image-nudge-slot { position: absolute; top: 12px; left: 12px; right: 12px; }
.catalogue-image-badge { display: inline-block; padding: 6px 10px; background: #faf9f6; color: var(--ink); border: 1px solid var(--line); font-size: 12px; font-weight: 600; line-height: 1.3; }
.catalogue-image-badge.nudge-environmental_label { border-color: #94bca0; background: #edf6ee; color: #24573a; }
.catalogue-leaf { display: inline-flex; align-items: center; gap: 5px; }
.catalogue-leaf svg { flex-shrink: 0; }
.nudge-panel { padding: 16px; border: 1px solid var(--line); }
.nudge-panel h2 { margin: 0 0 8px; font-size: 16px; font-weight: 600; line-height: 1.4; }
.nudge-panel p { margin: 0; font-size: 14px; line-height: 1.6; }
.nudge-panel.nudge-environmental_label { padding: 18px; border-color: #94bca0; border-left: 4px solid #3d7a4b; border-radius: 8px; background: #edf6ee; color: #24573a; }
.nudge-environmental_label h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: #1c5a3a; font-weight: 700; }
.sustainability-icon, .shopper-icon, .overall-pick-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; height: 36px; border-radius: 50%; background: #d7ead9; color: #327044; }
.sustainability-features { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.6; }
.sustainability-features li + li { margin-top: 8px; }
.sustainability-features li::marker { color: #3d7a4b; }
.nudge-panel.nudge-social_norm { padding: 18px; border-color: #adc8ad; border-left: 4px solid #6b9766; border-radius: 8px; background: #f0f7ef; color: #315a37; }
.catalogue-image-badge.nudge-social_norm, .catalogue-image-badge.nudge-overall_pick { border-color: #adc8ad; background: #f0f7ef; color: #315a37; }
.catalogue-image-badge.nudge-overall_pick, .catalogue-image-badge.nudge-social_norm { display: inline-flex; align-items: center; gap: 5px; }
.catalogue-image-badge.nudge-overall_pick svg, .catalogue-image-badge.nudge-social_norm svg { flex-shrink: 0; }
.nudge-social_norm h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 700; }
.nudge-social_norm p { font-size: 15px; }
.shopper-icon, .overall-pick-icon { background: #e0eddb; color: #497345; }
/* Full product panels and compact catalogue badges keep their own sizing. */
.nudge-panel.nudge-overall_pick { padding: 18px; border-color: #adc8ad; border-left: 4px solid #6b9766; border-radius: 8px; background: #f0f7ef; color: #315a37; }
.nudge-overall_pick h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-weight: 700; }
.default-choice-note { padding: 10px 12px; border: 1px solid var(--line); font-size: 13px; }
.product-title { display: flex; align-items: baseline; justify-content: flex-start; gap: 8px; }
.product-title h2 { margin: 0; font-size: 15px; line-height: 1.5; font-weight: 500; }
.product-title p { margin: 0; font-size: 14px; white-space: nowrap; }
.rating { margin: 10px 0 0; font-size: 12px; line-height: 1.5; }
.rating > span:last-child { color: var(--muted); }
.star { color: var(--accent); margin-right: 3px; }
/* Catalogue and product pages share the same rating display.
   The orange fill represents the actual fractional score, for example 4.2/5.
   The parent label announces the score and review count once to screen readers. */
.rating-display { display: flex; align-items: center; gap: 7px; margin-top: 8px; }
.rating-display .rating-value { font-size: 13px; }
.rating-display .rating-stars { position: relative; display: inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 18px; line-height: 1; letter-spacing: 1px; white-space: nowrap; }
.rating-display .rating-stars-empty { color: #d6d3cc; }
.rating-display .rating-stars-filled { position: absolute; top: 0; left: 0; width: var(--rating-fill); overflow: hidden; color: #de7900; }
.rating-display .rating-count { color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); padding-block: 28px; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; }
.footer-brand { color: var(--ink); letter-spacing: 2px; font-weight: 700; }
.skip-link { position: absolute; top: -60px; left: 16px; padding: 12px; background: var(--paper); }
.skip-link:focus { top: 12px; }

@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .header-inner { min-height: 82px; gap: 12px; flex-wrap: wrap; padding-block: 12px; }
  .wordmark { font-size: 18px; letter-spacing: 1.5px; }
  nav { gap: 16px; font-size: 12px; flex-wrap: wrap; }
  .welcome-caption { display: none; }
  .collection-heading { padding: 38px 0 26px; }
  .product-grid { grid-template-columns: 1fr; gap: 32px; margin-bottom: 44px; }
  .site-footer { flex-wrap: wrap; }
}
