@font-face { font-family: 'Vazirmatn'; src: url('../vendor/fonts/Vazirmatn-Variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Marcellus'; src: url('../vendor/fonts/Marcellus-Regular.woff2') format('woff2'); font-display: swap; unicode-range: U+0000-002F, U+003A-10FFFF; }

/* The bazaar shares the Divan's palette: lapis, turquoise, gold on paper. */
:root {
  /* Warm Iranian colours: ivory paper, saffron, pomegranate, Yazd brick, a deep cocoa night; turquoise as accent. */
  --lapis: #2a1712; --lapis2: #3a2119; --lapis3: #6b3424;
  --turq: #1f8a86; --turq-d: #15625f; --turq-l: #7cc9c3;
  --gold: #d9952b; --gold-l: #f0c77a; --gold-d: #a8701c;
  --paper: #faf5ec; --paper2: #f1e7d6; --card: #fffdf8;
  --ink: #2b1d16; --ink2: #7a6656; --line: #ebdfcb;
  --clay: #b5562d; --madder: #a3262a; --ok: #3f7d4e;
  --shadow: 0 1px 2px rgba(43, 29, 22, .04), 0 8px 24px rgba(43, 29, 22, .06);
  --radius: 18px;
  --display: 'Marcellus', 'Vazirmatn', Georgia, serif;
  --body: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 15px/1.6 var(--body); }
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; opacity: .05; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%231f1c2c' stroke-width='1.2'%3E%3Cpath d='M40 8 49 31 72 40 49 49 40 72 31 49 8 40 31 31Z'/%3E%3Cpath d='M17 17 40 26 63 17 54 40 63 63 40 54 17 63 26 40Z'/%3E%3Ccircle cx='40' cy='40' r='7'/%3E%3C/g%3E%3C/svg%3E");
}
a { color: var(--lapis3); text-decoration: none; }
a:hover { color: var(--clay); }
button, input, select, textarea { font: inherit; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--ink2); }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.wrap { max-width: 1220px; margin: 0 auto; padding: 0 20px; }

/* ---------------------------------------------------------------- the gate: an arched bazaar front */
.gate { position: relative; color: var(--paper); background: linear-gradient(180deg, #0c1436, var(--lapis)); overflow: hidden; }
.gate::before { content: ''; position: absolute; inset: 0; opacity: .14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='96' viewBox='0 0 72 96'%3E%3Cpath d='M6 96V40a30 30 0 0 1 60 0v56' fill='none' stroke='%23c9a14a' stroke-width='1.4'/%3E%3Cpath d='M18 96V44a18 18 0 0 1 36 0v52' fill='none' stroke='%231fa3a0' stroke-width='1.1'/%3E%3C/svg%3E");
  background-size: 72px 96px; }
.gate::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='12' viewBox='0 0 28 12'%3E%3Crect width='28' height='12' fill='%23c9a14a'/%3E%3Cpath d='M14 1 17 6 14 11 11 6Z' fill='%230f1840'/%3E%3C/svg%3E") repeat-x; }
.gate-in { position: relative; max-width: 1220px; margin: 0 auto; padding: 16px 20px 34px; }
.topbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--paper); }
.brand:hover { color: var(--gold-l); }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand b { font: 24px/1 var(--display); letter-spacing: .06em; display: block; }
.brand small { display: block; font-size: 11.5px; color: var(--gold-l); letter-spacing: .08em; margin-top: 3px; }
.topbar .sp { flex: 1; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: #dfe3f5; padding: 6px 12px; border-radius: 99px; font-size: 14px; }
.nav a:hover, .nav a.on { background: rgba(201,161,74,.18); color: var(--gold-l); }
.lang { display: inline-flex; background: rgba(255,255,255,.08); border: 1px solid rgba(201,161,74,.4); border-radius: 99px; padding: 2px; }
.lang button { background: none; border: 0; color: var(--paper); padding: 3px 11px; border-radius: 99px; font-size: 13px; cursor: pointer; }
.lang button.on { background: var(--gold); color: var(--lapis); font-weight: 700; }
.who { display: inline-flex; align-items: center; gap: 8px; color: var(--gold-l); font-size: 13px; }
.hero { text-align: center; margin-top: 22px; }
.hero h1 { font: 36px/1.15 var(--display); margin: 0; letter-spacing: .03em; }
[dir='rtl'] .hero h1 { font-family: var(--body); font-weight: 800; letter-spacing: 0; }
.hero p { margin: 10px auto 0; max-width: 680px; color: #cfd3ea; }
.preview-tag { display: inline-block; margin-top: 10px; padding: 3px 12px; border-radius: 99px; background: rgba(224,138,42,.2); color: #ffd9a6; font-size: 12.5px; border: 1px solid rgba(224,138,42,.5); }

/* ---------------------------------------------------------------- buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 9px 16px; cursor: pointer; font-weight: 600; text-decoration: none !important; transition: transform .1s, box-shadow .2s, background .2s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-gold { background: linear-gradient(180deg, var(--gold-l), var(--gold)); color: var(--lapis); box-shadow: 0 2px 0 var(--gold-d); }
.btn-turq { background: var(--turq); color: #fff; box-shadow: 0 2px 0 var(--turq-d); }
.btn-ghost { background: transparent; color: var(--lapis3); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--paper2); }
.btn-sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.gate .btn-ghost { color: var(--gold-l); box-shadow: inset 0 0 0 1px rgba(201,161,74,.45); }
.gate .btn-ghost:hover { background: rgba(201,161,74,.12); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > span { font-size: 13px; color: var(--ink2); }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); background: #fffdf7; border-radius: 10px; padding: 9px 12px; color: var(--ink); outline: none; }
.input:focus { border-color: var(--turq); box-shadow: 0 0 0 3px rgba(31,163,160,.18); }
textarea.input { min-height: 90px; resize: vertical; }

/* ---------------------------------------------------------------- layout */
main { padding: 26px 0 60px; }
.cols { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.panel > header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel > header h2 { margin: 0; font: 19px/1.2 var(--display); }
[dir='rtl'] .panel > header h2 { font-family: var(--body); font-weight: 700; }
.panel .body { padding: 16px 18px; }
.filters h3 { margin: 14px 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); }
.filters h3:first-child { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: #fffdf7; border-radius: 99px; padding: 4px 11px; font-size: 13px; cursor: pointer; color: var(--ink); }
.chip.on { background: var(--lapis); color: var(--gold-l); border-color: var(--lapis); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .input { max-width: 260px; }
.toolbar .sp { flex: 1; }

/* ---------------------------------------------------------------- the stalls */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--ink); display: flex; flex-direction: column; transition: transform .15s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(31,28,44,.16); color: var(--ink); }
.card .pic { aspect-ratio: 1; background: #e9dfc6 center/cover no-repeat; position: relative; }
.card .pic img, .card .pic video { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .kind { position: absolute; top: 8px; inset-inline-start: 8px; background: rgba(15,24,64,.78); color: var(--gold-l); font-size: 11px; padding: 2px 8px; border-radius: 99px; }
.card .meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.card .meta b { font: 16px/1.3 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[dir='rtl'] .card .meta b { font-family: var(--body); font-weight: 700; }
.card .meta small { color: var(--ink2); font-size: 12.5px; }
.price { display: flex; gap: 8px; align-items: baseline; margin-top: 6px; font-weight: 700; color: var(--lapis3); }
.price .t { font-size: 12px; color: var(--ink2); font-weight: 500; }
.empty { text-align: center; color: var(--ink2); padding: 50px 10px; }

/* ---------------------------------------------------------------- a work */
.work { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.stage { background: #e9dfc6; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.stage img, .stage video { width: 100%; display: block; max-height: 78vh; object-fit: contain; background: #e9dfc6; }
.work h1 { font: 32px/1.2 var(--display); margin: 0 0 6px; }
[dir='rtl'] .work h1 { font-family: var(--body); font-weight: 800; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; margin: 14px 0; }
.kv span:nth-child(odd) { color: var(--ink2); }
.attrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 12px 0; }
.attr { background: rgba(31,163,160,.08); border: 1px solid rgba(31,163,160,.3); border-radius: 10px; padding: 6px 10px; }
.attr small { display: block; color: var(--turq-d); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.buybox { background: linear-gradient(180deg, #fffaf0, var(--card)); border: 1px solid var(--gold); border-radius: var(--radius); padding: 16px; margin: 14px 0; }
.buybox .big { font: 30px/1 var(--display); color: var(--lapis); }
.split { font-size: 12.5px; color: var(--ink2); margin-top: 6px; }
.note { padding: 10px 12px; border-radius: 10px; background: rgba(34,51,122,.08); color: var(--lapis3); font-size: 13.5px; margin: 10px 0; }
.note.warn { background: rgba(156,31,36,.08); color: var(--madder); }
.note.ok { background: rgba(47,143,106,.1); color: var(--ok); }
table.sales { width: 100%; border-collapse: collapse; font-size: 13px; }
table.sales td { padding: 6px 4px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- creating */
.create { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; }
.drop { border: 2px dashed var(--gold); border-radius: var(--radius); background: rgba(201,161,74,.07); min-height: 260px; display: grid; place-items: center; text-align: center; padding: 20px; cursor: pointer; position: relative; overflow: hidden; }
.drop.over { background: rgba(31,163,160,.1); border-color: var(--turq); }
.drop img, .drop video { max-width: 100%; max-height: 360px; border-radius: 10px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tab { border: 0; background: var(--paper2); padding: 7px 16px; border-radius: 99px; cursor: pointer; color: var(--ink); }
.tab.on { background: var(--lapis); color: var(--gold-l); }
.attr-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; margin-bottom: 6px; }
input[type=range] { width: 100%; accent-color: var(--turq); }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { padding: 8px 0 8px 30px; position: relative; font-size: 13.5px; color: var(--ink2); }
[dir='rtl'] .steps li { padding: 8px 30px 8px 0; }
.steps li::before { content: '·'; position: absolute; inset-inline-start: 6px; color: var(--gold-d); font-weight: 900; }
.steps li.now { color: var(--lapis); font-weight: 700; }
.steps li.done { color: var(--ok); }
.steps li.done::before { content: '✓'; }

/* ---------------------------------------------------------------- the closed bazaar */
.soon { max-width: 900px; margin: 0 auto; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 20px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.feature b { display: block; font: 17px/1.3 var(--display); margin-bottom: 4px; color: var(--lapis); }
[dir='rtl'] .feature b { font-family: var(--body); font-weight: 700; }
.feature p { margin: 0; font-size: 14px; color: var(--ink2); }

.modal { position: fixed; inset: 0; background: rgba(15,24,64,.55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal .panel { width: min(440px, 100%); }
.wallets { display: flex; flex-direction: column; gap: 8px; }
.wallets img { width: 22px; height: 22px; border-radius: 5px; }
footer.foot { text-align: center; color: var(--ink2); font-size: 13px; padding: 26px 16px 40px; }

@media (max-width: 860px) {
  .cols, .work, .create { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
}


/* ---------------------------------------------------------------- the warm, minimal look */
body::before { opacity: .025; }
.gate { background: var(--lapis); }
.gate::before { opacity: .06; background-size: 96px 128px; }
.gate::after { height: 4px; background: linear-gradient(90deg, var(--madder) 0 25%, var(--gold) 25% 50%, var(--turq) 50% 75%, var(--clay) 75%); }
.gate-in { padding: 14px 24px 34px; }
.brand small { color: var(--gold-l); opacity: .8; letter-spacing: .12em; }
.nav a { color: #e9dccb; }
.nav a:hover, .nav a.on { background: rgba(240,199,122,.14); color: var(--gold-l); }
.hero h1 { font-size: 40px; letter-spacing: .01em; }
.hero p { color: #e2d3c0; }
.preview-tag { background: rgba(217,149,43,.16); border-color: rgba(217,149,43,.45); color: var(--gold-l); }
.btn { border-radius: 12px; }
.btn-gold { background: var(--gold); color: var(--lapis); box-shadow: none; }
.btn-gold:hover { background: var(--gold-l); }
.btn-turq { background: var(--madder); box-shadow: none; }
.btn-turq:hover { background: #8a1f23; }
.btn-ghost { box-shadow: inset 0 0 0 1px var(--line); color: var(--lapis3); }
.panel { border: 0; box-shadow: var(--shadow); }
.chip { background: var(--card); }
.chip.on { background: var(--lapis); border-color: var(--lapis); color: var(--gold-l); }
.card { border: 0; box-shadow: var(--shadow); }
.card:hover { box-shadow: 0 16px 36px rgba(43,29,22,.14); }
.card .pic { background-color: var(--paper2); }
.card .kind { background: rgba(42,23,18,.72); color: var(--gold-l); }
.price { color: var(--clay); }
.stage { border: 0; }
.buybox { border: 0; background: var(--card); box-shadow: var(--shadow), inset 0 0 0 1px rgba(217,149,43,.45); }
.buybox .big { color: var(--lapis); }
.attr { background: rgba(217,149,43,.08); border-color: rgba(217,149,43,.3); }
.attr small { color: var(--gold-d); }
.drop { border-color: rgba(217,149,43,.6); background: rgba(217,149,43,.05); }
.tab.on { background: var(--lapis); color: var(--gold-l); }
.feature { border: 0; box-shadow: var(--shadow); }
.feature b { color: var(--clay); }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,149,43,.18); }
input[type=range] { accent-color: var(--clay); }
.buybox .big, .price { font-family: var(--body); font-weight: 700; letter-spacing: -.01em; }

/* Touch targets on phones: the language switch and small links. */
@media (pointer: coarse), (max-width: 760px) {
  .lang button { min-height: 36px; min-width: 44px; padding: 6px 14px; }
  .toplink { display: inline-block; padding: 10px 4px; }
  .chip { min-height: 34px; padding: 6px 13px; }
}
