/* =======================
   Responsive main.css
   نسخه واکنش‌گرا – بدون تغییر در ظاهر اصلی
======================= */

:root {
  --bg: #faf7f2;
  --ink: #2b2b2b;
  --brand: #8b5e34;
  --muted: #8a8a8a;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(0,0,0,.06);
}

/* ========== پایه ========== */
html, body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: 'Shabnam', sans-serif;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--brand); text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

header { background: #fff; border-bottom: 1px solid #eee; }
.site-footer { border-top: 1px solid #eee; margin-top: 60px; padding: 18px 0; color: var(--muted); }

.navbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.logo { font-weight: 800; letter-spacing: .3px; }
.nav { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
.nav a { padding: 8px 12px; border-radius: 10px; font-size: 20px; transition: background .2s; }
.nav a:hover { background: #fff; border: 1px solid #eee; }

main { padding: 40px 0; }
.section { margin-block: 36px; }
h1 { font-size: clamp(26px, 4vw, 44px); margin: 0 0 10px; }
h2 { font-size: clamp(20px, 3vw, 30px); margin: 0 0 14px; }
.muted { color: var(--muted); }

.btn {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  font-family: 'Shabnam', 'Vazirmatn', sans-serif;

}
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn:hover { opacity: .95; }

/* ========== HERO ========== */
.hero { display: grid; gap: 24px; align-items: center; padding: 52px 0; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.2fr .8fr; } }
.hero img { width: 100%; height: auto; border-radius: 18px; box-shadow: var(--shadow); }

/* ========== برند ========== */
.brand-title {
  font-family: 'Lalezar', 'Shabnam', sans-serif;
  font-size: 80px;
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  text-shadow: 0 5px 10px rgb(0,0,0);
}
.brand-name {
  font-family: 'Vazirmatn', 'Shabnam', sans-serif;
  font-size: 5rem;
  font-weight: 400;
  color: #f1d6a6;
  text-shadow: 0 2px 6px rgba(0,0,0,0.35);
  letter-spacing: 2px;
  margin-bottom: .5rem;
}

/* ========== گریدها و کارت‌ها ========== */
.grid { display: grid; gap: 20px; }
@media (min-width: 720px) { .grid-cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 719px) { .grid-cols-3 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.08); }
.card-img { width: 100%; height: 200px; object-fit: cover; border-radius: 12px; margin-bottom: 10px; }
.card h3 { margin: 6px 0 4px; font-size: 18px; }
.price { font-weight: 700; margin-top: 8px; }
.badge {
  display: inline-block;
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 999px;
  color: #666;
  background: #fafafa;
  margin-bottom: 8px;
}

/* ========== تب‌ها ========== */
.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
}
.tab {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-family: 'Vazirmatn', 'Shabnam', sans-serif;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  scroll-snap-align: start;
}
.tab:hover { background: #fdf7ef; border-color: var(--brand); color: var(--brand); }
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }

/* ========== هدر چسبان ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid #eee;
  backdrop-filter: saturate(1.2);
}

/* ========== ناوبری موبایل ========== */
.menu-toggle {
  display: none;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 20px;
}
@media (max-width: 799px) {
  .menu-toggle { display: inline-block; }
  .nav {
    position: absolute;
    right: 20px;
    left: 20px;
    top: 64px;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { font-size: 18px; }
}

/* ========== Scroll افقی کارت‌ها ========== */
.hscroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 2px 2px;
  scroll-snap-type: x mandatory;
}
.hcard { flex: 0 0 260px; scroll-snap-align: start; }
.hscroll::-webkit-scrollbar { height: 8px; }
.hscroll::-webkit-scrollbar-thumb { background: #ddd; border-radius: 8px; }

/* ========== تنظیمات موبایل و تبلت ========== */
@media (max-width: 900px) {
  .navbar { flex-wrap: wrap; gap: 6px; }
  .logo img { height: 70px; }
  .card-img { height: 180px; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .brand-title { font-size: 60px; }
  .brand-name { font-size: 3.2rem; }
}
@media (max-width: 600px) {
  main { padding: 24px 0; }
  .container { padding: 0 14px; }
  .tabs { font-size: 14px; gap: 6px; }
  .card h3 { font-size: 16px; }
  .price { font-size: 14px; }
  .nav a { font-size: 17px; padding: 6px 10px; }
  .hero { grid-template-columns: 1fr; gap: 16px; padding: 30px 0; }
  .hero img { border-radius: 12px; }
  .hero-content { padding: 16px; }
  .site-footer { margin-top: 40px; font-size: 14px; }
}

/* ===== HERO full-bleed ===== */
.hero-hero {
  position: relative;
  height: clamp(340px, 52vw, 560px);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 26px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  filter: blur(4px) brightness(0.8);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right, rgba(0,0,0,.35), rgba(0,0,0,.15));
}

.hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  padding: clamp(16px, 4vw, 32px);
  padding-top: 20px;
  color: #fff;
}

.hero-content h1 { font-size: clamp(26px, 4vw, 44px); margin: 0; }
.hero-content .muted { color: #eaeaea; }

@media (max-width: 600px) {
  .hero-hero { height: 320px; border-radius: 12px; }
  .hero-content { padding: 16px; }
}

/* ========== پنل ادمین: ردیفی و کوچکتر شدن کارت‌های محصولات ========== */
/* ========== پنل ادمین: کارت‌های محصولات — کوچک + چندسطره (بدون اسکرول افقی) ========== */
.prod-row{
  display: flex;
  flex-wrap: wrap;        /* ← در چند سطر بشین */
  gap: 10px;
  margin-top: 10px;
  overflow-x: visible;    /* ← اسکرول افقی حذف */
  scroll-snap-type: none; /* ← دیگر لازم نیست */
}

.prod-row .card{
  flex: 0 0 180px;        /* عرض ثابتِ جمع‌وجور */
  max-width: 180px;
  padding: 10px;
  border-radius: 10px;
}

.prod-row .card-img{
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
}

.prod-row .card h3{ font-size: 13px; margin: 4px 0; }
.prod-row .card p{ font-size: 11px; line-height: 1.6; }
.prod-row .card strong{ font-size: 13px; }
.prod-row .card small{ font-size: 10px; }
.prod-row .card .btn{ padding: 4px 8px; font-size: 11px; }
.prod-row .card .badge{ font-size: 10px; padding: 2px 6px; }

/* اسکرول‌بار قبلی برای حالت افقی دیگر نیاز نیست */
.prod-row::-webkit-scrollbar { display: none; }

/* کمی فشرده‌تر روی موبایل‌های خیلی کوچک */
@media (max-width: 420px){
  .prod-row .card{ flex-basis: 150px; max-width: 150px; padding: 8px; }
  .prod-row .card-img{ height: 88px; border-radius: 6px; }
}

/* ========== حالت «همه» در منو: نمایش ماتریسی + کارت‌های کوچک برای مرور سریع ========== */
#all-hscroll.matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  overflow-x: visible;   /* اسکرول افقی حذف شود */
  padding: 8px 0;
}

#all-hscroll.matrix .hcard {
  flex: initial;         /* لغو رفتار فلکس افقی قبلی */
  max-width: 100%;
  padding: 10px;
  border-radius: 10px;
}

#all-hscroll.matrix .card-img {
  height: 90px;
  border-radius: 8px;
  object-fit: cover;
}

#all-hscroll.matrix h3 { font-size: 14px; margin: 4px 0; }
#all-hscroll.matrix .muted { font-size: 12px; line-height: 1.5; }
#all-hscroll.matrix .price { font-size: 14px; }

/* برای تراکم بیشتر روی موبایل‌های خیلی کوچک */
@media (max-width: 420px){
  #all-hscroll.matrix { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  #all-hscroll.matrix .card-img { height: 80px; }
  #all-hscroll.matrix h3 { font-size: 13px; }
  #all-hscroll.matrix .price { font-size: 13px; }
}

/* ===== Glass Buttons for menu_groups (updated) ===== */
.group-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.glass-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* راست‌چین کردن محتوا */
  gap: 14px;
  padding: 22px 20px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.55), rgba(255,255,255,.25));
  border: 3px solid rgba(139,94,52,.35); /* ✅ خط ضخیم‌تر */
  box-shadow: 0 8px 24px rgba(0,0,0,.06), inset 0 1px 0 rgba(255,255,255,.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #4a3a2b;
  text-align: right;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .2s ease;
  min-height: 110px;
}

.glass-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0,0,0,.10);
  border-color: rgba(139,94,52,.6);
  background: linear-gradient(145deg, rgba(255,255,255,.65), rgba(255,255,255,.35));
}

.glass-btn .title {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: .3px;
  flex: 1; /* برای تراز با تصویر */
}

.glass-btn img {
  width: 64px;  /* ✅ عکس بزرگ‌تر */
  height: 64px;
  object-fit: cover;
  border-radius: 16px;
  flex: 0 0 auto;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.glass-btn.giant {
  padding: 24px 20px;
  min-height: 120px;
  border-radius: 24px;
  font-size: 18px;
}

.glass-btn.alt {
  background: linear-gradient(145deg, rgba(241,214,166,.5), rgba(255,255,255,.25));
  border-color: rgba(139,94,52,.45);
}

@media (max-width:600px) {
  .group-grid { 
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
  }
  .glass-btn img {
    width: 52px;
    height: 52px;
  }
}

/* ===== Modern Main Menu Cards ===== */
.category-grid{
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

/* کارت کلی */
.category-card{
  position: relative;
  display: flex;
  flex-direction: row-reverse;      /* RTL: تصویر سمت راست */
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 16px 16px 16px 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.6), rgba(255,255,255,.3));
  border: 3px solid rgba(139,94,52,.35); /* حاشیه ضخیم و گرم */
  box-shadow:
    0 10px 28px rgba(0,0,0,.08),
    inset 0 1px 0 rgba(255,255,255,.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-decoration: none;
  color: #3c3127;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .2s ease;
  overflow: hidden;
}

/* افکت حاشیه‌ی گرادیانی ظریف هنگام هاور */
.category-card::before{
  content:"";
  position:absolute; inset:0;
  border-radius: 22px;
  pointer-events:none;
  background: linear-gradient(135deg, rgba(139,94,52,.35), rgba(241,214,166,.35), rgba(139,94,52,.25));
  opacity: 0; transition: opacity .2s ease;
}

/* Ripple نور ملایم */
.category-card::after{
  content:"";
  position:absolute;
  width:160px; height:160px;
  border-radius:50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.55), transparent);
  top:-60px; left:-60px;
  opacity:.0; transition: opacity .2s ease, transform .25s ease;
  transform: translate3d(0,0,0);
}

.category-card:hover{
  transform: translateY(-3px);
  border-color: rgba(139,94,52,.55);
  box-shadow: 0 16px 36px rgba(0,0,0,.12);
  background: linear-gradient(145deg, rgba(255,255,255,.7), rgba(255,255,255,.38));
}
.category-card:hover::before{ opacity:.9; }
.category-card:hover::after{ opacity:.35; transform: translate3d(6px,6px,0); }

/* مدِ سبُک‌تر برای «بقیه محصولات» */
.category-card.alt{
  background: linear-gradient(145deg, rgba(245,232,208,.6), rgba(255,255,255,.35));
  border-color: rgba(139,94,52,.45);
}

/* مدیا (عکس) – اندازه‌ی ثابت و تراز */
.category-media{
  width: 86px; height: 86px;       /* همه هم‌اندازه */
  border-radius: 18px;
  overflow: hidden;
  flex: 0 0 auto;
  background: #f4eee6;
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
  display: grid; place-items: center;
}
.category-media img{
  width:100%; height:100%; object-fit: cover;
  display:block;
  transform: scale(1.02);
}
.category-fallback{
  width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  font-weight:900; font-size:28px; color:#6b513c;
  background: linear-gradient(135deg, #f1d6a6, #ffffff);
}

/* بدنه */
.category-body{
  display:flex; flex-direction:column; gap:8px;
  flex:1; min-width:0;
}
.category-title{
  font-weight: 900;
  font-size: 20px;
  letter-spacing: .2px;
  color:#3b2e22;
  line-height: 1.2;
}
.category-cta{
  display:inline-flex; align-items:center; gap:8px;
  font-weight:600; font-size: 14px; color:#8b5e34;
  opacity:.9;
}
.category-card:hover .category-cta{ opacity:1; }

/* فلشِ راست به چپ */
.rtl-arrow{ transform: scaleX(-1); }

/* دسترس‌پذیری: فوکوس کیبورد */
.category-card:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(139,94,52,.25), 0 12px 28px rgba(0,0,0,.12);
}
.category-card:focus-visible{
  outline: none;
}

/* ریسپانسیو */
@media (max-width: 600px){
  .category-grid{
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
  }
  .category-card{
    min-height: 100px;
    border-radius: 18px;
    gap: 12px; padding: 14px;
  }
  .category-media{ width:72px; height:72px; border-radius:14px; }
  .category-title{ font-size:18px; }
}

/* ===== Flatten Header (remove white bar) ===== */
.site-header,
header.site-header {
  background: var(--bg) !important; /* هم‌رنگ پس‌زمینهٔ صفحه */
  border-bottom: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

/* در تم اصلی قبلاً header { background:#fff } داشتیم — با این خط خنثی می‌شود */
header {
  background: var(--bg) !important;
  border-bottom: 0 !important;
}

/* کمی جمع‌وجورتر */
.navbar {
  padding: 10px 0;
}

/* ===== Modern Top Nav Pills ===== */
.navbar .nav {
  gap: 10px;
}

/* استایل مدرن برای دکمه‌های بالای چپ (منو/درباره‌ما/تماس) */
.navbar .nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;                    /* قرص خوش‌دست */
  font-size: 15px;
  font-weight: 600;
  color: #4a3a2b;
  background: linear-gradient(145deg, rgba(255,255,255,.40), rgba(255,255,255,.20));
  border: 2px solid rgba(139,94,52,.35); /* مرز گرم و ضخیم */
  border-radius: 999px;                  /* قرصی */
  box-shadow: 0 6px 18px rgba(0,0,0,.06), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .2s ease, color .2s ease;
  text-decoration: none;
}

.navbar .nav a:hover {
  transform: translateY(-2px);
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
}

/* حالت Active اختیاری (اگر بخواهی لینکِ صفحهٔ فعلی پررنگ‌تر باشد) */
.navbar .nav a[aria-current="page"],
.navbar .nav a.active {
  color:#fff;
  background: var(--brand);
  border-color: var(--brand);
}

/* ===== Mobile Menu: هماهنگ با سبک جدید ===== */
.menu-toggle {
  border: 2px solid rgba(139,94,52,.35);
  background: transparent;
  color: #4a3a2b;
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 20px;
  transition: transform .15s ease, background .2s ease, border-color .15s ease;
}
.menu-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
  background: rgba(139,94,52,.08);
}

/* پنل منوی موبایل: شیشه‌ای و هم‌رنگ */
@media (max-width: 799px) {
  .nav {
    background: linear-gradient(145deg, rgba(255,255,255,.65), rgba(255,255,255,.35));
    border: 2px solid rgba(139,94,52,.30);
    box-shadow: 0 12px 28px rgba(0,0,0,.10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .navbar .nav a {
    width: 80%;
    justify-content: center;
  }
}




