/* فونت: اگر فایل Vazirmatn را در public/fonts بگذارید خودکار استفاده می‌شود */
@font-face {
  font-family: "Vazirmatn";
  src: local("Vazirmatn"), url("/fonts/Vazirmatn.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #FFF9E8;
  --paper: #fffdf6;
  --ink: #2b1217;
  --muted: #7a5a52;
  --burg: #931913;
  --burg-d: #5a0f0b;
  --burg-l: #b3261c;
  --gold: #96BAE4;
  --gold-l: #d6e5f6;
  --line: rgba(147, 25, 19, 0.2);
  --radius: 18px;
  --font: "Vazirmatn", "Vazir", "IRANSans", Tahoma, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.8;
  min-height: 100vh;
  background-image: radial-gradient(rgba(147, 25, 19, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
}
body.loading { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
img { max-width: 100%; display: block; }

/* ───────────── لودر ───────────── */
#loader {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: radial-gradient(circle at 50% 42%, var(--burg-l) 0%, var(--burg) 38%, var(--burg-d) 100%);
  color: var(--gold-l);
  transition: opacity 0.7s ease, visibility 0.7s;
}
#loader.done { opacity: 0; visibility: hidden; }
.stage { position: relative; width: min(78vw, 340px); aspect-ratio: 1; }
.stage .guide { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.22; }
.stage .core { position: absolute; left: 50%; top: 50%; width: 21%; transform: translate(-50%, -50%); color: var(--bg); }
.stage .core svg { width: 100%; height: auto; display: block; animation: corePulse 2.4s ease-in-out infinite; }
.stage .fly {
  position: absolute; left: 50%; top: 50%; width: 17%; aspect-ratio: 1;
  margin: -8.5% 0 0 -8.5%; opacity: 0; will-change: transform, opacity;
  color: var(--bg);
}
.stage .fly svg { width: 100%; height: 100%; }
.loader-text { font-size: 0.95rem; letter-spacing: 0.02em; opacity: 0.85; }
@keyframes corePulse { 50% { transform: scale(1.07); } }

/* ───────────── سربرگ ───────────── */
.hero {
  position: relative; overflow: hidden; text-align: center; color: var(--gold-l);
  padding: 56px 20px 64px;
  background: radial-gradient(circle at 50% 30%, var(--burg-l) 0%, var(--burg) 45%, var(--burg-d) 100%);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 26px;
  background: var(--bg);
  clip-path: ellipse(60% 100% at 50% 100%);
}
.hero-bg { position: absolute; inset: -20%; display: grid; place-items: center; opacity: 0.1; pointer-events: none; }
.hero-bg svg { width: min(130vw, 900px); animation: heroSpin 90s linear infinite; color: var(--gold); }
@keyframes heroSpin { to { transform: rotate(360deg); } }
.hero-inner { position: relative; }
.logo { width: 112px; margin: 0 auto 14px; color: var(--bg); }
.logo svg { width: 100%; height: auto; display: block; animation: logoIn 1.1s cubic-bezier(.2,.8,.3,1) both; }
@keyframes logoIn { from { opacity: 0; transform: scale(.9) rotate(-4deg); } }
.hero h1.wordmark { margin: 0 auto; width: min(72vw, 300px); line-height: 0; color: var(--gold); }
.hero h1.wordmark svg { width: 100%; height: auto; display: block; }
.tagline-fa { margin: 10px auto 0; width: min(46vw, 190px); color: var(--bg); line-height: 0; }
.tagline-fa svg { width: 100%; height: auto; display: block; }
.hero-label {
  display: inline-block; margin-top: 20px; padding: 3px 18px; font-size: 0.82rem;
  border: 1px solid rgba(150, 186, 228, 0.55); border-radius: 999px; color: var(--gold);
}

/* ───────────── رای‌دادن ───────────── */
.rate { max-width: 520px; margin: 4px auto 0; padding: 14px 16px 6px; text-align: center; }
.rate[hidden] { display: none; }
.rate-title { font-weight: 700; color: var(--burg-d); font-size: 1.02rem; }
.stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; margin-top: 4px; }
.stars button { font-size: 2.1rem; line-height: 1.2; color: rgba(147, 25, 19, .28); transition: color .15s, transform .15s; padding: 0 2px; }
.stars button.on, .stars:not(.locked) button:hover, .stars:not(.locked) button:hover ~ button { color: var(--burg); }
.stars:not(.locked) button:hover { transform: scale(1.15); }
.stars.locked button { cursor: default; }
.rate-note { margin-top: 2px; font-size: .88rem; color: var(--muted); min-height: 1.4em; }

/* ───────────── رای به غذا ───────────── */
.vote-row { display: flex; gap: 8px; margin-top: 8px; }
.vote-row select { flex: 1; min-width: 0; font: inherit; color: var(--ink); padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); }
.vote-row button { flex: none; padding: 0 18px; border-radius: 12px; background: var(--burg); color: var(--bg); font-weight: 700; transition: opacity .2s, transform .15s; }
.vote-row button:disabled { opacity: .45; cursor: not-allowed; }
.vote-row button:not(:disabled):hover { transform: translateY(-1px); }

/* ───────────── محتوا ───────────── */
main { max-width: 1040px; margin: 0 auto; padding: 8px 16px 40px; }

.section { padding-top: 34px; scroll-margin-top: 14px; }
.section-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; color: var(--burg); }
.section-head h2 { font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 800; white-space: nowrap; }
.section-head .orn { width: 32px; flex: none; color: var(--gold); }
.section-head .orn svg { width: 100%; height: auto; display: block; }
.section-head .rule { flex: 1; height: 2px; background: linear-gradient(to left, var(--line), transparent); border-radius: 2px; }

.items { display: grid; gap: 4px 44px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .items { grid-template-columns: 1fr 1fr; } }

.item {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.item .thumb {
  flex: none; width: 132px; height: 132px; border-radius: 18px; overflow: hidden; border: 2px solid var(--gold);
  background: var(--burg); padding: 0; cursor: zoom-in; position: relative;
}
.item .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; opacity: 0; transition: opacity .35s ease; }
.item .thumb img.on { opacity: 1; }
.item .thumb.multi { cursor: pointer; }
.thumb .dots { position: absolute; bottom: 4px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; pointer-events: none; }
.thumb .dots i, .gal-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 249, 232, .5); transition: .25s; display: block; }
.thumb .dots i.on, .gal-dots i.on { background: var(--bg); transform: scale(1.25); }
.thumb .zoom { position: absolute; top: 6px; left: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(90, 15, 11, .75); color: var(--bg); font-size: 14px; line-height: 26px; text-align: center; }
.item.has-img .row { flex-wrap: wrap; row-gap: 0; }
.item.has-img .leader { display: none; }
.item.has-img { min-height: 132px; }
@media (min-width: 860px) { .item .thumb { width: 150px; height: 150px; } .item.has-img { min-height: 150px; } }
.item .info { flex: 1; min-width: 0; }
.item .row { display: flex; align-items: baseline; gap: 8px; }
.item .name { font-size: 1.12rem; font-weight: 700; color: var(--burg-d); line-height: 1.6; }
.item .leader { flex: 1; min-width: 16px; border-bottom: 2px dotted rgba(147, 25, 19, 0.3); transform: translateY(-5px); }
.item .price { font-weight: 800; color: var(--burg); white-space: nowrap; font-size: 1.05rem; }
.item .price small { font-weight: 500; font-size: 0.72rem; color: var(--muted); margin-inline-start: 3px; }
.item .desc { margin-top: 1px; font-size: 0.86rem; color: var(--muted); line-height: 1.75; }
.badge {
  display: inline-block; margin-inline-start: 8px; padding: 0 9px; font-size: 0.7rem; font-weight: 700; line-height: 1.7;
  border-radius: 999px; background: var(--burg); color: var(--gold-l); vertical-align: middle;
}
.item.soldout .name, .item.soldout .desc { opacity: 0.5; }
.item.soldout .price { color: var(--muted); font-weight: 600; font-size: 0.85rem; }

/* ───────────── نقل‌قول ───────────── */
.quote {
  position: relative; margin: 44px auto 6px; padding: 34px 28px 28px; text-align: center; max-width: 760px;
  color: var(--gold-l); border-radius: 26px; overflow: hidden;
  background: radial-gradient(circle at 20% 0%, var(--burg-l), var(--burg) 55%, var(--burg-d));
  box-shadow: 0 14px 34px rgba(90, 15, 11, 0.28);
}
.quote::before, .quote::after {
  content: "“"; position: absolute; font-family: Georgia, serif; font-size: 7rem; line-height: 1; color: var(--gold); opacity: 0.35;
}
.quote::before { top: -6px; right: 18px; }
.quote::after { content: "”"; bottom: -44px; left: 18px; }
.quote blockquote { position: relative; font-size: clamp(1.15rem, 4.2vw, 1.55rem); font-weight: 600; line-height: 2; color: #FFF9E8; }
.quote figcaption { margin-top: 8px; font-size: 0.9rem; color: var(--gold); }
.quote .spin { position: absolute; left: 50%; top: 50%; width: 360px; margin: -180px 0 0 -180px; opacity: 0.06; color: var(--gold); animation: heroSpin 80s linear infinite; pointer-events: none; }

/* ───────────── مقاله و اسلایدر ───────────── */
.articles { margin-top: 58px; padding: 40px 0 10px; border-top: 2px solid var(--line); scroll-margin-top: 14px; }
.articles-head { text-align: center; margin-bottom: 22px; }
.articles-head .orn { width: 38px; margin: 0 auto 6px; color: var(--gold); }
.articles-head h2 { font-size: clamp(1.5rem, 5vw, 2rem); color: var(--burg); font-weight: 800; }
.articles-head p { color: var(--muted); font-size: 0.95rem; }

.slider { position: relative; }
.track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 10px 4px 22px; scrollbar-width: none; -webkit-overflow-scrolling: touch; cursor: grab;
}
.track::-webkit-scrollbar { display: none; }
.track.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.card {
  flex: 0 0 min(78%, 290px); scroll-snap-align: center; text-align: right;
  background: var(--paper); border-radius: var(--radius); overflow: hidden; padding: 0;
  border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(90, 15, 11, 0.12);
  transition: transform 0.3s, box-shadow 0.3s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(90, 15, 11, 0.2); }
.card .pic { aspect-ratio: 4 / 3; background: var(--burg); overflow: hidden; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.card .txt { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.card h3 { font-size: 1.1rem; color: var(--burg-d); font-weight: 800; }
.card p { font-size: 0.86rem; color: var(--muted); }
.card .more { margin-top: auto; padding-top: 8px; font-size: 0.85rem; font-weight: 700; color: var(--burg); }
.arrow {
  position: absolute; top: 40%; width: 42px; height: 42px; border-radius: 50%; z-index: 2;
  background: var(--burg); color: var(--gold-l); font-size: 1.2rem; display: none; place-items: center;
  box-shadow: 0 6px 14px rgba(90, 15, 11, 0.35); transition: transform 0.2s, background 0.2s;
}
.arrow:hover { background: var(--burg-l); transform: scale(1.08); }
.arrow.prev { right: -14px; } .arrow.next { left: -14px; }
@media (hover: hover) and (min-width: 700px) { .arrow { display: grid; } }
.hint { text-align: center; font-size: 0.78rem; color: var(--muted); margin-top: -8px; }

/* ───────────── فوتر ───────────── */
.footer { margin-top: 30px; padding: 36px 20px 44px; text-align: center; color: var(--gold-l); background: var(--burg-d); }
.footer-logo { width: 54px; margin: 0 auto 10px; color: var(--bg); }
.footer-logo svg { width: 100%; height: auto; display: block; }
.footer-words { display: grid; justify-items: center; gap: 8px; }
.footer-words .w1 { width: 120px; color: var(--gold); line-height: 0; }
.footer-words .w2 { width: 84px; color: var(--bg); line-height: 0; }
.footer-words svg { width: 100%; height: auto; display: block; }
.footer-info { margin-top: 10px; display: grid; gap: 14px; justify-items: center; }
.footer-address { font-size: .95rem; opacity: .92; max-width: 340px; line-height: 1.9; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.footer-links .pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255, 249, 232, .35); color: var(--bg); text-decoration: none; font-size: .92rem; transition: background .2s, transform .15s, color .2s; }
.footer-links .pill svg { width: 20px; height: 20px; flex: none; }
.contact { margin: 54px auto 0; padding: 30px 0 6px; border-top: 2px solid var(--line); }
.contact .footer-address { color: var(--burg-d); font-weight: 600; }
.contact .footer-links { gap: 26px; }
.contact .pill { flex-direction: column; gap: 6px; padding: 4px 8px; border: 0; background: none; color: var(--burg); font-size: .82rem; font-weight: 600; border-radius: 12px; }
.contact .pill svg { width: 34px; height: 34px; stroke-width: 1.5; }
.contact .pill:hover, .contact .pill:active { background: none; color: var(--burg-l); border-color: transparent; transform: translateY(-2px); }
.contact + .articles { margin-top: 30px; border-top: 0; padding-top: 10px; }
.footer-links .pill:hover, .footer-links .pill:active { background: var(--gold); color: var(--burg-d); border-color: var(--gold); transform: translateY(-1px); }

/* ───────────── پاپ‌آپ ───────────── */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(30, 4, 12, 0.72); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); animation: fade 0.25s ease; }
.modal-card {
  position: relative; width: min(560px, 100%); max-height: 92vh; overflow-y: auto; outline: none;
  background: var(--paper); border-radius: 24px; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  animation: pop 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.modal-close {
  position: absolute; top: 12px; left: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(90, 15, 11, 0.85); color: var(--gold-l); font-size: 1rem; display: grid; place-items: center;
}
.modal-img { aspect-ratio: 1 / 1; background: #efece6; position: relative; overflow: hidden; }
.modal-img img { width: 100%; height: 100%; object-fit: contain; transition: opacity .3s; }
.gal-btn { position: absolute; top: 50%; width: 38px; height: 38px; margin-top: -19px; border-radius: 50%; background: rgba(90, 15, 11, .75); color: var(--bg); font-size: 1.4rem; line-height: 1; display: grid; place-items: center; }
.gal-btn.prev { right: 10px; } .gal-btn.next { left: 10px; }
.gal-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.gal-dots i { cursor: pointer; width: 8px; height: 8px; }
.modal-body { padding: 20px 22px 26px; }
.modal-body h3 { font-size: 1.4rem; color: var(--burg-d); font-weight: 800; line-height: 1.6; }
.modal-price { margin-top: 2px; color: var(--burg); font-weight: 800; }
.modal-text { margin-top: 10px; color: #4a2b31; font-size: 0.98rem; }
.modal-text p + p { margin-top: 10px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(0.95); } }

/* ───────────── نمایش نرم هنگام اسکرول ───────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg svg, .quote .spin, .stage .core svg, .logo svg { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
@media print { .cats, #loader, .arrow { display: none !important; } }
