/* style.css - نسخه کامل، واکنش‌گرا و بهینه‌سازی‌شده شب‌پز */
@charset "UTF-8";

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 400 700 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary-orange: #696969;
  --call-teal: #2a9d8f;
  --call-teal-hover: #21867a;
  --bg-page: #f8f9fa;
  --card-bg: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --header-dark: #111418;
  --btn-dark: #1c212b;
  --btn-border-dark: #2d3545;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body, button, input, select, textarea {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif !important;
  direction: rtl;
  text-align: right;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ۱. هدر دسکتاپ */
.shabpaz-header {
  background-color: var(--header-dark);
  border-bottom: 2px solid var(--primary-orange);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 14px 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

.header-container {
  max-width: 1250px;
  margin: 0 auto;
}

.mobile-top-bar {
  display: none;
}

.nav-grid-container {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  align-items: center;
}

.grid-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--btn-dark);
  color: #e5e7eb;
  height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  border: 1px solid var(--btn-border-dark);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.grid-btn:hover {
  background-color: var(--primary-orange);
  color: #ffffff;
  border-color: var(--primary-orange);
  transform: translateY(-2px);
}

.btn-logo-main {
  background: linear-gradient(135deg, #05747e, #010100);
  border: 1.5px solid var(--primary-orange);
  color: #ffd88e;
  font-size: 1.05rem;
  font-weight: 900;
}

.btn-call-cta {
  background-color: var(--call-teal);
  border-color: #3bb2a3;
  color: #ffffff;
  font-weight: 900;
}

.btn-call-cta:hover {
  background-color: var(--call-teal-hover);
  border-color: var(--call-teal-hover);
}

/* ۲. بنر اصلی - هدایت‌شده به پایین جهت نمایان شدن لوگوی شب‌پز */
.hero-banner {
  background-color: #121417;
  background-size: cover;
  background-position: center center;
  color: #ffffff;
  text-align: center;
  /* پدینگ بالا ۲۹۰ پیکسل برای دور ماندن کامل از لوگوی روی تصویر */
  padding: 290px 20px 30px;
  min-height: 520px;
  border-bottom: 3px solid var(--primary-orange);
  position: relative;
  display: flex;
  align-items: flex-end; /* چسباندن محتوا به بخش پایینی */
  justify-content: center;
}

.hero-banner::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  /* سایه ملایم در کف بنر برای خوانایی صددرصد نوشته‌ها روی عکس */
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.2) 45%, rgba(0, 0, 0, 0.85) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1250px;
  width: 100%;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 8px;
  white-space: nowrap; /* نمایش صددرصد در یک خط در دسکتاپ و لپ‌تاپ */
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.95);
}

.hero-title span.area-highlight {
  color: #ffb703;
  text-decoration: none !important;
  font-weight: 900 !important;
  display: inline-block;
}

.hero-subtext {
  color: #f3f4f6;
  font-size: 0.95rem;
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--primary-orange);
  color: #fffd48;
  padding: 7px 22px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* انیمیشن پالس نرم برای آیکون‌های متحرک */
@keyframes softPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.18); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

/* ۳. کادر پیام پیک شبانه */
.shipping-alert-container {
  max-width: 1200px;
  margin: 18px auto 0;
  padding: 0 15px;
}

.shipping-alert-box {
  background: linear-gradient(135deg, #ffffff 0%, #fffcf5 100%);
  border: 1px solid #fed7aa;
  border-right: 5px solid var(--primary-orange);
  border-radius: 10px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
}

.shipping-alert-content {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #9a3412;
  font-size: 0.95rem;
}

.shipping-pulse-icon {
  font-size: 1.35rem;
  display: inline-block;
  animation: softPulse 1.8s infinite ease-in-out;
}

/* ۴. کادر اعلان وضعیت محله انتخاب شده */
.area-alert-container {
  max-width: 1200px;
  margin: 15px auto 0;
  padding: 0 15px;
}

.area-alert-box {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border: 1px solid #bbf7d0;
  border-right: 5px solid #22c55e;
  border-radius: 10px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
}

.area-alert-content {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #166534;
  font-size: 0.92rem;
}

.delivery-icon {
  font-size: 1.3rem;
  display: inline-block;
  animation: softPulse 1.8s infinite ease-in-out;
}

.area-reset-btn {
  background-color: #f3f4f6;
  color: #6b7280;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.area-reset-btn:hover {
  background-color: #ef4444;
  color: #ffffff;
}

/* ۵. لیست غذاها و کارت‌ها */
.main-content {
  max-width: 1200px;
  margin: 35px auto 80px;
  padding: 0 15px;
}

.category-block {
  margin-bottom: 55px;
  scroll-margin-top: 80px;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 10px;
  margin-bottom: 25px;
}

.category-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: #111827;
}

.category-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.product-thumb-container {
  width: 120px !important;
  min-width: 120px !important;
  max-width: 120px !important;
  height: 120px !important;
  border-radius: 12px;
  overflow: hidden;
  background-color: #f3f4f6;
  flex-shrink: 0 !important;
}

.food-img-fixed {
  width: 120px !important;
  height: 120px !important;
  object-fit: cover !important;
  border-radius: 12px;
  display: block;
}

.product-info-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
  min-height: 120px;
  gap: 12px;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 4px;
}

.product-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.product-price {
  font-size: 1.15rem;
  font-weight: 900;
  color: #d97706;
}

.product-price .currency {
  font-size: 0.75rem;
  font-weight: normal;
  color: #6b7280;
}

.call-btn-styled {
  background-color: var(--call-teal);
  color: #ffffff;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  transition: background 0.2s;
}

.call-btn-styled:hover {
  background-color: var(--call-teal-hover);
}

/* ۶. فوتر سئو */
.main-footer {
  background-color: var(--header-dark);
  color: #9ca3af;
  padding: 45px 20px 50px;
  font-size: 0.85rem;
}

.footer-wrapper { max-width: 1200px; margin: 0 auto; }
.footer-heading { color: #ff9800; margin-bottom: 15px; font-size: 1rem; }

.areas-badge-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
}

.area-badge-link {
  background-color: var(--btn-dark);
  color: #d1d5db;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all 0.2s ease;
}

.area-badge-link:hover, .area-badge-link.active {
  background-color: var(--primary-orange);
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.copyright-bar {
  text-align: center;
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid #222;
  color: #666;
}

/* ۷. بهینه‌سازی تبلت و موبایل */
@media (max-width: 992px) {
  .shabpaz-header {
    padding: 10px 14px;
  }

  .mobile-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .brand-badge {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 900;
    border: 1.5px solid var(--primary-orange);
    padding: 6px 14px;
    border-radius: 8px;
    background: #1c212b;
  }

  .menu-toggle-btn {
    background: #1c212b;
    border: 1px solid var(--btn-border-dark);
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
  }

  .menu-toggle-btn .bar {
    width: 22px;
    height: 2.5px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .menu-toggle-btn.active .bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }
  .menu-toggle-btn.active .bar:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle-btn.active .bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }

  .nav-accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, margin-top 0.3s ease;
    width: 100%;
  }

  .nav-accordion-panel.open {
    max-height: 250px;
    margin-top: 12px;
  }

  .nav-grid-container {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px;
    padding: 6px 0;
  }

  .grid-btn {
    height: 44px;
    font-size: 0.82rem;
    padding: 0 4px;
    border-radius: 6px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .hero-banner {
    padding: 150px 15px 20px;
    min-height: 300px;
    align-items: flex-end;
  }

  .hero-title {
    font-size: 1.25rem;
    white-space: normal; /* شکستن نرم در موبایل */
    line-height: 1.5;
  }

  .hero-subtext {
    font-size: 0.82rem;
  }

  .hero-badge-pill {
    padding: 6px 16px;
    font-size: 0.82rem;
  }

  .shipping-alert-box {
    padding: 10px 14px;
  }

  .shipping-alert-content {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .grid-btn {
    font-size: 0.75rem;
    height: 42px;
  }

  .product-thumb-container {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    height: 100px !important;
  }

  .food-img-fixed {
    width: 100px !important;
    height: 100px !important;
  }

  .product-info-box {
    min-height: 100px;
  }
}