/* --- Premium Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 6px; /* Even thinner for that ultra-modern look */
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(242, 116, 5, 0.4); /* More vibrant default state */
  border-radius: 100px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-gradient); /* Use the rich gradient */
  box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.4);
}

::-webkit-scrollbar-thumb:active {
  background: var(--primary-dark);
}

/* Firefox Support */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--text-rgb, 15, 23, 42), 0.12) transparent;
}

[data-theme="dark"] {
  scrollbar-color: rgba(var(--text-rgb, 248, 250, 252), 0.15) transparent;
}

/* --- Root & Global Reset --- */
:root {
  /* Extract RGB for transparency */
  --text-rgb: 15, 23, 42;
  --primary-rgb: 245, 124, 0;
  /* Fluid Typography - Slightly more refined */
  --h1: clamp(2.6rem, 8vw, 4.5rem);
  --h2: clamp(2.1rem, 6vw, 3.2rem);
  --h3: clamp(1.6rem, 4vw, 2.2rem);
  --text: clamp(0.95rem, 1.8vw, 1.05rem);

  /* Spacing Tokens */
  --section-padding: clamp(5rem, 12vh, 12rem);
  --container-padding: clamp(1.5rem, 6vw, 5rem);
  --radius: 18px;
  --radius-lg: 36px;
  --radius-full: 9999px;

  /* Premium Color Palette - Luxury Hardware Aesthetic */
  --primary: #f57c00; /* Richer Orange */
  --primary-rgb: 245, 124, 0;
  --primary-light: #ffb74d;
  --primary-dark: #e65100;
  --primary-gradient: linear-gradient(135deg, #f57c00, #ffb300);
  --secondary: #0f172a;
  --accent: #7c3aed; /* Royal Purple Accent */
  --danger: #ff4d4d;
  --success: #00d28a;
  --warning: #ffc107;
  
  /* Modern Surfaces */
  --background: #f8fafc;
  --text-rgb: 15, 23, 42;
  --surface: #ffffff;
  --surface-high: #f1f5f9;
  --text: #0f172a;
  --text-light: #64748b;
  --border: #e2e8f0;
  
  /* Luxury Shadows */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 25px 50px -12px rgba(15, 23, 42, 0.12);
  --shadow-premium: 0 20px 40px rgba(245, 124, 0, 0.15);
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-blur: 12px;
}

body {
  background-color: var(--background);
  color: var(--text);
  font-family: 'Inter', 'Cairo', sans-serif;
  font-size: var(--text);
  line-height: 1.7;
  overflow-x: hidden; /* Prevent horizontal scroll */
  width: 100%;
  transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  touch-action: manipulation; /* Improves mobile tap responsiveness */
}

/* --- Premium Micro-Interactions --- */
.btn, .card, .product-card, .nav-link, .category-pill {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active, .card:active, .product-card:active {
  transform: scale(0.96); /* Elegant 'press' effect */
  opacity: 0.9;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* Glassmorphism improvements for mobile */
@media (max-width: 768px) {
  .glass-card {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
  }
}

/* --- Animated Mesh Background --- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 0% 0%, rgba(245, 124, 0, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(124, 58, 237, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(245, 124, 0, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(124, 58, 237, 0.02) 0%, transparent 50%);
  z-index: -1;
  animation: meshMove 20s ease-in-out infinite alternate;
}

@keyframes meshMove {
  0% { transform: scale(1); }
  100% { transform: scale(1.1) rotate(1deg); }
}

/* --- i18n FOUC Fix --- */
html.i18n-loading [data-i18n] {
  opacity: 0 !important;
  visibility: hidden !important;
}

[data-i18n] {
  transition: opacity 0.2s ease-in-out;
}

/* --- Content Reveal Animations --- */
.reveal-card {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.reveal-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Float Animation for Icons */
@keyframes featureFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.feature-floating {
  animation: featureFloat 4s ease-in-out infinite;
}

/* Global Status Dot Pulse */
.dot-pulse {
  position: relative;
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
}

.dot-pulse::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 50%;
  background: inherit;
  opacity: 0.6;
  animation: dot-ripple 1.5s ease-out infinite;
}

@keyframes dot-ripple {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(3); opacity: 0; }
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(245, 124, 0, 0.1);
}

.icon-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(245, 124, 0, 0.15) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

/* Why Choose Us Section (Grid Layout) */
.why-section {
  padding: 120px 0;
  background: var(--surface-high);
  position: relative;
  overflow: hidden;
}

.why-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
}

.why-content h2 {
  font-size: var(--h2);
  font-weight: 800;
  margin-bottom: 40px;
  color: var(--text);
  line-height: 1.2;
}

.why-item {
  display: flex;
  gap: 25px;
  margin-bottom: 35px;
  padding: 25px;
  background: var(--surface);
  border-radius: 24px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.why-item:hover {
  transform: translateX(10px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

[dir="rtl"] .why-item:hover {
  transform: translateX(-10px);
}

.why-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-gradient);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 10px 20px rgba(245, 124, 0, 0.2);
}

.why-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.why-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.6s ease;
}

.why-image:hover img {
  transform: scale(1.05);
}

.auth-badge {
  position: absolute;
  bottom: 30px;
  right: 30px;
  background: var(--surface);
  padding: 20px 30px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: floatHelp 3s ease-in-out infinite;
}

[dir="rtl"] .auth-badge {
  right: auto;
  left: 30px;
}

.auth-badge .num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.auth-badge .label {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

@media (max-width: 992px) {
  .why-container {
    grid-template-columns: 1fr;
    gap: 50px;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

input,
select,
textarea {
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(242, 116, 5, 0.15) !important;
  transform: translateY(-1px);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-light);
}

/* Premium Admin Theme - Base (Light Mode) */
body.premium-admin {
  --background: #f1f5f9;
  --secondary: #ffffff;
  /* Sidebar Light */
  --surface: #ffffff;
  /* Card Surface */
  --surface-high: #f8fafc;
  --text: #0f172a;
  --text-light: #475569;
  --border: #CBD5E1;
  /* Darkened from E2E8F0 */
  --shadow-glow: 0 4px 20px rgba(0, 0, 0, 0.05);
  background-color: var(--background);
  color: var(--text);
  transition: all 0.3s ease;
}

/* Premium Admin Theme - Dark Mode Override */
[data-theme="dark"] body.premium-admin,
body.premium-admin[data-theme="dark"],
[data-theme="dark"] body,
body[data-theme="dark"] {
  --text-rgb: 248, 250, 252;
  --background: #020617; /* Deep Navy Obsidian */
  --secondary: #0f172a;
  --surface: #0f172a;
  --surface-high: #1e293b;
  --text: #f8fafc;
  --text-light: #94a3b8;
  --border: #1e293b;
  --shadow-glow: 0 0 30px rgba(245, 124, 0, 0.15);
  --glass-bg: rgba(15, 23, 42, 0.8);
  --glass-border: rgba(255, 255, 255, 0.05);
}

.premium-admin .admin-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

/* --- Premium UI Elements --- */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

[data-theme="dark"] .glass-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
}

[data-theme="dark"] .premium-glass-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(242, 116, 5, 0.2);
  backdrop-filter: blur(20px);
}

.glass-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 85px;
  display: flex;
  align-items: center;
}

[data-theme="dark"] .glass-nav {
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
}

.glass-nav.scrolled {
  height: 70px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

/* --- Admin Topbar & User Dropdown --- */
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 80px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 25px;
}

.notif-bell {
  position: relative;
  cursor: pointer;
  color: var(--text-light);
  font-size: 1.2rem;
  transition: color 0.3s;
}

.notif-bell:hover {
  color: var(--primary);
}

.notif-bell .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--primary);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.user-dropdown {
  position: relative;
}

.user-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 12px;
  transition: background 0.3s;
}

.user-trigger:hover {
  background: var(--background);
}

.topbar-right .user-info {
  text-align: right;
  line-height: 1.2;
}

[dir="ltr"] .topbar-right .user-info {
  text-align: left;
}

.topbar-right .user-info span {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.topbar-right .user-info small {
  font-size: 0.75rem;
  color: var(--text-light);
}

.topbar-right img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--border);
}

.user-trigger i {
  font-size: 0.8rem;
  color: var(--text-light);
  transition: transform 0.3s;
}

.user-dropdown.active .user-trigger i {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 10px;
  display: none;
  animation: fadeInDown 0.3s ease;
}

[dir="ltr"] .dropdown-menu {
  right: auto;
  left: 0;
}

.user-dropdown.active .dropdown-menu {
  display: block;
}

.dropdown-header {
  padding: 10px 15px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.3s;
}

.dropdown-item:hover {
  background: var(--background);
  color: var(--primary);
}

.dropdown-item i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.dropdown-menu hr {
  margin: 10px 0;
  border: none;
  border-top: 1px solid var(--border);
}

.logout-item {
  color: var(--danger);
}

.logout-item:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Global Help Modal (Admin) --- */
.help-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.help-modal {
  background: var(--surface);
  color: var(--text);
  padding: 40px;
  border-radius: 25px;
  width: 100%;
  max-width: 650px;
  position: relative;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.help-modal h2 {
  margin-bottom: 25px;
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
}

.help-content-area {
  flex: 1;
  overflow-y: auto;
  line-height: 1.8;
  color: var(--text);
  padding-inline-end: 15px;
  margin-bottom: 30px;
  white-space: pre-wrap;
  font-size: 1rem;
}

.help-textarea {
  width: 100%;
  height: 350px;
  padding: 20px;
  background: var(--background);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 15px;
  font-family: inherit;
  line-height: 1.6;
}

.close-help {
  position: absolute;
  top: 25px;
  right: 25px;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-light);
  transition: 0.3s;
}

.close-help:hover {
  color: var(--danger);
  transform: rotate(90deg);
}

.floating-help-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(242, 116, 5, 0.4);
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: 'Outfit', sans-serif;
}

.floating-help-btn:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 15px 30px rgba(242, 116, 5, 0.6);
}

/* Global Layout Improvements */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

.grid {
  display: grid;
}

/* Header & Nav Fixes */
.glass-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border);
  height: 80px;
  display: flex;
  align-items: center;
}

[data-theme="dark"] .glass-nav {
  background: rgba(15, 23, 42, 0.85);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 30px);
}

.search-box {
  position: relative;
  background: var(--surface-high);
  border-radius: 50px;
  padding: 6px 15px;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  transition: 0.3s;
  gap: 10px;
}



.search-box input {
  background: transparent;
  border: none;
  box-shadow: none !important;
  color: var(--text);
  width: 160px;
  font-size: 0.95rem;
  padding: 0;
}

.search-box input:focus {
  border: none !important;
  box-shadow: none !important;
  transform: none;
}

.search-box i {
  color: var(--text-light);
  font-size: 1rem;
}

.search-box:focus-within {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(242, 116, 5, 0.1);
}

@media (max-width: 1024px) {
  .search-box {
    display: none;
  }

  .nav-center {
    display: none;
  }
}

/* Header Action Buttons */
.action-btn {
  font-size: 1.1rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  border: none;
  cursor: pointer;
}

.action-btn:hover {
  background: var(--surface-high);
  color: var(--primary);
  transform: translateY(-2px);
}

.user-avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-high);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s;
}

.user-avatar-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(242, 116, 5, 0.2);
}

.hamburger-btn {
  display: flex;
}

@media (max-width: 1024px) {
  .nav-center {
    display: none;
  }
}



.user-btn-container {
  position: relative;
}

.user-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  width: 220px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  padding: 10px;
  z-index: 10005;
  margin-top: 15px;
  animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[dir="rtl"] .user-menu-dropdown {
  right: auto;
  left: 0;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-menu-dropdown.active {
  display: flex;
}

.user-menu-dropdown a {
  padding: 12px 15px;
  color: var(--text);
  border-radius: 10px;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.user-menu-dropdown a:hover {
  background: var(--background);
  color: var(--primary);
}

.user-menu-dropdown .dropdown-header {
  padding: 10px 15px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 5px;
  font-weight: 700;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

[dir="rtl"] .nav-container {
  flex-direction: row;
}

[dir="rtl"] .brands-header,
[dir="rtl"] .section-header,
[dir="rtl"] .hero-content,
[dir="rtl"] .footer-container,
[dir="rtl"] .why-content,
[dir="rtl"] .contact-info,
[dir="rtl"] .faq-item {
  text-align: right;
}

[dir="rtl"] .hero-actions,
[dir="rtl"] .header-actions {
  flex-direction: row;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 5px;
  background: var(--surface-high);
  padding: 5px;
  border-radius: 50px;
  border: 1px solid var(--border);
  align-items: center;
}

[dir="rtl"] .nav-links {
  flex-direction: row;
}

.nav-links a {
  font-weight: 500;
  color: var(--text);
  transition: 0.3s;
  padding: 8px 18px;
  border-radius: 50px;
  display: inline-block;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--primary-gradient);
  color: white !important;
  box-shadow: 0 4px 10px rgba(242, 116, 5, 0.3);
}

.nav-links a::after {
  display: none;
}

/* Advanced Hover for Cards */
.glass-card:hover, .product-card:hover, .testimonial-card:hover {
  transform: translateY(-12px) scale(1.02);
  filter: brightness(1.02);
}

/* Advanced Hover for Buttons */
.btn-primary {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300%;
  height: 300%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  z-index: -1;
}

.btn-primary:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

/* Icon Glow Hover */
.action-btn i, .logo-icon {
  transition: all 0.3s ease;
}

.action-btn:hover i {
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}


/* --- Micro-Interactions & Hover States --- */
.btn, 
.glass-card, 
.product-card-premium, 
.category-visual, 
.brand-item,
.premium-glass-card,
.testimonial-card,
.category-circle-item {
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Lift & Shadow Effect */
.glass-card:hover, 
.product-card-premium:hover, 
.category-visual:hover, 
.brand-item:hover,
.premium-glass-card:hover,
.testimonial-card:hover,
.category-circle-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Button Interactions */
.btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn:active, 
.action-btn:active, 
.glass-card:active,
.category-circle-item:active {
  transform: scale(0.96) translateY(0) !important;
  transition: transform 0.1s ease-in-out !important;
}

/* Accessibility Focus States */
:focus-visible {
  outline: 3px solid var(--primary) !important;
  outline-offset: 4px !important;
}

.btn-primary:hover {
  background: var(--primary-gradient);
  opacity: 0.95;
}

.btn-outline:hover {
  background: var(--surface-high);
  border-color: var(--primary);
  color: var(--primary);
}

/* Nav & Icons */
.nav-links a:hover {
  transform: translateY(-1px);
}

.action-btn:hover {
  background: var(--primary);
  color: white !important;
  transform: translateY(-3px) scale(1.1) rotate(5deg);
}

.action-btn:hover i {
  color: white !important;
}

.logo:hover {
  transform: scale(1.05);
}

.logo span {
  transition: color 0.3s;
}

.logo:hover span {
  color: var(--primary-light);
}

/* Image Interactions */
.category-visual img,
.premium-img-section img {
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.category-visual:hover img,
.premium-img-section:hover img,
.category-circle-item:hover img {
  transform: scale(1.1);
}

/* Specific Component Micro-Interactions */
.qty-btn:active {
  transform: scale(0.9);
  background: var(--primary-light) !important;
}

.remove-btn:active {
  transform: scale(0.8) rotate(10deg);
  color: var(--danger) !important;
}

.filter-item {
  transition: all 0.2s ease;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 6px;
}

.filter-item:hover {
  background: var(--surface-high);
  color: var(--primary);
  padding-inline-start: 12px;
}

.delivery-radio {
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.delivery-radio:hover {
  border-color: var(--primary);
  background: rgba(242, 116, 5, 0.02);
  transform: translateX(5px);
}

[dir="rtl"] .delivery-radio:hover {
  transform: translateX(-5px);
}

.delivery-radio:active {
  transform: scale(0.98);
}

/* Dropdown Menu Styles */
.nav-item-dropdown {
  position: relative;
}

.dropdown-nav-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--surface);
  min-width: 280px;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  padding: 15px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1001;
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

[data-theme="dark"] .dropdown-nav-menu {
  background: #1e293b;
}

.nav-item-dropdown:hover .dropdown-nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  color: var(--text);
  text-decoration: none;
  border-radius: 12px;
  transition: 0.3s;
  font-weight: 600;
  font-size: 0.95rem;
}

.dropdown-nav-item:hover {
  background: var(--surface-high);
  color: var(--primary);
  padding-inline-start: 20px;
}

[dir="rtl"] .dropdown-nav-item:hover {
  padding-inline-end: 20px;
  padding-inline-start: 15px;
}

.dropdown-nav-item i {
  color: var(--primary);
  font-size: 1rem;
}

.nav-links li {
  position: relative;
}

.hero {
  padding-top: 150px;
  padding-bottom: 100px;
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 80% 20%, rgba(245, 124, 0, 0.08), transparent),
              radial-gradient(circle at 20% 80%, rgba(124, 58, 237, 0.06), transparent),
              var(--background);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.83L1.22 55.455l-.83-.83L54.627 0zm-54.627 0l.83.83L55.455 54.627l-.83.83L0 0z' fill='%2394a3b8' fill-opacity='0.02' fill-rule='evenodd'/%3E%3C/svg%3E");
  pointer-events: none;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--secondary);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-icon {
  font-size: 1.5rem;
  color: var(--primary);
  background: var(--surface);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover .logo-icon {
  transform: rotate(15deg) scale(1.1);
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-premium);
}

[dir="rtl"] .hero {
  text-align: right;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 700px;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-size: var(--h1);
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.1;
  color: #ffffff;
  letter-spacing: -1px;
}

.hero-title span {
  display: block;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(242, 116, 5, 0.3));
}

/* Primary CTA Highlight */
.btn-cta-highlight {
  position: relative;
  background: var(--primary-gradient) !important;
  border: none !important;
  box-shadow: 0 10px 30px rgba(242, 116, 5, 0.4) !important;
  animation: ctaPulse 2s infinite;
  transform-origin: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.btn-cta-highlight:hover {
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 15px 40px rgba(242, 116, 5, 0.6) !important;
}

@keyframes ctaPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.hero-content {
  color: #ffffff;
}

.hero-content .hero-badge {
  color: var(--primary) !important;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 40px;
  max-width: 600px;
}

@media (max-width: 1024px) {
  .nav-center {
    display: none;
  }

  .header-actions .quote-trigger {
    display: none;
  }

  .search-box {
    display: none;
  }
}

@media (max-width: 480px) {
  .nav-right .action-btn:not(.cart-toggle) {
    display: none;
  }
}

.premium-admin .admin-sidebar {
  background: var(--secondary);
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
}

.premium-admin .sidebar-logo {
  margin-bottom: 50px;
  text-align: center;
}

.premium-admin .sidebar-logo img {
  width: 80px;
  filter: drop-shadow(0 0 10px var(--primary));
}

.premium-admin .admin-nav {
  list-style: none;
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 20px;
}

/* Thin scrollbar for admin sidebar nav */
.premium-admin .admin-nav::-webkit-scrollbar {
  width: 4px;
}
.premium-admin .admin-nav::-webkit-scrollbar-track {
  background: transparent;
}
.premium-admin .admin-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 100px;
}
.premium-admin .admin-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.premium-admin .admin-nav li {
  margin-bottom: 12px;
}

.premium-admin .admin-nav a {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 20px;
  border-radius: var(--radius);
  color: var(--text-light);
  font-weight: 600;
  transition: 0.3s;
}

.premium-admin .admin-nav a i {
  font-size: 1.2rem;
}

.premium-admin .admin-nav a:hover,
.premium-admin .admin-nav a.active {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-glow);
}

.premium-admin .sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.premium-admin .logout-link {
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-weight: 700;
  text-decoration: none;
}

/* Main Content */
.premium-admin .admin-main {
  padding: 50px;
  background: var(--background);
}

.premium-admin .page-header {
  margin-bottom: 40px;
}

.premium-admin .page-header h2 {
  font-size: 2rem;
  margin-bottom: 5px;
}

.premium-admin .page-header p {
  color: var(--text-light);
}

.premium-admin .top-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

/* Search Bar */
.premium-admin .search-wrapper {
  position: relative;
  flex-grow: 1;
  max-width: 600px;
  margin-inline-end: 20px;
}

.premium-admin .search-wrapper input {
  width: 100%;
  padding: 14px 20px 14px 50px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text);
  font-family: inherit;
}

.premium-admin .search-wrapper .search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

/* Product Cards Grid */
.premium-admin .products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.premium-admin .product-card {
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  transition: 0.3s;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-glow);
}

.premium-admin .product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

[data-theme="dark"] .premium-admin .product-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.premium-admin .card-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  position: relative;
  background: var(--surface-high);
}

.premium-admin .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.premium-admin .category-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  color: var(--primary-light);
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
}

.premium-admin .card-content {
  padding: 20px;
  flex-grow: 1;
  text-align: center;
}

.premium-admin .card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.product-brand {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 15px;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 15px;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
}

.cart-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
}

.cart-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 5px 15px rgba(242, 116, 5, 0.4);
}

[dir="rtl"] .product-footer {
  flex-direction: row;
}

/* Public Product Card Upgrade */
.product-card {
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-lg), var(--shadow-premium);
  border-color: var(--primary-light);
}

.product-img {
  height: 260px;
  overflow: hidden;
  position: relative;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.product-card:hover .product-img img {
  transform: scale(1.15);
}

/* Shimmer Animation for Premium Feel */
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.product-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  z-index: 10;
  pointer-events: none;
}

.product-card:hover::after {
  animation: shimmer 1s ease;
}

.product-card:hover .product-img img {
  transform: scale(1.1);
}

.stock-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  backdrop-filter: blur(5px);
  z-index: 5;
}

.stock-in {
  background: rgba(16, 185, 129, 0.2);
  color: #10B981;
}

.stock-out {
  background: rgba(239, 68, 68, 0.2);
  color: #EF4444;
}

.stock-limited {
  background: rgba(245, 158, 11, 0.2);
  color: #F59E0B;
}

.premium-admin .card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 20px 20px;
}

.premium-admin .btn-edit {
  background: rgba(51, 65, 85, 0.5);
  color: white;
  border: 1px solid var(--border);
}

.premium-admin .btn-delete {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
}

[dir="ltr"] body {
  font-family: 'Inter', sans-serif;
}

[dir="rtl"] body {
  font-family: 'Cairo', sans-serif;
  text-align: right;
}

a {
  text-decoration: none;
  color: inherit;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  border: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  box-shadow: 0 8px 25px rgba(242, 116, 5, 0.4);
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.w-100 {
  width: 100%;
}

/* --- Public Modal System --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--surface);
  color: var(--text);
  padding: 40px;
  border-radius: 25px;
  width: 100%;
  max-width: 500px;
  position: relative;
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
}

/* --- Public Footer Upgrade --- */
.footer {
  background: var(--secondary);
  color: white;
  padding: 80px 0 40px;
  margin-top: 100px;
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 50px;
}

.footer-brand h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  font-family: 'Outfit', sans-serif;
}

.footer-brand span {
  color: var(--primary);
}

.footer-links h3 {
  margin-bottom: 25px;
  font-size: 1.1rem;
  position: relative;
  padding-bottom: 10px;
}

.footer-links h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--primary);
}

[dir="rtl"] .footer-links h3::after {
  left: auto;
  right: 0;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-light);
  transition: 0.3s;
}

.footer-links a:hover {
  color: var(--primary);
  padding-inline-start: 5px;
}

[dir="rtl"] .footer-links a:hover {
  padding-inline-start: 0;
  padding-inline-end: 5px;
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Modal Dark Theme */
.premium-admin .modal-overlay {
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(10px);
}

.premium-admin .modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  color: white;
}

.premium-admin .form-group input,
.premium-admin .form-group textarea,
.premium-admin .form-group select {
  background: var(--background);
  border: 1px solid var(--border);
  color: white;
}

/* Dashboard Specific */
.premium-admin .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.premium-admin .stat-card {
  background: var(--surface);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.premium-admin .stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.premium-admin .stat-label {
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 10px;
}

.premium-admin .stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
}

/* Dashboard Tables & Panels */
.premium-admin .panel h3 {
  font-size: 1.3rem;
  margin-bottom: 25px;
}

.premium-admin table {
  width: 100%;
  border-collapse: collapse;
}

.premium-admin th {
  padding: 15px;
  color: var(--text-light);
  font-size: 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.premium-admin td {
  padding: 15px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

[dir="rtl"] .premium-admin th,
[dir="rtl"] .premium-admin td {
  text-align: right;
}

/* Modal & Form Fixes */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-card {
  background: var(--surface);
  color: var(--text);
  padding: 35px;
  border-radius: 25px;
  width: 100%;
  max-width: 800px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  border: 1px solid var(--border);
  max-height: 90vh;
  overflow-y: auto;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.3s;
}

.close-modal:hover {
  color: var(--danger);
}

.premium-admin .form-group {
  margin-bottom: 18px;
}

.premium-admin .form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-light);
}

.premium-admin input,
.premium-admin select,
.premium-admin textarea {
  width: 100%;
  padding: 12px 15px;
  border-radius: 12px;
  background: var(--background);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.premium-admin input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(242, 116, 5, 0.1);
  outline: none;
}

/* Alert Styling */
.alert-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: var(--background);
  border-radius: 12px;
  margin-bottom: 12px;
  border-right: 4px solid var(--primary);
}

.alert-item.danger {
  border-right-color: var(--danger);
}

.alert-item.warning {
  border-right-color: var(--warning);
}

.alert-icon {
  font-size: 1.2rem;
}

.alert-text {
  flex-grow: 1;
  font-size: 0.85rem;
}

.alert-text b {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

/* Floating WhatsApp Button */
.whatsapp-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  /* Standard position - avoids overlap with bottom-left toggles */
  background: #25D366;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: white;
  text-decoration: none;
  font-size: 2rem;
}

.whatsapp-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
}

/* Animations for floating */
@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

.whatsapp-btn {
  animation: float 3s ease-in-out infinite;
}

/* --- Storefront Stats Section --- */
.stats {
  padding: 100px 0;
  background: var(--surface);
  position: relative;
}

.stats-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.stat-item {
  flex: 1;
  min-width: 280px;
  max-width: 350px;
  padding: 45px 30px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 30px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow-sm);
}

.stat-item:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 40px rgba(var(--primary-rgb), 0.15);
  border-color: var(--primary);
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              var(--primary-gradient) border-box;
}

.stat-number {
  font-family: 'Outfit', sans-serif;
  font-size: 3.8rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
  display: block;
  transition: transform 0.3s ease;
  line-height: 1;
}

.stat-number.animated {
  animation: countPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes countPop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.stat-label {
  font-size: 1.1rem;
  color: var(--text-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* Categories Upgrade */
.category-card {
  padding: 40px;
  text-align: center;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 25px;
  transition: all 0.4s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.category-card:hover {
  background: var(--primary-gradient);
  color: white;
  transform: translateY(-10px);
}

.category-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  font-weight: 800;
}

.category-card p {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 20px;
}

.category-card:hover a {
  color: white !important;
}

/* ============================================
   RESPONSIVE DESIGN SYSTEM
   ============================================ */

/* --- Tablet & Below (≤1024px) --- */
@media (max-width: 1024px) {

  /* Admin: Collapse sidebar */
  .premium-admin .admin-layout {
    grid-template-columns: 1fr;
  }

  .premium-admin .admin-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    z-index: 3000;
    transition: left 0.3s ease;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
  }

  .premium-admin .admin-sidebar.open {
    left: 0;
  }

  [dir="rtl"] .premium-admin .admin-sidebar {
    left: auto;
    right: -300px;
  }

  [dir="rtl"] .premium-admin .admin-sidebar.open {
    right: 0;
  }

  .premium-admin .admin-main {
    padding: 20px;
  }

  .premium-stat-grid {
    padding: 20px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  /* Dashboard grid stack */
  .premium-admin .stats-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Variant Row Styling */
.variant-row input {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  transition: border-color 0.3s;
}

.variant-row input:focus {
  border-color: var(--primary);
  outline: none;
}

.variant-row .btn-remove:hover {
  color: #ff4d4d !important;
  transform: scale(1.1);
}

/* --- Premium Admin Dashboard UI --- */
.premium-admin {
  --admin-sidebar-width: 280px;
  --admin-topbar-height: 70px;
  --admin-card-bg: var(--surface);
  --admin-accent: var(--primary);
  background: #f1f5f9;
}

[data-theme="dark"].premium-admin {
  background: #0f172a;
  --admin-card-bg: #1e293b;
}

.admin-layout {
  display: grid;
  grid-template-columns: var(--admin-sidebar-width) 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--secondary);
  color: white;
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
  z-index: 2000;
  transition: 0.3s;
}

.admin-sidebar .sidebar-logo {
  padding-bottom: 30px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.admin-nav {
  list-style: none;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 20px;
}

.admin-nav li {
  margin-bottom: 8px;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 20px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

.admin-nav a i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.admin-nav a.active {
  background: var(--admin-accent);
  box-shadow: 0 10px 20px rgba(242, 116, 5, 0.2);
}

.admin-main {
  padding: 0;
  background: transparent;
}

/* New Admin Topbar */
.admin-topbar {
  height: var(--admin-topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

/* Stat Cards 2.0 */
.premium-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 40px;
}

/* Admin Sidebar Collapsible Logic */
.admin-sidebar-toggle {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
  width: 50px;
  height: 50px;
  background: var(--primary-gradient);
  border: none;
  border-radius: 14px;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(242, 116, 5, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[dir="rtl"] .admin-sidebar-toggle {
  right: auto;
  left: 25px;
}

.admin-sidebar-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 15px 35px rgba(242, 116, 5, 0.4);
}

.admin-layout {
  transition: grid-template-columns 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-layout.sidebar-collapsed {
  grid-template-columns: 80px 1fr;
}

.admin-layout.sidebar-collapsed .admin-sidebar {
  padding: 30px 10px;
  width: 80px;
}

.admin-layout.sidebar-collapsed .admin-sidebar .sidebar-logo,
.admin-layout.sidebar-collapsed .admin-sidebar .admin-nav span,
.admin-layout.sidebar-collapsed .admin-sidebar .sidebar-footer span,
.admin-layout.sidebar-collapsed .admin-sidebar .super-only span {
  display: none;
}

.admin-layout.sidebar-collapsed .admin-nav a {
  justify-content: center;
  padding: 15px;
}

.admin-layout.sidebar-collapsed .admin-nav a i {
  font-size: 1.3rem;
  margin: 0;
}

@media (max-width: 1024px) {
  .admin-layout {
    grid-template-columns: 0 1fr;
  }
  .admin-sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100vh;
    z-index: 10001;
  }
  [dir="rtl"] .admin-sidebar {
    left: auto;
    right: -280px;
  }
  .admin-layout.sidebar-collapsed .admin-sidebar {
    left: 0;
    width: 280px;
  }
  [dir="rtl"] .admin-layout.sidebar-collapsed .admin-sidebar {
    right: 0;
    left: auto;
  }
  .admin-layout.sidebar-collapsed .admin-sidebar span {
    display: inline !important;
  }
  .admin-layout.sidebar-collapsed .admin-sidebar .sidebar-logo {
    display: block !important;
  }
}

.premium-stat-card {
  background: var(--admin-card-bg);
  padding: 30px;
  border-radius: 24px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: 0.4s;
}

.premium-stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.stat-info .label {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: block;
}

.stat-info .value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-dark);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Tables 2.0 */
.premium-table-container {
  background: var(--admin-card-bg);
  border-radius: 24px;
  border: 1px solid var(--border);
  margin: 0 40px 40px;
  padding: 30px;
}

.premium-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.premium-table th {
  padding: 15px 20px;
  text-align: left;
  color: var(--text-light);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.premium-table td {
  padding: 20px;
  background: var(--background);
}

.premium-table tr td:first-child {
  border-radius: 15px 0 0 15px;
}

.premium-table tr td:last-child {
  border-radius: 0 15px 15px 0;
}

@media (max-width: 1024px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-topbar {
    padding: 0 20px;
  }

  .premium-stat-grid {
    padding: 20px;
    gap: 20px;
  }

  .premium-table-container {
    margin: 0 20px 20px;
    padding: 20px;
  }
}

.stats {
  padding: 60px 0;
}

.stat-item {
  min-width: 200px;
}

/* --- Trust Bar Interactive Styles --- */
.trust-item {
  border-radius: 18px;
  cursor: pointer;
}

.trust-item:hover {
  background: rgba(var(--primary-rgb), 0.03);
  transform: translateY(-8px);
}

.trust-item:hover .trust-icon {
  background: var(--primary) !important;
  color: white !important;
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 10px 25px rgba(242, 116, 5, 0.3);
}

.trust-item h4 {
  transition: color 0.3s ease;
}

.trust-item:hover h4 {
  color: var(--primary) !important;
}

/* --- Reveal Animation System --- */
.reveal-item, .trust-item {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-item.revealed, .trust-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Delay for items in container */
.trust-bar .trust-item:nth-child(1) { transition-delay: 0.1s; }
.trust-bar .trust-item:nth-child(2) { transition-delay: 0.2s; }
.trust-bar .trust-item:nth-child(3) { transition-delay: 0.3s; }
.trust-bar .trust-item:nth-child(4) { transition-delay: 0.4s; }

/* --- Infinite Brands Marquee --- */
.brands-marquee-wrapper {
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.brands-track {
  display: flex;
  width: calc(250px * 20); /* Accommodate cloned items */
  animation: scrollBrands 40s linear infinite;
  gap: 60px;
  align-items: center;
}

@keyframes scrollBrands {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-250px * 10)); }
}

/* Reverse for RTL */
[dir="rtl"] .brands-track {
  animation: scrollBrandsRTL 40s linear infinite;
}

@keyframes scrollBrandsRTL {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(250px * 10)); }
}

.brand-item {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  transition: 0.3s;
  opacity: 0.85;
}

.brand-item:hover {
  opacity: 1;
  transform: translateY(-5px);
}

.brand-logo-circle {
  width: 100px;
  height: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 15px;
  box-shadow: var(--shadow-sm);
  transition: 0.3s;
}

.brand-logo-circle img {
  max-width: 80%;
  max-height: 80%;
  transition: 0.3s;
}

.brand-item:hover .brand-logo-circle img {
  transform: scale(1.1);
}

.brand-item:hover .brand-logo-circle {
  border-color: var(--primary);
  box-shadow: 0 10px 25px rgba(242, 116, 5, 0.15);
}

.brand-item span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Project Card Premium v2 --- */
.project-card-premium {
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.project-card-premium:hover {
  transform: translateY(-15px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

/* Phone & Small Tablet (≤768px) */
@media (max-width: 768px) {

  /* Public Navigation: Stack */
  .nav-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .nav-right {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .header-actions {
    gap: 10px !important;
  }

  .action-btn {
    font-size: 1.1rem !important;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    font-size: 0.85rem;
  }

  .glass-nav {
    padding: 10px 0;
  }

  /* Hero */
  .hero {
    padding-top: 120px;
    padding-bottom: 60px;
    min-height: 60vh;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  [dir="rtl"] .hero {
    text-align: center;
  }

  .hero-title {
    font-size: 1.8rem !important;
  }

  .hero-subtitle {
    font-size: 0.95rem !important;
  }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
  }

  /* Stats */
  .stats {
    padding: 40px 0;
  }

  .stats-container {
    gap: 15px;
    margin-top: -30px !important;
  }

  .stat-item {
    min-width: 100%;
    padding: 25px 15px;
    border-radius: 20px;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .stat-label {
    font-size: 0.85rem;
  }

  /* Admin main */
  .premium-admin .admin-main {
    padding: 20px 15px;
  }

  .premium-admin .page-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 15px !important;
  }

  .premium-admin .page-header h2 {
    font-size: 1.5rem;
  }

  .premium-admin .header-right {
    width: 100% !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
  }

  .premium-admin .search-wrapper {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* Stats grid in admin */
  .premium-admin .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 12px;
  }

  .premium-admin .stat-card {
    padding: 18px;
  }

  .premium-admin .stat-value {
    font-size: 1.6rem;
  }

  .premium-admin .stat-icon {
    width: 40px !important;
    height: 40px !important;
    font-size: 1rem !important;
  }

  /* Tables: horizontal scroll */
  .premium-admin .panel {
    padding: 15px;
    overflow-x: auto;
  }

  .premium-table,
  .data-table {
    min-width: 600px;
  }

  .premium-admin th,
  .premium-admin td {
    padding: 10px 8px;
    font-size: 0.8rem;
  }

  /* Modal */
  .modal-card {
    padding: 20px;
    border-radius: 18px;
    max-width: 95vw;
  }

  .modal-card>div[style*="grid-template-columns: 1fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
  }

  /* Product cards */
  .premium-admin .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
  }

  /* Footer */
  .footer-container {
    flex-direction: column !important;
    text-align: center;
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column !important;
    text-align: center;
  }

  /* Categories grid */
  .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
  }

  /* Customers loyalty grid */
  .loyalty-grid {
    grid-template-columns: 1fr !important;
  }

  .cards-grid {
    grid-template-columns: 1fr !important;
  }

  /* Profile Layout Fix */
  .profile-layout {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding-top: 100px !important;
  }

  .profile-sidebar {
    position: relative !important;
    top: 0 !important;
  }

  .tab-pane .section-header h2 {
    font-size: 1.8rem !important;
  }

  .loyalty-visual {
    padding: 20px !important;
  }

  .points-val {
    font-size: 2.5rem !important;
  }

  /* Tables Scroll */
  .panel,
  .premium-table-container,
  .admin-main {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  table,
  .premium-table,
  .data-table {
    min-width: 600px;
  }

  .loyalty-hero {
    padding: 25px !important;
  }

  .loyalty-hero h1 {
    font-size: 1.5rem !important;
  }

  /* WhatsApp button */
  .whatsapp-btn {
    width: 50px;
    height: 50px;
    bottom: 15px;
    right: 15px;
  }

  /* Cart Mobile Fix */
  .cart-item {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 15px !important;
  }

  .cart-item-img {
    width: 100% !important;
    height: 180px !important;
  }

  .item-actions {
    width: 100% !important;
    justify-content: space-between !important;
  }

  /* Section padding */
  .section-padding {
    padding: var(--section-padding) 0 !important;
  }
}

/* --- Small Phone (≤480px) --- */
@media (max-width: 480px) {
  .nav-links {
    font-size: 0.75rem;
    gap: 8px;
  }

  .logo {
    font-size: 1.2rem !important;
  }

  .hero-title {
    font-size: 1.4rem !important;
  }

  .hero-subtitle {
    font-size: 0.85rem !important;
  }

  .hero {
    padding-top: 100px;
    min-height: 50vh;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  .premium-admin .page-header h2 {
    font-size: 1.3rem;
  }

  .premium-admin .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }

  .premium-admin .stat-card {
    padding: 14px;
    border-radius: 14px;
  }

  .premium-admin .stat-value {
    font-size: 1.3rem;
  }

  .premium-admin .stat-label {
    font-size: 0.7rem;
  }

  .premium-admin .products-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    padding: 10px 18px;
    font-size: 0.85rem;
  }

  .section-title {
    font-size: 1.4rem;
  }
}

/* Storefront Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(160px, 45vw, 320px), 1fr));
  gap: clamp(15px, 3vw, 40px);
  padding: 40px 0;
}

@media (max-width: 640px) {
  .product-card-premium {
    border-radius: 24px;
  }

  .premium-img-section {
    height: clamp(140px, 40vw, 200px);
    padding: 10px;
  }

  .premium-title {
    font-size: 0.95rem;
    margin-bottom: 10px;
  }

  .premium-price-row {
    font-size: 1.1rem;
  }
}

/* Hero Section Responsiveness */
.hero {
  padding: clamp(3rem, 10vh, 8rem) 0;
  text-align: center;
}

.hero h1 {
  font-size: var(--h1);
  margin-bottom: 20px;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.product-card-premium {
  background: var(--surface);
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card-premium:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-lg), 0 15px 30px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

[data-theme="dark"] .product-card-premium {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(20px);
  border-color: rgba(255, 255, 255, 0.05);
}

.premium-img-section {
  position: relative;
  height: 240px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 12px;
  border-radius: 22px;
  transition: 0.4s ease;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.02);
}

.product-card-premium:hover .premium-img-section {
  transform: scale(0.98);
}

.premium-badges {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.p-badge {
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  transition: 0.3s;
}

.badge-limited {
  background: #fff7ed;
  color: #f27405;
  border: 1px solid #ffedd5;
}

.badge-new {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #dcfce7;
}

.premium-info-section {
  padding: 10px 22px 22px;
  background: transparent;
  color: var(--text);
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: right;
}

[dir="ltr"] .premium-info-section {
  text-align: left;
}

.info-badge-row {
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.product-rating {
  display: flex;
  gap: 3px;
  color: #fbbf24;
  margin-bottom: 12px;
  font-size: 0.75rem;
}

.product-rating span {
  color: var(--text-light);
  margin-inline-start: 6px;
  font-weight: 600;
}

.premium-title {
  font-family: 'Outfit', 'Cairo';
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text);
  line-height: 1.4;
  cursor: pointer;
  transition: color 0.3s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em;
}

.premium-title:hover {
  color: var(--primary);
}

.premium-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 15px;
}

.price-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.old-price {
  font-size: 0.75rem;
  color: var(--text-light);
  text-decoration: line-through;
  opacity: 0.6;
}

.premium-price-row {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
  font-family: 'Outfit';
}

.contract-price {
  color: var(--success);
}

.contract-price small {
  font-size: 0.6rem;
  background: rgba(var(--primary-rgb), 0.1);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--primary);
  margin-inline-start: 5px;
}

.actions-row {
  display: flex;
  gap: 10px;
}

.action-mini-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-high);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1rem;
}

.action-mini-btn:hover {
  background: var(--surface);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.cart-btn-main {
  background: var(--primary-gradient);
  border: none;
  color: white;
  box-shadow: 0 8px 15px rgba(245, 124, 0, 0.2);
}

.cart-btn-main:hover {
  background: var(--primary-dark);
  color: white;
  box-shadow: 0 10px 20px rgba(245, 124, 0, 0.4);
}

/* Loyalty Member Card Responsive */
.member-card {
  width: 100%;
  max-width: 450px;
  aspect-ratio: 1.6 / 1;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 24px;
  padding: 30px;
  position: relative;
  overflow: hidden;
  color: white;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  margin: 0 auto 30px;
}

@media (max-width: 480px) {
  .member-card {
    padding: 20px;
    border-radius: 18px;
  }

  .card-chip {
    width: 40px;
  }

  .card-number {
    font-size: 1.2rem !important;
  }
}

/* User Profile & Auth scaling */
.auth-container {
  width: 95%;
  max-width: 500px;
  margin: 40px auto;
  padding: clamp(1.5rem, 5vw, 3rem);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.premium-cart-btn-v2 {
  width: 50px;
  height: 50px;
  background: var(--primary-gradient);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 10px 20px rgba(242, 116, 5, 0.2);
}

.premium-cart-btn-v2:hover {
  transform: scale(1.1);
  box-shadow: 0 15px 30px rgba(242, 116, 5, 0.4);
}

.premium-cart-btn-v2 i {
  color: #000000;
  /* Black icon as requested */
  font-size: 1.2rem;
}

/* Mobile Drawer (Public) */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 380px;
  height: 100vh;
  background: var(--surface);
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  padding: 80px 40px;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .mobile-drawer {
  background: var(--secondary);
}

[dir="ltr"] .mobile-drawer {
  right: auto;
  left: 0;
  transform: translateX(-100%);
}

.mobile-drawer.open {
  transform: translateX(0);
}

.drawer-content {
  display: flex;
  flex-direction: column;
  gap: 35px;
}

.drawer-content a {
  text-decoration: none;
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  transition: 0.3s;
}

.mobile-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: 320px;
  max-width: 450px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: white;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transform: translateX(120%);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
}
.toast.active { transform: translateX(0); }
.toast-icon {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.toast-content { flex: 1; }
.toast-title { font-weight: 800; font-size: 1rem; margin-bottom: 3px; }
.toast-msg { font-size: 0.85rem; opacity: 0.8; line-height: 1.4; }

.toast.success { border-left: 5px solid var(--success); }
.toast.success .toast-icon { background: rgba(34, 197, 94, 0.1); color: var(--success); }

.toast.error { border-left: 5px solid var(--danger); }
.toast.error .toast-icon { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
}
.toast-progress-bar {
  height: 100%;
  width: 100%;
}
.toast.success .toast-progress-bar { background: var(--success); }
.toast.error .toast-progress-bar { background: var(--danger); }

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

@media (max-width: 480px) {
  .mobile-drawer {
    max-width: 100%;
    padding: 100px 30px;
  }
}

.mobile-actions .action-btn {
  background: #f1f5f9;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Coming Soon Styles --- */
.coming-soon-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
}

.coming-soon-overlay span {
  background: var(--primary-gradient);
  color: white;
  padding: 10px 25px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 10px 20px rgba(242, 116, 5, 0.3);
  transform: rotate(-5deg);
}

.product-card-premium.coming-soon {
  opacity: 0.85;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(242, 116, 5, 0.4);
  }

  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(242, 116, 5, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(242, 116, 5, 0);
  }
}

/* --- End of File --- */

/* Homepage Visuals */
.category-visual img {
  transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

.category-visual:hover img {
  transform: scale(1.1);
}

.category-visual::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(242, 116, 5, 0.2);
  opacity: 0;
  transition: 0.3s;
}

.category-visual:hover::after {
  opacity: 1;
}

.contractor-cta img {
  transition: 0.5s ease;
}

.contractor-cta:hover img {
  transform: rotate(0deg) scale(1.05);
}

/* Testimonials Premium Styling */
.testimonial-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--primary) !important;
}

[dir="rtl"] .testimonial-card .fas.fa-quote-right {
  right: auto;
  left: 30px;
  transform: scaleX(-1);
}

.testimonial-card {
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .testimonial-card {
  background: rgba(30, 41, 59, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .footer {
  background: #020617 !important;
}

.footer-links a:hover {
  color: var(--primary) !important;
  transform: translateX(-5px);
}

[dir="ltr"] .footer-links a:hover {
  transform: translateX(5px);
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 18px !important;
}

/* Restored header actions */

.help-chat-cta .btn-outline:hover {
  background: white !important;
  color: var(--secondary) !important;
}

@media (max-width: 992px) {
  .footer-container {
    grid-template-columns: 1fr !important;
    text-align: center !important;
    gap: 40px !important;
  }

  .footer-brand {
    text-align: center !important;
  }

  .footer-brand p {
    margin: 0 auto 30px !important;
  }

  .footer-brand div {
    justify-content: center;
  }

  .footer-links h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Circular Brand Logos Styling */
.brand-logo-circle {
  width: 110px;
  height: 110px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin: 0 auto;
}

.brand-logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
  transition: transform 0.4s ease;
  mix-blend-mode: multiply; /* Removes white backgrounds from logos */
}

.brands-marquee {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 30px 0;
}

.brands-track {
  display: flex;
  gap: 60px;
  width: max-content;
  animation: marqueeScroll 40s linear infinite;
  align-items: center;
}

.brands-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.brand-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  min-width: 120px;
  padding: 10px;
  transition: transform 0.3s ease;
}

.brand-item:hover {
  transform: translateY(-5px);
}

.brand-item span {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.brand-item:hover .brand-logo-circle {
  border-color: var(--primary);
  transform: scale(1.05);
}

/* --- Skeleton Loader --- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-high) 25%, var(--border) 50%, var(--surface-high) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

.skeleton-card {
  height: 320px;
  border-radius: 20px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 10px;
  border-radius: 8px;
}

.skeleton-text.short {
  width: 60%;
}

/* --- Premium Loading Spinner --- */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 20px;
  grid-column: 1 / -1;
}

.loading-spinner::before {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner span {
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.95rem;
}
/* --- Final UI/UX Mobile Optimization Fixes --- */
@media (max-width: 992px) {
  .shop-layout, 
  .product-layout,
  .profile-layout {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
    padding-top: 100px !important;
  }

  .filters-sidebar,
  .profile-sidebar {
    position: relative !important;
    top: 0 !important;
    width: 100% !important;
    margin-bottom: 20px;
  }

  .header-actions .btn-primary {
    display: none !important;
  }
  
  .search-box {
    max-width: 150px;
  }

  .nav-center {
    display: none !important;
  }

  .hero-title {
    font-size: 2.2rem !important;
  }
  
  .hero-subtitle {
    font-size: 1rem !important;
  }

  .whatsapp-btn {
    bottom: 20px !important;
    right: 20px !important;
    width: 55px !important;
    height: 55px !important;
    font-size: 1.6rem !important;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem !important;
  }

  .search-box {
    display: none !important;
  }

  .action-btn {
    padding: 8px !important;
  }

  .stat-item {
    min-width: 100% !important;
  }
}
@media (max-width: 768px) {
  .product-title { font-size: 1.1rem !important; }
  .section-title { font-size: 1.8rem !important; }
  .product-layout h1 { font-size: 1.8rem !important; }
  .stat-number { font-size: 2.5rem !important; }
}

/* --- Side Drawer & Floating Menu --- */
.floating-menu-btn {
  display: none;
  position: fixed;
  top: 25px;
  right: 25px;
  z-index: 10001;
  width: 50px;
  height: 50px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(242, 116, 5, 0.4);
  border-radius: 14px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: white;
}

@media (max-width: 1024px) {
  .floating-menu-btn {
    display: flex;
  }
}

[dir="rtl"] .floating-menu-btn {
  right: auto;
  left: 25px;
}

.floating-menu-btn:hover {
  transform: scale(1.1);
  border-color: var(--primary);
  background: var(--surface-dark);
  box-shadow: 0 15px 40px rgba(242, 116, 5, 0.2);
}

.floating-menu-btn .btn-icon {
  font-size: 1.1rem;
  color: var(--primary);
  transition: 0.3s;
}

.floating-menu-btn .btn-text {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  opacity: 0.8;
}

.floating-menu-btn:hover .btn-icon {
  transform: rotate(90deg);
  color: white;
}

/* Sidebar Drawer */
.side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 20000;
  visibility: hidden;
  transition: 0.4s;
}
[dir="ltr"] .side-drawer { right: auto; left: 0; }

.side-drawer.active {
  visibility: visible;
}

.drawer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10,14,24,0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: 0.4s;
}
.side-drawer.active .drawer-overlay {
  opacity: 1;
}

.drawer-content {
  position: absolute;
  top: 0;
  right: -380px;
  width: 380px;
  height: 100%;
  background: var(--surface);
  box-shadow: -10px 0 50px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  padding: 30px;
}
[dir="ltr"] .drawer-content { right: auto; left: -380px; }
.side-drawer.active .drawer-content {
  right: 0;
}
[dir="ltr"] .side-drawer.active .drawer-content { right: auto; left: 0; }

.drawer-body {
  flex-grow: 1;
  overflow-y: auto;
  margin-right: -15px;
  padding-right: 15px;
}
[dir="rtl"] .drawer-body {
  margin-right: 0;
  margin-left: -15px;
  padding-left: 15px;
}

.drawer-footer {
  margin-top: auto;
  padding-top: 20px;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}
.close-drawer {
  background: var(--surface-high);
  border: 1px solid var(--border);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  transition: 0.3s;
}
.close-drawer:hover { background: var(--primary); color: white; }

.drawer-section {
  margin-bottom: 35px;
}
.drawer-section h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.drawer-links {
  list-style: none;
  padding: 0;
}
.drawer-links li {
  margin-bottom: 8px;
}
.drawer-links a {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 18px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}
.drawer-links a i {
  width: 20px;
  text-align: center;
  color: var(--primary);
  font-size: 1.1rem;
}
.drawer-links a:hover {
  background: var(--surface-high);
  transform: translateX(-5px);
  color: var(--primary);
}
[dir="ltr"] .drawer-links a:hover { transform: translateX(5px); }

.control-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 15px;
}
.control-btn {
  background: var(--surface-high);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: 0.3s;
}
.control-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* --- Ultimate Luxury UI Refinements --- */

/* Premium Card Interactions */
.glass-card, .premium-glass-card, .product-card, .category-visual, .testimonial-card, .stat-item {
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.glass-card:hover, .premium-glass-card:hover, .product-card:hover, .category-visual:hover, .testimonial-card:hover, .stat-item:hover, .product-card-premium:hover {
  transform: translateY(-12px) scale(1.02) rotateX(2deg) rotateY(2deg);
  box-shadow: 0 25px 50px -12px rgba(var(--primary-rgb), 0.25), 
              0 10px 20px -5px rgba(var(--primary-rgb), 0.1) !important;
  border-color: var(--primary) !important;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              var(--primary-gradient) border-box !important;
}

/* Global Entrance Animation */
.reveal-card {
  opacity: 0;
  transform: scale(0.9) translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-card.revealed {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Typography Polish */
h1, h2, h3, .hero-title, .section-title {
  font-family: 'Outfit', 'Cairo', sans-serif;
  letter-spacing: -0.02em;
}

.section-title {
  font-size: var(--h2);
  font-weight: 800;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 100px;
  height: 6px;
  background: var(--primary-gradient);
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(242, 116, 5, 0.4),
              0 0 30px rgba(242, 116, 5, 0.2);
  animation: titleUnderlineLuxury 4s ease-in-out infinite;
  overflow: hidden;
}

/* Luxury Shimmer Streak */
.section-title::after::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.8), 
    transparent
  );
  animation: shimmerStreak 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

[dir="rtl"] .section-title::after {
  left: auto;
  right: 0;
}

@keyframes titleUnderlineLuxury {
  0%, 100% { 
    width: 60px; 
    box-shadow: 0 0 10px rgba(242, 116, 5, 0.3);
    filter: hue-rotate(0deg);
  }
  50% { 
    width: 110px; 
    box-shadow: 0 0 25px rgba(242, 116, 5, 0.6),
                0 0 45px rgba(242, 116, 5, 0.2);
    filter: hue-rotate(10deg) brightness(1.2);
  }
}

@keyframes shimmerStreak {
  0% { left: -150%; }
  50% { left: 150%; }
  100% { left: 150%; }
}

/* Modern Inputs Upgrade */
input, select, textarea {
  border-radius: 14px !important;
  padding: 14px 18px !important;
  font-size: 0.95rem !important;
  border: 1.5px solid var(--border) !important;
  background: var(--surface-high) !important;
}

input:focus, select:focus, textarea:focus {
  background: var(--surface) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(245, 124, 0, 0.1) !important;
}

/* Premium Badge Styling */
.badge, .cart-count, .category-badge {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Side Drawer Polish */
.drawer-content {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-left: 1px solid var(--glass-border);
}

[dir="ltr"] .drawer-content {
  border-left: none;
  border-right: 1px solid var(--glass-border);
}

.drawer-links a {
  position: relative;
  overflow: hidden;
}

.drawer-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  opacity: 0;
  transition: 0.3s;
  z-index: -1;
  border-radius: inherit;
}

.drawer-links a:hover {
  color: #ffffff !important;
}

.drawer-links a:hover::before {
  opacity: 1;
}

.drawer-links a:hover i {
  color: #ffffff !important;
}

/* Scrollbar Styling for Premium Feel */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
  border: 3px solid var(--background);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* --- State of the Art Micro-Interactions --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal-on-scroll {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

/* Smooth Image Loading */
img {
  transition: opacity 0.5s ease-in-out;
}

img[loading] {
  opacity: 0;
}

img.loaded {
  opacity: 1;
}

/* Feature Section Premium Animations */
.feature-card {
  overflow: hidden;
  position: relative;
}

.feature-card:hover {
  border-color: var(--primary) !important;
  transform: translateY(-15px) scale(1.02) !important;
}

.feature-floating {
  animation: floatIcon 3s ease-in-out infinite;
  display: inline-block;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.icon-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(242, 116, 5, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.8; }
}

.features-grid .reveal-card:nth-child(1) { transition-delay: 0.1s; }
.features-grid .reveal-card:nth-child(2) { transition-delay: 0.2s; }
.features-grid .reveal-card:nth-child(3) { transition-delay: 0.3s; }
.features-grid .reveal-card:nth-child(4) { transition-delay: 0.4s; }

.feature-card:hover .feature-floating {
  animation: bounceIcon 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceIcon {
  0% { transform: scale(1); }
  50% { transform: scale(1.2) rotate(10deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ============================================================
   ULTIMATE MOBILE-FIRST EXCELLENCE (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --h1: 2.1rem;
    --h2: 1.7rem;
    --h3: 1.3rem;
    --section-padding: 50px 0;
  }

  .container {
    padding: 0 16px;
  }

  /* --- Global Image Fixes --- */
  img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }

  /* --- Navigation & Header --- */
  .glass-nav {
    padding: 8px 0;
  }
  .nav-center {
    display: none !important; /* Hamburger handles navigation */
  }
  .search-box {
    display: none !important;
  }
  .header-actions {
    gap: 8px !important;
  }
  .logo {
    font-size: 1.3rem;
  }
  .hamburger-main-btn {
    width: 38px; height: 38px;
  }

  /* --- Hero Section --- */
  .hero {
    min-height: 65vh !important;
    padding-top: 110px !important;
    padding-bottom: 40px !important;
    text-align: center;
  }
  .hero-title {
    font-size: 2.1rem !important;
    line-height: 1.25 !important;
    margin-bottom: 15px !important;
  }
  .hero-subtitle {
    font-size: 0.95rem !important;
    margin: 0 auto 30px !important;
    max-width: 100% !important;
  }
  .hero-actions {
    flex-direction: column;
    gap: 12px !important;
  }
  .hero-actions .btn {
    width: 100%;
    padding: 16px !important;
    font-size: 1rem !important;
  }

  /* --- Grids --- */
  .grid, .stats-container, .features-grid, .testimonial-grid, .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* --- Products Grid (2 COLUMNS) --- */
  #featuredProducts, .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  /* --- Product Card Premium --- */
  .product-card-premium {
    padding: 0 !important;
    border-radius: 18px !important;
  }
  .premium-img-section {
    height: 150px !important;
  }
  .premium-img-section img {
    padding: 10px;
  }
  .premium-info-section {
    padding: 12px !important;
  }
  .premium-info-section h3 {
    font-size: 0.9rem !important;
    margin: 5px 0 !important;
    height: 2.4em; /* Max 2 lines */
    overflow: hidden;
  }
  .price-badge-premium {
    font-size: 0.95rem !important;
  }
  .add-to-cart-btn-premium {
    padding: 10px !important;
    font-size: 0.85rem !important;
  }

  /* --- Category Sections --- */
  .category-circle-container {
    padding: 10px 0 !important;
    gap: 15px !important;
  }
  .category-circle-item span {
    font-size: 0.8rem !important;
  }

  /* --- Shop Page Layout --- */
  .shop-layout {
    grid-template-columns: 1fr !important;
    padding-top: 90px !important;
  }
  .filters-sidebar {
    display: none; /* Hide desktop filters, usually handled by a drawer on mobile */
  }

  /* --- Cart / Checkout Page --- */
  .checkout-layout {
    grid-template-columns: 1fr !important;
    padding-top: 100px !important;
  }
  .cart-item {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    padding: 20px 10px !important;
  }
  .cart-item-img {
    width: 100px !important;
    height: 100px !important;
    margin-bottom: 10px;
  }
  .item-actions {
    flex-direction: column !important;
    width: 100%;
    gap: 15px !important;
  }
  .qty-controls {
    width: 100%;
    justify-content: center;
  }
  .item-total {
    font-size: 1.1rem !important;
  }

  /* --- Trust Bar & Stats --- */
  .trust-bar {
    padding: 40px 0 !important;
  }
  .trust-item {
    flex-direction: column !important;
    text-align: center;
    gap: 10px !important;
  }
  .stat-item {
    padding: 30px 20px !important;
  }
  .stat-number {
    font-size: 2.5rem !important;
  }

  /* --- Buttons & UI --- */
  .section-title {
    font-size: 1.7rem !important;
    text-align: center;
    display: block !important;
  }
  .section-title::after {
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
}

/* Fix for RTL Text Shadow/Alignment in Mobile */
@media (max-width: 768px) {
  [dir="rtl"] .hero-actions {
    flex-direction: column;
  }
  [dir="rtl"] .section-title::after {
    right: 50% !important;
    left: auto !important;
    transform: translateX(50%) !important;
  }
}

/* ===== HERO CAROUSEL ===== */
.hero-carousel {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  box-sizing: border-box;
  padding: 40px 50px;
  border-radius: 24px;
  background: #FFF3E0;
}

[data-theme="dark"] .carousel-slide {
  background: rgba(245, 124, 0, 0.06);
}

.slide-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  max-width: 100%;
  min-height: 280px;
}

.slide-text {
  flex: 1;
  min-width: 0;
}

.slide-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 18px;
  background: rgba(242, 116, 5, 0.12);
  color: var(--primary);
  border: 1px solid rgba(242, 116, 5, 0.25);
}

.slide-title {
  font-family: 'Cairo', 'Outfit', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 14px;
}

.slide-title span {
  color: var(--primary);
}

[data-theme="dark"] .slide-title {
  color: #f8fafc;
}

.slide-desc {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 28px;
  max-width: 480px;
}

.slide-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 35px;
  background: var(--primary);
  color: white;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 20px rgba(242, 116, 5, 0.25);
}

.slide-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(242, 116, 5, 0.35);
}

.slide-btn i {
  transition: transform 0.3s;
}

.slide-btn:hover i {
  transform: translateX(-5px);
}

.slide-img {
  flex: 0 0 320px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.15));
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.carousel-slide:hover .slide-img img {
  transform: scale(1.05);
}

/* Arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}

.carousel-arrow:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(242, 116, 5, 0.3);
}

.carousel-prev {
  right: 16px;
}

.carousel-next {
  left: 16px;
}

/* Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 16px 0 8px;
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

.carousel-dot.active {
  background: var(--primary);
  width: 28px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(242, 116, 5, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-carousel-section {
    padding: 95px 0 20px !important;
  }

  .carousel-slide {
    padding: 25px 20px 50px;
  }

  .slide-content {
    flex-direction: column-reverse;
    text-align: center;
    gap: 20px;
    min-height: auto;
  }

  .slide-img {
    flex: 0 0 auto;
    height: 160px;
    width: 100%;
  }

  .slide-title {
    font-size: 1.5rem;
  }

  .slide-desc {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  .slide-btn {
    padding: 12px 28px;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
  }

  .carousel-arrow {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }

  .carousel-prev {
    right: 8px;
  }

  .carousel-next {
    left: 8px;
  }

  .carousel-dots {
    bottom: 8px;
  }
}