:root {
  --paper: #f7f3ec;
  --wool: #f3eee6;
  --sand: #e7dccb;
  --sand-deep: #d5c6ae;
  --ink: #2a2420;
  --muted: #5e564e;
  --terracotta: #9c4530;
  --terracotta-deep: #7a3424;
  --olive: #5c6844;
  --olive-deep: #3d4730;
  --line: rgba(42, 36, 32, 0.14);
  --white: #fffcf8;
  --header: 4.25rem;
  --wrap: 1120px;
  --serif: Fraunces, Georgia, "Times New Roman", serif;
  --sans: Outfit, "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  padding-bottom: 5.5rem;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, .logo {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0;
}

h1 { font-size: clamp(2.5rem, 7vw, 4.8rem); }

h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }

h3 { font-size: 1.35rem; }

p { margin: 0; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 0.8rem;
  z-index: 80;
}

.skip:focus { top: 0.75rem; }

:focus-visible {
  outline: 2px solid var(--terracotta-deep);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
}

.section { padding: clamp(3.25rem, 8vw, 6.5rem) 0; }

.section-sand { background: var(--sand); }

.section-olive { background: var(--olive-deep); color: var(--paper); }

.eyebrow, .rug-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  margin-bottom: 0.8rem;
}

.section-olive .eyebrow { color: #e7cbb8; }

.lede, .prose {
  max-width: 38rem;
  color: var(--muted);
}

.lede { font-size: 1.15rem; margin-top: 1.1rem; }

.prose { display: grid; gap: 1rem; }

.prose strong { color: var(--ink); font-weight: 560; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(247, 243, 236, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
  min-height: var(--header);
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.logo {
  font-style: italic;
  font-size: 1.7rem;
  text-decoration: none;
  font-weight: 560;
}

.nav-toggle {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: 999px;
}

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 0.4rem 1.25rem 1rem;
}

.site-nav.is-open { display: block; }

.site-nav a {
  display: block;
  text-decoration: none;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.site-nav a[aria-current="page"] { color: var(--terracotta-deep); }

a.header-cta { display: none; }

.btn, .text-link, .header-cta {
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.2rem;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
}

.btn-primary { background: var(--terracotta); color: var(--white); }

.btn-primary:hover { background: var(--terracotta-deep); }

.btn-secondary { border-color: var(--ink); background: transparent; }

.btn-secondary:hover { background: var(--ink); color: var(--paper); }

.section-olive .btn-primary { background: var(--paper); color: var(--olive-deep); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.text-link {
  color: var(--terracotta-deep);
  text-underline-offset: 0.22em;
}

.hero {
  display: grid;
  gap: 1.5rem;
  padding-top: clamp(1.5rem, 4vw, 3rem);
}

.hero-copy { padding-bottom: 1rem; }

.hero-media {
  background: var(--sand);
  min-height: 22rem;
  position: relative;
  overflow: hidden;
}

.hero-media img, .hero-media .swatch { width: 100%; height: 100%; object-fit: cover; object-position: center 68%; min-height: 22rem; }

.hero-caption {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  background: rgba(247, 243, 236, 0.92);
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
}

.swatch {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 16rem;
  height: 100%;
  padding: 1.25rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 42%),
    repeating-linear-gradient(90deg, rgba(94, 106, 69, 0.09) 0 1px, transparent 1px 13px),
    var(--sand);
  color: var(--olive-deep);
  font-family: var(--serif);
  font-size: 1.35rem;
}

.band {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.band img, .story-figure img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.story-figure { margin: 0; background: var(--sand); }

.story-figure figcaption, .caption {
  font-size: 0.9rem;
  color: var(--muted);
  padding-top: 0.55rem;
}

.feature-grid, .rug-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 0.65rem;
  margin-top: 1.25rem;
}

.rug-grid > .empty { grid-column: 1 / -1; }

.collection-notes {
  display: grid;
  gap: 1.35rem;
  max-width: 40rem;
  padding-bottom: 4rem;
}

.collection-notes p { color: var(--muted); margin-top: 0.35rem; }

.rug-card { min-width: 0; max-width: 100%; }

.rug-card-media {
  display: block;
  position: relative;
  background: var(--sand);
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.rug-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }

.rug-card h2 { font-size: 0.92rem; line-height: 1.15; margin: 0.15rem 0 0.25rem; overflow-wrap: anywhere; }

.rug-card h2 a { text-decoration: none; }

.rug-card h2 a:hover { text-decoration: underline; text-underline-offset: 0.18em; }

.rug-card-body { display: grid; justify-items: start; gap: 0.1rem; padding-top: 0.45rem; min-width: 0; }

.rug-card .price,
.rug-card .text-link { font-size: 0.78rem; }

.rug-card .rug-kicker { font-size: 0.65rem; letter-spacing: 0.06em; }

.rug-card .sold-note { max-width: 100%; font-size: 0.65rem; white-space: normal; }

.sold-note {
  display: inline-block;
  margin: 0.15rem 0 0;
  padding: 0.16rem 0.42rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.price { margin-top: 0.35rem; }

.price-is-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  border: 1px dashed var(--terracotta);
  padding: 0.12rem 0.45rem;
  background: repeating-linear-gradient(-45deg, transparent, transparent 4px, rgba(156, 69, 48, 0.08) 4px, rgba(156, 69, 48, 0.08) 5px);
}

.price-sold { color: var(--olive-deep); font-size: 0.98rem; }

.price-flag {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
}

.price-banner {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.steps {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
  list-style: none;
  padding: 0;
}

.steps li { display: grid; gap: 0.4rem; }

.step-no {
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--olive);
}

.trust {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.trust h3 { margin-bottom: 0.35rem; }

.trust p, .styles-list { color: var(--muted); }

.styles-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  margin-top: 1rem;
  padding: 0;
  list-style: none;
}

.page-head { padding: clamp(2.2rem, 6vw, 4.5rem) 0 0; }

.page-head .lede { margin-bottom: 0.5rem; }

.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin: 1.6rem 0 1rem;
}

.cat-tabs a {
  text-decoration: none;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
}

.cat-tabs a[aria-current="page"] { border-color: var(--terracotta); color: var(--terracotta-deep); }

.notice {
  background: var(--sand);
  padding: 1rem 1.1rem;
  margin: 1rem 0;
  max-width: 42rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1rem;
  align-items: end;
  margin: 1.2rem 0 0.4rem;
}

.filters label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.filters select, .field input, .field select, .field textarea {
  background: var(--white);
  border: 1px solid var(--sand-deep);
  min-height: 48px;
  padding: 0.55rem 0.7rem;
  border-radius: 0;
  min-width: min(100%, 14rem);
}

.field textarea { min-height: 8rem; resize: vertical; }

.result-count { color: var(--muted); min-height: 1.4rem; margin: 0.6rem 0 0; }

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.75rem;
}

.pager[hidden], [hidden] { display: none !important; }

.pager button {
  min-width: 2.6rem;
  min-height: 2.6rem;
  border: 1px solid var(--line);
  background: transparent;
  padding: 0 0.7rem;
  cursor: pointer;
}

.pager button[aria-current="page"] { background: var(--ink); color: var(--paper); }

.pager button:disabled { opacity: 0.4; cursor: default; }

.empty {
  border: 1px solid var(--line);
  padding: 1.5rem 1.2rem;
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.rug-detail {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 3rem) 0 4rem;
}

.gallery-main {
  background: var(--sand);
  min-height: 18rem;
}

.gallery-main img { width: 100%; height: auto; max-height: 82vh; object-fit: contain; margin-inline: auto; }

.thumbs { display: flex; gap: 0.5rem; margin-top: 0.6rem; }

.thumbs button {
  width: 4.5rem;
  height: 4.5rem;
  padding: 0;
  border: 1px solid transparent;
  background: var(--sand);
  cursor: pointer;
}

.thumbs button[aria-current="true"] { border-color: var(--ink); }

.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.facts { margin: 1.4rem 0; display: grid; gap: 0.8rem; }

.facts div { display: grid; gap: 0.15rem; }

.facts dt {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.crumb { font-size: 0.92rem; color: var(--muted); margin-bottom: 0.8rem; }

.crumb a { color: var(--muted); }

.crumb ol { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; padding: 0; margin: 0; }

.fine { color: var(--muted); margin-top: 1rem; font-size: 0.95rem; }

.order-layout { display: grid; gap: 1.25rem; align-items: start; margin-top: 2rem; }
.order-stack { display: grid; gap: 1.25rem; }

.method, .bank-panel, .form-panel {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.15rem 1.15rem 1.3rem;
}

.method h2, .form-panel h2, .bank-panel h2 { font-size: 1.7rem; margin-bottom: 0.55rem; }

.method p, .bank-panel p, .form-panel p { color: var(--muted); }

.method .btn, .method .text-link { margin-top: 0.9rem; }

.form-grid { display: grid; gap: 0.9rem; margin-top: 1rem; }

.field { display: grid; gap: 0.3rem; }

.field span { font-size: 0.92rem; }

.form-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 0.4rem; }

#form-status { min-height: 1.4rem; color: var(--olive-deep); }

.account {
  margin: 1rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.account div { display: grid; gap: 0.15rem; }

.account dt {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.account-number {
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
  user-select: all;
}

.steps-list, .faq { display: grid; gap: 1.1rem; margin-top: 1.5rem; }

.faq details {
  border-top: 1px solid var(--line);
  padding: 0.9rem 0;
}

.faq details:last-child { border-bottom: 1px solid var(--line); }

.faq summary { cursor: pointer; font-weight: 560; }

.faq details p { margin-top: 0.55rem; color: var(--muted); max-width: 40rem; }

.index-group { margin-top: 2rem; }

.index-group ul { padding-left: 1.1rem; display: grid; gap: 0.35rem; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 2rem;
  color: var(--muted);
}

.footer-grid { display: grid; gap: 1.5rem; }

.footer-brand {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--ink);
  text-decoration: none;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 0.45rem 1rem; }

.footer-links a { color: var(--ink); }

.wa-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #1e6b45;
  color: white;
  text-decoration: none;
  border-radius: 999px;
  min-height: 52px;
  padding: 0.7rem 0.95rem;
  box-shadow: 0 10px 24px rgba(42, 36, 32, 0.18);
}

.wa-float span { font-size: 0.95rem; }

.wa-float:hover { background: #18573a; }

@media (max-width: 640px) {
  .btn-row .btn, .form-actions .btn { width: 100%; }
}

@media (min-width: 640px) {
  .feature-grid, .rug-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem 1rem;
    margin-top: 2rem;
  }
  .rug-card h2 { font-size: 1.45rem; line-height: 1.08; margin: 0.2rem 0 0.45rem; }
  .rug-card-body { gap: 0.15rem; padding-top: 0.85rem; }
  .rug-card .price,
  .rug-card .text-link { font-size: inherit; }
  .rug-card .rug-kicker { font-size: 0.78rem; letter-spacing: 0.14em; }
  .rug-card .sold-note { font-size: 0.72rem; }
}

@media (min-width: 720px) {
  .trust, .steps { grid-template-columns: 1fr 1fr; }
  .band { grid-template-columns: 1.1fr 0.9fr; }
  .footer-grid { grid-template-columns: 1.3fr 1fr; }
}

@media (min-width: 880px) {
  .nav-toggle { display: none; }
  a.header-cta { display: inline-flex; margin-left: auto; }
  .site-nav {
    display: flex;
    position: static;
    background: transparent;
    border: 0;
    padding: 0;
    gap: 1.15rem;
    margin-left: 1.5rem;
  }
  .site-nav a { border: 0; padding: 0.35rem 0; white-space: nowrap; }
  .hero { grid-template-columns: 0.86fr 1.14fr; align-items: center; min-height: 0; }
  .hero-media { aspect-ratio: 4 / 5; min-height: 0; }
  .hero-media img, .hero-media .swatch { min-height: 0; height: 100%; }
  .rug-detail { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
  .rug-info { position: sticky; top: calc(var(--header) + 1.5rem); }
  .order-layout { grid-template-columns: 1fr 1fr; align-items: start; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .trust { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .feature-grid, .rug-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem 1.15rem;
  }
}

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

/* ---- 2026-11-19 upgrade: trade banner, video, custom size table ---- */
.trade-banner { display: grid; gap: 1rem; align-items: center; margin: 0.5rem auto 1rem; padding: 1.5rem 1.75rem; background: var(--terracotta-deep); color: var(--paper); border-radius: 14px; }
.trade-banner .eyebrow { color: #f1d3c4; margin: 0 0 0.25rem; }
.trade-banner-title { font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 1.65rem); line-height: 1.25; margin: 0; }
.trade-banner-text { margin: 0.4rem 0 0; color: #f3e6dc; }
.trade-banner .btn-primary { background: var(--paper); color: var(--terracotta-deep); justify-self: start; }
@media (min-width: 760px) { .trade-banner { grid-template-columns: 1fr auto; } .trade-banner .btn-primary { justify-self: end; } }
.video-band { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 760px) { .video-band { grid-template-columns: minmax(240px, 340px) 1fr; } }
.video-figure { margin: 0; }
.video-frame { position: relative; width: 100%; max-width: 340px; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-figure figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; max-width: 340px; }
.video-solo { margin: 2rem 0; }
.notice-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.pill { margin: 0; padding: 0.4rem 0.9rem; border-radius: 999px; background: var(--olive-deep); color: var(--paper); font-size: 0.92rem; }
.pill-muted { background: var(--sand); color: var(--ink); }
.table-tools { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; justify-content: space-between; margin: 1rem 0 0.5rem; }
.search-field { display: grid; gap: 0.3rem; font-size: 0.92rem; color: var(--muted); }
.search-field input { padding: 0.6rem 0.8rem; border: 1px solid var(--line); border-radius: 8px; background: var(--white); min-width: 240px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 0.4rem 0.9rem; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.size-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.size-table th, .size-table td { padding: 0.6rem 0.9rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.size-table thead th { position: sticky; top: 0; background: var(--wool); font-weight: 600; }
.size-table th button { all: unset; cursor: pointer; }
.size-table th button::after { content: " ↕"; color: var(--muted); font-size: 0.8em; }
.size-table th[aria-sort="ascending"] button::after { content: " ↑"; }
.size-table th[aria-sort="descending"] button::after { content: " ↓"; }
.size-table .num { text-align: right; }
.size-table .price-cell { font-weight: 600; color: var(--terracotta-deep); }
.size-table tbody tr:hover { background: var(--wool); }
.custom-grid { display: grid; gap: 1.5rem; }
@media (min-width: 860px) { .custom-grid { grid-template-columns: 1fr 1fr; } }
.card-box { background: var(--white); border-radius: 14px; padding: 1.5rem; }
.card-box h2 { margin-top: 0.2rem; }
@media (max-width: 640px) {
  .size-table th:nth-child(3), .size-table td:nth-child(3), .size-table th:nth-child(4), .size-table td:nth-child(4) { display: none; }
  .size-table th, .size-table td { padding: 0.55rem 0.6rem; }
  .search-field input { min-width: 0; width: 100%; }
  .search-field { width: 100%; }
}
.sale-note { margin: 0.75rem 0; padding: 0.8rem 1rem; border-left: 4px solid var(--terracotta); background: var(--white); border-radius: 8px; }
.size-table .sale-cell { font-weight: 600; color: var(--olive-deep); }
.size-table .price-cell { color: var(--muted); font-weight: 500; }
@media (max-width: 640px) { .size-table th, .size-table td { white-space: normal; } }
