/* =========================================
   VARIABLES & BASE STYLES
========================================= */
:root {
  --bg: #f3f6f0;
  --white: #ffffff;

  --green-dark: #12372c;
  --green: #426b58;
  --green-light: #789684;

  --text: #17382e;
  --muted: #84918a;

  --glass: rgba(255, 255, 255, 0.48);
  --glass-strong: rgba(255, 255, 255, 0.72);

  --border: rgba(255, 255, 255, 0.8);

  --serif: "DM Serif Display", serif;
  --sans: "Vazirmatn", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(107, 143, 123, 0.13),
      transparent 30%
    ),
    #f3f6f0 !important;
  color: var(--text);
  font-family: var(--sans);
}

.main-logo {
  width: 130px;
  height: auto;
  border-radius: 50%;
  margin-top: 20px;
  margin-bottom: 10px;
  outline: 2px solid #d4af37;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.7);
  outline-offset: -2px;
}

button {
  font-family: inherit;
}

.background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  animation: floating 10s ease-in-out infinite;
}

.glow-one {
  width: 420px;
  height: 420px;
  top: -200px;
  right: -120px;
  background: rgba(75, 119, 96, 0.15);
}

.glow-two {
  width: 350px;
  height: 350px;
  bottom: -180px;
  left: -100px;
  background: rgba(155, 180, 164, 0.2);
  animation-delay: -4s;
}

@keyframes floating {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(25px, -25px);
  }
}

/* ==========================
   CATEGORY PAGE
========================== */
.category-page {
  width: min(1280px, 92%);
  min-height: 100vh;
  margin: auto;
  padding-bottom: 80px;
  transition:
    opacity 0.7s ease,
    transform 0.8s cubic-bezier(.77, 0, .18, 1);
}

.category-page.exit {
  opacity: 0;
  transform: translateY(-80px) scale(.97);
}

/* HEADER */
.main-header {
  height: 82px;
  margin-top: 20px;
  padding: 0 25px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 25px;
  background: var(--glass);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  box-shadow: 0 20px 70px rgba(24, 60, 48, .06);
}

.logo, .food-logo {
  direction: ltr;
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1;
  color: var(--green-dark);
  transition: letter-spacing .5s ease;
}

.logo:hover, .food-logo:hover {
  letter-spacing: 2px;
}

.header-side {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 9px;
}

.header-side.right {
  justify-content: flex-start;
}

.location {
  display: flex;
  align-items: center;
  gap: 8px;
  direction: ltr;
}

.location i {
  color: var(--green);
}

.open-time {
  direction: ltr;
  letter-spacing: 2px;
  font-size: 7px;
}

/* INTRO */
.menu-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 85px 30px 60px;
  text-align: center;
  animation: introIn 1s cubic-bezier(.16, 1, .3, 1);
}

@keyframes introIn {
  from {
    opacity: 0;
    transform: translateY(35px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  font-size: 8px;
  letter-spacing: 4px;
  color: var(--green);
  direction: ltr;
}

.menu-intro h1 {
  margin-top: 25px;
  font-size: clamp(45px, 6vw, 78px);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -2px;
  color: var(--green-dark);
}

.menu-intro h1 em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--green);
}

.menu-intro p {
  margin-top: 18px;
  font-size: 10px;
  color: var(--muted);
}

/* CATEGORIES GRID */
.categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 13px;
}

.category {
  position: relative;
  min-height: 100px;
  padding: 20px 25px;
  display: grid;
  grid-template-columns: 55px 1fr 40px;
  align-items: center;
  text-align: right;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(120deg, rgba(255,255,255,.68), rgba(255,255,255,.3));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform .55s cubic-bezier(.16,1,.3,1),
    background .4s ease,
    box-shadow .5s ease,
    border-color .4s ease;
}

.category::before {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -60px;
  top: -80px;
  border-radius: 50%;
  background: rgba(95, 133, 112, .12);
  transition: .6s ease;
}

.category:hover {
  transform: translateY(-6px);
  background: linear-gradient(120deg, rgba(255,255,255,.9), rgba(255,255,255,.48));
  box-shadow: 0 25px 55px rgba(26, 65, 51, .1);
  border-color: rgba(255,255,255,.95);
}

.category:hover::before {
  transform: scale(2.2);
}

.category-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 56, 46, .09);
  border-radius: 50%;
  background: rgba(255,255,255,.42);
  color: var(--green);
  font-size: 13px;
  transition: .5s cubic-bezier(.16,1,.3,1);
}

.category:hover .category-icon {
  transform: rotate(-8deg) scale(1.1);
  background: var(--green-dark);
  color: white;
}

.category-name {
  position: relative;
  font-size: 14px;
  font-weight: 400;
}

.arrow {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  font-size: 11px;
  transition:
    transform .5s cubic-bezier(.16,1,.3,1),
    background .4s ease;
}

.category:hover .arrow {
  transform: translateX(-8px);
  background: var(--green-dark);
  color: white;
}

/* ==========================
   FOOD PAGE
========================== */
.food-page {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(107, 143, 123, .13),
      transparent 30%
    ),
    var(--bg);

  opacity: 0;
  visibility: hidden;
  transform: translateY(80px) scale(.97);
  transition:
    opacity .7s ease,
    transform .8s cubic-bezier(.16,1,.3,1),
    visibility 0s linear .8s;
}

.food-page.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity .7s ease,
    transform .8s cubic-bezier(.16,1,.3,1);
}

.food-header {
  position: sticky;
  top: 20px;
  z-index: 1010;
  width: min(1280px, 92%);
  height: 72px;
  margin: 20px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 23px;
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 20px 60px rgba(25,65,50,.07);
}

.back-button {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border: 1px solid rgba(23,56,46,.08);
  border-radius: 100px;
  background: rgba(255,255,255,.4);
  color: var(--green-dark);
  cursor: pointer;
  font-size: 9px;
  transition: .4s ease;
}

.back-button:hover {
  background: var(--green-dark);
  color: white;
  transform: translateX(4px);
}

.selected-title {
  justify-self: end;
  font-size: 9px;
  color: var(--muted);
}

/* =========================================
   FOOD LAYOUT & SIDEBAR (MINI MENU)
========================================= */
.food-layout {
  display: flex;
  gap: 25px;
  width: min(1280px, 92%);
  margin: 30px auto 80px;
  align-items: flex-start;
}

/* SIDEBAR MINI MENU */
.mini-menu {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 105px;

  /* اصلاح ارتفاع سایدبار در صفحه‌های بزرگ */
  height: calc(100vh - 125px);
  height: calc(100dvh - 125px);
  max-height: none;

  overflow-y: auto;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: space-between;
  padding: 12px;

  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(15px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(15px) saturate(180%) !important;

  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
  border-radius: 22px;
  z-index: 900;
}

/* دکمه‌های درون سایدبار */
.mini-category {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  cursor: pointer;
  transition: all 0.3s ease;
  word-break: break-word;
  white-space: normal;
  line-height: 1.4;
}

.mini-category.active {
  background: var(--green-dark);
  color: var(--white);
  border-color: var(--green-dark);
  box-shadow: 0 4px 15px rgba(18, 55, 44, 0.2);
}

/* اسکرول بار باریک سایدبار */
.mini-menu::-webkit-scrollbar {
  width: 4px;
}

.mini-menu::-webkit-scrollbar-thumb {
  background: var(--green-light);
  border-radius: 10px;
}

/* FOOD CONTENT AREA */
.food-content {
  flex: 1;
  min-width: 0;
}

.food-heading {
  margin-bottom: 40px;
}

.food-heading span {
  font-size: 7px;
  letter-spacing: 3px;
  color: var(--green);
  direction: ltr;
}

.food-heading h2 {
  margin-top: 10px;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 300;
  color: var(--green-dark);
}

.food-heading p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

/* FOOD CARDS GRID */
.food-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.food-card {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 28px;
  background: rgba(255,255,255,.45);
  backdrop-filter: blur(20px);
  box-shadow: 0 25px 60px rgba(25,65,50,.07);
  opacity: 0;
  transform: translateY(35px);
  animation: foodIn .7s forwards;
}

@keyframes foodIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.food-image {
  height: 280px;
  overflow: hidden;
  position: relative;
}

.food-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(.16,1,.3,1);
}

.food-card:hover .food-image img {
  transform: scale(1.07);
}

.food-number {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(12px);
  color: white;
  font-family: var(--serif);
}

.food-info {
  padding: 22px;
}

.food-label {
  font-size: 7px;
  letter-spacing: 2px;
  color: var(--green);
  direction: ltr;
}

.food-info h3 {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 500;
}

.food-info p {
  margin-top: 8px;
  font-size: 9px;
  line-height: 1.8;
  color: var(--muted);
}

.food-bottom {
  margin-top: 20px;
  padding-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(23,56,46,.08);
}

.price {
  direction: rtl;
  color: var(--green);
  font-family: var(--serif);
  font-size: 26px;
}

.price small {
  font-family: var(--sans);
  font-size: 7px;
  color: var(--muted);
}

/* =========================================
   SIMPLE RAMO FOOTER
========================================= */
.site-footer {
  width: 100%;
  margin: 35px auto 0;
  padding: 22px 10px 15px;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(23, 56, 46, 0.12);
  border-radius: 0;
  box-shadow: none;
  color: var(--text);
}

.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--green-dark);
  direction: ltr;
}

.footer-credit {
  font-size: 11px;
  color: var(--muted);
}

.footer-credit strong {
  margin-right: 4px;
  color: var(--green);
  letter-spacing: 1px;
  direction: ltr;
}

.footer-contact {
  margin-top: 15px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: transparent;
  border: none;
  border-radius: 0;
}

.contact-label {
  font-size: 11px;
  color: var(--muted);
}

.footer-contact a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
  direction: ltr;
  transition: color 0.2s ease;
}

.footer-contact a i {
  color: var(--green);
  font-size: 11px;
}

.footer-contact a:hover {
  color: var(--green-dark);
}

.footer-bottom {
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid rgba(23, 56, 46, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 480px) {
  .site-footer {
    margin-top: 25px;
    padding: 18px 4px 12px;
  }

  .footer-brand {
    font-size: 22px;
  }

  .footer-credit {
    font-size: 10px;
  }

  .footer-contact {
    flex-direction: row;
    align-items: center;
  }

  .footer-bottom {
    font-size: 9px;
  }
}

/* =========================================
   RESPONSIVE (موبایل و تبلت - حفظ سایدبار)
========================================= */

/* تبلت‌ها و گوشی‌های عریض (زیر 768px) */
@media (max-width: 768px) {
  .category-page {
    width: 92%;
  }

  .main-header {
    height: 65px;
    margin-top: 12px;
    border-radius: 19px;
    padding: 0 17px;
  }

  .logo { font-size: 37px; }
  .location { font-size: 0; }
  .location i { font-size: 11px; }
  .open-time { display: none; }

  .menu-intro { padding: 50px 5px 30px; }
  .eyebrow { font-size: 6px; letter-spacing: 2.5px; }
  .menu-intro h1 { margin-top: 18px; font-size: 42px; letter-spacing: -1px; }
  .menu-intro p { font-size: 9px; }

  .categories {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .category {
    min-height: 82px;
    padding: 15px 17px;
    grid-template-columns: 45px 1fr 35px;
    border-radius: 20px;
  }

  .category-icon { width: 37px; height: 37px; font-size: 11px; }
  .category-name { font-size: 12px; }
  .arrow { width: 31px; height: 31px; }

  /* تنظیمات لایه‌بندی صفحه غذا در موبایل */
  .food-header {
    width: 94%;
    top: 10px;
    margin-top: 10px;
    height: 60px;
    border-radius: 18px;
    padding: 0 12px;
  }

  .food-logo { font-size: 32px; }
  .selected-title { font-size: 8px; }
  .back-button { padding: 7px 10px; font-size: 8px; }

  /* حفظ حالت سایدبار کنار صفحه در موبایل */
  .food-layout {
    width: 96%;
    gap: 10px;
    margin: 20px auto 40px;
  }

  /* سایدبار موبایل با ارتفاع تا پایین صفحه */
  .mini-menu {
    width: 105px;
    top: 80px;

    height: calc(100vh - 95px);
    height: calc(100dvh - 95px);
    max-height: none;

    overflow-y: auto;
    padding: 6px 4px;
    gap: 5px;
    border-radius: 16px;
  }

  /* دکمه‌های سایدبار در موبایل */
  .mini-category {
    padding: 8px 6px;
    font-size: 10px;
    border-radius: 10px;
    text-align: center;
    line-height: 1.3;
  }

  .food-heading { margin-bottom: 25px; }
  .food-heading h2 { font-size: 32px; }

  /* تک ستونه شدن لیست غذاها در موبایل */
  .food-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .food-image { height: 210px; }
  .food-info { padding: 18px; }
  .food-info h3 { font-size: 18px; }
}

/* گوشی‌های کوچک (زیر 480px) */
@media (max-width: 480px) {
  .food-layout {
    gap: 8px;
  }

  .mini-menu {
    width: 92px;
    padding: 5px 3px;
  }

  .mini-category {
    font-size: 9.5px;
    padding: 7px 4px;
  }
}
