/* =====================================================================
   style.css — استایل سایت (RTL/LTR) — بدون هیچ فریمورکی
   ===================================================================== */
:root {
  --brand: #ea580c;
  --brand-dark: #c2410c;
  --brand-light: #fff7ed;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #fff7ed;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(900px 500px at 110% -10%, rgba(251,146,60,.18), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(244,63,94,.12), transparent 60%),
    linear-gradient(160deg, #fff7ed 0%, #fdf2f8 50%, #fef3c7 100%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: inherit; font-size: .9rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.section { padding: 48px 16px; }
.narrow { max-width: 640px; }
.mt { margin-top: 24px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.green { color: #16a34a; }
code { background: #f3f4f6; padding: 2px 8px; border-radius: 6px; direction: ltr; }

/* ---------------- دکمه‌ها ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; cursor: pointer; transition: .2s; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: #fff; border-color: var(--line); color: #374151; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-dark { background: #111827; color: #fff; }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-danger:hover { background: #fecaca; }
.btn-green { background: #16a34a; color: #fff; }
.btn-green:hover { background: #15803d; }
.btn-telegram { background: #0ea5e9; color: #fff; }
.btn-link { background: none; color: var(--muted); }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-xs { padding: 4px 10px; font-size: .72rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-glass { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); color: #fff; backdrop-filter: blur(4px); }
.btn-glass:hover { background: rgba(255,255,255,.22); }

/* ---------------- هدر (شیشه‌ای) ---------------- */
.site-header {
  background: rgba(255,255,255,.55);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,.6);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; flex-wrap: wrap; padding: 8px 16px; }
.header-right { display: flex; align-items: center; gap: 24px; }
.brand { font-weight: 900; font-size: 1.15rem; color: var(--brand); }
.main-nav { display: flex; gap: 18px; font-size: .85rem; font-weight: 600; }
.main-nav a:hover { color: var(--brand); }
.header-left { display: flex; align-items: center; gap: 8px; }
.inline-form { display: inline; }
.lang-form { display: inline; }
.cart-btn { position: relative; }
.cart-count { background: var(--brand); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .7rem; }

/* ---------------- هیرو ---------------- */
.hero {
  background: linear-gradient(120deg, #431407 0%, #7c2d12 45%, #ea580c 100%);
  color: #fff; padding: 90px 0;
}
.hero-badge { background: rgba(255,255,255,.15); padding: 4px 14px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 900; margin: 16px 0; max-width: 600px; line-height: 1.35; }
.hero p { max-width: 520px; opacity: .9; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* ---------------- کارت‌ها و گرید ---------------- */
.card {
  background: rgba(255,255,255,.6);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(31,38,135,.08);
}
.glass-dark {
  background: rgba(15,23,42,.55);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.14);
}
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.section-title { font-size: 1.6rem; font-weight: 900; text-align: center; }
.section-sub { text-align: center; color: var(--muted); margin: 8px auto 28px; max-width: 640px; font-size: .9rem; }

.service-card { display: flex; flex-direction: column; gap: 10px; transition: .2s; }
.service-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(234,88,12,.12); }
.service-icon { font-size: 2rem; }
.service-card h3 { font-size: 1.05rem; }
.service-card p { color: var(--muted); font-size: .85rem; flex: 1; }
.service-card .link { color: var(--brand); font-weight: 700; font-size: .85rem; }

/* ---------------- محصولات ---------------- */
.product-card { overflow: hidden; padding: 0; transition: .2s; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.1); }
.product-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.product-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.product-name { font-weight: 800; font-size: .9rem; }
.product-name:hover { color: var(--brand); }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-price { display: flex; flex-direction: column; font-size: .95rem; }
.product-price b { color: var(--brand); }
.product-price s { color: #9ca3af; font-size: .75rem; }
.product-price small { color: #9ca3af; font-size: .65rem; }
.out-stock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.5); color: #fff; font-weight: 800; }
.product-card > a { position: relative; }

/* ---------------- تلگرام CTA ---------------- */
.telegram-cta { background: #0f172a; color: #fff; padding: 40px 0; margin-top: 24px; }
.telegram-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.telegram-inner p { color: #94a3b8; max-width: 560px; font-size: .88rem; }

/* ---------------- فرم‌ها ---------------- */
input, select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; outline: none; transition: .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(234,88,12,.12); }
textarea { min-height: 72px; resize: vertical; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label, .field label { font-size: .75rem; color: var(--muted); display: block; margin-bottom: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.check input { width: auto; }
.search-form { display: flex; gap: 10px; max-width: 560px; margin: 0 auto 20px; }
.radio-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; }
.radio-row input { width: auto; }

/* ---------------- فیلترها ---------------- */
.cat-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 20px 0 28px; }
.cat-pill { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; font-size: .82rem; font-weight: 700; color: #4b5563; }
.cat-pill:hover { border-color: var(--brand); color: var(--brand); }
.cat-pill.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------------- سبد و تسویه ---------------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.cart-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
@media (max-width: 800px) { .cart-grid { grid-template-columns: 1fr; } }
.cart-items { display: flex; flex-direction: column; gap: 12px; }
.cart-item { display: flex; align-items: center; gap: 14px; }
.cart-item img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.ci-body { flex: 1; }
.ci-actions { display: flex; align-items: center; gap: 8px; }
.qty-val { min-width: 22px; text-align: center; }
.sum-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: .9rem; }
.sum-row.total { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 12px; font-size: 1rem; }
.sum-row.total b { color: var(--brand); }
.checkout-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
@media (max-width: 800px) { .checkout-grid { grid-template-columns: 1fr; } }
.checkout-grid .card { display: flex; flex-direction: column; gap: 12px; }

/* ---------------- رهگیری ---------------- */
.order-detail { display: flex; flex-direction: column; gap: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.order-no { font-size: 1.2rem; font-weight: 900; color: var(--brand); }
.order-items { display: flex; flex-direction: column; gap: 8px; }
.oi-row { display: flex; justify-content: space-between; font-size: .9rem; }
.oi-row.total { border-top: 1px dashed var(--line); padding-top: 10px; font-weight: 800; }
.oi-row.total b { color: var(--brand); }
.meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.meta { background: #f9fafb; border-radius: 10px; padding: 12px; }
.meta small { display: block; color: var(--muted); font-size: .7rem; }
.crypto-box { border: 1px solid #fed7aa; background: #fff7ed; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.crypto-amount { font-size: 1.3rem; font-weight: 900; }
.crypto-box code { display: block; background: #fff; padding: 10px; font-size: .78rem; word-break: break-all; }
.receipt-form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

/* ---------------- بج و هشدار ---------------- */
.badge { background: #f3f4f6; color: #374151; border-radius: 999px; padding: 2px 12px; font-size: .72rem; font-weight: 700; display: inline-block; white-space: nowrap; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.alert { border-radius: 12px; padding: 12px 16px; font-size: .85rem; margin: 12px 0; }
.alert.success { background: #dcfce7; color: #166534; }
.alert.error { background: #fee2e2; color: #b91c1c; }
.alert.warning { background: #fef3c7; color: #92400e; }
.empty { border: 2px dashed var(--line); background: #fff; border-radius: var(--radius); padding: 48px 20px; text-align: center; color: #9ca3af; }
.empty.small { padding: 16px; font-size: .8rem; }

/* ---------------- جدول‌های ادمین ---------------- */
.table-wrap { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; min-width: 720px; }
th { text-align: start; padding: 12px 14px; color: var(--muted); font-size: .72rem; border-bottom: 1px solid var(--line); }
td { padding: 12px 14px; border-bottom: 1px dashed #f3f4f6; vertical-align: top; }
tr:hover td { background: #fffbeb; }
.thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; display: inline-block; vertical-align: middle; margin-inline-end: 10px; }
.select-sm { width: auto; padding: 5px 10px; font-size: .75rem; }
.mini-list { margin: 6px 18px; font-size: .78rem; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.admin-nav a { background: #fff; border: 1px solid var(--line); padding: 8px 14px; border-radius: 10px; font-size: .8rem; font-weight: 700; color: #4b5563; }
.admin-nav a.active, .admin-nav a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.admin-logout { background: none; border: 1px solid #fecaca; color: #b91c1c; padding: 8px 14px; border-radius: 10px; font-size: .8rem; font-weight: 700; cursor: pointer; }
.stats-grid .stat { display: flex; flex-direction: column; gap: 4px; }
.stat-icon { font-size: 1.5rem; }
.stat b { font-size: 1.1rem; }
.stat small { color: var(--muted); }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .85rem; }
.list-card { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.log-pre { background: #0f172a; color: #86efac; padding: 10px; border-radius: 8px; font-size: .7rem; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.receipt-link img { border-radius: 10px; max-height: 180px; width: 100%; object-fit: cover; }
.btn-row { display: flex; gap: 10px; margin-top: 8px; }
.pay-card { display: flex; flex-direction: column; gap: 12px; }

/* ---------------- صفحهٔ محصول ---------------- */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 24px; }
@media (max-width: 800px) { .product-grid { grid-template-columns: 1fr; } }
.product-image img { border-radius: 20px; width: 100%; }
.product-info { display: flex; flex-direction: column; gap: 14px; }
.product-info h1 { font-size: 1.8rem; font-weight: 900; }
.cat-tag { background: #ffedd5; color: var(--brand-dark); border-radius: 999px; padding: 3px 14px; font-size: .75rem; font-weight: 800; width: fit-content; }
.product-desc { color: var(--muted); font-size: .9rem; }
.product-price.big { font-size: 1.5rem; }
.product-price.big b { color: var(--brand); }
.stock { font-size: .8rem; font-weight: 700; }
.stock.in { color: #16a34a; }
.stock.out { color: #dc2626; }
.add-row { display: flex; align-items: center; gap: 10px; }
.back-link { color: var(--muted); font-size: .85rem; }
.back-link:hover { color: var(--brand); }

/* ---------------- پروفایل ---------------- */
.profile-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 24px; }
@media (max-width: 800px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-grid h3 { margin-bottom: 12px; }

/* ---------------- فوتر ---------------- */
.site-footer { background: #0f172a; color: #cbd5e1; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding: 48px 16px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { color: #fff; font-weight: 900; font-size: 1.1rem; margin-bottom: 10px; }
.site-footer p { font-size: .85rem; opacity: .85; }
.footer-title { color: #fff; font-weight: 700; margin-bottom: 12px; font-size: .9rem; }
.footer-grid > div > a { display: block; font-size: .85rem; padding: 3px 0; }
.footer-grid a:hover { color: #fb923c; }
.footer-copy { border-top: 1px solid #1e293b; text-align: center; padding: 16px; font-size: .75rem; opacity: .6; }

/* ---------------- صندوق پیام ادمین ---------------- */
.msg-item { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; background: rgba(255,255,255,.7); }
.msg-item.out { border-color: #bbf7d0; background: rgba(240,253,244,.7); }
.msg-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .8rem; }
.msg-head b { font-size: .82rem; }
.msg-item p { margin: 8px 0; font-size: .85rem; white-space: pre-wrap; }
.reply-form { display: flex; gap: 8px; margin-top: 8px; }
.reply-form input { flex: 1; }
.small-p { font-size: .78rem; line-height: 1.9; }

/* ---------------- گالری ---------------- */
.gallery-grid { columns: 3 220px; column-gap: 14px; }
.gallery-item {
  position: relative; display: block; overflow: hidden; border-radius: 16px;
  margin-bottom: 14px; border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 8px 32px rgba(31,38,135,.08); break-inside: avoid;
}
.gallery-item img { width: 100%; transition: transform .5s; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-overlay {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  background: linear-gradient(to top, rgba(0,0,0,.7), transparent 60%);
  color: #fff; padding: 14px; opacity: 0; transition: .3s; font-weight: 700; font-size: .85rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ---------------- رزرو میز ---------------- */
.table-card {
  display: flex; flex-direction: column; gap: 6px; align-items: center; cursor: pointer;
  transition: .2s; width: 100%; text-align: center; font: inherit; color: inherit;
}
.table-card:not(.taken):hover { transform: translateY(-4px); border-color: #fdba74; }
.table-card.selected { border: 2px solid var(--brand); background: #fff7ed; }
.table-card.taken { opacity: .5; cursor: not-allowed; }
.seat-row { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.seat-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #d1d5db; background: #fff; }
.table-card.selected .seat-dot { border-color: var(--brand); background: #fdba74; }
.table-name { font-weight: 900; }

/* ---------------- توست ---------------- */
#toast { position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(50%); background: #16a34a; color: #fff; padding: 10px 22px; border-radius: 999px; font-weight: 700; font-size: .85rem; box-shadow: 0 8px 24px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transition: .25s; z-index: 99; }
[dir="ltr"] #toast { transform: translateX(-50%); }
#toast.show { opacity: 1; }
