@font-face {
  font-family: "amir";
  src: url("fonts/Mikhak-Black.woff2") format("woff2");
}
:root {
  --green-1: #cde59a;
  --green-2: #eaf4c6;
  --green-3: #f4f9de;

  --text: #111;
  --muted: #5b6450;

  --shadow: 0 14px 30px rgba(0, 0, 0, 0.1);
  --shadow2: 0 10px 22px rgba(0, 0, 0, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "amir";
  background: linear-gradient(180deg, #fff, var(--green-3));
  color: var(--text);
  overflow: hidden; /* فقط content اسکرول شود */
}

.app {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

/* Content */
.content {
  position: relative;
  height: 100vh;
  width: calc(100% - 92px);
  margin-right: 92px;

  padding: 24px 18px;
  direction: rtl;

  overflow: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: y proximity;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.topbar h1 {
  font-size: 22px;
}
.topbar p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.pill {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow);
}

/* Cards */
.cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.food-card {
  background: var(--green-2);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  scroll-snap-align: start;
}

.thumb {
  width: 100px;
  height: 90px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

.info h3 {
  font-size: 17px;
  margin-bottom: 4px;
  color: rgb(73, 86, 25);
}
.info p {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 8px;
}

.meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.price {
  font-weight: 900;
}

.hint {
  font-size: 12px;
  margin-top: 16px;
  color: rgba(0, 0, 0, 0.55);
}

/* Sidebar (Right) */
.sidebar {
  width: 92px;
  background: var(--green-1);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px;
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  z-index: 10;
}

.profile {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow2);
}
.profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cats {
  list-style: none;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  user-select: none;
}

.cat {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 13px;
  color: rgba(20, 20, 20, 0.55);
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
  padding: 6px 2px;
}

.cat.active {
  font-weight: 900;
  color: var(--text);
  transform: rotate(180deg) translateX(-2px);
}

/* ✅ دایره بین سایدبار و محتوا => سمت چپِ سایدبار */
.indicator {
  width: 42px;
  height: 42px;
  background: whitesmoke;
  border-radius: 50%;
  position: absolute;
  right: -21px;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: var(--shadow2);
  transition: top 0.28s cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* Tap + Ripple */
.tap:active {
  transform: scale(0.985);
}
.food-card.tap:active {
  transform: scale(0.99);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.ripple {
  position: relative;
  overflow: hidden;
}
.ripple-wave {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.55s ease-out;
  background: rgba(0, 0, 0, 0.12);
  pointer-events: none;
}
@keyframes ripple {
  to {
    transform: scale(3.2);
    opacity: 0;
  }
}

/* Category transitions */
.cards.is-leaving {
  animation: cardsOut 180ms ease forwards;
}
.cards.is-entering {
  animation: cardsIn 240ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

@keyframes cardsOut {
  from {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-10px) translateY(6px);
  }
}
@keyframes cardsIn {
  from {
    opacity: 0;
    transform: translateX(12px) translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
}

/* Modal (Center) */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999;
}
.modal.show {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
}

.modal-sheet {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100% - 28px));
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  animation: modalInCenter 0.22s cubic-bezier(0.2, 0.9, 0.2, 1);
}

@keyframes modalInCenter {
  from {
    transform: translate(-50%, -50%) scale(0.96);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  z-index: 2;
}

.modal-img {
  background: var(--green-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* ✅ عکس بزرگ‌تر و با جزئیات + زوم نرم */
.modal-img img {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 18px;
  border: 3px solid #fff;
}

@keyframes imgZoom {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-body {
  padding: 14px 16px 16px;
  direction: rtl;
}
.modal-body h2 {
  font-size: 18px;
  margin-bottom: 6px;
  color: rgb(89, 103, 37);
}
.modal-body p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.modal-row {
  display: flex;
  justify-content: flex-start;
}
.modal-price {
  font-weight: 900;
}

@media (max-width: 420px) {
  .content {
    padding: 22px 16px;
  }
  .thumb {
    width: 86px;
    height: 78px;
  }
}
