/* Palette: navy + cream carry the site, coral is reserved for clickable buttons only.
   Editorial structure: serif display type, square corners, rules. Colour comes from navy bands and beige panels. */
:root {
  --navy: #14213d;
  --navy-2: #1f3057;
  --blue: #2f4a85;
  --cream: #f4ede0;
  --cream-2: #ebe1ce;
  --cream-3: #ddd0b6;
  --paper: #fbf7ef;
  --coral: #ff6b58;
  --coral-hover: #ff8576;

  --bg: var(--cream);
  --text: var(--navy);
  --muted: #566080;
  --rule: var(--navy);
  --line: rgba(20, 33, 61, 0.2);
  --accent: var(--blue);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --r: 8px;      /* buttons, fields, small tiles */
  --r-lg: 14px;  /* cards, panels, big photos; bands (header, hero, footer) stay square */
  color-scheme: light;
}

/* navy bands re-map the text tokens, so every component inside just works */
.site-header, .site-footer, .hero {
  --text: var(--cream);
  --muted: #b6bed3;
  --rule: rgba(244, 237, 224, 0.5);
  --line: rgba(244, 237, 224, 0.3);
  --accent: var(--cream);
  background: var(--navy);
  color: var(--text);
}

* { box-sizing: border-box; }

html { scrollbar-color: #8c96b3 var(--cream); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--navy); color: var(--cream); }
.site-header ::selection, .site-footer ::selection, .hero ::selection { background: var(--cream); color: var(--navy); }
input, textarea { caret-color: var(--blue); }

a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -0.01em; text-wrap: balance; margin: 0 0 16px; }
h1 { font-size: clamp(2.2rem, 7vw, 4.6rem); }
h2 { font-size: 0.8rem; font-family: var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; border-top: 2px solid var(--navy); padding-top: 14px; margin: 72px 0 24px; }
h3, .card-title { font-family: var(--serif); font-size: 1.25rem; line-height: 1.2; margin: 6px 0 8px; }
p { text-wrap: pretty; }
.muted { color: var(--muted); font-size: 1rem; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 40px; padding-bottom: 96px; min-height: 60vh; }

/* masthead */
.site-header { border-bottom: 0; }
.bar { display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.brand { font-family: var(--serif); font-size: 1.7rem; letter-spacing: 0.01em; text-decoration: none; margin-right: auto; }
.nav { display: flex; gap: 8px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; text-decoration: none; border-bottom: 2px solid transparent; transition-property: border-color, color; transition-duration: 150ms; transition-timing-function: var(--ease); }
.nav a:hover { border-bottom-color: var(--text); }
.nav a[aria-current="page"] { border-bottom-color: var(--text); font-weight: 600; }
.site-footer { padding: 40px 0 48px; color: var(--muted); font-size: 0.9rem; }
.site-footer strong, .site-footer a { color: var(--text); }
.foot { display: flex; gap: 32px; flex-wrap: wrap; justify-content: space-between; }

/* buttons: the only place coral lives. Primary = solid coral, secondary = outline that fills coral on hover. */
.btn, .phone { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 1.5px solid var(--text); border-radius: var(--r); font: inherit; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; text-decoration: none; cursor: pointer; background: transparent; color: var(--text); transition-property: scale, background-color, border-color, color, box-shadow; transition-duration: 150ms; transition-timing-function: var(--ease); }
.btn:hover { background: var(--coral); border-color: var(--coral); color: var(--navy); }
.btn:active, .phone:active { scale: 0.96; }
.btn.primary, .phone { background: var(--coral); border-color: var(--coral); color: var(--navy); box-shadow: 0 6px 16px rgba(255, 107, 88, 0.28); }
.btn.primary:hover, .phone:hover { background: var(--coral-hover); border-color: var(--coral-hover); box-shadow: 0 8px 20px rgba(255, 107, 88, 0.4); }
.phone { min-height: 44px; padding: 0 18px; font-size: 0.9rem; letter-spacing: 0.04em; text-transform: none; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.site-header :focus-visible, .site-footer :focus-visible, .hero :focus-visible { outline-color: var(--cream); }

/* home: navy hero, full bleed */
.hero { margin-top: -40px; padding: 72px 0 56px; box-shadow: 0 0 0 100vmax var(--navy); clip-path: inset(0 -100vmax); }
.hero h1 { max-width: 14ch; }
.hero p { max-width: 46ch; font-family: var(--serif); font-size: 1.3rem; line-height: 1.5; color: var(--text); }
.hero .actions { margin-bottom: 0; }

/* numbered index of collections, on a beige panel */
.chips { list-style: none; counter-reset: idx; padding: 4px 24px; margin: 0; background: var(--cream-2); border-radius: var(--r-lg); }
.chips li { counter-increment: idx; border-bottom: 1px solid var(--line); }
.chips li:last-child { border-bottom: 0; }
.chips a { display: flex; align-items: baseline; gap: 20px; min-height: 56px; padding: 12px 0; text-decoration: none; font-family: var(--serif); font-size: 1.5rem; transition-property: padding-left, color; transition-duration: 200ms; transition-timing-function: var(--ease); }
.chips a::before { content: counter(idx, decimal-leading-zero); font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.1em; color: var(--blue); font-weight: 600; font-variant-numeric: tabular-nums; }
.chips a .muted { margin-left: auto; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.chips a:hover { padding-left: 8px; color: var(--blue); }

/* filters: beige panel with boxed fields */
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px 16px; margin: 24px 0 32px; padding: 20px; background: var(--cream-2); border-radius: var(--r-lg); }
.field { min-height: 44px; padding: 0 12px; border: 1px solid var(--cream-3); border-radius: var(--r); background: var(--paper); font: inherit; color: var(--text); transition-property: border-color; transition-duration: 150ms; transition-timing-function: var(--ease); }
.field:hover, .field:focus { border-color: var(--navy); }

/* grid + cards: paper tiles, image first */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 32px 24px; }
.card { display: block; overflow: hidden; border-radius: var(--r-lg); text-decoration: none; background: var(--paper); border: 1px solid var(--cream-3); transition-property: box-shadow, translate, border-color; transition-duration: 200ms; transition-timing-function: var(--ease); }
.card:hover { border-color: var(--navy); box-shadow: 0 14px 28px rgba(20, 33, 61, 0.14); translate: 0 -2px; }
.card-body { padding: 14px 16px 16px; }
.card-title { transition-property: color; transition-duration: 150ms; transition-timing-function: var(--ease); }
.card:hover .card-title { color: var(--blue); }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }

.thumb { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: linear-gradient(160deg, hsl(var(--hue) 28% 82%), hsl(var(--hue) 30% 62%)); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition-property: scale; transition-duration: 400ms; transition-timing-function: var(--ease); }
.card:hover .thumb img { scale: 1.03; }
.thumb::after { content: ""; position: absolute; inset: 0; outline: 1px solid rgba(20, 33, 61, 0.24); outline-offset: -1px; pointer-events: none; }
.thumb.big { box-shadow: 0 10px 28px rgba(20, 33, 61, 0.12); border-radius: var(--r-lg); }
.card .thumb { border-radius: 0; }

/* availability: small tinted tags */
.badge { display: inline-block; padding: 2px 8px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; white-space: nowrap; background: #d6dff1; color: var(--navy); border-radius: 4px; }
.badge.on_order { background: #ead9ad; color: #5e4208; }
.badge.out_of_stock { background: var(--cream-3); color: #4a5370; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 64px; padding-top: 20px; border-top: 2px solid var(--navy); }

/* product */
.crumbs { margin-bottom: 24px; }
.product { display: grid; gap: 40px; }
.thumb.big { aspect-ratio: 4 / 3; }
.thumb.big img { scale: 1 !important; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; }
.thumb-btn { padding: 0; border: 0; background: none; cursor: pointer; opacity: 0.55; transition-property: opacity, scale; transition-duration: 150ms; transition-timing-function: var(--ease); }
.thumb-btn:hover, .thumb-btn[aria-current="true"] { opacity: 1; }
.thumb-btn:active { scale: 0.96; }
.thumb-btn[aria-current="true"] { outline: 2px solid var(--navy); outline-offset: 3px; }
.thumbs img { display: block; width: 72px; height: 72px; object-fit: cover; outline: 1px solid rgba(20, 33, 61, 0.24); outline-offset: -1px; border-radius: var(--r); }
.price { font-family: var(--serif); font-size: 1.6rem; color: var(--blue); margin: 20px 0 8px; }
.specs { display: grid; grid-template-columns: max-content 1fr; margin: 32px 0; padding: 4px 20px; background: var(--cream-2); border-radius: var(--r-lg); }
.specs dt, .specs dd { padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
.specs dt:nth-last-of-type(1), .specs dd:last-of-type { border-bottom: 0; }
.specs dt { color: var(--muted); padding-right: 32px; font-size: 0.875rem; }
.specs dd { font-variant-numeric: tabular-nums; }

main a:not(.btn):not(.card):not(.chips a) { text-underline-offset: 4px; text-decoration-thickness: 1px; text-decoration-color: rgba(47, 74, 133, 0.45); transition-property: text-decoration-color, color; transition-duration: 150ms; transition-timing-function: var(--ease); }
main a:not(.btn):not(.card):not(.chips a):hover { text-decoration-color: currentColor; color: var(--blue); }

/* filters apply on change when JS is available */
.js .filters button[type="submit"] { display: none; }

@media (min-width: 800px) {
  .product { grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
  .thumb.big { aspect-ratio: 4 / 5; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .card-title, .chips a, .btn, .phone, .thumb img, .thumb-btn { transition-duration: 0.01ms; }
}

@media (max-width: 760px) {
  .bar .brand { order: 1; width: auto; margin-right: auto; }
  .bar .phone { order: 2; margin-left: auto; }
  .bar .nav { order: 3; flex: 1 1 100%; flex-wrap: wrap; }
  .hero { padding: 48px 0 40px; }
  .brand { font-size: 1.5rem; }
  .phone { padding: 0 12px; font-size: 0.85rem; letter-spacing: 0.02em; }
  .bar { gap: 4px 12px; }
}

/* gentle page fade-in: opacity only, never blocks navigation */
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
main { animation: page-in 200ms var(--ease) both; }
.prose { max-width: 60ch; font-family: var(--serif); font-size: 1.2rem; line-height: 1.6; }
.nav { flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { main { animation: none; } }

/* styled dropdowns (filters): boxed field, paper list, navy selection */
.dd { position: relative; }
.dd-native { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; overflow: hidden; }
.dd-btn { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; cursor: pointer; color: var(--muted); }
.dd.has-value .dd-btn { color: var(--text); border-color: var(--navy); }
.dd-btn::after { content: ""; flex: none; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; rotate: 45deg; translate: 0 -2px; transition-property: rotate, translate; transition-duration: 150ms; transition-timing-function: var(--ease); }
.dd.open .dd-btn { border-color: var(--navy); }
.dd.open .dd-btn::after { rotate: 225deg; translate: 0 2px; }
.dd-list { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 100%; width: max-content; max-width: 320px; max-height: 320px; overflow-y: auto; margin: 0; padding: 6px 0; list-style: none; background: var(--paper); border: 1px solid var(--navy); border-radius: var(--r); box-shadow: 0 14px 28px rgba(20, 33, 61, 0.18); visibility: hidden; opacity: 0; translate: 0 -4px; transition-property: opacity, translate, visibility; transition-duration: 140ms, 140ms, 0s; transition-delay: 0s, 0s, 140ms; transition-timing-function: var(--ease); }
.dd.open .dd-list { visibility: visible; opacity: 1; translate: 0 0; transition-delay: 0s; }
.dd-list li { display: flex; align-items: center; min-height: 44px; padding: 8px 16px; cursor: pointer; line-height: 1.3; }
.dd-list li.dd-empty { color: var(--muted); }
.dd-list li.active { background: var(--cream-2); }
.dd-list li.dd-empty[aria-selected="true"] { color: var(--muted); font-weight: 400; background: transparent; }
.dd-list li[aria-selected="true"] { background: var(--navy); color: var(--cream); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .dd-list, .dd-btn::after { transition-duration: 0.01ms; transition-delay: 0s; } }

/* site search */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.search { display: flex; align-items: center; align-self: center; border-bottom: 1px solid var(--line); transition-property: border-color; transition-duration: 150ms; transition-timing-function: var(--ease); }
.search:hover, .search:focus-within { border-bottom-color: var(--text); }
.search input[type="search"] { -webkit-appearance: none; appearance: none; border: 0; border-radius: 0; background: transparent; font: inherit; font-size: 0.95rem; min-height: 44px; width: 150px; padding: 0 4px; color: var(--text); outline: none; }
.search input[type="search"]::placeholder { color: var(--muted); }
.search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.search button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 0; background: none; color: var(--text); cursor: pointer; transition-property: color, scale; transition-duration: 150ms; }
.search button:hover { color: var(--blue); }
.site-header .search button:hover { color: #fff; }
.search button:active { scale: 0.96; }
.search-wide { max-width: 680px; margin: 20px 0 8px; border-bottom: 0; gap: 12px; }
.search-wide:hover, .search-wide:focus-within { border-bottom: 0; }
.search-wide input[type="search"] { flex: 1; width: auto; min-height: 52px; font-size: 1.2rem; border-bottom: 2px solid var(--navy); }
.search-wide .btn { color: var(--navy); }
@media (max-width: 760px) {
  .bar .search { order: 4; flex: 1 1 100%; }
  .bar .search input[type="search"] { flex: 1; width: auto; }
}
