:root {
  --ink: #f4efe6;
  --muted: rgba(244, 239, 230, 0.55);
  --paper: #12100e;
  --panel: #1a1714;
  --ember: #e85d2c;
  --gold: #d4a574;
  --line: rgba(244, 239, 230, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Lalezar", "Vazirmatn", sans-serif;
  --font-body: "Vazirmatn", sans-serif;
}

* { box-sizing: border-box; }

body.catalog-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 45% at 50% -10%, rgba(232, 93, 44, 0.18), transparent 50%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(212, 165, 116, 0.08), transparent 45%),
    linear-gradient(165deg, #1f1b18 0%, #0e0c0b 55%, #080706 100%);
  overflow-x: hidden;
}

.catalog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2rem);
}

.catalog-hours {
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(244, 239, 230, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.catalog-hours.is-closed {
  background: rgba(154, 31, 24, 0.9);
  color: #fff;
}

.catalog-brand {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: inherit;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.catalog-hint {
  opacity: 0.65;
  font-size: 0.85rem;
}

.catalog-home {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  color: #fff;
  text-decoration: none;
  background: var(--ember);
  border-radius: 0.4rem;
  font-size: 1.05rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.catalog-home:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(232, 93, 44, 0.35);
}

.catalog-home .cart-count {
  position: absolute;
  top: -0.35rem;
  left: -0.35rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #fff;
  color: var(--ember);
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.book-stage {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem clamp(0.75rem, 3vw, 1.5rem) 1.5rem;
  max-width: 56rem;
  margin: 0 auto;
}

.book {
  position: relative;
  width: min(100%, 26rem);
  margin: 0 auto;
  aspect-ratio: 3 / 4.35;
  overflow: hidden;
  isolation: isolate;
}

.book-page {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(12%) scale(0.98);
  transition:
    opacity 0.32s var(--ease),
    transform 0.32s var(--ease),
    visibility 0.32s;
  z-index: 1;
  will-change: transform, opacity;
}

.book-page.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  z-index: 3;
}

.book-page.is-enter {
  z-index: 2;
}

.book-page.is-leaving-next {
  opacity: 0;
  visibility: visible;
  transform: translateX(-14%) scale(0.98);
  z-index: 4;
  pointer-events: none;
}

.book-page.is-leaving-prev {
  opacity: 0;
  visibility: visible;
  transform: translateX(14%) scale(0.98);
  z-index: 4;
  pointer-events: none;
}

.page-face {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 0.3rem 0.65rem 0.65rem 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.45),
    inset -12px 0 22px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  position: relative;
  background: #0c0b09;
  backface-visibility: hidden;
}

.page-face--cover {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  background:
    radial-gradient(circle at 50% 30%, rgba(232, 93, 44, 0.22), transparent 55%),
    linear-gradient(160deg, #221e1a, #0f0d0b 70%);
}

.cover-glow {
  position: absolute;
  inset: 18% 22%;
  background: radial-gradient(circle, rgba(212, 165, 116, 0.12), transparent 70%);
  pointer-events: none;
  animation: cover-breathe 4.5s ease-in-out infinite;
}

@keyframes cover-breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

.cover-badge {
  position: relative;
  display: inline-block;
  margin-bottom: 0.85rem;
  padding: 0.3rem 0.85rem;
  border: 1px solid rgba(212, 165, 116, 0.45);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.cover-title {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  line-height: 1.05;
  color: #fff;
}

.cover-sub {
  position: relative;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 16rem;
}

.cover-rule {
  position: relative;
  width: 3.5rem;
  height: 2px;
  margin: 1.35rem auto;
  background: linear-gradient(90deg, transparent, var(--ember), transparent);
}

.cover-cta-hint {
  position: relative;
  margin: 0;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
}

.page-face--menu {
  background:
    linear-gradient(180deg, #161310 0%, #0c0b09 100%);
  padding: 1.15rem 1.1rem 2.4rem;
}

.menu-head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.75rem;
  align-items: end;
  padding-bottom: 0.75rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

.menu-head h2 {
  margin: 0;
  grid-column: 1;
  font-family: var(--font-display);
  font-size: 1.65rem;
  color: #fff;
  line-height: 1.1;
}

.menu-part {
  grid-column: 1;
  font-size: 0.72rem;
  color: var(--muted);
}

.menu-price-label {
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: end;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold);
  text-transform: uppercase;
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 165, 116, 0.45) transparent;
}

.menu-row {
  display: grid;
  grid-template-columns: 2.65rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.35rem;
  margin: 0 -0.35rem;
  border-radius: 0.45rem;
  border: 0;
  width: calc(100% + 0.7rem);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: right;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
  animation: row-in 0.45s var(--ease) both;
}

.menu-row:hover,
.menu-row:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.menu-row:active,
.menu-row.is-adding {
  transform: scale(0.98);
  background: rgba(232, 93, 44, 0.12);
}

.menu-row.is-added {
  background: rgba(212, 165, 116, 0.14);
}

.book-page.is-active .menu-row:nth-child(1) { animation-delay: 0.05s; }
.book-page.is-active .menu-row:nth-child(2) { animation-delay: 0.09s; }
.book-page.is-active .menu-row:nth-child(3) { animation-delay: 0.13s; }
.book-page.is-active .menu-row:nth-child(4) { animation-delay: 0.17s; }
.book-page.is-active .menu-row:nth-child(5) { animation-delay: 0.21s; }
.book-page.is-active .menu-row:nth-child(6) { animation-delay: 0.25s; }
.book-page.is-active .menu-row:nth-child(7) { animation-delay: 0.29s; }

@keyframes row-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.menu-thumb {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(212, 165, 116, 0.35);
  background: #2a2420;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(232, 93, 44, 0.08);
}

.menu-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.menu-thumb.is-empty {
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1rem;
}

.menu-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.menu-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.menu-name:hover {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.menu-desc {
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-dots {
  width: 1.25rem;
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    rgba(244, 239, 230, 0.28) 0 2px,
    transparent 2px 5px
  );
  align-self: center;
  margin-top: 0.15rem;
}

.menu-price {
  text-align: left;
  white-space: nowrap;
  min-width: 4.5rem;
}

.menu-price strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  direction: ltr;
}

.menu-price small {
  font-size: 0.65rem;
  color: var(--muted);
}

.page-number {
  position: absolute;
  bottom: 0.65rem;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(244, 239, 230, 0.35);
  font-size: 0.72rem;
}

.book-nav {
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 50%;
  background: rgba(251, 250, 247, 0.1);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.book-nav:hover {
  background: var(--ember);
  transform: scale(1.05);
}

.book-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  padding-bottom: 1.5rem;
}

.book-dots button {
  width: 0.5rem;
  height: 0.5rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.book-dots button.is-active {
  background: var(--ember);
  transform: scale(1.25);
}

.catalog-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  z-index: 50;
  padding: 0.75rem 1.15rem;
  border-radius: 0.5rem;
  background: rgba(26, 23, 20, 0.94);
  border: 1px solid rgba(212, 165, 116, 0.35);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
  pointer-events: none;
  max-width: min(90vw, 22rem);
  text-align: center;
}

.catalog-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 700px) {
  html {
    height: 100%;
  }

  body.catalog-body {
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .catalog-hours {
    flex-shrink: 0;
  }

  .catalog-top {
    flex-shrink: 0;
    padding: 0.65rem 0.85rem;
  }

  .catalog-hint { display: none; }

  .catalog-brand {
    font-size: 1.45rem;
  }

  .book-stage {
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0.2rem 0.35rem 0.35rem;
    align-items: stretch;
    gap: 0.3rem;
  }

  .book {
    width: 100%;
    max-width: none;
    aspect-ratio: auto;
    height: 100%;
    min-height: 0;
  }

  .book-page,
  .page-face {
    height: 100%;
  }

  .page-face {
    border-radius: 0.35rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  }

  .page-face--cover {
    padding: 1.5rem 1.1rem 2.5rem;
  }

  .page-face--menu {
    padding: 0.85rem 0.7rem 2.1rem;
  }

  .book-nav {
    width: 2.15rem;
    height: 2.15rem;
    align-self: center;
    flex-shrink: 0;
  }

  .book-dots {
    flex-shrink: 0;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  .menu-desc { display: none; }
  .menu-row {
    grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  }
  .menu-dots { display: none; }
}

.site-banners-wrap {
  width: min(42rem, calc(100% - 1.5rem));
  margin: 0.75rem auto 1rem;
}

.site-banners-grid {
  display: grid;
  gap: 0.55rem;
}

.site-banners-grid--1 { grid-template-columns: 1fr; }
.site-banners-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-banners-grid--3,
.site-banners-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.site-banner-card {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: 7rem;
  border-radius: 0.65rem;
  overflow: hidden;
  background: #f0eeea;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.site-banner-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

@media (max-width: 800px) {
  .site-banners-grid.hide-mobile { display: none !important; }
}
@media (min-width: 801px) {
  .site-banners-grid.hide-desktop { display: none !important; }
}

