/* لوموتو — هویت بصری: اسباب‌بازی‌فروشیِ گرم و مدرن */
@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #FAF6F0;
  --bg2: #FFFFFF;
  --ink: #23180F;
  --ink2: #6B5D4F;
  --line: #EADFD2;
  --accent: #E5484D;
  --accent-ink: #fff;
  --accent2: #F5A623;
  --ok: #2E9E5B;
  --bad: #D33;
  --r: 18px;
  --shadow: 0 10px 30px rgba(60, 35, 10, .08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Vazirmatn', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  direction: rtl;
  line-height: 1.75;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 15px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ── هدر ── */
header.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 240, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 21px; }
.logo .dot { width: 30px; height: 30px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; color: #fff; font-size: 17px; transform: rotate(-8deg); }
.spacer { flex: 1; }
.navlink { font-size: 14px; color: var(--ink2); padding: 6px 10px; border-radius: 10px; }
.navlink:hover { background: var(--line); color: var(--ink); }

/* ── دکمه‌ها ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 14px; padding: 12px 22px;
  font-size: 15px; font-weight: 800; transition: transform .1s, box-shadow .2s;
  box-shadow: 0 6px 18px rgba(229, 72, 77, .25);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.small { padding: 8px 14px; font-size: 13px; border-radius: 11px; }

/* ── کارت ── */
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }

/* ── فرم ── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--ink2); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); outline: none; transition: border .15s;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.hint { font-size: 12px; color: var(--ink2); }

/* ── تایمر / تایم‌لاین سفارش ── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tstep { display: flex; gap: 14px; position: relative; padding-bottom: 26px; }
.tstep:last-child { padding-bottom: 0; }
.tstep::before {
  content: ''; position: absolute; right: 15px; top: 34px; bottom: 0; width: 3px;
  background: var(--line); border-radius: 2px;
}
.tstep:last-child::before { display: none; }
.tstep .ticon {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px;
  display: grid; place-items: center; font-size: 15px; z-index: 1;
  background: var(--line); color: var(--ink2); font-weight: 800;
}
.tstep.done .ticon { background: var(--ok); color: #fff; }
.tstep.active .ticon { background: var(--accent2); color: #fff; animation: pulse 1.6s infinite; }
.tstep.failed .ticon { background: var(--bad); color: #fff; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(245,166,35,.4);} 50% { box-shadow: 0 0 0 10px rgba(245,166,35,0);} }
.tstep h4 { font-size: 15px; }
.tstep p { font-size: 13px; color: var(--ink2); }
.tstep .tmedia { margin-top: 10px; }
.tstep .tmedia img { border-radius: 14px; max-width: 320px; border: 1px solid var(--line); }

/* ── مودال ── */
.modal-back {
  position: fixed; inset: 0; background: rgba(30, 18, 8, .5); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-back.show { display: flex; }
.modal { background: var(--bg2); border-radius: 20px; padding: 24px; width: 100%; max-width: 400px; }
.modal h3 { margin-bottom: 14px; }

/* ── toast ── */
#toast {
  position: fixed; bottom: 24px; right: 50%; transform: translateX(50%);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 14px;
  font-size: 14px; z-index: 200; display: none; max-width: 90vw;
}

/* ── گرید سبک‌ها ── */
.styles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.style-card {
  background: var(--bg2); border: 2px solid var(--line); border-radius: var(--r);
  overflow: hidden; cursor: pointer; transition: border .15s, transform .15s; position: relative;
}
.style-card:hover { transform: translateY(-3px); }
.style-card.sel { border-color: var(--accent); box-shadow: 0 8px 24px rgba(229,72,77,.18); }
.style-card .simg { aspect-ratio: 3/4; background: #EEE5D8 center/cover no-repeat; }
.style-card .sname { padding: 10px 12px 4px; font-weight: 800; font-size: 14px; }
.style-card .sprice { padding: 0 12px 10px; font-size: 12.5px; color: var(--ink2); }
.style-card .badge {
  position: absolute; top: 10px; right: 10px; background: var(--accent2); color: #fff;
  font-size: 11px; font-weight: 800; border-radius: 8px; padding: 2px 8px;
}

/* عمومی */
.muted { color: var(--ink2); }
.center { text-align: center; }
h1, h2, h3 { line-height: 1.4; }
.price { font-weight: 900; color: var(--accent); }
footer.foot { border-top: 1px solid var(--line); margin-top: 60px; padding: 30px 0; font-size: 13px; color: var(--ink2); }
@media (max-width: 640px) {
  .styles-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
