/* ========= Theme (قابل تغییر مناسبتی) ========= */
:root {
  --color-primary: #27ae60;      /* سبز اصلی */
  --color-primary-dark: #1e8d4e;
  --color-accent: #ff5252;       /* قرمز برای دکمه‌های خاص */
  --color-bg: #f7f7f7;
  --color-surface: #ffffff;
  --color-text: #2c3e50;
  --color-muted: #6b7a8d;

  --radius: 12px;
  --shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* برای مناسبت‌ها، به‌سادگی رنگ‌ها را عوض کن
   مثلا یلدا:
   :root { --color-primary:#b21d32; --color-accent:#1f7a8c; }
*/

/* ========= Base ========= */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Tahoma, Vazirmatn, IRANSans, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}
a { text-decoration: none; color: inherit; }
.container { width: min(1200px, 94vw); margin: 0 auto; }

/* ========= Topbar ========= */
.topbar {
  background: var(--color-surface);
  border-bottom: 1px solid #eee;
  font-size: 13px;
  color: var(--color-muted);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
}
.topbar .social a {
  margin-left: 10px; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; background: #f0f0f0; transition: .2s;
}
.topbar .social a:hover { background: #e8e8e8; }

/* ========= Header / Navbar ========= */
.header {
  background: var(--color-surface);
  box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 999;
}
.navbar {
  display: grid; grid-template-columns: 0px 1fr 350px; gap: 4px; align-items: center;
  padding: 12px 0;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 48px; width: 130px; object-fit: cover; border-radius: 10px; }
.logo .brand { font-weight: 700; font-size: 20px; color: var(--color-primary); }

.menu { display: flex; gap: 5px; justify-content: right; }
.menu a {
  padding: 8px 10px; border-radius: 8px; white-space: nowrap; color: var(--color-text);
}
.menu a:hover { background: #f2f6f3; color: var(--color-primary); }

.actions {
  display: flex; align-items: center; gap: 6px; justify-content: flex-end;
}
.auth a {
  padding: 6px 10px; border-radius: 8px; color: var(--color-primary);
}
.auth a:hover { background: #eef7f1; }
.cart-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--color-accent); color: #fff; padding: 8px 12px; border-radius: 10px;
}
.cart-btn .count {
  background: rgba(255,255,255,.2); padding: 2px 8px; border-radius: 10px; font-weight: 700;
}

/* ========= Welcome Message ========= */
.welcome {
  margin: 14px auto 0; width: min(1200px, 94vw);
  background: #fff8e6; color: #8a5a00; padding: 12px 16px; border-radius: 10px;
  border: 1px solid #ffe2a8;
}

/* ========= Slider ========= */
.slider {
  position: relative; width: 100%; height: clamp(220px, 45vw, 420px); margin: 18px 0; overflow: hidden;
  border-radius: var(--radius); box-shadow: var(--shadow); background: #ddd;
}
.slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease;
  background-size: cover; background-position: center;
}
.slide.active { opacity: 1; }
.slider .ctrl {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.9);
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow);
}
.slider .prev { right: 12px; } .slider .next { left: 12px; }
.dots {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px;
}
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,.7); cursor: pointer;
}
.dot.active { background: var(--color-primary); }

/* ========= Categories ========= */
.section-title {
  margin: 28px 0 14px; font-size: 20px; font-weight: 700; color: var(--color-primary);
}
.cat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.cat-card {
  background: var(--color-surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.cat-card:hover { transform: translateY(-4px); }
.cat-card a { display: block; }
.cat-card img { width: 100%; aspect-ratio: 1.1/1; object-fit: cover; }
.cat-card .name { padding: 10px; text-align: center; font-weight: 600; }

/* ========= Specials (Offers) ========= */


/* ========= Footer ========= */
.footer {
  margin-top: 34px; background: var(--color-surface); border-top: 1px solid #eee; color: var(--color-muted);
}
.footer .footer-inner {
  padding: 18px 0; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 18px;
}
.footer h4 { margin: 0 0 10px; color: var(--color-text); }
.footer a { color: var(--color-muted); }
.footer a:hover { color: var(--color-primary); }
.copy { border-top: 1px solid #eee; text-align: center; padding: 12px; font-size: 13px; }

/* ========= Responsive ========= */
@media (max-width: 1024px) {
  .navbar { grid-template-columns: 1fr; row-gap: 8px; }
  .menu { justify-content: flex-start; flex-wrap: wrap; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .products { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .products { grid-template-columns: repeat(2, 1fr); }
  .topbar-inner { flex-direction: column; gap: 6px; }
}