/* =============================================================================
   The Tile World — storefront stylesheet
   One file for every storefront page (cached once by the browser).

   Contents
     1. Fonts            7. Header, top bar, mega menu
     2. Design tokens    8. Mobile drawer, dialogs, action bar
     3. Base             9. Footer
     4. Layout          10. Product card
     5. Type            11. Home page
     6. Buttons, forms  12. Listing (category, search)
                        13. Product page
                        14. Content pages (about, contact), messages
                        15. Utilities, responsive, reduced motion

   Breakpoints: 1180px (desktop menu ↔ drawer, 4 → 2 columns), 720px (phone layout).
   ============================================================================= */

/* 1. Fonts — self-hosted variable fonts, latin subset (OFL licensed) ---------- */
@font-face {
  font-family: "Cinzel";
  src: url("../fonts/cinzel-latin-var.7a5ca9201524.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-var.65850a373e25.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* 2. Design tokens — colours from the logo kit (new-logo/README.md) ----------- */
:root {
  --espresso: #2A170A;   /* text, dark bands, primary buttons */
  --walnut: #4E2405;     /* hover on brown */
  --brown: #733F16;      /* links, kickers, sale, secondary buttons (8.6:1 on white) */
  --brown-hover: #5A300F;
  --gold: #DCA76A;       /* hairlines, icons; text only on dark */
  --gold-soft: #E3C9A4;
  --cream: #EAD7C4;      /* promo panels */
  --ivory: #F8F1E8;      /* section ground */
  --emerald: #087B1B;    /* in stock */
  --white: #FFFFFF;
  --ink-2: #4A4640;      /* body copy */
  --muted: #6B655D;      /* secondary text (5.8:1) */
  --line: #E3DCD1;       /* borders, "grout" lines */
  --line-soft: #ECE6DD;
  --field: #D6CFC4;      /* input borders */
  --image-bg: #F1E7DB;   /* behind images while they load */
  --on-dark: #E2D3C1;    /* body text on espresso */
  --on-dark-muted: #B5A08A;
  --on-dark-line: #4A3220;

  --font-display: "Cinzel", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1320px;
  --gutter: 40px;
  --section-space: 104px;
  --radius: 2px;
  --shadow: 0 18px 40px rgba(42, 23, 10, .14);
  --header-sticky-top: 0px;
}

/* 3. Base ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--espresso);
  font: 400 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brown); }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brown); outline-offset: 2px; }
.section--dark :focus-visible, .site-footer :focus-visible { outline-color: var(--gold); }
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; flex: none; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 26px; height: 26px; }

/* 4. Layout ------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-space) 0; }
.section--ivory { background: var(--ivory); }
.section--dark { background: var(--espresso); color: var(--on-dark); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 44px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* 5. Type --------------------------------------------------------------------- */
.kicker {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  font: 600 12px/1.3 var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--brown);
}
.kicker::before { content: ""; width: 24px; height: 1px; background: var(--gold); }
.section--dark .kicker, .kicker--on-dark { color: var(--gold); }
.h-display { font: 500 58px/1.1 var(--font-display); }
.h-section { font: 500 38px/1.12 var(--font-display); }
.h-card { font: 500 20px/1.15 var(--font-display); }
.section--dark .h-section, .section--dark .h-display { color: var(--white); }
.lead { font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.section--dark .lead { color: var(--on-dark); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.text-link {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px;
  border-bottom: 1px solid currentColor; padding-bottom: 3px;
}

/* 6. Buttons, forms ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border: 1px solid transparent; border-radius: var(--radius);
  font-weight: 600; font-size: 15px; line-height: 1.2; text-align: center; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--dark { background: var(--espresso); color: var(--white); }
.btn--dark:hover { background: #3F2512; color: var(--white); }
.btn--brown { background: var(--brown); color: var(--white); }
.btn--brown:hover { background: var(--brown-hover); color: var(--white); }
.btn--outline { background: transparent; border-color: var(--espresso); color: var(--espresso); }
.btn--outline:hover { background: var(--espresso); color: var(--white); }
.btn--light { background: var(--white); color: var(--espresso); }
.btn--light:hover { background: var(--ivory); color: var(--espresso); }
.btn--ghost { background: transparent; border-color: rgba(255, 255, 255, .5); color: var(--white); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 14px; }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--line-soft); border-color: var(--line-soft); color: var(--muted); cursor: not-allowed; }
.btn__note { font-size: 12px; font-weight: 500; opacity: .85; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--field); border-radius: var(--radius);
  background: var(--white); color: var(--espresso); font-size: 16px;
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--espresso); box-shadow: 0 0 0 3px rgba(220, 167, 106, .35); }
.section--dark .input, .section--dark .select {
  background: #3A2213; border-color: var(--on-dark-line); color: var(--white);
}
.section--dark .input::placeholder { color: var(--on-dark-muted); }
.section--dark .field { color: var(--on-dark); }
.check { display: flex; align-items: center; gap: 12px; min-height: 36px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--espresso); }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--field); border-radius: 999px; background: var(--white); font-size: 14px; white-space: nowrap;
}
.chip:hover { border-color: var(--espresso); color: var(--espresso); }
.chip--active { background: var(--ivory); border-color: var(--ivory); font-weight: 500; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px;
  border: 1px solid var(--field); border-radius: var(--radius); background: var(--white); font-size: 15px; font-weight: 500;
}
.pill:hover { border-color: var(--espresso); color: var(--espresso); }
.pill--selected { border: 2px solid var(--espresso); padding: 0 17px; }
.pill--unavailable { color: #9A9286; border-style: dashed; text-decoration: line-through; pointer-events: none; }
.size-icon { display: block; border: 1.5px solid var(--gold); background: #F4EBDF; }

/* 7. Header, top bar, mega menu ----------------------------------------------- */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--white); }
.skip-link:focus { top: 8px; }
.topbar { background: var(--espresso); color: var(--on-dark); font-size: 13px; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 40px; }
.topbar a { color: var(--on-dark); }
.topbar a:hover { color: var(--white); }
.topbar__item { display: inline-flex; align-items: center; gap: 8px; }

.site-header { position: sticky; top: 0; z-index: 40; background: var(--white); border-bottom: 1px solid var(--line-soft); }
.header-bar { display: flex; align-items: center; gap: 32px; min-height: 88px; }
.site-logo { flex: none; }
.site-logo img { width: 240px; height: auto; }
.search-form { flex: 1; max-width: 620px; display: flex; height: 50px; border: 1px solid var(--field); border-radius: var(--radius); background: var(--white); }
.search-form:focus-within { border-color: var(--espresso); box-shadow: 0 0 0 3px rgba(220, 167, 106, .3); }
.search-form input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 14px; background: transparent; font-size: 15px; }
.search-form button { width: 56px; border: 0; background: var(--espresso); color: var(--white); display: grid; place-items: center; }
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.header-action { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; padding: 6px 8px; font-size: 12px; font-weight: 500; background: none; border: 0; }
.icon-button.menu-toggle { display: none; } /* shown below 1180px, where the department menu collapses */

.main-nav__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.main-nav__list { display: flex; align-items: stretch; }
.main-nav__item { position: static; }
.main-nav__trigger {
  display: flex; align-items: center; gap: 4px; height: 52px; padding: 0 10px; border: 0; border-bottom: 2px solid transparent;
  background: none; font: 600 13px/1 var(--font-display); letter-spacing: .03em; text-transform: uppercase; color: var(--espresso);
}
.main-nav__trigger .icon { width: 13px; height: 13px; transition: transform .2s; }
.main-nav__item:hover .main-nav__trigger, .main-nav__trigger[aria-expanded="true"] { border-bottom-color: var(--gold); }
.main-nav__trigger[aria-expanded="true"] .icon { transform: rotate(180deg); }
.main-nav__cta { font-size: 14px; }

/* Closed panels use display:none so their lazy feature photos are not downloaded until a menu opens. */
.mega {
  display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 30;
  background: var(--white); border-top: 1px solid var(--line-soft); box-shadow: 0 24px 40px rgba(42, 23, 10, .12);
}
/* Open on hover (mouse), on keyboard focus inside, or when the button sets aria-expanded (touch, click). */
.main-nav__item:hover > .mega, .main-nav__item:focus-within > .mega, .main-nav__trigger[aria-expanded="true"] + .mega {
  display: block;
}
.mega__inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.4fr); gap: 40px; padding-top: 36px; padding-bottom: 40px; }
.mega__title { margin-bottom: 14px; font: 600 12px/1.3 var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--brown); }
.mega__links a { display: block; padding: 6px 0; font-size: 15px; }
.mega__all { margin-top: 14px; font-size: 14px; }
.mega__feature { position: relative; grid-column: -2; display: block; min-height: 260px; overflow: hidden; background: var(--image-bg); }
.mega__feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mega__feature-text { position: absolute; left: 16px; right: 16px; bottom: 16px; padding: 16px 18px; background: var(--white); }
.mega__feature-text strong { display: block; font: 500 20px/1.15 var(--font-display); }
.mega__feature-text span { font-size: 14px; color: var(--ink-2); }

/* 8. Mobile drawer, dialogs, action bar ---------------------------------------- */
.dialog { padding: 0; border: 0; max-width: none; max-height: none; background: var(--white); color: var(--espresso); }
.dialog::backdrop { background: rgba(42, 23, 10, .45); }
.dialog--drawer { margin: 0; width: min(360px, 90vw); height: 100%; height: 100dvh; }
.dialog--sheet { margin: auto 0 0; width: 100%; max-height: 92dvh; border-radius: 12px 12px 0 0; }
.dialog__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 64px; padding: 0 8px 0 20px; border-bottom: 1px solid var(--line-soft); }
.dialog__title { font: 600 18px/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.icon-button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--espresso); position: relative; }
.drawer__body { display: flex; flex-direction: column; min-height: calc(100% - 64px); }
.drawer-nav { flex: 1; }
.drawer-nav details { border-bottom: 1px solid var(--line-soft); }
.drawer-nav summary {
  list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 50px; padding: 0 20px;
  font: 600 15px/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
}
.drawer-nav summary::-webkit-details-marker { display: none; }
.drawer-nav details[open] summary { background: var(--ivory); }
.drawer-nav details[open] .icon--plus { transform: rotate(45deg); }
.drawer-nav .icon--plus { transition: transform .2s; }
.drawer-nav__group { padding: 4px 20px 14px 32px; background: var(--ivory); }
.drawer-nav__group p { margin: 10px 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.drawer-nav__group a { display: block; padding: 8px 0; font-size: 15px; }
.drawer__showroom { padding: 20px; background: var(--espresso); color: var(--on-dark); font-size: 13px; }
.drawer__showroom .row { margin-top: 12px; }
.drawer__showroom .btn { flex: 1; }

.action-bar { display: none; }

/* 9. Footer -------------------------------------------------------------------- */
.site-footer { background: var(--espresso); color: var(--on-dark); }
.site-footer a { color: var(--on-dark); }
.site-footer a:hover { color: var(--white); }
.newsletter { display: flex; justify-content: space-between; align-items: center; gap: 24px 40px; flex-wrap: wrap; padding: 64px 0; border-bottom: 1px solid var(--on-dark-line); }
.newsletter__title { font: 500 30px/1.15 var(--font-display); color: var(--white); }
.newsletter__form { display: flex; flex-wrap: wrap; width: 520px; max-width: 100%; }
.newsletter__form .input { flex: 1 1 0; width: auto; min-width: 0; border-right: 0; background: #3A2213; border-color: var(--on-dark-line); color: var(--white); }
.newsletter__form .input::placeholder { color: var(--on-dark-muted); }
.newsletter__status { flex-basis: 100%; margin-top: 8px; font-size: 14px; color: var(--gold); }
.newsletter__status:empty { display: none; }
.footer-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 48px; padding: 64px 0; }
.footer-cols h2 { margin-bottom: 20px; font: 600 13px/1.3 var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--white); }
.footer-cols li { margin-bottom: 12px; font-size: 15px; }
.footer-brand img { width: 200px; }
.footer-brand p { margin-top: 18px; max-width: 320px; font-size: 15px; line-height: 1.6; }
.social-links { display: flex; gap: 10px; margin-top: 20px; }
.social-links a { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--on-dark-line); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding: 24px 0 40px; border-top: 1px solid var(--on-dark-line); font-size: 13px; color: var(--on-dark-muted); }
.footer-bottom nav { display: flex; gap: 24px; }

/* 10. Product card ------------------------------------------------------------- */
.p-card { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.p-card__media { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--image-bg); }
.p-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.p-card:hover .p-card__media img { transform: scale(1.03); }
.p-card:hover .p-card__title a { color: var(--brown); }
.p-card__badge { position: absolute; top: 12px; left: 12px; padding: 7px 9px; border-radius: var(--radius); font-size: 12px; font-weight: 600; letter-spacing: .05em; line-height: 1; text-transform: uppercase; color: var(--white); background: var(--espresso); }
.p-card__badge--sale { background: var(--brown); }
.p-card__eyebrow { margin-top: 4px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.p-card__title { font-size: 16px; font-weight: 500; line-height: 1.35; }
/* Whole card is clickable: the title link stretches an invisible layer over the card.
   It must sit on the <a> itself; on the heading it would cover the link and block every click. */
.p-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.p-card__detail { font-size: 14px; color: var(--ink-2); }
.p-card__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.p-card__chips li { padding: 3px 8px; border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }
.p-card__swatches { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.p-card__swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
.p-card__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.price { font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.price__unit, .price__box { font-size: 14px; color: var(--muted); }
.price__was { font-size: 14px; color: var(--muted); text-decoration: line-through; }
.price__call { font-size: 15px; font-weight: 600; color: var(--brown); }
.p-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }
.stock { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--emerald); }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* 11. Home page ---------------------------------------------------------------- */
/* padding-top/bottom only: .hero is also a .container, which owns the side padding. */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; padding-top: 56px; padding-bottom: 72px; }
.hero__title { margin-bottom: 22px; }
.hero__text { max-width: 500px; }
.hero__actions { margin: 32px 0; }
.hero__media { position: relative; aspect-ratio: 4 / 3; max-height: 620px; background: var(--image-bg); }
.hero__media picture, .hero__media picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero__card { position: absolute; left: -40px; bottom: 40px; display: flex; align-items: center; gap: 14px; width: 340px; padding: 16px; background: var(--white); box-shadow: var(--shadow); }
.hero__card img { width: 72px; height: 72px; object-fit: cover; }
.hero__card-text { flex: 1; min-width: 0; }
.hero__card-text strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.section--promos { padding-bottom: var(--section-space); }

.perks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line-soft); }
.perk { display: flex; gap: 16px; padding: 32px 28px 32px 0; }
.perk + .perk { padding-left: 28px; border-left: 1px solid var(--line-soft); }
.perk__icon { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border: 1px solid var(--gold-soft); color: var(--brown); }
.perk h3 { margin-bottom: 4px; font-size: 16px; font-weight: 600; }
.perk p { font-size: 14px; color: var(--muted); }

.cat-card { display: flex; flex-direction: column; gap: 12px; }
.cat-card__media { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--image-bg); }
.cat-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cat-card__media:hover img { transform: scale(1.04); }
.cat-card__title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cat-card__links { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }
.cat-card__links a { color: var(--ink-2); border-bottom: 1px solid var(--field); }

.promos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.promo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 360px; background: var(--cream); }
.promo--dark { background: var(--espresso); color: var(--on-dark); }
.promo__body { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 40px; }
.promo__title { font: 500 30px/1.12 var(--font-display); }
.promo--dark .promo__title { color: var(--white); }
.promo__body .btn { margin-top: auto; }
.promo img { width: 100%; height: 100%; object-fit: cover; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.tab { min-height: 48px; padding: 0 18px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; font-size: 15px; font-weight: 500; color: var(--muted); }
.tab:hover { color: var(--espresso); }
.tab[aria-selected="true"] { color: var(--espresso); font-weight: 600; border-bottom-color: var(--espresso); }
.center-cta { display: flex; justify-content: center; margin-top: 52px; }

.look { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: center; }
.look__media { aspect-ratio: 1 / 1; max-height: 680px; overflow: hidden; background: var(--image-bg); }
.look__media img { width: 100%; height: 100%; object-fit: cover; }
.look__item { display: grid; grid-template-columns: 28px 72px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.look__item img { width: 72px; height: 72px; object-fit: cover; background: var(--image-bg); }
.look__name { font-weight: 500; }
.look__num { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--espresso); border-radius: 50%; font-size: 13px; font-weight: 600; }

.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; }
.swatch-tile { display: flex; flex-direction: column; gap: 10px; font-size: 15px; font-weight: 500; }
.swatch-tile img { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; background: var(--image-bg); }
.swatch-tile:hover img { outline: 2px solid var(--espresso); outline-offset: 3px; }
.sizes { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.sizes__title { font-size: 15px; font-weight: 600; }
.size-link { display: inline-flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 20px; border: 1px solid var(--line); background: var(--white); font-size: 15px; font-weight: 600; }
.size-link:hover { border-color: var(--espresso); color: var(--espresso); }

.install { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; align-items: start; }
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tile-grid__item { display: flex; flex-direction: column; gap: 12px; min-height: 230px; padding: 32px; background: var(--white); }
.tile-grid__item:hover { background: #FCFAF7; color: var(--espresso); }
.tile-grid__icon { width: 56px; height: 56px; display: grid; place-items: center; background: var(--ivory); color: var(--brown); }
.tile-grid__item h3 { margin-top: auto; }
.tile-grid__item p { font-size: 14px; color: var(--muted); }

.consult { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 72px; align-items: center; }
.consult__media img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; }
.ticks li { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ticks .icon { color: var(--gold); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.trade { display: flex; justify-content: space-between; align-items: center; gap: 24px 32px; flex-wrap: wrap; margin-top: 88px; padding-top: 40px; border-top: 1px solid var(--on-dark-line); }
.trade__title { font: 500 24px/1.2 var(--font-display); color: var(--white); }

.visit { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); background: var(--white); }
.visit__body { display: flex; flex-direction: column; gap: 20px; padding: 56px; }
.visit__media { position: relative; min-height: 520px; background: var(--image-bg); }
.visit__media img, .visit__media iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.visit__map-btn { position: absolute; left: 24px; bottom: 24px; }
.hours { display: grid; grid-template-columns: auto 1fr; gap: 6px 28px; font-size: 15px; }
.hours dt { color: var(--muted); }
.hours dd { font-weight: 500; }
.address { display: flex; gap: 14px; font-size: 16px; line-height: 1.5; }
.address .icon { color: var(--brown); margin-top: 2px; }

.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.gallery a { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--image-bg); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery a:hover img { transform: scale(1.04); }

.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion details:first-child { border-top: 1px solid var(--line); }
.accordion summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; font-size: 18px; font-weight: 500; cursor: pointer; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .icon { transition: transform .2s; }
.accordion details[open] summary .icon { transform: rotate(45deg); }
.accordion__body { padding: 0 48px 22px 0; font-size: 15px; line-height: 1.65; color: var(--ink-2); }

/* 12. Listing (category, search, brand) ---------------------------------------- */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; padding: 24px 0 18px; font-size: 13px; color: var(--muted); }
.breadcrumbs a { text-decoration: underline; text-underline-offset: 3px; }
.listing-head { padding-bottom: 36px; background: var(--ivory); }
.listing-head__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 40px; flex-wrap: wrap; }
.listing-head h1 { font: 500 46px/1.1 var(--font-display); }
.listing { display: flex; flex-wrap: wrap; gap: 40px; padding-top: 40px; padding-bottom: 96px; }
.listing__filters { flex: 0 0 272px; }
.listing__results { flex: 999 1 560px; min-width: 0; }
.filters__head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; }
.filters__title { font: 600 18px/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.filter-group { border-top: 1px solid var(--line); }
.filter-group summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 18px 0; font-size: 15px; font-weight: 600; cursor: pointer; }
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group[open] summary .icon { transform: rotate(45deg); }
.filter-group__options { padding-bottom: 16px; max-height: 280px; overflow-y: auto; }
.filters__actions { display: flex; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.filters__help { margin-top: 24px; padding: 24px; background: var(--ivory); font-size: 14px; color: var(--ink-2); }
.filters__close { display: none; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.toolbar__filters-btn { display: none; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.active-filters button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px 0 12px; border: 0; border-radius: 999px; background: var(--ivory); font-size: 13px; font-weight: 500; }
.results-grid { margin-top: 28px; }
.calc-promo { display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; padding: 32px 28px; background: var(--espresso); color: var(--on-dark); }
.calc-promo strong { font: 500 26px/1.12 var(--font-display); color: var(--white); }
.calc-promo .icon-box { margin-bottom: auto; width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid #6B4A2E; color: var(--gold); }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 56px; }
.pagination a, .pagination span { min-width: 44px; height: 44px; padding: 0 12px; display: grid; place-items: center; border: 1px solid var(--line); font-size: 15px; }
.pagination [aria-current="page"] { background: var(--espresso); border-color: var(--espresso); color: var(--white); }
.pagination .gap { border: 0; }
.empty-state { padding: 64px 24px; text-align: center; background: var(--ivory); }
.help-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.help-band a { display: flex; flex-direction: column; gap: 8px; padding: 32px; background: var(--white); }
.help-band strong { font: 500 21px/1.2 var(--font-display); }

/* 13. Product page ------------------------------------------------------------- */
.pdp { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; padding-bottom: 96px; }
.pdp__gallery { flex: 7 1 560px; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; position: sticky; top: calc(var(--header-sticky-top) + 24px); }
.pdp__gallery--thumbs { grid-template-columns: 88px minmax(0, 1fr); } /* thumbnail column only when there are 2+ photos */
.pdp__thumbs { display: flex; flex-direction: column; gap: 10px; }
.pdp__thumb { width: 88px; height: 88px; padding: 0; border: 1px solid var(--line); background: var(--image-bg); }
.pdp__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp__thumb[aria-current="true"] { outline: 2px solid var(--espresso); outline-offset: 2px; }
.pdp__main { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--image-bg); }
.pdp__main img { width: 100%; height: 100%; object-fit: cover; }
.pdp__info { flex: 5 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.pdp__meta { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); }
.pdp__title { font: 500 38px/1.12 var(--font-display); }
.pdp__price .price { font-size: 32px; }
.option-label { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.calc { padding: 24px; background: var(--ivory); }
.calc__title { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 16px; font-weight: 600; }
.calc__title .icon { color: var(--brown); }
.calc__inputs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: end; }
.calc__op { min-height: 48px; display: flex; align-items: center; color: var(--muted); }
.calc__area { min-height: 48px; display: flex; align-items: center; font-weight: 600; }
.calc__result { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.calc__boxes { font-size: 24px; font-weight: 600; }
.buy { display: flex; flex-direction: column; gap: 10px; }
.buy .btn { min-height: 56px; }
.buy__secondary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.specs--single { grid-template-columns: 1fr; }
.specs--single div { grid-template-columns: 170px minmax(0, 1fr); }
.trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust li { display: flex; flex-direction: column; gap: 4px; padding: 16px 12px 16px 0; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.trust li + li { padding-left: 16px; border-left: 1px solid var(--line); }
.trust strong { color: var(--espresso); font-size: 14px; }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; }
.specs div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.specs dt { color: var(--muted); }
.prose { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.prose p + p, .prose ul { margin-top: 12px; }
.prose ul { padding-left: 20px; list-style: disc; }
.also { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.also a { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--line); font-size: 14px; font-weight: 500; line-height: 1.35; }
.also a:hover { border-color: var(--espresso); }
.also img { width: 64px; height: 64px; flex: none; object-fit: cover; background: var(--image-bg); }
.sticky-buy { display: none; }

/* 14. Content pages, messages -------------------------------------------------- */
.page-head { padding: 0 0 48px; background: var(--ivory); }
.page-head h1 { font: 500 46px/1.1 var(--font-display); }
.page-head .lead { margin-top: 14px; max-width: 680px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: start; }
.contact-card { display: flex; flex-direction: column; gap: 18px; padding: 40px; background: var(--ivory); }
.contact-map { display: block; width: 100%; height: 480px; border: 0; }
.messages { margin: 24px auto 0; }
.message { padding: 14px 18px; border-left: 3px solid var(--emerald); background: #EEF6EF; font-size: 15px; }
.message--error { border-left-color: #A3261E; background: #FBEDEC; }

/* 15. Utilities, responsive, reduced motion ------------------------------------ */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; }
.align-start { align-self: flex-start; }
.stack > .kicker { margin-bottom: 0; }

@media (max-width: 1180px) {
  :root { --section-space: 80px; }
  .main-nav, .header-action--desktop, .topbar__middle { display: none; }
  .icon-button.menu-toggle { display: grid; }
  .header-bar { gap: 16px; }
  .grid-4, .gallery, .also { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero, .promos, .look, .install, .consult, .visit, .faq, .two-col { grid-template-columns: 1fr; }
  .hero__card { left: 16px; }
  .perks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .perk + .perk { padding-left: 0; border-left: 0; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Filters slide in from the left (ttw.js toggles .is-open); the big shadow dims the page behind. */
  .listing__filters {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; width: min(360px, 90vw); padding: 8px 20px 24px;
    overflow-y: auto; background: var(--white); transform: translateX(-105%); transition: transform .25s;
  }
  .listing__filters.is-open { transform: none; box-shadow: 0 0 0 100vmax rgba(42, 23, 10, .45); }
  .filters__close { display: grid; }
  .filters__actions { position: sticky; bottom: -24px; padding-bottom: 16px; background: var(--white); }
  .toolbar__filters-btn { display: inline-flex; }
  .specs { grid-template-columns: 1fr; }
  .pdp__gallery { position: static; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; --section-space: 56px; }
  body { padding-bottom: 64px; } /* room for the action bar */
  .topbar__inner { justify-content: center; min-height: 32px; font-size: 12px; }
  .topbar__right { display: none; }
  .header-bar { flex-wrap: wrap; min-height: 64px; gap: 4px 8px; padding-top: 8px; padding-bottom: 8px; }
  .site-logo { order: 2; margin: 0 auto; }
  .site-logo img { width: 196px; }
  .menu-toggle { order: 1; }
  .header-actions { order: 3; margin-left: 0; }
  .header-action span { display: none; }
  .header-action { min-width: 44px; padding: 0; height: 44px; justify-content: center; }
  .search-form { order: 4; flex-basis: 100%; max-width: none; height: 48px; }
  .h-display { font-size: 34px; }
  .h-section { font-size: 27px; }
  .lead { font-size: 16px; }
  .hero { padding-top: 0; padding-bottom: 40px; gap: 24px; }
  .hero__media { margin: 0 calc(var(--gutter) * -1); order: -1; }
  .hero__card { display: none; }
  .hero__actions .btn { width: 100%; }
  .perks { grid-template-columns: 1fr 1fr; }
  .perk { padding: 20px 12px 20px 0; flex-direction: column; gap: 8px; }
  .perk__icon { display: none; }
  .grid-4, .grid-3 { gap: 28px 12px; }
  .promo { grid-template-columns: 1fr; }
  .promo img { aspect-ratio: 16 / 9; order: -1; }
  .promo__body { padding: 24px 20px; }
  .look__item { grid-template-columns: 24px 56px minmax(0, 1fr); }
  .look__item .btn { display: none; }
  .look__item img { width: 56px; height: 56px; }
  .tile-grid, .form-grid, .help-band { grid-template-columns: 1fr; }
  .tile-grid__item { min-height: 0; padding: 24px; }
  .visit__body { padding: 28px 20px; }
  .visit__media { min-height: 260px; }
  .footer-cols { grid-template-columns: 1fr; gap: 32px; padding: 40px 0; }
  .newsletter { padding: 40px 0; }
  .listing-head h1, .page-head h1 { font-size: 30px; }
  .pdp { gap: 24px; }
  .pdp__gallery, .pdp__gallery--thumbs { grid-template-columns: 1fr; margin: 0 calc(var(--gutter) * -1); }
  .pdp__thumbs { flex-direction: row; order: 2; padding: 0 var(--gutter); overflow-x: auto; }
  .pdp__thumb { width: 64px; height: 64px; flex: none; }
  .pdp__title { font-size: 28px; }
  .calc__inputs { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .calc__inputs .calc__op:nth-of-type(2) { display: none; } /* the "=" sign; the area gets its own line */
  .calc__area { grid-column: 1 / -1; min-height: 0; }
  .trust { grid-template-columns: 1fr; }
  .trust li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .specs div { grid-template-columns: 140px minmax(0, 1fr); }
  .sticky-buy {
    position: fixed; left: 0; right: 0; bottom: 64px; z-index: 35; display: flex; align-items: center; gap: 12px;
    padding: 10px var(--gutter); background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(42, 23, 10, .06);
  }
  .sticky-buy .btn { flex: 1; min-height: 48px; }
  .action-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 36; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    height: 64px; background: var(--white); border-top: 1px solid var(--line);
  }
  .action-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 500; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
