/* Reset + پایه */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Vazirmatn", sans-serif;
}
html,
body {
  height: 100%;
}
body {
  background: #fbf8e8;
  color: #333;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 78px; /* فضایی برای نوار پایین (nav) تا محتوا زیرش مخفی نشه */
}

/* Loader */
.loader {
  background: #1b3c53;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}
.loader img {
  max-width: 60%;
  height: auto;
}
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
.typewriter {
  font-size: 20px;
  font-family: Helvetica, sans-serif;
  color: #0000;
  background: linear-gradient(-90deg, #fbf8e8 5px, #0000 0) 10px 0,
    linear-gradient(#fbf8e8 0 0) 0 0;
  background-size: calc(var(--n) * 1ch) 200%;
  -webkit-background-clip: padding-box, text;
  background-clip: padding-box, text;
  background-repeat: no-repeat;
  overflow: hidden;
  animation: b 0.7s infinite steps(1),
    t calc(var(--n) * 0.4s) steps(var(--n)) forwards;
}
@keyframes t {
  from {
    background-size: 0 200%;
  }
}
@keyframes b {
  50% {
    background-position: 0 -100%, 0 0;
  }
}

/* Header */
header {
  background: #1b3c53;
  color: #fff;
  text-align: center;
  padding: 10px 12px;
  position: sticky;
  top: 0;
  z-index: 100;
}
header img {
  width: 130px;
  height: auto;
  display: inline-block;
}
header .font-bold {
  margin-top: 6px;
  font-size: 0.95rem;
  color: #fbf8e8;
}
/* مودال نمایش عکس */
.image-modal {
  display: none; /* اول مخفی */
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
}

.image-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  animation: zoomIn 0.3s ease;
}

/* دکمه بستن */
.image-modal .close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
}

/* انیمیشن */
@keyframes zoomIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* دسته‌های افقی (قابل اسکرول) */
.category-scroll {
  position: sticky;
  top: 64px; /* زیر header */
  z-index: 850;
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  padding: 10px 12px;
  background: linear-gradient(#fbf8e8, #fbf8e8);
  border-bottom: 1px solid #e6e1d6;
  -webkit-overflow-scrolling: touch;
}
.category {
  flex: 0 0 auto;
  text-align: center;
  font-size: 0.85rem;
  color: #1b3c53;
  cursor: pointer;
  min-width: 64px;
}
.category-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fbf8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  border: 3px solid #e4dfce;
  padding: 6px;
}
.category.active .category-icon {
  border-color: #1b3c53;
  transform: scale(1.03);
}

/* بخش منو (container) */
.menu-section {
  padding: 14px 12px 24px;
}

/* عنوان هر دسته */
.menu-category-title {
  font-size: 1rem;
  font-weight: 700;
  color: #2f4156;
  margin: 10px 0 8px;
}

/* کارت آیتم - موبایل‌اول */
.menu-item {
  background: #eae6d5;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.04);
}



/* تصویر آیتم */
.menu-item img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
  flex: 0 0 86px;
}

/* اطلاعات آیتم */
.item-info {
  flex: 1;
  min-width: 0;
}
.item-info h3 {
  font-size: 0.98rem;
  color: #1b3c53;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-info p {
  font-size: 0.84rem;
  color: #666;
  line-height: 1.2;
  max-height: 2.4rem;
  overflow: hidden;
}

/* قیمت / اکشن */
.price-action {
  flex: 0 0 auto;
  text-align: center;
  font-size: 0.9rem;
  color: #1b3c53;
  min-width: 72px;
  margin-left: 6px; /* در RTL این سمت چپ خواهد بود */
}
button {
  background-color: transparent;
  color: rgb(251, 248, 232);
  border-color: transparent;
}

/* ناوبری پایین (fixed) */
nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1b3c53;
  padding: 6px 8px;
  display: flex;
  z-index: 500;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.12);
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
nav .left,
nav .center,
nav .right {
  flex: 1;
  text-align: center;
}
nav a,
nav button {
  color: #fbf8e8;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* پنجره آدرس پاپ‌آپ */
#address-section {
  display: none;
  position: fixed;
  bottom: 64px; /* بالاتر از nav */
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 420px;
  background: #fbf8e8;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  z-index: 1100;
  text-align: center;
}
#address-section iframe {
  width: 100%;
  height: 220px;
  border-radius: 8px;
}

/* Footer (در صورت نیاز به footer جدا) */
footer {
  display: none;
}

/* ====== ریسپانسیو: تبلت و بزرگ‌تر ====== */
@media (min-width: 640px) {
  .menu-item {
    padding: 14px;
    gap: 14px;
  }
  .menu-item img {
    width: 110px;
    height: 110px;
    flex: 0 0 110px;
  }
  .price-action {
    min-width: 90px;
    font-size: 1rem;
  }
  header {
    padding: 12px;
  }
  .category-scroll {
    top: 76px;
  }
  body {
    padding-bottom: 88px;
  }
}

/* ====== دسکتاپ کوچک: بیشتر فضای عرضی ====== */
@media (min-width: 1000px) {
  .menu-section {
    max-width: 980px;
    margin: 0 auto;
    padding: 20px;
  }
  .menu-item {
    gap: 16px;
  }
  .menu-item img {
    width: 150px;
    height: 150px;
    flex: 0 0 150px;
    border-radius: 20px;
  }
  .category-icon {
    width: 80px;
    height: 80px;
  }
  .category-scroll {
    padding: 14px 20px;
  }
  body {
    padding-bottom: 100px;
  }
}

/* بهبودهای دسترسی و لمس */
.category-scroll::-webkit-scrollbar {
  height: 8px;
}
.category-scroll::-webkit-scrollbar-thumb {
  background: #dcd6c8;
  border-radius: 8px;
}
