:root {
  --ink: #0b0906;
  --panel: #14110b;
  --gold: #c9a24b;
  --goldlt: #e9ce8c;
  --cream: #efe5cf;
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(201, 162, 75, .08), transparent 50%),
    #0b0906;
  color: var(--cream);
}

::selection { background: var(--gold); color: #171106; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2b2416; border-radius: 99px; }
::-webkit-scrollbar-track { background: var(--ink); }

.ic {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.no-bar { scrollbar-width: none; }
.no-bar::-webkit-scrollbar { display: none; }

#prog {
  transform-origin: right center;
  box-shadow: 0 0 12px rgba(201, 162, 75, .45);
}

#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--ink);
  transition: opacity .4s ease, visibility .4s ease;
}

#loader.loader-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 75, .4);
}

.loader-bar {
  width: 104px;
  height: 2px;
  overflow: hidden;
  background: rgba(239, 229, 207, .1);
  border-radius: 999px;
}

.loader-bar span {
  display: block;
  width: 35%;
  height: 100%;
  background: var(--gold);
  animation: loaderMove 1s ease-in-out infinite;
}

@keyframes loaderMove {
  from { transform: translateX(-120%); }
  to { transform: translateX(360%); }
}

.chip {
  color: rgba(239, 229, 207, .55);
  border: 1px solid rgba(239, 229, 207, .1);
  background: rgba(255, 255, 255, .02);
  transition: color .2s, border-color .2s, background .2s;
}

.chip:hover {
  color: var(--goldlt);
  border-color: rgba(201, 162, 75, .4);
}

.chip.on {
  color: #171106;
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 600;
}

.navbtn {
  color: rgba(239, 229, 207, .55);
  transition: color .2s, background .2s;
}

.navbtn:hover { color: var(--goldlt); background: rgba(201, 162, 75, .06); }
.navbtn.on { color: var(--goldlt); background: rgba(201, 162, 75, .1); }

.search-box {
  width: 100%;
  max-width: 280px;
  height: 42px;
  padding-block: 0;
  padding-inline: 40px 14px;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 75, .28);
  background: rgba(255, 255, 255, .06);
  color: var(--cream);
  font-size: 13px;
}

.search-box::placeholder { color: rgba(239, 229, 207, .35); }
.search-box:focus {
  outline: none;
  border-color: rgba(201, 162, 75, .55);
}

.menu-product {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(201, 162, 75, .14);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(20, 17, 11, .7));
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease, border-color .25s, box-shadow .25s;
}

.menu-product.in {
  opacity: 1;
  transform: none;
}

.menu-product[hidden] { display: none !important; }

.menu-product:hover {
  border-color: rgba(201, 162, 75, .38);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
}

.product-media {
  position: relative;
  min-height: 180px;
  background: #100d09;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

.menu-product:hover .product-media img { transform: scale(1.04); }

.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 75, .35);
  background: rgba(11, 9, 6, .72);
  color: var(--goldlt);
  font-size: 11px;
  backdrop-filter: blur(8px);
}

.product-cat {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .5);
  color: rgba(241, 230, 210, .9);
  font-size: 11px;
  backdrop-filter: blur(8px);
}

.product-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 18px;
  min-width: 0;
}

.product-info h3 {
  margin: 0;
  font-family: "Markazi Text", serif;
  font-size: 28px;
  line-height: 1.15;
  color: var(--goldlt);
}

.product-desc {
  margin: 8px 0 0;
  color: rgba(239, 229, 207, .5);
  font-size: 13px;
  line-height: 1.9;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--gold);
  color: #171106;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .2s, transform .15s;
}

.product-cta:hover { filter: brightness(1.06); }
.product-cta:active { transform: scale(.98); }

.product-price {
  font-family: "Markazi Text", serif;
  font-size: 26px;
  line-height: 1;
  color: var(--gold);
}

.product-price small {
  font-family: Vazirmatn, sans-serif;
  font-size: 10px;
  color: rgba(239, 229, 207, .45);
}

.product-add-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#modal, #drawer, #cartDrawer {
  opacity: 0;
  transition: opacity .25s ease;
}

#modal.show, #drawer.show, #cartDrawer.show { opacity: 1; }

.modal-card {
  opacity: 0;
  transform: translateY(12px) scale(.98);
  transition: opacity .3s ease, transform .3s ease;
}

#modal.show .modal-card {
  opacity: 1;
  transform: none;
}

.drawer-aside, .cart-panel {
  transform: translateX(-100%);
  transition: transform .35s cubic-bezier(.22, .9, .32, 1);
}

#drawer.show .drawer-aside,
#cartDrawer.show .cart-panel { transform: none; }

#cartCount {
  position: absolute;
  top: 2px;
  inset-inline-end: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--gold);
  color: #171106;
  font-size: 9px;
  font-weight: 700;
}

#cartCount.hidden { display: none; }

.cart-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(239, 229, 207, .08);
}

.cart-row-name { color: var(--cream); font-size: 13px; }
.cart-row-price { margin-top: 3px; color: rgba(239, 229, 207, .4); font-size: 11px; }

.qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--goldlt);
  background: transparent;
  border: 1px solid rgba(201, 162, 75, .28);
  border-radius: 8px;
}

.qty-btn:active { transform: scale(.92); }

.split-input {
  width: 58px;
  padding: 6px;
  text-align: center;
  color: var(--cream);
  background: transparent;
  border: 1px solid rgba(201, 162, 75, .3);
  border-radius: 8px;
}

.split-input:focus { outline: none; border-color: var(--gold); }

#toast {
  opacity: 0;
  transform: translate(-50%, 15px);
  transition: opacity .25s ease, transform .25s ease;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.menu-product.flash { animation: productFlash 1.6s ease; }

@keyframes productFlash {
  35% { box-shadow: 0 0 32px rgba(201, 162, 75, .2); }
}

@media (max-width: 767px) {
  .menu-product {
    grid-template-columns: 1fr;
  }

  .product-media {
    height: 200px;
  }

  .product-info h3 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
/* =========================================================
   HERO / CAFE BACKGROUND
   ========================================================= */

.hero-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* تصویر پس‌زمینه */
.hero-bg {
    position: absolute;
    inset: -8%;
    z-index: -3;

    background-image:
        linear-gradient(
            to bottom,
            rgba(11, 9, 6, .58) 0%,
            rgba(11, 9, 6, .38) 35%,
            rgba(11, 9, 6, .72) 75%,
            #0B0906 100%
        ),
        url('../images/cafe-bg.jpg');

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    transform: translate3d(0, 0, 0) scale(1.08);
    will-change: transform;
}

/* لایه تاریک روی تصویر */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;

    background:
        radial-gradient(
            circle at center,
            rgba(201, 162, 75, .08),
            transparent 45%
        ),
        linear-gradient(
            to bottom,
            transparent 55%,
            #0B0906 100%
        );
}

/* خط طلایی ظریف */
.hero-section::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: min(600px, 80%);
    height: 1px;

    transform: translateX(-50%);

    background: linear-gradient(
        90deg,
        transparent,
        rgba(201,162,75,.35),
        transparent
    );

    pointer-events: none;
}

/* محتوای Hero */
.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-top: 55px;
    padding-bottom: 65px;
}

/* افکت شیشه‌ای خیلی ظریف پشت متن */
.hero-content-inner {
    max-width: 680px;
    margin: auto;
    padding: 30px 24px;

    background: rgba(11, 9, 6, .18);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 28px;

    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);

    box-shadow:
        0 30px 80px rgba(0,0,0,.22);
}

/* موبایل */
@media (max-width: 767px) {

    .hero-section {
        min-height: 480px;
    }

    .hero-bg {
        inset: -12%;
        background-position: center;
    }

    .hero-content {
        padding-top: 40px;
        padding-bottom: 55px;
    }

    .hero-content-inner {
        padding: 24px 18px;
        border-radius: 22px;
        background: rgba(11,9,6,.25);
    }
}

/* اگر کاربر Reduce Motion فعال کرده */
@media (prefers-reduced-motion: reduce) {
    .hero-bg {
        transform: none !important;
    }
}
/* =========================================================
   FOOTER PARALLAX
   ========================================================= */

#siteFooter {
    min-height: 520px;
    isolation: isolate;
}

/* Background image */
.footer-bg {
    position: absolute;
    inset: -12%;
    z-index: -3;

    background-image:
        linear-gradient(
            to bottom,
            rgba(11, 9, 6, .88) 0%,
            rgba(11, 9, 6, .55) 35%,
            rgba(11, 9, 6, .72) 70%,
            rgba(11, 9, 6, .96) 100%
        ),
        url('../images/cafe-bg3.jpg');

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    transform: translate3d(0, 0, 0) scale(1.12);

    will-change: transform;
}

/* Extra cinematic overlay */
.footer-overlay {
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;

    background:
        radial-gradient(
            ellipse at center,
            rgba(201, 162, 75, .08),
            transparent 55%
        );
}

/* Golden top glow */
#siteFooter::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;

    width: min(700px, 90%);
    height: 1px;

    transform: translateX(-50%);

    background: linear-gradient(
        90deg,
        transparent,
        rgba(201,162,75,.45),
        transparent
    );

    z-index: 5;
}

/* Mobile */
@media (max-width: 767px) {

    #siteFooter {
        min-height: 560px;
    }

    .footer-bg {
        inset: -15%;

        background-position: center;
        transform: translate3d(0, 0, 0) scale(1.15);
    }

}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    .footer-bg {
        transform: none !important;
    }

}
/* =========================================================
   PROGRESSIVE PRODUCT IMAGE LOADING
   ========================================================= */
.product-image-frame {
  position: relative;
  overflow: hidden;
  background: #090705;
}

.product-image-frame img {
  opacity: .01;
  transition: opacity .35s ease, transform .6s ease;
}

.product-image-frame img.is-loaded {
  opacity: 1;
}

.product-image-loader {
  background:
    radial-gradient(circle at center, rgba(201,162,75,.08), transparent 58%);
  transition: opacity .25s ease, visibility .25s ease;
}

.product-image-frame.image-loaded .product-image-loader {
  opacity: 0;
  visibility: hidden;
}

.product-image-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(239,229,207,.12);
  border-top-color: #c9a24b;
  animation: productImageSpin .8s linear infinite;
}

@keyframes productImageSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .product-image-spinner { animation: none; }
}
