/* ═══════════════════════════════════════════════════════
   FATHI USTA RESTAURANT — Main Stylesheet
   Design: Dark Brown + Gold Glassmorphism
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&family=Noto+Kufi+Arabic:wght@400;700;900&family=Playfair+Display:wght@400;600;700&display=swap');
 @font-face {
  font-family: 'CustomFont';
  src: url('/Speda.ttf') format('truetype');
}
/* ── Design Tokens ── */
:root {
  --coffee-950: #0D0603;
  --coffee-900: #1A0D07;
  --coffee-800: #2C1A0E;
  --coffee-700: #3D2712;
  --coffee-600: #5C3317;
  --coffee-500: #7A4520;
  --coffee-400: #8B5A2B;
  --coffee-300: #A0714F;

  --beige-600:  #C4A882;
  --beige-400:  #D4BC9A;
  --beige-200:  #F0E2CC;
  --cream:      #FAF4EB;

  --gold-deep:   #8B6914;
  --gold:        #C9A96E;
  --gold-bright: #E8C97A;
  --gold-glow:   #FFE9A0;

  --font-arabic: 'CustomFont','Cairo', 'Noto Kufi Arabic', sans-serif;
  --font-en:     'CustomFont','Playfair Display', Georgia, serif;

  --radius-card: 20px;
  --radius-sm:   10px;
  --shadow-card: 0 8px 32px rgba(0,0,0,0.45);
  --shadow-glow: 0 0 60px rgba(201,169,110,0.15);
  --border-gold: 1px solid rgba(201,169,110,0.25);

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-arabic);
  background: var(--coffee-900);
  color: var(--cream);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Animated Background ── */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%,  rgba(139,90,43,0.4) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 5%  90%, rgba(92,51,23,0.35) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 95% 80%, rgba(201,169,110,0.12) 0%, transparent 50%),
    linear-gradient(180deg, var(--coffee-800) 0%, var(--coffee-900) 100%);
}

/* ── Floating Orbs ── */
.orbs { position:fixed; inset:0; z-index:0; pointer-events:none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbDrift ease-in-out infinite alternate;
}
.orb1 { width:300px; height:300px; background:radial-gradient(circle,rgba(201,169,110,0.18) 0%,transparent 70%); top:-80px; left:-60px; animation-duration:14s; }
.orb2 { width:250px; height:250px; background:radial-gradient(circle,rgba(139,90,43,0.25) 0%,transparent 70%); bottom:5%; right:-50px; animation-duration:18s; animation-delay:-7s; }
.orb3 { width:180px; height:180px; background:radial-gradient(circle,rgba(240,226,204,0.08) 0%,transparent 70%); top:40%; left:50%; transform:translate(-50%,-50%); animation-duration:11s; animation-delay:-4s; }

@keyframes orbDrift { 0%{transform:translate(0,0)} 100%{transform:translate(40px,25px)} }

/* ── Particles ── */
.particles { position:fixed; inset:0; z-index:0; pointer-events:none; overflow:hidden; }
.p { position:absolute; bottom:-10px; border-radius:50%; background:var(--gold); opacity:0; animation:riseUp linear infinite; }
.p:nth-child(1){left:5%;width:3px;height:3px;animation-duration:9s;}
.p:nth-child(2){left:15%;width:4px;height:4px;animation-duration:12s;animation-delay:2s;}
.p:nth-child(3){left:25%;width:5px;height:5px;animation-duration:8s;animation-delay:1s;}
.p:nth-child(4){left:38%;width:3px;height:3px;animation-duration:14s;animation-delay:3.5s;}
.p:nth-child(5){left:50%;width:4px;height:4px;animation-duration:7s;animation-delay:0.5s;}
.p:nth-child(6){left:62%;width:5px;height:5px;animation-duration:11s;animation-delay:4s;}
.p:nth-child(7){left:72%;width:3px;height:3px;animation-duration:10s;animation-delay:1.5s;}
.p:nth-child(8){left:82%;width:6px;height:6px;animation-duration:13s;animation-delay:2.8s;}
.p:nth-child(9){left:91%;width:4px;height:4px;animation-duration:9s;animation-delay:0.2s;}
.p:nth-child(10){left:96%;width:3px;height:3px;animation-duration:15s;animation-delay:3s;}
@keyframes riseUp {
  0%   { transform:translateY(0) translateX(0) scale(1); opacity:0; }
  8%   { opacity:0.6; }
  85%  { opacity:0.2; }
  100% { transform:translateY(-100vh) translateX(15px) scale(0.3); opacity:0; }
}

/* ════════════════════════════════
   LAYOUT
   ════════════════════════════════ */
.site-wrapper {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Gold Shimmer Bar ── */
.gold-bar {
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg,
    transparent 0%, var(--coffee-500) 15%, var(--gold) 45%,
    var(--gold-bright) 55%, var(--gold) 65%, var(--coffee-500) 85%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 3.5s linear infinite;
  position: sticky;
  top: 0;
  z-index: 100;
}
@keyframes shimmer { 0%{background-position:-200% center} 100%{background-position:200% center} }

/* CSS custom property for dynamic header height tracking */
:root { --header-h: 92px; }

/* ════════════════════════════════
   HEADER
   ════════════════════════════════ */
.site-header {
  background: linear-gradient(180deg, rgba(44,26,14,0.95) 0%, rgba(26,13,7,0.85) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: var(--border-gold);
  position: sticky;
  top: 4px;   /* right below gold-bar (4px) */
  z-index: 90;
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(201,169,110,0.4);
  object-fit: cover;
  box-shadow: 0 0 20px rgba(201,169,110,0.25);
}

.header-titles { line-height: 1.2; }

.brand-name-en {
  font-family: var(--font-en);
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 2px;
  text-shadow: 0 0 30px rgba(232,201,122,0.5);
  animation: nameGlow 4s ease-in-out infinite alternate;
}
@keyframes nameGlow {
  from { text-shadow: 0 0 20px rgba(232,201,122,0.35); }
  to   { text-shadow: 0 0 45px rgba(232,201,122,0.7); }
}

.brand-name-local {
  font-family: var(--font-arabic);
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  font-weight: 600;
  color: var(--beige-400);
}

/* ── Language Switcher ── */
.lang-switcher {
  display: flex;
  gap: 4px;
  background: rgba(0,0,0,0.3);
  border: var(--border-gold);
  border-radius: 50px;
  padding: 4px;
}

.lang-btn {
  padding: 6px 14px;
  border-radius: 50px;
  border: none;
  background: transparent;
  color: var(--beige-400);
  font-family: var(--font-arabic);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-btn.active,
.lang-btn:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--coffee-900);
}

/* ════════════════════════════════
   SEARCH BAR
   ════════════════════════════════ */
.search-section {
  padding: 16px 0;
  max-width: 1200px;
  margin: 0 auto;
}

.search-wrap {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  pointer-events: none;
  font-size: 1.1rem;
}
[dir="rtl"] .search-icon { right: 14px; }
[dir="ltr"] .search-icon { left: 14px; }

.search-input {
  width: 100%;
  background: rgba(44,26,14,0.7);
  border: var(--border-gold);
  border-radius: 50px;
  color: var(--cream);
  font-family: var(--font-arabic);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}
[dir="rtl"] .search-input { padding: 12px 44px 12px 18px; }
[dir="ltr"] .search-input { padding: 12px 18px 12px 44px; }

.search-input::placeholder { color: var(--beige-600); }
.search-input:focus {
  border-color: rgba(201,169,110,0.6);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.12);
  background: rgba(44,26,14,0.9);
}

/* ════════════════════════════════
   CATEGORY TABS
   ════════════════════════════════ */
.categories-section {
  padding: 6px 0 10px;
  position: sticky;
  /* Stick just below the header (~90px). This keeps tabs always visible */
  top: 88px;
  z-index: 80;
  background: linear-gradient(180deg,
    rgba(26,13,7,0.98) 0%,
    rgba(26,13,7,0.93) 70%,
    rgba(26,13,7,0.75) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201,169,110,0.1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.categories-scroll {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
  max-width: 1200px;
  margin: 0 auto;
}
.categories-scroll::-webkit-scrollbar { display:none; }

.categories-list {
  display: flex;
  gap: 8px;
  padding: 4px 4px;
  width: max-content;
  min-width: 100%;
  justify-content: center;
}

.cat-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 50px;
  border: var(--border-gold);
  background: rgba(44,26,14,0.6);
  color: var(--beige-400);
  font-family: var(--font-arabic);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: var(--transition);
  text-decoration: none;
  backdrop-filter: blur(8px);
}

.cat-tab:hover {
  background: rgba(61,39,18,0.8);
  color: var(--gold-bright);
  border-color: rgba(201,169,110,0.5);
  transform: translateY(-2px);
}

.cat-tab.active {
  background: linear-gradient(135deg, rgba(201,169,110,0.3) 0%, rgba(139,90,43,0.3) 100%);
  border-color: var(--gold);
  color: var(--gold-glow);
  box-shadow: 0 4px 16px rgba(201,169,110,0.2), inset 0 1px 0 rgba(255,255,255,0.06);
}

.cat-icon { font-size: 1.1rem; }
.cat-count {
  background: rgba(201,169,110,0.2);
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 0.75rem;
  color: var(--gold);
}

/* ════════════════════════════════
   MENU GRID
   ════════════════════════════════ */
.menu-section {
  padding: 8px 0 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.category-section {
  margin-bottom: 40px;
  animation: fadeInUp 0.5s ease both;
}

@keyframes fadeInUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}

.category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: var(--border-gold);
}

.category-icon { font-size: 1.6rem; }

.category-title {
  font-family: var(--font-arabic);
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 900;
  color: var(--gold-bright);
  flex: 1;
}

.category-badge {
  background: rgba(201,169,110,0.15);
  border: var(--border-gold);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.8rem;
  color: var(--gold);
}

/* ── Item Grid ── */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

/* ── Item Card ── */
.item-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: linear-gradient(135deg,
    rgba(92,51,23,0.35) 0%,
    rgba(44,26,14,0.6)  50%,
    rgba(61,39,18,0.4)  100%);
  border: var(--border-gold);
  border-radius: var(--radius-card);
  padding: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,0.04);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.item-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: var(--transition);
}

.item-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 25px rgba(201,169,110,0.1);
  border-color: rgba(201,169,110,0.45);
}

.item-card:hover::before { opacity: 1; }

.item-card.unavailable {
  opacity: 0.55;
  filter: grayscale(30%);
}

/* ── Item Image ── */
.item-img-wrap {
  flex-shrink: 0;
  position: relative;
}

.item-img {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  object-fit: cover;
  border: var(--border-gold);
  display: block;
  background: var(--coffee-700);
}

.unavailable-badge {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(180,60,60,0.85);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  font-family: var(--font-arabic);
  font-weight: 700;
}

/* ── Item Info ── */
.item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item-name {
  font-family: var(--font-arabic);
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-name-sub {
  font-family: var(--font-arabic);
  font-size: 0.78rem;
  color: var(--beige-600);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-price-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-price {
  font-family: var(--font-en);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 0 15px rgba(232,201,122,0.4);
}

.item-currency {
  font-family: var(--font-arabic);
  font-size: 0.75rem;
  color: var(--beige-600);
  font-weight: 600;
}

/* ════════════════════════════════
   ITEM DETAIL MODAL
   ════════════════════════════════ */
.item-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10,5,2,0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.item-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.item-modal {
  background: linear-gradient(160deg,
    rgba(92,51,23,0.6) 0%,
    rgba(44,26,14,0.92) 50%,
    rgba(61,39,18,0.75) 100%);
  border: 1px solid rgba(201,169,110,0.35);
  border-radius: 28px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 40px 80px rgba(0,0,0,0.8), 0 0 60px rgba(201,169,110,0.12);
  transform: translateY(40px) scale(0.95);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
  opacity: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,169,110,0.3) transparent;
}
.item-modal-overlay.open .item-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-img-wrap {
  position: relative;
  width: 100%;
  height: 260px;
  border-radius: 28px 28px 0 0;
  overflow: hidden;
  background: var(--coffee-700);
}

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

.modal-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(26,13,7,0.85) 0%, transparent 55%);
}

.modal-close {
  position: absolute;
  top: 14px;
  border: var(--border-gold);
  background: rgba(26,13,7,0.75);
  color: var(--gold-bright);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  backdrop-filter: blur(8px);
  transition: var(--transition);
  z-index: 2;
  line-height: 1;
}
[dir="rtl"] .modal-close { left: 14px; }
[dir="ltr"] .modal-close { right: 14px; }
.modal-close:hover { background: rgba(201,169,110,0.3); transform: scale(1.1); }

.modal-unavailable-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(180,60,60,0.88);
  color: #fff;
  text-align: center;
  padding: 7px;
  font-family: var(--font-arabic);
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 2;
}

.modal-body {
  padding: 20px 24px 28px;
}

.modal-name {
  font-family: var(--font-arabic);
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  font-weight: 900;
  color: var(--cream);
  line-height: 1.3;
  margin-bottom: 6px;
}

.modal-name-sub {
  font-size: 0.9rem;
  color: var(--beige-600);
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-name-badge {
  background: rgba(201,169,110,0.12);
  border: var(--border-gold);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.78rem;
  color: var(--gold);
}

.modal-price-section {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(201,169,110,0.1);
  border: var(--border-gold);
  border-radius: 14px;
  padding: 12px 16px;
  margin-top: 4px;
}

.modal-price-icon { font-size: 1.3rem; }

.modal-price {
  font-family: var(--font-en);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 0 20px rgba(232,201,122,0.5);
}

.modal-currency {
  font-family: var(--font-arabic);
  font-size: 0.85rem;
  color: var(--beige-600);
  font-weight: 600;
}

/* ── No results ── */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--beige-600);
  font-size: 1.1rem;
  display: none;
}
.no-results.visible { display: block; }
.no-results-icon { font-size: 3rem; margin-bottom: 12px; }

/* ════════════════════════════════
   FOOTER
   ════════════════════════════════ */
.site-footer {
  background: linear-gradient(0deg, rgba(13,6,3,0.98) 0%, rgba(26,13,7,0.95) 100%);
  border-top: var(--border-gold);
  padding: 40px 16px 24px;
  margin-top: 20px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 28px;
}

.footer-section-title {
  font-family: var(--font-arabic);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-info p {
  font-size: 0.88rem;
  color: var(--beige-400);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-info a {
  color: var(--beige-400);
  text-decoration: none;
  transition: var(--transition);
}
.footer-info a:hover { color: var(--gold-bright); }

/* Social Buttons */
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.soc-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 50px;
  border: var(--border-gold);
  background: rgba(44,26,14,0.6);
  color: var(--beige-400);
  font-family: var(--font-arabic);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}
.soc-btn:hover {
  background: rgba(201,169,110,0.2);
  color: var(--gold-bright);
  border-color: rgba(201,169,110,0.5);
  transform: translateY(-2px);
}
.soc-btn svg { width:16px; height:16px; flex-shrink:0; }

/* Footer Bottom */
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(201,169,110,0.12);
  text-align: center;
  font-size: 0.8rem;
  color: var(--coffee-300);
}

.footer-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 0.7rem;
}
.orn-line { flex:1; max-width:100px; height:1px; background:linear-gradient(to right,transparent,var(--gold),transparent); }

/* ════════════════════════════════
   SCROLLTOP BUTTON
   ════════════════════════════════ */
.scroll-top {
  position: fixed;
  bottom: 24px;
  z-index: 200;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  border: none;
  color: var(--coffee-900);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(201,169,110,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  pointer-events: none;
}
[dir="rtl"] .scroll-top { left: 20px; }
[dir="ltr"] .scroll-top { right: 20px; }
.scroll-top.visible { opacity:1; transform:translateY(0); pointer-events:all; }
.scroll-top:hover { transform:translateY(-3px) scale(1.1); }

/* ════════════════════════════════
   ADMIN PANEL STYLES
   ════════════════════════════════ */

/* ── Admin Layout ── */
.admin-body {
  font-family: var(--font-arabic);
  background: var(--coffee-900);
  color: var(--cream);
  min-height: 100vh;
  display: flex;
}

.admin-sidebar {
  width: 260px;
  background: linear-gradient(180deg, rgba(44,26,14,0.98) 0%, rgba(26,13,7,0.98) 100%);
  border-right: var(--border-gold);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 50;
  transition: var(--transition);
}

[dir="ltr"] .admin-sidebar { border-right: var(--border-gold); border-left: none; left: 0; }
[dir="rtl"] .admin-sidebar { border-left: var(--border-gold); border-right: none; right: 0; }

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: var(--border-gold);
  text-align: center;
}

.sidebar-logo { width:55px; height:55px; border-radius:50%; border:2px solid rgba(201,169,110,0.4); margin-bottom:10px; }

.sidebar-title {
  font-family: var(--font-en);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 1px;
}
.sidebar-subtitle { font-size:0.75rem; color:var(--beige-600); margin-top:2px; }

.sidebar-nav { flex:1; padding:16px 12px; overflow-y:auto; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--beige-400);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
  background: rgba(201,169,110,0.12);
  color: var(--gold-bright);
}
.nav-item.active { border-right: 3px solid var(--gold); }
[dir="ltr"] .nav-item.active { border-right: none; border-left: 3px solid var(--gold); }

.nav-icon { font-size: 1.2rem; width: 22px; text-align: center; flex-shrink:0; }

.sidebar-footer {
  padding: 16px;
  border-top: var(--border-gold);
}

/* ── Admin Main ── */
.admin-main {
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
[dir="rtl"] .admin-main { margin-right: 260px; }
[dir="ltr"] .admin-main { margin-left: 260px; }

.admin-topbar {
  background: rgba(44,26,14,0.95);
  backdrop-filter: blur(20px);
  border-bottom: var(--border-gold);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-bright);
}

.admin-content {
  flex: 1;
  padding: 24px;
  max-width: 1100px;
  width: 100%;
}

/* ── Stats Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: linear-gradient(135deg, rgba(92,51,23,0.4) 0%, rgba(44,26,14,0.7) 100%);
  border: var(--border-gold);
  border-radius: var(--radius-card);
  padding: 22px 18px;
  text-align: center;
  transition: var(--transition);
  backdrop-filter: blur(12px);
}
.stat-card:hover { transform:translateY(-3px); box-shadow:0 12px 30px rgba(0,0,0,0.4); }
.stat-icon { font-size:2rem; margin-bottom:8px; }
.stat-value { font-family:var(--font-en); font-size:2.2rem; font-weight:700; color:var(--gold-bright); line-height:1; }
.stat-label { font-size:0.82rem; color:var(--beige-600); margin-top:4px; }

/* ── Admin Table ── */
.admin-table-wrap { overflow-x:auto; border-radius:var(--radius-card); border:var(--border-gold); }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th {
  background: rgba(44,26,14,0.9);
  color: var(--gold);
  padding: 13px 16px;
  font-weight: 700;
  text-align: inherit;
  border-bottom: var(--border-gold);
  white-space: nowrap;
}
.admin-table td {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(201,169,110,0.08);
  color: var(--beige-400);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr { background: rgba(44,26,14,0.3); transition:var(--transition); }
.admin-table tbody tr:hover { background:rgba(92,51,23,0.3); }

.thumb { width:48px; height:48px; border-radius:8px; object-fit:cover; border:var(--border-gold); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-green { background:rgba(46,160,67,0.2); color:#6ee87a; border:1px solid rgba(46,160,67,0.3); }
.badge-red   { background:rgba(220,53,69,0.2); color:#ff6b7a; border:1px solid rgba(220,53,69,0.3); }
.badge-gold  { background:rgba(201,169,110,0.2); color:var(--gold-bright); border:var(--border-gold); }

/* ── Toggle Switch ── */
.toggle-wrap { display:flex; align-items:center; gap:8px; }
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}
.toggle input { opacity:0; width:0; height:0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 34px;
  border: var(--border-gold);
  transition: var(--transition);
}
.toggle-slider::before {
  content:'';
  position:absolute;
  height:18px; width:18px;
  left:3px; bottom:3px;
  background:var(--beige-600);
  border-radius:50%;
  transition:var(--transition);
}
.toggle input:checked + .toggle-slider { background:rgba(46,160,67,0.4); border-color:rgba(46,160,67,0.6); }
.toggle input:checked + .toggle-slider::before { transform:translateX(20px); background:#6ee87a; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 50px;
  border: none;
  font-family: var(--font-arabic);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary { background:linear-gradient(135deg,var(--gold),var(--gold-deep)); color:var(--coffee-900); box-shadow:0 4px 16px rgba(201,169,110,0.3); }
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 8px 24px rgba(201,169,110,0.4); }
.btn-danger  { background:rgba(220,53,69,0.2); color:#ff6b7a; border:1px solid rgba(220,53,69,0.4); }
.btn-danger:hover  { background:rgba(220,53,69,0.35); transform:translateY(-2px); }
.btn-outline { background:rgba(201,169,110,0.1); color:var(--gold); border:var(--border-gold); }
.btn-outline:hover { background:rgba(201,169,110,0.2); color:var(--gold-bright); transform:translateY(-2px); }
.btn-sm { padding:6px 12px; font-size:0.8rem; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-label { display:block; font-size:0.88rem; font-weight:700; color:var(--beige-400); margin-bottom:7px; }
.form-control {
  width: 100%;
  background: rgba(44,26,14,0.7);
  border: var(--border-gold);
  border-radius: var(--radius-sm);
  color: var(--cream);
  font-family: var(--font-arabic);
  font-size: 0.92rem;
  padding: 11px 14px;
  outline: none;
  transition: var(--transition);
}
.form-control:focus { border-color:rgba(201,169,110,0.6); box-shadow:0 0 0 3px rgba(201,169,110,0.1); background:rgba(44,26,14,0.9); }
.form-control option { background:var(--coffee-800); }

select.form-control { cursor:pointer; }

.form-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }

.form-section {
  background: rgba(44,26,14,0.5);
  border: var(--border-gold);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}
.form-section-title {
  font-size:1rem; font-weight:700; color:var(--gold); margin-bottom:18px;
  padding-bottom:10px; border-bottom:var(--border-gold);
  display:flex; align-items:center; gap:8px;
}

/* ── Login Page ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(160deg, rgba(92,51,23,0.55) 0%, rgba(44,26,14,0.85) 100%);
  border: var(--border-gold);
  border-radius: 28px;
  padding: 44px 36px;
  backdrop-filter: blur(24px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), var(--shadow-glow);
}
.login-logo { text-align:center; margin-bottom:24px; }
.login-logo img { width:80px; height:80px; border-radius:50%; border:2px solid rgba(201,169,110,0.4); }
.login-title { font-family:var(--font-en); font-size:1.6rem; font-weight:700; color:var(--gold-bright); text-align:center; margin-bottom:4px; }
.login-subtitle { font-size:0.85rem; color:var(--beige-600); text-align:center; margin-bottom:28px; }
.error-msg { background:rgba(220,53,69,0.15); border:1px solid rgba(220,53,69,0.4); color:#ff6b7a; padding:10px 14px; border-radius:var(--radius-sm); font-size:0.88rem; margin-bottom:16px; }

/* ── Image upload preview ── */
.img-preview-wrap { margin-top:10px; }
.img-preview { width:80px; height:80px; border-radius:10px; object-fit:cover; border:var(--border-gold); display:none; }
.img-preview.visible { display:block; }
.upload-hint { font-size:0.78rem; color:var(--beige-600); margin-top:6px; }

/* ── Alert / Toast ── */
.alert {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-success { background:rgba(46,160,67,0.15); border:1px solid rgba(46,160,67,0.35); color:#6ee87a; }
.alert-danger  { background:rgba(220,53,69,0.15); border:1px solid rgba(220,53,69,0.4); color:#ff6b7a; }
.alert-info    { background:rgba(201,169,110,0.15); border:var(--border-gold); color:var(--gold-bright); }

/* ════════════════════════════════
   RESPONSIVE
   ════════════════════════════════ */
@media (max-width: 768px) {
  .items-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap:24px; }
  .form-row { grid-template-columns: 1fr; }

  /* Admin sidebar collapse */
  .admin-sidebar { transform:translateX(100%); width:240px; }
  [dir="ltr"] .admin-sidebar { transform:translateX(-100%); }
  .admin-sidebar.open { transform:translateX(0); }
  [dir="rtl"] .admin-main { margin-right:0; }
  [dir="ltr"] .admin-main { margin-left:0; }

  .admin-content { padding:16px; }
  .stats-grid { grid-template-columns:repeat(2,1fr); }
}

@media (max-width: 480px) {
  .header-inner { gap:10px; }
  .brand-name-en { font-size:1.1rem; }
  .lang-btn { padding:5px 10px; font-size:0.78rem; }
  .item-img { width:85px; height:85px; }
  .stats-grid { grid-template-columns:1fr 1fr; }
  .login-card { padding:30px 22px; }
}

/* ── Mobile Admin Overlay ── */
.sidebar-overlay {
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.6);
  z-index:45;
  backdrop-filter:blur(2px);
}
@media (max-width:768px) {
  .sidebar-overlay.visible { display:block; }
}

.hamburger {
  display:none;
  align-items:center;
  justify-content:center;
  width:40px; height:40px;
  background:rgba(201,169,110,0.1);
  border:var(--border-gold);
  border-radius:10px;
  cursor:pointer;
  color:var(--gold);
  font-size:1.2rem;
}
@media (max-width:768px) { .hamburger { display:flex; } }
