/* ==========================================================================
   فراخ آل عمر | CHICKEN AL OMAR - PREMIUM DESIGN SYSTEM & STYLES
   ========================================================================== */

:root {
  --primary: #C8102E;
  --primary-hover: #A00C24;
  --primary-light: #FFEFF2;
  --secondary: #FFFFFF;
  --accent-gold: #D4AF37;
  --accent-gold-light: #FFF9E6;
  --accent-gold-dark: #AA7C11;
  --bg-light: #F8F8F8;
  --text-dark: #222222;
  --text-muted: #666666;
  --border-color: #E2E8F0;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(200, 16, 46, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  --shadow-gold: 0 10px 30px rgba(212, 175, 55, 0.25);
  --shadow-primary: 0 10px 30px rgba(200, 16, 46, 0.3);
  
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Apply smooth scroll only to the document root, not every element */
html {
  scroll-behavior: smooth;
}


body {
  font-family: var(--font-family);
  background-color: var(--bg-light);
  color: var(--text-dark);
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Prevent iOS Safari rubber-band overscroll */
  overscroll-behavior-y: none;
}

button, a, input, select, textarea {
  touch-action: manipulation;
}

/* ── Mobile Performance & Stability ─────────────────────────── */

/* GPU-accelerate animated/transitioning elements */
.cart-drawer,
.modal-overlay,
.modal-container,
.product-card,
#floating-cart-bar {
  will-change: transform;
}

/* Smooth momentum scrolling for scroll containers on iOS */
.cart-drawer,
.modal-container {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Prevent layout paint thrashing during scroll */
#main-header {
  will-change: background-color, box-shadow;
  contain: layout style;
}

/* Luxury Font Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #F1F1F1;
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover);
}

/* Glassmorphism Classes */
.glass-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.glass-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid rgba(200, 16, 46, 0.1);
}

.glass-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.glass-card-dark {
  background: rgba(34, 34, 34, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.glass-gold-badge {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(255, 249, 230, 0.6) 100%);
  border: 1px solid rgba(212, 175, 55, 0.4);
  backdrop-filter: blur(8px);
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(0.5deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes pulse-subtle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.03); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes toastSlideIn {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-pulse-gold {
  animation: pulse-subtle 3s infinite ease-in-out;
}

/* Gradient Backgrounds & Buttons */
.bg-primary-gradient {
  background: linear-gradient(135deg, #E61938 0%, #C8102E 50%, #A00C24 100%);
}

.bg-gold-gradient {
  background: linear-gradient(135deg, #D4AF37 0%, #F5D77F 50%, #B8860B 100%);
}

.text-gold-gradient {
  background: linear-gradient(135deg, #D4AF37 0%, #F3E5AB 50%, #AA7C11 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #E61938 0%, #C8102E 100%);
  color: #FFFFFF;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-primary);
  transition: var(--transition);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #C8102E 0%, #900B20 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 35px rgba(200, 16, 46, 0.45);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #FFFFFF;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
  transition: var(--transition);
}

.btn-whatsapp:hover {
  background: linear-gradient(135deg, #20BA5C 0%, #0E7569 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.45);
}

.btn-gold {
  background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
  color: #111111;
  font-weight: 800;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-gold);
  transition: var(--transition);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 35px rgba(212, 175, 55, 0.45);
}

/* Card Lift & Hover Effects */
.product-card {
  border-radius: var(--radius-lg);
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

/* Only apply hover lift on true pointer devices — prevents sticky-hover on mobile */
@media (hover: hover) and (pointer: fine) {
  .product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(200, 16, 46, 0.12);
    border-color: rgba(200, 16, 46, 0.2);
  }
}

/* Favorite Heart Animation */
.fav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: #999;
}

.fav-btn.active {
  color: var(--primary);
  background: var(--primary-light);
  transform: scale(1.1);
}

/* Quantity Control — minimum 44×44px touch targets */
.qty-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #F1F5F9;
  color: var(--text-dark);
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  user-select: none;
}

@media (hover: hover) and (pointer: fine) {
  .qty-btn:hover {
    background: var(--primary);
    color: #FFFFFF;
  }
}

/* Quantity display */
.qty-display {
  font-weight: 800;
  font-size: 1.1rem;
  min-width: 60px;
  text-align: center;
}



/* Accordion Styling */
.faq-item {
  border-radius: var(--radius-md);
  border: 1px solid rgba(0,0,0,0.06);
  background: #FFFFFF;
  transition: var(--transition);
  overflow: hidden;
}

.faq-item.active {
  border-color: var(--accent-gold);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.12);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out, padding 0.35s ease;
}

.faq-item.active .faq-answer {
  max-height: 250px;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

/* Drawer / Slide-Over Cart */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 440px;
  background: #FFFFFF;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.2);
}

.cart-drawer.active {
  transform: translateX(0);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 94vh;
  overflow-y: auto;
  transform: scale(0.92);
  transition: transform 0.3s ease;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #1E293B;
  color: #FFFFFF;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border-right: 4px solid var(--accent-gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  animation: toastSlideIn 0.3s ease forwards;
}

/* Floating Badges */
.badge-gold {
  background: linear-gradient(135deg, #FFF9E6 0%, #FFF3CC 100%);
  border: 1px solid var(--accent-gold);
  color: #856404;
  font-weight: 700;
}

/* Touch-friendly Interactive Elements */
button, input, select, textarea, a {
  touch-action: manipulation;
}

.btn-primary, .btn-secondary, .btn-gold {
  min-height: 48px;
}

/* Mobile First Responsive Utilities */
@media (max-width: 640px) {
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  .hero-title {
    font-size: 1.8rem !important;
    line-height: 1.25 !important;
  }

  .cart-drawer {
    max-width: 100vw;
  }

  .toast-container {
    right: 12px;
    left: 12px;
    bottom: 16px;
  }

  .toast {
    font-size: 13px;
    padding: 12px 16px;
  }

  .modal-container {
    padding: 1.25rem !important;
    border-radius: 20px;
  }
}

