/* ==========================================================================
   SkyGarden - Design System & Base CSS
   Bilingual RTL / LTR Architecture with Luxury Rooftop Aesthetic
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Vazirmatn:wght@200;300;400;500;600;700;800;900&display=swap');

:root {
  /* Color Palette - Dark Luxury SkyGarden (Default) */
  --bg-main: #0a0e12;
  --bg-surface: #11171d;
  --bg-surface-elevated: #162029;
  --bg-glass: rgba(17, 24, 31, 0.75);
  --bg-glass-card: rgba(22, 32, 41, 0.65);
  --bg-glass-input: rgba(10, 14, 18, 0.6);
  
  --border-subtle: rgba(212, 175, 55, 0.14);
  --border-medium: rgba(212, 175, 55, 0.28);
  --border-highlight: rgba(229, 192, 123, 0.6);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-gold: #e5c07b;
  --text-gold-light: #fef08a;

  /* Accent & Luxury Gold / Botanical */
  --gold-primary: #d4af37;
  --gold-gradient: linear-gradient(135deg, #f3e7c4 0%, #d4af37 50%, #aa820a 100%);
  --gold-gradient-soft: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(170, 130, 10, 0.1) 100%);
  --emerald-accent: #10b981;
  --emerald-glass: rgba(16, 185, 129, 0.15);
  --ruby-accent: #f43f5e;
  --amber-accent: #f59e0b;

  /* Typography */
  --font-en-display: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-en-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-fa: 'Vazirmatn', Tahoma, sans-serif;

  /* Elevation & Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.22);
  --shadow-gold-strong: 0 8px 30px rgba(212, 175, 55, 0.35);

  /* Layout */
  --header-height: 68px;
  --sticky-tabs-height: 56px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light Theme (Sunlit Terrace Mode) */
[data-theme="light"] {
  --bg-main: #f5f4f0;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f0eee8;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --bg-glass-card: rgba(255, 255, 255, 0.85);
  --bg-glass-input: rgba(240, 238, 232, 0.8);

  --border-subtle: rgba(180, 140, 40, 0.2);
  --border-medium: rgba(180, 140, 40, 0.35);
  --border-highlight: rgba(180, 140, 40, 0.7);

  --text-primary: #1a1e24;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-gold: #9e7412;
  --text-gold-light: #b48518;

  --gold-primary: #b8860b;
  --gold-gradient: linear-gradient(135deg, #d4af37 0%, #aa820a 60%, #785a00 100%);
  --gold-gradient-soft: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(170, 130, 10, 0.05) 100%);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.09);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.14);
  --shadow-gold: 0 4px 20px rgba(184, 134, 11, 0.15);
}

/* Base Resets & Global Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-en-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* Typography Rules for Persian (RTL) vs English (LTR) */
[dir="rtl"] body {
  font-family: var(--font-fa);
  letter-spacing: -0.01em;
}

[dir="rtl"] h1, 
[dir="rtl"] h2, 
[dir="rtl"] h3, 
[dir="rtl"] h4, 
[dir="rtl"] .brand-title {
  font-family: var(--font-fa);
  font-weight: 800;
  letter-spacing: -0.02em;
}

[dir="ltr"] .brand-title,
[dir="ltr"] .font-display {
  font-family: var(--font-en-display);
  letter-spacing: 0.08em;
}

/* Background Ambient Glow & Starfield */
.bg-ambient-layer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-glow-top {
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, rgba(16, 185, 129, 0.06) 45%, transparent 70%);
  filter: blur(60px);
}

.ambient-glow-bottom {
  position: absolute;
  bottom: -150px;
  right: 10%;
  width: 500px;
  height: 350px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, rgba(212, 175, 55, 0.04) 50%, transparent 70%);
  filter: blur(70px);
}

/* Main App Wrapper */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 768px; /* Optimized for mobile screens & tablets */
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 120px; /* Space for sticky cart/action bar */
  background: transparent;
}

/* Screen Reader Only Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Buttons and Clickables */
button {
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  font-family: inherit;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), opacity var(--transition-fast), background-color var(--transition-fast);
}

button:active {
  transform: scale(0.96);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.25);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.5);
}
