/* ============================================================
   APPETIZER Digital Menu — style.css
   Palette: Deep Teal #0D3B44, Gold #C9A84C, Cream #F5EFE0
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Cairo:wght@400;600;700&family=Inter:wght@400;500;600&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  --teal:        #0D3B44;
  --teal-mid:    #155263;
  --teal-light:  #1B6B7B;
  --gold:        #C9A84C;
  --gold-light:  #E0C270;
  --cream:       #F5EFE0;
  --cream-dark:  #EDE4CE;
  --white:       #FFFFFF;
  --text-dark:   #1A1A1A;
  --text-muted:  #6B7280;

  --font-display: 'Playfair Display', serif;
  --font-ar:      'Cairo', sans-serif;
  --font-body:    'Inter', sans-serif;

  --radius-card:  18px;
  --radius-btn:   50px;
  --shadow-card:  0 4px 24px rgba(13,59,68,0.13);
  --shadow-gold:  0 2px 12px rgba(201,168,76,0.25);

  --transition:   0.25s ease;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--text-dark);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body[dir="rtl"] {
  font-family: var(--font-ar);
}

img { display: block; width: 100%; object-fit: cover; }
a { text-decoration: none; color: inherit; }

/* ── Header ───────────────────────────────────────────────── */
/* ── Header Luxury Mobile ─────────────────────────────────── */
.header {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.10), transparent 42%),
    linear-gradient(135deg, #062f36 0%, #0D3B44 55%, #062f36 100%);
  padding: 20px 14px 34px;
  border-radius: 0 0 46px 46px;
  border-bottom: 4px solid var(--gold);
  box-shadow: 0 10px 28px rgba(13,59,68,0.25);
}

.header::after {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -28px;
  height: 70px;
  border-radius: 0 0 50% 50%;
  border-bottom: 3px solid rgba(224,194,112,0.85);
  pointer-events: none;
}

.header-inner {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  min-height: 230px;
}

.lang-switcher {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  overflow: hidden;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  background: rgba(0,0,0,0.10);
  z-index: 4;
}

.lang-btn {
  border: 0;
  border-left: 1px solid rgba(201,168,76,0.45);
  background: transparent;
  color: rgba(255,255,255,0.90);
  padding: 7px 15px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.lang-btn:last-child {
  border-left: 0;
}

.lang-btn.active {
  background: linear-gradient(135deg, #F8D57A, #C9962E);
  color: #062f36;
}

.logo-circle {
  position: absolute;
  top: 54px;
  left: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 3px var(--gold),
    0 10px 20px rgba(0,0,0,0.20);
  overflow: hidden;
  z-index: 3;
}

.logo-circle img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.brand-area {
  text-align: center;
  padding-top: 70px;
  padding-left: 105px;
}

.top-ornament,
.bottom-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.top-ornament span {
  width: 115px;
  height: 3px;
  border-radius: 50px;
  background: linear-gradient(to right, transparent, #F4D276, #C9962E, transparent);
  box-shadow: 0 0 9px rgba(201,168,76,0.55);
}

.cutlery-icon {
  width: 58px;
  height: 48px;
  fill: #D9A847;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.35));
}

.main-title {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(2.65rem, 10vw, 4.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 7px;
  color: var(--white);
  text-shadow:
    0 2px 0 rgba(255,255,255,0.22),
    0 6px 16px rgba(0,0,0,0.35);
}

.main-title span {
  background: linear-gradient(#F8D57A, #C9962E, #F3D06C);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bottom-ornament {
  margin-top: 18px;
}

.bottom-ornament span {
  width: 125px;
  height: 3px;
  border-radius: 50px;
  background: linear-gradient(to right, transparent, #F4D276, #C9962E, transparent);
  box-shadow: 0 0 9px rgba(201,168,76,0.5);
}

.bottom-ornament i {
  width: 14px;
  height: 14px;
  display: block;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #F8D57A, #C9962E);
  box-shadow: 0 0 9px rgba(201,168,76,0.65);
}

/* Mobile fix */
@media (max-width: 420px) {
  .header {
    padding: 16px 10px 30px;
    border-radius: 0 0 38px 38px;
  }

  .header-inner {
    min-height: 210px;
  }

  .lang-btn {
    padding: 6px 10px;
    font-size: 0.68rem;
  }

  .logo-circle {
    top: 60px;
    width: 72px;
    height: 72px;
  }

  .logo-circle img {
    width: 60px;
    height: 60px;
  }

  .brand-area {
    padding-top: 76px;
    padding-left: 78px;
  }

  .top-ornament span,
  .bottom-ornament span {
    width: 68px;
    height: 2.5px;
  }

  .cutlery-icon {
    width: 46px;
    height: 40px;
  }

  .main-title {
    font-size: 2.3rem;
    letter-spacing: 4px;
  }

  .bottom-ornament {
    margin-top: 13px;
  }
}
/* ── Back Button (category pages) ───────────────────────────── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: none;
  border-radius: var(--radius-btn);
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 18px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.back-btn:hover { background: rgba(255,255,255,0.2); }

.back-btn svg { flex-shrink: 0; }

[dir="rtl"] .back-btn svg { transform: scaleX(-1); }

.page-title {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 10px;
}

[dir="rtl"] .page-title { font-family: var(--font-ar); }

.page-subtitle {
  color: var(--gold-light);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ── Main Layout ──────────────────────────────────────────── */
.main {
  padding: 24px 16px 40px;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Category Grid (index) ───────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cat-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-card);
  border: 1.5px solid var(--cream-dark);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.cat-card:hover, .cat-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(13,59,68,0.18);
  outline: none;
}

.cat-card:active { transform: translateY(-1px); }

.cat-img-wrap {
  height: 140px;
  overflow: hidden;
}

.cat-img-wrap img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cat-card:hover .cat-img-wrap img { transform: scale(1.05); }

/* placeholder gradient for missing images */
.cat-img-placeholder {
  height: 140px;
  background: linear-gradient(135deg, var(--teal-mid), var(--teal-light));
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-footer {
  background: var(--teal);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cat-icon {
  color: var(--gold);
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}

.cat-name {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
  flex: 1;
  text-align: center;
}

[dir="rtl"] .cat-name { text-align: right; }
[dir="ltr"] .cat-name { text-align: left; }

.cat-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  font-weight: 700;
  transition: background var(--transition);
}

.cat-card:hover .cat-arrow { background: var(--gold-light); }

/* ── Product Grid (category pages) ──────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 480px) {
  .products-grid { grid-template-columns: 1fr 1fr; }
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1.5px solid var(--cream-dark);
  transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(13,59,68,0.15);
}

.product-img-wrap {
  height: 160px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--teal-mid), var(--teal-light));
  position: relative;
}

.product-img-wrap img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-img-wrap img { transform: scale(1.06); }

.product-img-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.product-body {
  padding: 12px 14px 14px;
}

.product-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1.3;
  margin-bottom: 5px;
}

.product-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  background: var(--teal);
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--radius-btn);
  letter-spacing: 0.5px;
}

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  margin: 0 auto 16px;
  opacity: 0.3;
}

.empty-state p {
  font-size: 0.95rem;
}

/* ── Gold Divider ─────────────────────────────────────────── */
.gold-divider {
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 20px 0;
  opacity: 0.5;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.75rem;
  border-top: 1px solid var(--cream-dark);
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--teal-mid); border-radius: 3px; }

/* ── Reduced Motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
