/*
Theme Name: Thuluth Cafe Menu
Theme URI: https://yoursite.com
Author: Thuluth Cafe Theme
Description: فاخر، ثنائي اللغة (عربي/إنجليزي) موقع قائمة مقهى مع دعم RTL كامل، مستوحى من تصميم مقهى ثُلُث. صفوف عمودية ملونة متدرجة مع إدارة كاملة من WordPress.
Version: 2.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thuluth-cafe
Tags: rtl-language, arabic, cafe, restaurant, menu, bilingual, dark, luxury, green
*/

/* =====================================================
   THULUTH CAFE — CSS DESIGN SYSTEM
   Inspired by ثُلُث مقهى
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Tajawal:wght@300;400;500;700;800&family=Cormorant+Garamond:ital,wght@0,300;0,600;1,300&display=swap');

/* =====================================================
   CSS VARIABLES — THULUTH PALETTE
   ===================================================== */
:root {
  /* Thuluth Green → Olive → Khaki palette */
  --c-row-1:   #2d3d28;
  --c-row-2:   #374832;
  --c-row-3:   #4a5538;
  --c-row-4:   #5e6640;
  --c-row-5:   #7a7a3a;
  --c-row-6:   #9e9050;
  --c-row-7:   #b09a5a;

  /* UI Colors */
  --c-bg:         #0f0f0d;
  --c-bg-card:    #141410;
  --c-bg-raised:  #1c1c16;
  --c-border:     #252520;
  --c-border-gold:rgba(200,168,75,0.28);
  --c-gold:       #C8A84B;
  --c-gold-light: #E0C070;
  --c-gold-dark:  #9A7A2E;
  --c-cream:      #F0E8D0;
  --c-text:       #D8D0BC;
  --c-muted:      #888880;
  --c-white:      #FFFFFF;

  /* Fonts */
  --f-arabic:  'Tajawal', 'Noto Naskh Arabic', Arial, sans-serif;
  --f-display: 'Playfair Display', 'Noto Naskh Arabic', Georgia, serif;
  --f-body:    'Cormorant Garamond', 'Tajawal', Georgia, serif;
  --f-ui:      'Tajawal', Arial, sans-serif;

  /* Spacing */
  --sp-xs: 4px;  --sp-sm: 8px;  --sp-md: 16px;
  --sp-lg: 24px; --sp-xl: 40px; --sp-2xl: 64px;

  /* Misc */
  --radius:    6px;
  --radius-lg: 12px;
  --shadow:    0 4px 24px rgba(0,0,0,0.5);
  --transition:0.25s cubic-bezier(0.16,1,0.3,1);
  --max-w:     1100px;
}

/* =====================================================
   RESET
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-arabic);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  direction: rtl;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-gold-light); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* =====================================================
   LAYOUT
   ===================================================== */
.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: var(--sp-lg); }

/* =====================================================
   SITE HEADER
   ===================================================== */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 200;
  height: 66px;
  background: rgba(10,10,8,0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--c-border-gold);
  transition: background var(--transition);
}
.admin-bar .site-header { top: 32px; }
@media screen and (max-width:782px){ .admin-bar .site-header { top:46px; } }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
}

/* Logo */
.site-logo { display: flex; align-items: center; gap: var(--sp-sm); text-decoration: none; flex-shrink: 0; }
.logo-mark {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(200,168,75,0.12);
  border: 1px solid rgba(200,168,75,0.35);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.logo-mark-text { font-size: 20px; color: var(--c-gold); font-weight: 700; }
.logo-text-wrap .logo-name { font-family: var(--f-arabic); font-size: 1.15rem; font-weight: 800; color: var(--c-gold); line-height: 1; letter-spacing: 0.03em; }
.logo-text-wrap .logo-tag  { font-family: var(--f-ui); font-size: 0.65rem; color: var(--c-muted); letter-spacing: 0.15em; text-transform: uppercase; display: block; margin-top: 2px; }

/* Primary Nav */
.primary-nav { display: flex; align-items: center; gap: 2px; }
.primary-nav a { font-family: var(--f-ui); font-size: 0.88rem; color: var(--c-muted); padding: 6px 12px; border-radius: var(--radius); transition: all 0.15s; }
.primary-nav a:hover, .primary-nav a.current { color: var(--c-gold); background: rgba(200,168,75,0.08); }

/* Lang + Controls */
.header-controls { display: flex; align-items: center; gap: var(--sp-sm); flex-shrink: 0; }
.lang-switcher { display: flex; gap: 4px; }
.lang-btn { font-family: var(--f-ui); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; padding: 3px 9px; border-radius: 20px; border: 1px solid var(--c-border); color: var(--c-muted); transition: all 0.15s; }
.lang-btn:hover, .lang-btn.active { color: var(--c-gold); border-color: var(--c-gold); background: rgba(200,168,75,0.08); }

/* Mobile toggle */
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: var(--sp-sm); }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--c-gold); border-radius: 2px; transition: all var(--transition); }

/* =====================================================
   PAGE HERO TITLE BAR
   ===================================================== */
.page-hero {
  padding: 70px var(--sp-lg) 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--c-bg);
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% -10%, rgba(200,168,75,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero-pattern {
  position: absolute; inset: 0; opacity: 0.03; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='50' height='50' viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23C8A84B' fill-rule='evenodd'%3E%3Cpath d='M25 0L50 25L25 50L0 25L25 0zm0 7L43 25L25 43L7 25L25 7z'/%3E%3C/g%3E%3C/svg%3E");
}
.page-hero-content { position: relative; z-index: 1; }
.hero-ornament { display: block; font-size: 13px; color: var(--c-gold); opacity: 0.55; letter-spacing: 0.55em; margin-bottom: var(--sp-md); }
.hero-main-title { font-family: var(--f-arabic); font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; color: var(--c-cream); line-height: 1.1; margin-bottom: var(--sp-md); }
.hero-divider { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 200px; margin: 0 auto 12px; }
.hero-divider::before, .hero-divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--c-gold-dark), transparent); }
.hero-divider span { color: var(--c-gold); font-size: 11px; }
.hero-caption { font-family: var(--f-ui); font-size: 0.8rem; color: var(--c-muted); letter-spacing: 0.18em; text-transform: uppercase; }

/* =====================================================
   STACKED MENU ROWS — Main Style (Thuluth-inspired)
   ===================================================== */
.menu-stack { display: flex; flex-direction: column; }

.menu-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 140px;
  padding: 0 48px 0 56px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  transition: filter 0.2s ease, transform 0.18s ease;
}
.menu-row:hover { filter: brightness(1.09); }
.menu-row:active { transform: scale(0.998); }

/* Row color variants */
.menu-row--c1 { background: var(--c-row-1); }
.menu-row--c2 { background: var(--c-row-2); }
.menu-row--c3 { background: var(--c-row-3); }
.menu-row--c4 { background: var(--c-row-4); }
.menu-row--c5 { background: var(--c-row-5); }
.menu-row--c6 { background: var(--c-row-6); }
.menu-row--c7 { background: var(--c-row-7); }

/* Row background image overlay */
.row-bg-image {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.15;
  transition: opacity 0.3s ease;
  mix-blend-mode: luminosity;
}
.menu-row:hover .row-bg-image { opacity: 0.25; }

/* Row separator */
.row-separator { height: 1px; background: rgba(0,0,0,0.35); flex-shrink: 0; }

/* Row content layout */
.row-inner {
  position: relative; z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  width: 100%;
}

.row-ornament { color: rgba(255,255,255,0.65); font-size: 1.3rem; flex-shrink: 0; }

.row-text-block { text-align: right; flex: 1; }
.row-title-ar {
  font-family: var(--f-arabic);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  text-shadow: 0 2px 16px rgba(0,0,0,0.4);
  letter-spacing: -0.01em;
}
.row-title-en {
  font-family: var(--f-ui);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 4px;
  direction: ltr;
  text-align: left;
}

.row-arrow {
  flex-shrink: 0;
  margin-inline-start: auto;
  margin-inline-end: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.55);
  font-size: 1rem;
  transition: all 0.2s ease;
}
.menu-row:hover .row-arrow {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.55);
  color: #fff;
  transform: translateX(-4px);
}

/* =====================================================
   INFO BAR
   ===================================================== */
.info-bar {
  background: var(--c-bg-card);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  padding: var(--sp-xl) 0;
}
.info-bar-inner { display: flex; flex-wrap: wrap; gap: var(--sp-xl); align-items: flex-start; justify-content: center; }
.info-item { display: flex; align-items: flex-start; gap: var(--sp-md); max-width: 260px; }
.info-icon { width: 42px; height: 42px; border-radius: 50%; background: rgba(200,168,75,0.1); border: 1px solid var(--c-border-gold); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; color: var(--c-gold); }
.info-body h4 { font-family: var(--f-ui); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--c-gold); margin-bottom: 4px; }
.info-body p  { font-family: var(--f-ui); font-size: 0.88rem; color: var(--c-muted); line-height: 1.55; }

/* =====================================================
   SITE FOOTER
   ===================================================== */
.site-footer { background: var(--c-bg-card); border-top: 1px solid var(--c-border-gold); padding: var(--sp-2xl) 0 var(--sp-xl); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--sp-2xl); margin-bottom: var(--sp-xl); }
.footer-brand-name { font-family: var(--f-arabic); font-size: 1.5rem; font-weight: 800; color: var(--c-gold); margin-bottom: var(--sp-sm); }
.footer-brand-desc { font-family: var(--f-ui); font-size: 0.88rem; color: var(--c-muted); line-height: 1.7; max-width: 300px; }
.footer-col-title { font-family: var(--f-arabic); font-size: 0.95rem; font-weight: 700; color: var(--c-gold); margin-bottom: var(--sp-md); padding-bottom: var(--sp-sm); border-bottom: 1px solid var(--c-border-gold); }
.footer-nav-list { display: flex; flex-direction: column; gap: var(--sp-sm); }
.footer-nav-list a { font-family: var(--f-ui); font-size: 0.88rem; color: var(--c-muted); transition: color 0.15s; }
.footer-nav-list a:hover { color: var(--c-gold-light); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: var(--sp-xl); border-top: 1px solid var(--c-border); gap: var(--sp-md); flex-wrap: wrap; }
.footer-copy { font-family: var(--f-ui); font-size: 0.78rem; color: var(--c-muted); }
.footer-social { display: flex; gap: var(--sp-sm); }
.footer-social a { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--c-border); display: flex; align-items: center; justify-content: center; color: var(--c-muted); font-size: 0.85rem; transition: all 0.15s; }
.footer-social a:hover { border-color: var(--c-gold); color: var(--c-gold); background: rgba(200,168,75,0.08); }

/* =====================================================
   CATEGORY / TAXONOMY PAGE
   ===================================================== */
.cat-hero {
  min-height: 200px;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  text-align: center;
  padding: 80px var(--sp-lg) 40px;
  position: relative; overflow: hidden;
}
.cat-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.cat-hero-overlay { position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.7)); }
.cat-hero-content { position: relative; z-index: 1; }
.cat-hero-icon { font-size: 2.2rem; margin-bottom: var(--sp-sm); display: block; }
.cat-hero-title { font-family: var(--f-arabic); font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: #fff; margin-bottom: var(--sp-sm); }
.cat-hero-count { font-family: var(--f-ui); font-size: 0.8rem; color: rgba(255,255,255,0.55); letter-spacing: 0.15em; text-transform: uppercase; }

/* Back button */
.back-link { display: inline-flex; align-items: center; gap: var(--sp-sm); font-family: var(--f-ui); font-size: 0.85rem; color: var(--c-muted); margin: var(--sp-xl) 0 var(--sp-lg); transition: color 0.15s; }
.back-link:hover { color: var(--c-gold); }
.back-link svg { transition: transform 0.15s; }
.back-link:hover svg { transform: translateX(3px); }

/* Category pills */
.cat-filter { display: flex; flex-wrap: wrap; gap: var(--sp-sm); margin-bottom: var(--sp-xl); justify-content: flex-end; }
.cat-filter-pill { font-family: var(--f-ui); font-size: 0.82rem; padding: 6px 14px; border-radius: 20px; border: 1px solid var(--c-border); color: var(--c-muted); transition: all 0.15s; text-decoration: none; }
.cat-filter-pill:hover { border-color: var(--c-gold); color: var(--c-gold); }
.cat-filter-pill.active { background: var(--c-gold); color: var(--c-bg); border-color: var(--c-gold); font-weight: 700; }

/* Menu Items List */
.menu-items-container { display: flex; flex-direction: column; gap: 10px; margin-bottom: var(--sp-2xl); }
.menu-item-card {
  display: flex; align-items: center; gap: var(--sp-lg);
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  transition: all var(--transition);
  position: relative; overflow: hidden;
}
.menu-item-card::after {
  content: '';
  position: absolute;
  inset-inline-end: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--c-gold);
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.menu-item-card:hover { border-color: var(--c-border-gold); background: var(--c-bg-raised); }
.menu-item-card:hover::after { opacity: 1; }
.menu-item-card.unavailable { opacity: 0.5; }

.item-image { width: 88px; height: 88px; border-radius: var(--radius-lg); overflow: hidden; flex-shrink: 0; background: var(--c-bg-raised); border: 1px solid var(--c-border); order: 3; }
.item-image img { width: 100%; height: 100%; object-fit: cover; }
.item-image-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--c-border); }

.item-body { flex: 1; text-align: right; order: 2; min-width: 0; }
.item-name-ar { font-family: var(--f-arabic); font-size: 1.1rem; font-weight: 700; color: var(--c-cream); margin-bottom: 2px; line-height: 1.3; }
.item-name-en { font-family: var(--f-ui); font-size: 0.8rem; color: var(--c-muted); direction: ltr; text-align: left; margin-bottom: 6px; letter-spacing: 0.03em; }
.item-desc { font-family: var(--f-ui); font-size: 0.83rem; color: var(--c-muted); line-height: 1.5; }
.item-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: var(--sp-sm); justify-content: flex-end; }
.item-tag { font-family: var(--f-ui); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; }
.tag-new     { background: rgba(200,168,75,0.15); color: var(--c-gold); border: 1px solid rgba(200,168,75,0.3); }
.tag-popular { background: rgba(155,89,182,0.12); color: #BB8FCE; border: 1px solid rgba(155,89,182,0.3); }
.tag-spicy   { background: rgba(231,76,60,0.12);  color: #E74C3C; border: 1px solid rgba(231,76,60,0.3); }
.tag-veg     { background: rgba(46,204,113,0.10); color: #2ECC71; border: 1px solid rgba(46,204,113,0.3); }
.tag-unavail { background: rgba(231,76,60,0.12);  color: #E74C3C; border: 1px solid rgba(231,76,60,0.3); }

.item-price-block { flex-shrink: 0; text-align: center; order: 1; }
.item-price { font-family: var(--f-display); font-size: 1.5rem; font-weight: 700; color: var(--c-gold); display: block; line-height: 1; }
.item-currency { font-family: var(--f-ui); font-size: 0.72rem; color: var(--c-muted); display: block; margin-top: 2px; letter-spacing: 0.08em; text-transform: uppercase; }

/* =====================================================
   SINGLE ITEM PAGE
   ===================================================== */
.single-item-wrap { padding: var(--sp-2xl) 0; }
.single-item-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2xl); align-items: start; }
.single-item-image { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--c-border); }
.single-item-title { font-family: var(--f-arabic); font-size: 2.2rem; font-weight: 800; color: var(--c-cream); margin-bottom: var(--sp-sm); }
.single-item-title-en { font-family: var(--f-ui); font-size: 1rem; color: var(--c-muted); direction: ltr; margin-bottom: var(--sp-lg); }
.single-item-price { font-family: var(--f-display); font-size: 2.8rem; font-weight: 700; color: var(--c-gold); }
.single-divider { height: 1px; background: var(--c-border); margin: var(--sp-lg) 0; }

/* =====================================================
   PAGE TEMPLATE (generic)
   ===================================================== */
.page-content { padding: var(--sp-2xl) 0; min-height: 60vh; }
.page-content-title { font-family: var(--f-arabic); font-size: 2.2rem; font-weight: 800; color: var(--c-cream); margin-bottom: var(--sp-xl); }
.page-content-body { font-family: var(--f-ui); color: var(--c-muted); line-height: 1.8; }

/* =====================================================
   404
   ===================================================== */
.error-404 { min-height: 80vh; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; gap: var(--sp-lg); padding: var(--sp-2xl); }
.error-404 .error-num { font-family: var(--f-display); font-size: clamp(5rem, 15vw, 9rem); font-weight: 700; color: var(--c-gold); line-height: 1; }
.error-404 p { font-family: var(--f-ui); font-size: 1rem; color: var(--c-muted); }
.btn-primary { display: inline-block; padding: 13px 30px; background: var(--c-gold); color: var(--c-bg); border-radius: var(--radius); font-family: var(--f-ui); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.05em; transition: background 0.15s; }
.btn-primary:hover { background: var(--c-gold-light); color: var(--c-bg); }

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeUp { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: translateY(0); } }
.animate { animation: fadeUp 0.55s cubic-bezier(0.16,1,0.3,1) both; }
.animate:nth-child(1){animation-delay:0.04s} .animate:nth-child(2){animation-delay:0.08s}
.animate:nth-child(3){animation-delay:0.12s} .animate:nth-child(4){animation-delay:0.16s}
.animate:nth-child(5){animation-delay:0.20s} .animate:nth-child(6){animation-delay:0.24s}
.animate:nth-child(7){animation-delay:0.28s}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > *:first-child { grid-column: 1 / -1; }
  .single-item-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .primary-nav { display:none; position:fixed; top:66px; inset-inline:0; bottom:0; background:rgba(10,10,8,0.98); flex-direction:column; align-items:center; justify-content:center; gap:var(--sp-lg); z-index:199; }
  .primary-nav.open { display:flex; }
  .primary-nav a { font-size:1.2rem; }
  .nav-toggle { display:flex; }
  .menu-row { min-height:110px; padding:0 24px 0 32px; }
  .row-title-ar { font-size: clamp(1.4rem, 5vw, 2rem); }
  .menu-item-card { flex-wrap: wrap; }
  .item-image { order:1; width:64px; height:64px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width:480px) {
  .menu-row { min-height:90px; padding:0 16px 0 20px; }
  .row-arrow { width:32px; height:32px; font-size:0.85rem; }
  .info-bar-inner { flex-direction: column; align-items:flex-end; padding:0 var(--sp-lg); }
}
