/*
 * Tagheh: a fabric swatch book. Design brief: sites/02-directory/DESIGN.md.
 * Colours come from the old natural dyes of Iranian textiles: madder, walnut, saffron. No blue in the interface (the pet shop is the blue site).
 * The weave colours (.w-*) are fabric, the content itself, not interface colours.
 */

/* ---------- Fonts (files in assets/fonts, from Fontsource) ---------- */
@font-face { font-family: "Lalezar"; src: url(../fonts/lalezar-latin-400-normal.woff2) format("woff2"); font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Lalezar"; src: url(../fonts/lalezar-arabic-400-normal.woff2) format("woff2"); font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Readex Pro"; src: url(../fonts/readex-pro-latin-wght-normal.woff2) format("woff2-variations"); font-weight: 160 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
/* Persian text: Estedad, drawn for Persian (clear ۰-۹ digits, Persian letter shapes). Readex Pro's Arabic letters
   looked Arabic and its Persian zero was a dot (Kia, 24 Oct 2026). Only its Persian range is loaded; Latin stays Readex Pro. */
@font-face { font-family: "Estedad"; src: url(../fonts/estedad-arabic-wght-normal.woff2) format("woff2-variations"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

/* ---------- Colours and base ---------- */
:root {
  --card: #F4E4DE;      /* page: a sample card washed in madder, a pale rose (not cream) */
  --label: #FFFFFF;     /* stapled labels */
  --walnut: #2B1A12;    /* text, outlines, footer: walnut-husk dye, deep brown */
  --madder: #8C1C2E;    /* the one accent: your picks and your request */
  --tape: #E2B93B;      /* tape measure, numbers only */
  --thread: #D9C5BB;    /* stitches and quiet borders */
  --soft: #6E5248;      /* secondary text (passes contrast on both whites) */
  --madder-wash: #F7E3E4;
  --head: "Lalezar", "Readex Pro", system-ui, sans-serif;
  --text: "Readex Pro", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--card); color: var(--walnut); font: 400 16.5px/1.6 var(--text); }
:lang(fa) body, html[lang^="fa"] body { font-size: 16px; line-height: 1.85; }
h1, h2, h3 { font-family: var(--head); font-weight: 400; line-height: 1.12; margin: 0; }
/* Persian: one Persian family for text and headings (heavy weight for headings). Lalezar stays only in the logo. */
html[lang^="fa"] { --text: "Estedad", "Readex Pro", system-ui, sans-serif; --head: "Estedad", "Readex Pro", system-ui, sans-serif; }
html[lang^="fa"] h1, html[lang^="fa"] h2, html[lang^="fa"] h3 { line-height: 1.5; font-weight: 850; }
html[lang^="fa"] .logo__word { font-family: "Lalezar", var(--text); font-weight: 400; }
p { margin: 0 0 .8em; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--madder); }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--madder); outline-offset: 2px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.lead { font-size: 18.5px; color: var(--soft); max-width: 40ch; }
html[lang^="fa"] .lead { font-size: 17.5px; }
/* Hidden without pushing the page wider (a far-off "left" makes Persian pages scroll sideways). */
.skip, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip-path: none; inset-inline-start: 16px; top: 16px; z-index: 99; background: var(--label); padding: 8px 12px; }
[hidden] { display: none !important; }
.unknown { color: var(--soft); }
.unknown::before { content: ""; display: inline-block; width: 10px; height: 0; border-top: 1.5px dashed var(--thread); vertical-align: middle; margin-inline-end: 6px; }
.icon { width: 18px; height: 18px; flex: none; }

/* ---------- Header ---------- */
.top { border-bottom: 1px dashed var(--thread); }
.top__in { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--walnut); }
.logo .mark { width: 34px; height: 36px; }
.logo__word { font-family: var(--head); font-size: 32px; line-height: 1; padding-top: 6px; }
html[lang^="fa"] .logo__word { padding-top: 0; font-size: 34px; }
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { text-decoration: none; }
.top__tools { margin-inline-start: auto; display: flex; align-items: center; gap: 18px; }
.lang { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; text-decoration: none; }
.stack { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; text-decoration: none; padding: 6px 2px; }
.stack__n { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; font-size: 13.5px; font-weight: 600; line-height: 1;
  color: var(--soft); border: 1.5px solid var(--thread); }
.stack.is-full .stack__n { background: var(--madder); border-color: var(--madder); color: var(--label); }
.stack__short { display: none; }

/* A question box (the fabric chooser, "start a new request?"). */
.ask { border: 0; border-radius: 6px; padding: 26px 24px 22px; width: min(460px, calc(100% - 32px)); background: var(--label); color: var(--walnut);
  box-shadow: 0 20px 50px -20px rgba(43, 26, 18, .6); }
.ask::backdrop { background: rgba(43, 26, 18, .45); }
.ask__title { font-size: 24px; padding-inline-end: 40px; margin-bottom: 8px; }
.ask__text { color: var(--soft); margin: 0 0 16px; }
.ask__choices { display: flex; flex-wrap: wrap; gap: 10px; }
.ask__fabric { cursor: pointer; min-height: 44px; font-size: 15.5px; }
.ask__fabric:hover { border-color: var(--madder); color: var(--madder); }
.ask__x { position: absolute; top: 10px; inset-inline-end: 10px; border: 0; background: none; color: var(--soft); min-width: 44px; min-height: 44px;
  display: grid; place-items: center; cursor: pointer; }
.ask__x:hover { color: var(--madder); }

/* ---------- Finder (home hero) ---------- */
.finder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 36px; align-items: center; padding: 44px 0 20px; }
.finder h1 { font-size: clamp(40px, 5.2vw, 64px); max-width: 11ch; }
html[lang^="fa"] .finder h1 { font-size: clamp(36px, 4.6vw, 56px); max-width: 13ch; }
.finder .lead { margin: 16px 0 24px; }
.filters { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 5px; margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.filters .field, .filters .seg { margin: 0; }
.field__label { font-size: 14px; font-weight: 600; padding: 0; }
.field__opt { font-weight: 400; color: var(--soft); }
.field__help { font-size: 13.5px; color: var(--soft); }
.field input, .field select, .field textarea {
  background: var(--label); border: 1px solid var(--thread); border-radius: 6px; padding: 10px 12px; min-height: 44px; width: 100%;
}
.field textarea { min-height: 88px; resize: vertical; }
.field select { padding-inline-end: 30px; }
.field.is-bad input, .field.is-bad select, .field.is-bad textarea { border-color: var(--madder); box-shadow: 0 0 0 1px var(--madder); }
.field.is-bad .field__label { color: var(--madder); }
.field--select select { min-width: 170px; }
.seg { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; }
.seg legend { width: 100%; margin-bottom: 5px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 10px 14px; min-height: 44px; background: var(--label); border: 1px solid var(--thread); margin-inline-start: -1px; font-size: 15px; cursor: pointer; }
.seg label:first-of-type span { border-start-start-radius: 6px; border-end-start-radius: 6px; margin-inline-start: 0; }
.seg label:last-of-type span { border-start-end-radius: 6px; border-end-end-radius: 6px; }
.seg input:checked + span { background: var(--walnut); border-color: var(--walnut); color: var(--label); }
.seg input:focus-visible + span { outline: 2px solid var(--madder); outline-offset: 2px; position: relative; }
.others { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.others__label { font-size: 14px; color: var(--soft); margin-inline-end: 2px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 7px; min-height: 36px; border: 1px solid var(--thread); border-radius: 4px; background: var(--label); font-size: 14.5px; text-decoration: none; }
html[dir="rtl"] .chip { padding: 6px 7px 6px 11px; }
.chip__dot { width: 18px; height: 18px; border-radius: 2px; flex: none; }
.chip[aria-current="true"] { border-color: var(--madder); box-shadow: inset 0 0 0 1px var(--madder); color: var(--madder); font-weight: 600; }

/* The three steps: a real sequence, so numbered. The step the visitor is on is filled in. */
.steps { list-style: none; counter-reset: step; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; max-width: 30rem; }
.steps li { counter-increment: step; position: relative; padding-inline-start: 46px; min-height: 32px; color: var(--soft); }
.steps li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 600; border: 1.5px solid var(--thread); background: var(--label); color: var(--soft);
}
.steps b { display: block; color: var(--walnut); font-size: 17.5px; }
.steps .is-now::before { background: var(--madder); border-color: var(--madder); color: var(--label); }
.steps .is-now b { color: var(--madder); }
.steps .is-done::before { content: ""; background: var(--walnut) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat; border-color: var(--walnut); }
html[lang^="fa"] .steps li::before { content: counter(step, persian); }
html[lang^="fa"] .steps .is-done::before { content: ""; }

/* ---------- The swatch fan ---------- */
.finder__fan { container-type: inline-size; }
.fan { position: relative; aspect-ratio: 470 / 460; max-width: 520px; margin-inline: auto; }
html[dir="rtl"] .fan { transform: scaleX(-1); }
.swatch {
  position: absolute; left: 3%; top: 86%; width: 91.5%; height: 13.5%; padding: 0; border: 0; background: none; cursor: pointer;
  transform-origin: 7.9% 50%; z-index: calc(var(--i) + 1);
  transform: rotate(calc(-80deg + var(--i) * 10.5deg));
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
  filter: drop-shadow(0 1px 1px rgba(43, 26, 18, .28));
  pointer-events: none;   /* strips overlap: only the visible cloth and label of each one take taps */
}
.swatch__tag, .swatch__cloth { pointer-events: auto; cursor: pointer; }
html.js .fan:not(.is-open) .swatch { transform: rotate(-6deg); }
.swatch[aria-pressed="true"] { transform: rotate(calc(-80deg + var(--i) * 10.5deg)) translateX(6%); }
.swatch__cloth {
  position: absolute; inset: 0;
  -webkit-mask: conic-gradient(from 225deg at 100% 50%, #0000, #000 1deg 89deg, #0000 90deg) 100% 0 / 100% 12px repeat-y;
  mask: conic-gradient(from 225deg at 100% 50%, #0000, #000 1deg 89deg, #0000 90deg) 100% 0 / 100% 12px repeat-y;
}
.swatch__tag {
  position: absolute; right: 6.5%; top: 17%; height: 66%; min-width: 22%; padding: 0 3cqw;
  display: flex; align-items: center; justify-content: center; border-radius: 2px;
  background: var(--label); color: var(--walnut); font: 600 clamp(11px, 3cqw, 15px)/1 var(--text); white-space: nowrap;
}
html[dir="rtl"] .swatch__tag > span { transform: scaleX(-1); }
.swatch:hover .swatch__tag { color: var(--madder); }
.swatch[aria-pressed="true"] .swatch__tag { background: var(--madder); color: var(--label); }
.swatch:focus-visible { outline: none; }
.swatch:focus-visible .swatch__tag { outline: 2px solid var(--madder); outline-offset: 2px; }
.fan__post {
  position: absolute; left: 10.2%; top: 92.8%; width: 6%; aspect-ratio: 1; border-radius: 50%; z-index: 20; transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 35%, #F3DC9B, #B8892F 60%, #7A5A1E); box-shadow: 0 1px 2px rgba(0, 0, 0, .35); pointer-events: none;
}
.fan__post::after { content: ""; position: absolute; left: 22%; right: 22%; top: 46%; height: 8%; background: #6B4E19; transform: rotate(-30deg); }
.fan__hint { text-align: center; font-size: 13.5px; color: var(--soft); margin-top: 6px; }

/* ---------- Weaves, drawn in CSS ---------- */
.w-cotton { background-color: #B7862A;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.16) 0 1px, transparent 1px 3px), repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px); }
.w-linen { background-color: #B5A88C;
  background-image: repeating-linear-gradient(0deg, rgba(90,70,40,.22) 0 1px, transparent 1px 4px, rgba(255,255,255,.25) 4px 5px, transparent 5px 7px, rgba(90,70,40,.3) 7px 9px, transparent 9px 13px),
                    repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 1px, transparent 1px 3px, rgba(90,70,40,.15) 3px 5px, transparent 5px 6px); }
.w-silk { background-color: #1F6B66;
  background-image: linear-gradient(100deg, rgba(255,255,255,0) 10%, rgba(255,255,255,.35) 28%, rgba(255,255,255,0) 40%, rgba(0,0,0,.25) 62%, rgba(255,255,255,.22) 82%, rgba(255,255,255,0) 95%); }
.w-crepe { background-color: #C47888;
  background-image: radial-gradient(rgba(255,255,255,.2) .7px, transparent 1px), radial-gradient(rgba(0,0,0,.12) .7px, transparent 1px);
  background-size: 3px 3px, 5px 4px; background-position: 0 0, 1px 2px; }
.w-wool { background-color: #6A4934;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.14) 0 2px, transparent 2px 5px), repeating-linear-gradient(-45deg, rgba(0,0,0,.12) 0 1px, transparent 1px 6px); }
.w-velvet { background-color: #1E4A38;
  background-image: radial-gradient(ellipse at 40% 30%, rgba(255,255,255,.25), transparent 55%), radial-gradient(ellipse at 75% 90%, rgba(0,0,0,.35), transparent 60%); }
.w-termeh { background-color: #7B1E2C;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='22'%3E%3Cpath d='M8 17c-4 0-5-5-2-8 3-3 8-3 9 1 1 3-1 4-2 3 2-3-2-5-4-2-2 2-1 6 3 6' fill='none' stroke='%23D9B55A' stroke-width='1.2'/%3E%3Ccircle cx='21' cy='5' r='1.3' fill='%23D9B55A'/%3E%3C/svg%3E"),
                    repeating-linear-gradient(90deg, rgba(0,0,0,.12) 0 1px, transparent 1px 2px); }
.w-knit { background-color: #5A2D3F;
  background-image: repeating-linear-gradient(60deg, rgba(255,255,255,.14) 0 1px, transparent 1px 4px), repeating-linear-gradient(-60deg, rgba(255,255,255,.14) 0 1px, transparent 1px 4px); }
.w-denim { background-color: #34507A;
  background-image: repeating-linear-gradient(63deg, rgba(255,255,255,.2) 0 1px, transparent 1px 3px), repeating-linear-gradient(0deg, rgba(0,0,0,.1) 0 1px, transparent 1px 2px); }
.w-satin { background-color: #C9B79C;
  background-image: linear-gradient(95deg, rgba(255,255,255,0) 20%, rgba(255,255,255,.55) 45%, rgba(255,255,255,0) 60%, rgba(0,0,0,.12) 80%); }
.w-jacquard { background-color: #4B2E22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M8 1l3 7-3 7-3-7z' fill='none' stroke='%23C9A25A' stroke-width='1'/%3E%3C/svg%3E"); }
.w-lace { background-color: #EDE7DD;
  background-image: radial-gradient(circle, transparent 2.2px, rgba(70,60,50,.45) 2.6px, transparent 3.2px); background-size: 8px 8px; }
.w-chador { background-color: #18191D;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 2px), linear-gradient(100deg, transparent 30%, rgba(255,255,255,.08) 50%, transparent 70%); }
.w-upholstery { background-color: #6B6F3E;
  background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 2px, transparent 2px 4px), repeating-linear-gradient(90deg, rgba(255,255,255,.14) 0 2px, transparent 2px 4px); }
.w-bare { background-color: transparent; background-image: repeating-linear-gradient(90deg, var(--thread) 0 1px, transparent 1px 6px); }

/* A strip of cloth with a pinked (zigzag-cut) top edge. */
.cloth {
  display: flex;
  -webkit-mask: conic-gradient(from 135deg at 50% 0, #0000, #000 1deg 89deg, #0000 90deg) 0 0 / 14px 100% repeat-x;
  mask: conic-gradient(from 135deg at 50% 0, #0000, #000 1deg 89deg, #0000 90deg) 0 0 / 14px 100% repeat-x;
}
.cloth > i { flex: 1; }

/* ---------- The bar above the list (stays on screen while scrolling the list) ---------- */
.listbar { position: sticky; top: 0; z-index: 30; background: var(--card); padding: 10px 0; border-bottom: 1px dashed var(--thread); margin-bottom: 22px; }
.listbar__fabrics { display: flex; flex-wrap: wrap; gap: 5px; }
.listbar .chip { min-height: 34px; padding: 4px 8px 4px 6px; gap: 6px; font-size: 14px; }
html[dir="rtl"] .listbar .chip { padding: 4px 6px 4px 8px; }
.listbar .chip__dot { width: 14px; height: 14px; }
.listbar__more { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 18px; margin-bottom: 4px; }
.listbar__more .field, .listbar__more .seg { margin: 0; }

/* ---------- The tray: what to do once sellers are ticked ---------- */
.tray { position: fixed; inset-inline: 0; bottom: 0; z-index: 40; background: var(--walnut); color: var(--label); box-shadow: 0 -6px 18px -10px rgba(0, 0, 0, .5); }
.tray__in { display: flex; align-items: center; gap: 12px 18px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.tray__text { margin: 0; flex: 1; min-width: 12rem; font-weight: 600; }
.tray .btn { background: var(--label); color: var(--madder); border-color: var(--label); }
.tray .btn:hover { background: var(--madder-wash); border-color: var(--madder-wash); color: var(--madder); }
.tray .link { color: #EBDDD3; margin: 0; }
body.has-tray { padding-bottom: 76px; }

/* ---------- Seller cards ---------- */
.list { padding: 36px 0 24px; }
.list__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 24px; }
.list__head h2 { font-size: clamp(30px, 3.6vw, 40px); }
.list__count { color: var(--soft); margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 30px 24px; align-items: start; }
.card { position: relative; padding-top: 56px; }
.card__cloth { position: absolute; top: 0; left: 10px; right: 10px; height: 84px; }
.card__label {
  position: relative; background: var(--label); border-radius: 3px; padding: 22px 20px 18px;
  box-shadow: 0 1px 0 var(--thread), 0 8px 16px -12px rgba(43, 26, 18, .5);
}
.staple { position: absolute; top: -5px; left: 50%; width: 28px; height: 5px; margin-left: -14px; border: 1.5px solid #9C8A80; border-bottom: 0; border-radius: 2px 2px 0 0; }
.card__name { font-size: 26px; }
html[lang^="fa"] .card__name { font-size: 25px; }
.card__name a { text-decoration: none; }
.card__alt { color: var(--soft); font-size: 15px; margin: 2px 0 0; text-align: start; }
html:not([dir="rtl"]) .card__alt { text-align: left; }  /* WordPress only writes dir="rtl", never dir="ltr" */
html[dir="rtl"] .card__alt { text-align: right; }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 14px 0 0; font-size: 14.5px; }
.facts dt { color: var(--soft); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.card__source { font-size: 13px; color: var(--soft); margin: 14px 0 0; }
.card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; }
.card__more { font-size: 14px; color: var(--soft); }
.card--add .card__label { background: transparent; box-shadow: none; border: 1.5px dashed var(--thread); }
.card--add .card__cloth { opacity: .8; }
.card--add p { font-size: 15px; margin-top: 10px; }
.empty { grid-column: 1 / -1; background: var(--label); border-radius: 3px; padding: 22px; }
.empty__title { font-family: var(--head); font-size: 24px; margin-bottom: 6px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 6px; cursor: pointer;
  font: 600 15px/1.2 var(--text); text-decoration: none; border: 1.5px solid var(--madder); background: var(--madder); color: var(--label);
}
.btn:hover { background: #6E1422; border-color: #6E1422; color: var(--label); }
.btn--line { background: var(--label); color: var(--madder); }
.btn--line:hover { background: var(--madder-wash); color: var(--madder); }
.btn[aria-pressed="true"] { background: var(--walnut); border-color: var(--walnut); color: var(--label); }
/* "Ask this seller": a tick box inside the button, filled when the seller is picked. */
.btn--tick .tick { display: grid; place-items: center; width: 20px; height: 20px; border: 1.5px solid currentColor; border-radius: 3px; flex: none; }
.btn--tick .tick .icon { width: 14px; height: 14px; opacity: 0; }
.btn--tick[aria-pressed="true"] .tick .icon { opacity: 1; }
.btn--big { min-height: 52px; padding: 12px 22px; font-size: 16.5px; }
.link { background: none; border: 0; padding: 0; color: var(--madder); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; margin-inline-end: 14px; }

/* ---------- Bazaar index and method ---------- */
.bazaars { padding: 44px 0 12px; }
.bazaars h2, .method h2 { font-size: clamp(30px, 3.6vw, 40px); }
.bazaars .lead { margin: 8px 0 22px; }
.cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 32px; }
.city { border-top: 2px solid var(--walnut); padding: 12px 0 20px; }
.city h3 { font-size: 24px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.city h3 a { text-decoration: none; }
.city__n { font-family: var(--text); font-size: 14px; color: var(--soft); }
.city ul { list-style: none; margin: 6px 0 0; padding: 0; font-size: 15px; }
.city li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--thread); }
.method { padding: 36px 0 40px; }
.method__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 18px 0; max-width: 1000px; }
.method__steps p { margin: 0; border-inline-start: 2px dashed var(--thread); padding-inline-start: 16px; }
.method__steps b { display: block; font-size: 17px; margin-bottom: 4px; }

/* ---------- Seller page ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14.5px; color: var(--soft); padding: 22px 0 8px; }
.seller__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 36px; align-items: start; padding-top: 10px; }
.card--big { padding-top: 76px; }
.card--big .card__cloth { height: 110px; left: 14px; right: 14px; }
.card--big .card__label { padding: 30px 30px 26px; }
.card--big .card__name { font-size: clamp(32px, 4vw, 46px); }
.seller__about { margin: 14px 0 0; max-width: 60ch; }
.facts--full { font-size: 15.5px; gap: 10px 22px; margin-top: 20px; }
.seller__side { display: flex; flex-direction: column; gap: 26px; padding-top: 76px; }
.sources h2, .near h2 { font-size: 24px; margin-bottom: 10px; }
.sources ul, .near ul { list-style: none; padding: 0; margin: 0; }
.sources li { padding: 10px 0; border-bottom: 1px dashed var(--thread); }
.sources__meta { display: block; font-size: 13.5px; color: var(--soft); }
.sources__note { font-size: 14px; color: var(--soft); margin-top: 12px; }
.near li { padding: 6px 0; }
.near__area { color: var(--soft); font-size: 14px; }
.claim { margin: 56px 0 40px; padding-top: 30px; border-top: 1px dashed var(--thread); max-width: 760px; }
.claim h2 { font-size: clamp(28px, 3.4vw, 36px); margin-bottom: 8px; }
.claim .lead { max-width: 56ch; }
.form { max-width: 640px; }
.seg--wide { margin-bottom: 18px; }
/* Notices: a whole thin border and a tint, like a slip of coloured paper. (A coloured stripe on one edge is a template tell.) */
.notice { border-radius: 3px; padding: 14px 18px; margin: 14px 0 20px; background: var(--label); border: 1px solid var(--thread); }
.notice p { margin: 0; }
.notice--ok { background: #EAF2EC; border-color: #A9C7B3; }
.notice--err { background: var(--madder-wash); border-color: #D9A8B1; }
.notice--demo { background: #FBF3DA; border-color: #E8D08A; }

/* ---------- Price request ---------- */
.request { padding: 30px 0 50px; }
.request > h1, .narrow > h1 { font-size: clamp(36px, 4.6vw, 54px); padding-top: 10px; }
.request > .lead, .narrow > .lead { margin: 10px 0 24px; max-width: 52ch; }
.request__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.request__form { min-width: 0; }
.request__form .lead { margin: 8px 0 22px; max-width: 52ch; }
.request__side { position: sticky; top: 20px; padding-top: 8px; }
.request__empty { max-width: 640px; margin: 20px 0; }
.request__empty h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 8px; }
/* Who you are asking: the fabric, then the sellers as small tags you can take out. */
.whom { display: flex; align-items: center; gap: 16px; padding-top: 6px; }
.whom h1 { font-size: clamp(32px, 4.2vw, 48px); }
.whom__cloth { width: 56px; height: 56px; flex: none; border-radius: 3px; overflow: hidden; -webkit-mask: none; mask: none; }
.whom__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.whom__item { display: inline-flex; align-items: center; background: var(--label); border: 1px solid var(--thread); border-radius: 6px; padding-inline-start: 12px; min-height: 48px; }
.whom__text { display: flex; flex-direction: column; line-height: 1.3; padding: 5px 0; }
.whom__name { font-weight: 600; text-decoration: none; }
.whom__where { font-size: 13px; color: var(--soft); }
.whom__x { border: 0; background: none; color: var(--soft); cursor: pointer; min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.whom__x:hover { color: var(--madder); }
.whom__more { margin: 12px 0 0; font-size: 15px; }
.whom__more a { color: var(--madder); }
/* The two questions: a real sequence, so numbered. */
.step { margin-top: 34px; padding-top: 26px; border-top: 1px dashed var(--thread); }
.step__title { display: flex; align-items: center; gap: 12px; font-size: 26px; margin-bottom: 18px; }
.step__n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--walnut); color: var(--label); font: 600 16px/1 var(--text); flex: none; }
.request__form .btn--big { margin-top: 26px; }
.request__fine { margin-top: 12px; max-width: 52ch; }
.preview__title { font-size: 22px; margin-bottom: 10px; }
.message.preview { text-align: start; min-height: 220px; }
.request__side .field__help { margin: 10px 0 0; }
.request__side .notice { margin-top: 16px; }
/* Sellers without a public email: no Ask button, a plain note instead. */
.card__noemail { font-size: 14px; color: var(--soft); margin: 16px 0 0; padding-top: 12px; border-top: 1px dashed var(--thread); }
.card__noemail a { color: var(--walnut); }
.noemail { margin-top: 20px; background: var(--card); border-radius: 3px; padding: 14px 16px; }
.noemail p { margin: 0 0 6px; }
.noemail p:last-child { margin: 0; color: var(--soft); }
/* "Only sellers I can ask": a plain checkbox with a big tap area. */
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--madder); margin: 0; }
.message__status { font-size: 13.5px; margin: 0 0 6px; color: var(--soft); }
.message__status--sent, .message__status--demo { color: #2F6B4B; }
.message__status--repeat, .message__status--busy, .message__status--failed { color: var(--madder); }
.card__ticked { font-size: 13.5px; color: var(--soft); margin: 10px 0 0; }
.picked__empty { background: var(--label); border: 1.5px dashed var(--thread); border-radius: 3px; padding: 22px 24px; }
html[lang^="fa"] .prose ol { list-style-type: persian; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.colours { margin-bottom: 18px; }
.colours__row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 4px 0 12px; }
.dye { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; text-align: center; cursor: pointer; }
.dye input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.dye__chip { width: 100%; max-width: 44px; aspect-ratio: 1; border-radius: 3px; background: var(--dye); box-shadow: inset 0 0 0 1px rgba(43, 26, 18, .2); }
.dye input:checked + .dye__chip { box-shadow: 0 0 0 2px var(--label), 0 0 0 4px var(--madder); }
.dye input:focus-visible + .dye__chip { outline: 2px solid var(--madder); outline-offset: 4px; }
.dye__name { color: var(--soft); line-height: 1.3; }
.dye input:checked ~ .dye__name { color: var(--madder); font-weight: 600; }
.field--inline { margin: 0; }
.tapes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tape {
  display: flex; align-items: center; border-radius: 4px; overflow: hidden; background-color: var(--tape); padding-top: 9px;
  background-image: repeating-linear-gradient(90deg, rgba(43, 26, 18, .75) 0 1px, transparent 1px 6px), repeating-linear-gradient(90deg, rgba(43, 26, 18, .9) 0 1px, transparent 1px 30px);
  background-size: 100% 6px, 100% 9px; background-repeat: no-repeat;
}
html[dir="rtl"] .tape { background-position: 100% 0, 100% 0; }
.field .tape input { background: transparent; border: 0; border-radius: 0; font-size: 20px; font-weight: 600; min-height: 46px; padding: 4px 12px; }
.tape input::placeholder { color: rgba(43, 26, 18, .45); }
.tape__unit { padding-inline-end: 12px; font-weight: 600; }
.tape-field.is-bad .tape { box-shadow: 0 0 0 2px var(--madder); }
.form__error { color: var(--madder); font-weight: 600; }

.receipt h1 { font-size: clamp(32px, 4.2vw, 50px); padding-top: 10px; }
.receipt h2 { font-size: 28px; margin: 36px 0 6px; }
.card--receipt { max-width: 520px; margin-top: 10px; }
.receipt .card__name { margin: 0; font-size: 26px; }
.messages { list-style: none; padding: 0; margin: 18px 0 30px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.messages h4 { font-family: var(--head); font-size: 21px; margin: 0 0 6px; }
.receipt__part { margin-top: 30px; }
.receipt__to { font-size: 22px; margin: 22px 0 0; }
.message { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 15px/1.9 var(--text); background: var(--label); border-radius: 3px; padding: 16px 18px; box-shadow: 0 1px 0 var(--thread); text-align: right; }  /* long links in the email must wrap on phones */

.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 50;
  background: var(--walnut); color: var(--label); padding: 12px 18px; border-radius: 6px; font-size: 15px; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Text pages and 404 ---------- */
.narrow { padding-top: 30px; padding-bottom: 60px; }
.prose h2 { font-size: 26px; margin: 34px 0 10px; }
.prose p, .prose li { max-width: 66ch; }
.prose ul { padding-inline-start: 20px; }
.prose li { margin-bottom: 8px; }
.lost__cloth { height: 70px; max-width: 360px; margin: 30px 0 26px; }

/* ---------- Footer ---------- */
.foot { background: var(--walnut); color: var(--card); margin-top: 40px; padding: 44px 0 50px; font-size: 14.5px; }
.foot__in { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.6fr; gap: 32px; }
.foot h2 { font-family: var(--text); font-weight: 600; font-size: 14.5px; margin-bottom: 10px; color: #D9BFAF; }
.foot nav a { display: block; padding: 4px 0; text-decoration: none; }
.foot a:hover { color: var(--tape); }
.logo--light { color: var(--card); margin-bottom: 12px; }
.logo--light .mark circle { fill: #4A3226; }
.foot p { color: #EBDDD3; max-width: 46ch; }

/* ---------- Phones and tablets ---------- */
@media (max-width: 980px) {
  .nav { display: none; }
  .finder, .seller__grid, .request__grid { grid-template-columns: minmax(0, 1fr); }
  .finder { gap: 20px; padding-top: 28px; }
  .finder__fan { max-width: 400px; width: 100%; margin-inline: auto; }
  .seller__side { padding-top: 0; }
  .foot__in { grid-template-columns: 1fr 1fr; }
  .method__steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .top__in { gap: 12px; min-height: 64px; }
  .logo__word { font-size: 27px; }
  .logo .mark { width: 28px; height: 30px; }
  .top__tools { gap: 12px; }
  .lang span, .stack__label { display: none; }
  .stack__short { display: inline; }
  .lang .icon { width: 22px; height: 22px; }
  .lang, .stack { min-height: 44px; min-width: 44px; justify-content: center; }
  .filters .field--select, .filters .field--select select { width: 100%; }
  .seg { width: 100%; }
  .seg label { flex: 1; }
  .seg span { text-align: center; padding: 10px 6px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .listbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .listbar .chip { flex: none; }
  .listbar__more { flex-wrap: nowrap; gap: 8px; }
  .listbar__more .field__label, .listbar__more .seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .listbar__more .field--select { flex: 1; min-width: 0; }
  .listbar__more .field--select select { min-width: 0; }
  .listbar__more .seg { width: auto; flex: 1.4; flex-wrap: nowrap; }
  .listbar__more .seg span { padding: 10px 4px; font-size: 14px; }
  .tray__text { min-width: 0; flex-basis: calc(100% - 50px); font-size: 15px; }
  .tray .btn { flex: 1; justify-content: center; }
  body.has-tray { padding-bottom: 120px; }
  .card--big .card__label { padding: 24px 18px 20px; }
  .facts--full { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts--full dd { margin-bottom: 10px; }
  .pair, .tapes { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tapes .field { margin-bottom: 16px; }
  .request__side { position: static; padding-top: 10px; }
  .whom__cloth { width: 44px; height: 44px; }
  .colours__row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .foot__in { grid-template-columns: minmax(0, 1fr); }
  .messages { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .swatch { transition: none; }
  }
