/* ===== آنلاین شاپ شاین مُدا — پایه مشترک ===== */
:root {
  --ink: #1b1712;
  --ink-2: #4a4238;
  --muted: #8a8075;
  --paper: #f8f4ee;
  --card: #ffffff;
  --line: #e9e1d5;
  --sun: #f0a52c;
  --sun-deep: #d9861a;
  --sun-soft: #fff1d9;
  --sale: #e5383b;
  --sale-soft: #ffe8e6;
  --new-price: #0f9d6b;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --radius: 16px;
  --shadow: 0 10px 30px -12px rgba(40, 25, 5, .18);
  --shadow-lg: 0 30px 60px -20px rgba(40, 25, 5, .3);
  --font: 'Vazirmatn', Tahoma, sans-serif;
  --display: 'Lalezar', 'Vazirmatn', sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); direction: rtl; line-height: 1.7; font-feature-settings: "ss01"; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }
.ltr { direction: ltr; text-align: left; }
.muted { color: var(--muted); }
.hidden, [hidden] { display: none !important; }

/* دکمه‌ها */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 12px 22px; font-weight: 700; font-size: 15px; transition: transform .15s, box-shadow .2s, background .2s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; box-shadow: 0 8px 20px -8px rgba(0,0,0,.5); }
.btn-sun { background: linear-gradient(135deg, var(--sun), var(--sun-deep)); color: #2a1700; }
.btn-sun:hover { box-shadow: 0 10px 24px -10px var(--sun-deep); }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.link-btn { background: none; border: 0; color: var(--sun-deep); font-weight: 600; padding: 8px; }
.inp { width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; outline: none; transition: border .2s, box-shadow .2s; margin-bottom: 10px; }
.inp:focus { border-color: var(--sun); box-shadow: 0 0 0 4px var(--sun-soft); }
textarea.inp { min-height: 90px; resize: vertical; }

/* قیمت: قیمت قبلی خط‌خورده + قیمت جدید رنگی */
.price { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.price-old { position: relative; color: var(--muted); font-size: 13px; width: fit-content; }
.price-old::after { content: ""; position: absolute; inset: 50% -3px auto -3px; height: 2px; background: var(--sale); transform: rotate(-8deg); border-radius: 2px; }
.price-new { color: var(--new-price); font-weight: 800; font-size: 17px; }
.price-new.plain { color: var(--ink); }
.price-new small { font-size: 11px; font-weight: 500; color: var(--muted); }
.badge-off { background: var(--sale); color: #fff; font-weight: 800; font-size: 12px; padding: 3px 9px; border-radius: 20px; box-shadow: 0 6px 14px -6px var(--sale); }
.chip { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 30px; padding: 4px 12px; font-size: 13px; white-space: nowrap; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgba(0,0,0,.12); display: inline-block; }

/* مودال و دراور */
.modal-wrap { position: fixed; inset: 0; background: rgba(20, 14, 6, .55); backdrop-filter: blur(4px); z-index: 900; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .25s; padding: 16px; }
.modal-wrap.open { opacity: 1; pointer-events: auto; }
.modal { background: #fff; border-radius: 22px; padding: 28px; width: min(420px, 100%); position: relative; transform: translateY(20px) scale(.98); transition: transform .3s cubic-bezier(.2,.9,.3,1.2); max-height: 92vh; overflow: auto; }
.modal-wrap.open .modal { transform: none; }
.modal-x { position: absolute; top: 14px; left: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #f3eee6; font-size: 15px; z-index: 3; }
.login-box { text-align: center; }
.login-box h3 { margin: 4px 0; font-size: 22px; }
.login-sun { font-size: 40px; width: 74px; height: 74px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, #ffd27a, var(--sun)); color: #7a4300; box-shadow: 0 0 0 10px var(--sun-soft); }
.code-inp { letter-spacing: 12px; text-align: center; font-size: 22px; font-weight: 800; }

/* توست */
#toasts { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 30px; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-10px); transition: .3s; max-width: 90vw; }
.toast.show { opacity: 1; transform: none; }
.toast-err { background: var(--err); } .toast-warn { background: var(--warn); }

/* سبد خرید (دراور) */
.drawer-wrap { position: fixed; inset: 0; z-index: 800; background: rgba(20,14,6,.5); opacity: 0; pointer-events: none; transition: .25s; }
.drawer-wrap.open { opacity: 1; pointer-events: auto; }
.drawer { position: absolute; top: 0; bottom: 0; left: 0; width: min(430px, 100%); background: var(--paper); display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.drawer-wrap.open .drawer { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; }
.drawer-body { flex: 1; overflow: auto; padding: 14px 16px; }
.drawer-foot { padding: 16px 20px 22px; border-top: 1px solid var(--line); background: #fff; }
.ci { display: flex; gap: 12px; background: #fff; border-radius: 14px; padding: 10px; margin-bottom: 10px; box-shadow: 0 2px 8px -4px rgba(0,0,0,.08); }
.ci img { width: 78px; height: 96px; object-fit: cover; border-radius: 10px; }
.ci-info { flex: 1; min-width: 0; }
.ci-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.ci-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { width: 30px; height: 30px; border: 0; background: #fff; font-size: 16px; }
.qty span { min-width: 28px; text-align: center; font-weight: 700; }
.ci-del { border: 0; background: none; color: var(--muted); font-size: 18px; }
.sum-row { display: flex; justify-content: space-between; margin: 4px 0; font-size: 14px; }
.sum-row.total { font-size: 17px; font-weight: 800; margin-top: 8px; }
.sum-row .save { color: var(--sale); font-weight: 700; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .big { font-size: 54px; }

/* نشان امانت وجه */
.escrow-box { display: flex; gap: 12px; background: linear-gradient(135deg, #fff8ea, #fff); border: 1.5px dashed var(--sun); border-radius: 14px; padding: 14px; font-size: 13.5px; }
.escrow-box .ico { font-size: 28px; }
.ret-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.ret-yes { background: #e6f7ee; color: #0f7a4a; }
.ret-no { background: #f3f0ec; color: #8a7f72; }

/* جدول سایز */
.size-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: center; overflow: hidden; border-radius: 12px; }
.size-table th { background: var(--ink); color: #fff; font-weight: 600; padding: 8px 4px; }
.size-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.size-table tr:nth-child(even) td { background: #faf6f0; }

/* اسکلت لودینگ */
.skel { background: linear-gradient(90deg, #eee7dd 0%, #f7f2ea 50%, #eee7dd 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 14px; }
@keyframes sk { to { background-position: -200% 0; } }

/* صفحات داخلی (تسویه، حساب) */
.page { max-width: 1100px; margin: 0 auto; padding: 20px 16px 120px; }
.page-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 20px; }
.page-head h1 { margin: 0; font-size: 24px; }
.back-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 18px; display: grid; place-items: center; }
.panel { background: #fff; border-radius: 18px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.panel h2 { font-size: 17px; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } }
.radio-card { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; transition: .2s; }
.radio-card:has(input:checked) { border-color: var(--sun); background: var(--sun-soft); }
.radio-card input { accent-color: var(--sun-deep); width: 18px; height: 18px; }
.map-box { height: 260px; border-radius: 14px; overflow: hidden; margin-bottom: 10px; border: 1.5px solid var(--line); }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-top: 10px; }
.check-line input { width: 20px; height: 20px; accent-color: var(--sun-deep); flex-shrink: 0; margin-top: 3px; }
