/* ==================== MAIN STYLESHEET ==================== */
@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --color-bg: #f5ebdd;
  --color-surface: #fff9f2;
  --color-surface-soft: #f3e4d0;
  --color-primary: #3b170f;
  --color-secondary: #5f2a19;
  --color-accent: #d1a056;
  --color-accent-strong: #b98339;
  --color-text: #30170f;
  --color-text-muted: #7b5d47;
  --color-border: rgba(95, 43, 25, 0.24);
  --color-danger: #e74c3c;
  --color-success: #27ae60;
  --color-warning: #f39c12;
  --admin-gold: var(--color-accent);

  --primary: var(--color-primary);
  --secondary: var(--color-secondary);
  --gold: var(--color-accent);
  --dark: var(--color-primary);
  --light: var(--color-bg);
  --white: var(--color-surface);
  --text: var(--color-text);

  /* Typography */
  --font-family-base: "Cairo", sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.5rem;
  --font-size-hero: clamp(2.3rem, 6vw, 4.5rem);

  /* Spacing */
  --space-1: 0.4rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-accent: 0 16px 34px rgba(209, 160, 86, 0.24);

  /* Layout */
  --header-height: 84px;
  --header-height-mobile: 70px;
  --container-max: 1400px;
    --header-h: 84px;
  --transition: all 0.24s ease;
  --focus-ring: 0 0 0 3px rgba(209, 160, 86, 0.3);
  --shadow: var(--shadow-sm);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  --focus-ring: 0 0 0 3px rgba(209, 160, 86, 0.3);
}


html {
  font-size: clamp(14px, 1vw + 12px, 16px);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  color: var(--color-text);
  background: radial-gradient(
    circle at top right,
    #fff7ec 0%,
    var(--color-bg) 45%,
    #ebdbc6 100%
  );
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
}

/* ==================== HEADER ==================== */
.main-header {
  background: rgba(59, 23, 15, 0.95);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all var(--transition-base);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* Logo */
.logo {
  flex-shrink: 0;
}

.logo-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast);
}

.logo-link:hover {
  transform: translateY(-2px);
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-accent);
  margin: 0;
  line-height: 1.2;
  letter-spacing: 1px;
}

.logo-subtitle {
  font-size: 0.7rem;
  color: rgba(255, 247, 239, 0.7);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Navigation */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  color: rgba(255, 247, 239, 0.9);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
  font-size: 0.95rem;
  position: relative;
  white-space: nowrap;
}

.nav-link i {
  font-size: 1rem;
  transition: transform var(--transition-fast);
}

.nav-link:hover {
  background: rgba(209, 160, 86, 0.15);
  color: var(--color-accent);
  transform: translateY(-2px);
}

.nav-link:hover i {
  transform: translateX(-3px);
}

.nav-link.active {
  background: linear-gradient(
    135deg,
    var(--color-accent),
    var(--color-accent-strong)
  );
  color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(209, 160, 86, 0.3);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
}

.admin-link,
.cart-icon,
.dark-mode-toggle-header {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: white;
  font-size: 1.2rem;
  transition: all var(--transition-fast);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.admin-link:hover,
.cart-icon:hover,
.dark-mode-toggle-header:hover {
  background: rgba(209, 160, 86, 0.3);
  transform: translateY(-2px) scale(1.05);
}

.cart-icon {
  position: relative;
  cursor: pointer;
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--color-danger);
  color: white;
  font-size: 0.7rem;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  padding: 0 4px;
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: white;
  font-size: 1.5rem;
  transition: all var(--transition-fast);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle:hover {
  background: rgba(209, 160, 86, 0.2);
  transform: scale(1.05);
}

.mobile-menu-close {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: white;
  font-size: 1.2rem;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.mobile-menu-close:hover {
  background: rgba(209, 160, 86, 0.15);
  color: var(--color-accent);
}

/* ==================== HERO SECTION ==================== */
.hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(72vh, 90vh, 100vh);
  background:
    linear-gradient(rgba(35, 13, 8, 0.68), rgba(59, 23, 15, 0.8)),
    url("https://images.unsplash.com/photo-1544006593-1a0b9255782d?q=80&w=1463&auto=format&fit=crop")
      center/cover fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: right;
  color: white;
  margin-top: 0;
  padding: calc(var(--header-height) + 3rem) 5% 4rem;
}

.hero-layout {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-max);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 1.6rem;
  align-items: stretch;
}

.hero-content {
  max-width: none;
  padding: var(--space-6) var(--space-5);
  border: 1px solid rgba(234, 210, 167, 0.22);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    145deg,
    rgba(59, 23, 15, 0.54),
    rgba(255, 255, 255, 0.06)
  );
  box-shadow: 0 30px 60px rgba(15, 5, 3, 0.32);
  animation: fadeInUp 1s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 100%;
}

.hero-eyebrow {
  display: inline-block;
  margin-bottom: var(--space-3);
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(234, 210, 167, 0.34);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: #f4dfbd;
  background: rgba(59, 23, 15, 0.28);
}

.hero-content h2 {
  font-size: clamp(2.1rem, 5vw, var(--font-size-hero));
  margin-bottom: var(--space-3);
  color: var(--color-accent);
}

.hero-content p {
  font-size: 1.15rem;
  margin-bottom: var(--space-5);
  color: #f8ecdd;
  opacity: 0.98;
  max-width: 38rem;
}

.hero-buttons {
  display: flex;
  justify-content: flex-start;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.hero-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.3rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 237, 205, 0.16);
  background: rgba(59, 23, 15, 0.36);
  color: #f8e7cf;
  font-size: 0.92rem;
  backdrop-filter: blur(6px);
}

.hero-chip i {
  color: var(--color-accent);
}

.hero-showcase-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 1.5rem;
  min-height: 100%;
  background: linear-gradient(
    180deg,
    rgba(255, 249, 241, 0.96),
    rgba(245, 226, 200, 0.93)
  );
  color: var(--color-primary);
  border: 1px solid rgba(255, 235, 205, 0.48);
  box-shadow: 0 30px 60px rgba(15, 5, 3, 0.26);
  animation: fadeInUp 1.1s ease;
}

.hero-showcase-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}

.showcase-badge {
  background: linear-gradient(
    135deg,
    var(--color-secondary),
    var(--color-accent)
  );
  color: #fff;
  padding: 0.48rem 0.82rem;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  box-shadow: 0 12px 28px rgba(209, 160, 86, 0.24);
}

.showcase-caption {
  color: var(--color-text-muted);
  border: 1px solid rgba(95, 42, 25, 0.14);
  background: rgba(255, 255, 255, 0.56);
  padding: 0.48rem 0.82rem;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
}

.hero-showcase-label {
  margin-bottom: 0.6rem;
  color: var(--color-secondary);
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.hero-showcase-card h3 {
  font-size: 1.9rem;
  line-height: 1.35;
  margin-bottom: 0.8rem;
}

.hero-showcase-description {
  color: var(--color-text-muted);
  margin-bottom: 1.15rem;
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.2rem;
}

.hero-note {
  color: var(--color-secondary);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(95, 42, 25, 0.1);
  padding: 0.48rem 0.82rem;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.hero-metric {
  padding: 0.95rem 0.8rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(95, 42, 25, 0.1);
  text-align: center;
}

.hero-metric strong {
  display: block;
  font-size: 1.25rem;
  color: var(--color-primary);
}

.hero-metric span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.86rem;
  color: var(--color-text-muted);
}

/* ==================== BUTTONS ==================== */
.btn {
  padding: 0.95rem 2.2rem;
  border: none;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-md);
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.24s ease,
    background-color 0.24s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(
    120deg,
    var(--color-secondary),
    var(--color-accent)
  );
  color: white;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  background: var(--color-accent);
  color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(209, 160, 86, 0.26);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.hero-secondary-btn {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.46);
}

.hero-secondary-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* ========== PRODUCTS SECTION ========== */
.products {
  padding: var(--space-7) 5%;
  background: linear-gradient(
    180deg,
    rgba(255, 248, 236, 0.65),
    rgba(245, 235, 221, 0.96)
  );
}

.section-title {
  text-align: center;
  font-size: var(--font-size-xl);
  color: var(--dark);
  margin-bottom: 1rem;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--gold);
}

.section-subtitle {
  text-align: center;
  color: #755844;
  margin-bottom: var(--space-6);
  font-size: 1.05rem;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto var(--space-6);
  flex-wrap: wrap;
  align-items: center;
  max-width: var(--container-max);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.filter-btn {
  padding: 0.8rem 2rem;
  border: 2px solid var(--secondary);
  background: transparent;
  color: var(--dark);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease;
  font-weight: 600;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--secondary);
  color: white;
  transform: translateY(-1px);
}

.search-input {
  padding: 0.8rem 1rem;
  border: 1px solid #ead8c0;
  border-radius: var(--radius-pill);
  font-family: inherit;
  min-width: 200px;
  color: var(--text);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--gold);
  outline: none;
}

.sort-select {
  padding: 0.8rem 1rem;
  border: 1px solid #ead8c0;
  border-radius: var(--radius-pill);
  font-family: inherit;
  background: white;
  cursor: pointer;
  color: var(--text);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--dark);
  cursor: pointer;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: stretch;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    border-color 0.24s ease;
  border: 1px solid var(--color-border);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.product-image {
  height: 250px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.product-card:hover .product-image img {
  transform: scale(1.1);
}

.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gold);
  color: var(--dark);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 1;
}

.discount-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: #e74c3c;
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 1;
}

.product-info {
  padding: 1.5rem;
}

.product-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--dark);
  cursor: pointer;
}

.product-info h3:hover {
  color: var(--gold);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.stars {
  color: #f39c12;
  font-size: 0.8rem;
}

.rating-count {
  color: #666;
  font-size: 0.8rem;
}

.product-description {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-price {
  display: flex;
  flex-direction: column;
}

.current-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
}

.old-price {
  font-size: 0.8rem;
  color: #999;
  text-decoration: line-through;
}

.add-to-cart {
  background: var(--secondary);
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    background-color 0.24s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-to-cart:hover {
  background: var(--gold);
  transform: rotate(360deg);
}

.product-stock {
  font-size: 0.7rem;
  margin-top: 0.5rem;
  color: #27ae60;
}

.product-stock.low-stock {
  color: #f39c12;
}

.product-stock.out-of-stock {
  color: #e74c3c;
}

.products-count {
  text-align: center;
  margin-top: 2rem;
  color: #666;
}

/* ========== CONTACT SECTION ========== */
.contact {
  padding: var(--space-7) 5%;
  background: linear-gradient(180deg, #f0e1cf 0%, #ead7c2 100%);
}

.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-info {
  display: grid;
  gap: 2rem;
}

.info-item {
  text-align: center;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.info-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.info-item i {
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.info-item h3 {
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 1rem;
  border: 2px solid #eee;
  border-radius: 12px;
  font-family: inherit;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--gold);
  outline: none;
}

/* ========== CART SIDEBAR ========== */
.cart-sidebar {
  position: fixed;
  top: 0;
  left: -400px;
  width: 400px;
  height: 100vh;
  background: var(--white);
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.2);
  transition: left 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 1001;
  padding: 2rem;
  overflow-y: auto;
}

.cart-sidebar.active {
  left: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #eee;
}

.cart-header h3 {
  color: var(--dark);
}

.close-cart {
  cursor: pointer;
  font-size: 2rem;
  color: var(--secondary);
  transition: var(--transition);
}

.close-cart:hover {
  color: var(--primary);
  transform: rotate(90deg);
}

.cart-items {
  margin-bottom: 2rem;
  max-height: calc(100vh - 500px);
  overflow-y: auto;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
  animation: slideIn 0.3s ease;
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h4 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: var(--dark);
}

.cart-item-price {
  color: var(--secondary);
  font-weight: 600;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 1rem;
}

.quantity-btn {
  background: #eee;
  border: none;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: bold;
  transition: var(--transition);
}

.quantity-btn:hover {
  background: var(--gold);
  color: white;
}

.remove-item {
  color: #e74c3c;
  cursor: pointer;
  transition: var(--transition);
}

.remove-item:hover {
  transform: scale(1.2);
}

.cart-summary {
  margin: 1rem 0;
}

.cart-summary-details {
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 12px;
  margin-top: 1rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dashed #eee;
}

.summary-row.total {
  border-top: 2px solid var(--gold);
  border-bottom: none;
  padding-top: 0.8rem;
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

.cart-total {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
}

.free-shipping-msg {
  color: #27ae60;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.coupon-section {
  margin: 1rem 0;
}

.coupon-input {
  display: flex;
  gap: 0.5rem;
}

.coupon-input input {
  flex: 1;
  padding: 0.8rem;
  border: 2px solid #eee;
  border-radius: 8px;
  font-family: inherit;
}

.coupon-input button {
  padding: 0 1.5rem;
  background: var(--secondary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.coupon-input button:hover {
  background: var(--gold);
}

.payment-methods {
  margin: 1.5rem 0;
}

.payment-methods h4 {
  margin-bottom: 1rem;
  color: var(--dark);
}

.payment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.payment-method {
  background: #f5f5f5;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0.8rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.payment-method:hover {
  background: #e5e5e5;
}

.payment-method.selected {
  border-color: var(--gold);
  background: #f8ead4;
  color: var(--dark);
}

.checkout-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 1rem;
  width: 100%;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.checkout-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(95, 42, 25, 0.28);
}
/* ==================== MODAL ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal {
  background: var(--color-surface);
  border-radius: 20px;
  width: min(92vw, 460px);
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
  position: relative;
  border: 1px solid rgba(209, 160, 86, 0.2);
  box-shadow: 0 28px 48px rgba(59, 23, 15, 0.2);
}

/* ===== تحسين تبويبات المصادقة ===== */
.auth-tabs {
  display: flex;
  gap: 0.5rem; /* مسافة بين التبويبات */
  background: transparent;
  border-bottom: 1px solid #ead9c5;
  margin-bottom: 1.5rem;
  position: relative;
}

.auth-tab {
  flex: 1;
  padding: clamp(0.75rem, 2vw, 1rem);
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: #6c5a4a; /* لون هادئ بدلاً من الرمادي الباهت */
  transition: all 0.25s ease;
  font-family: 'Cairo', 'Tajawal', sans-serif;
  position: relative;
  border-radius: 12px 12px 0 0;
}

.auth-tab:hover {
  color: #8b4d2d; /* لون داكن عند التحويم */
  background-color: rgba(139, 77, 45, 0.05);
}

.auth-tab.active {
  color: #d1a056; /* اللون الذهبي المميز */
  border-bottom: 3px solid #d1a056;
  background: linear-gradient(to bottom, rgba(209, 160, 86, 0.08), transparent);
  font-weight: 700;
}

/* تحسين شكل الحاوية العامة للنموذج */
.auth-modal-content {
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  max-width: 480px;
  width: 90%;
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

/* تحسين زر الإغلاق */
.close-auth {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  font-size: 1.2rem;
  cursor: pointer;
  color: #aaa;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f8f2ec;
  transition: all 0.2s;
}

.close-auth:hover {
  background: #f0e4d8;
  color: #e74c3c;
  transform: rotate(90deg);
}

/* تنسيق الحقول */
.auth-form input {
  width: 100%;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid #e2d4c8;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s;
  background-color: #fefcf9;
}

.auth-form input:focus {
  border-color: #d1a056;
  outline: none;
  box-shadow: 0 0 0 3px rgba(209, 160, 86, 0.2);
  background-color: #ffffff;
}

/* أزرار النموذج */
.auth-btn {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #8b4d2d, #5f2a19);
  color: white;
  border: none;
  border-radius: 40px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s;
  margin-top: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(95, 42, 25, 0.25);
  background: linear-gradient(135deg, #9e5a34, #6e321d);
}

/* زر Google */
.google-btn {
  width: 100%;
  border: 1px solid #e2d4c8;
  background: white;
  color: #3a2a1f;
  border-radius: 40px;
  padding: 0.75rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 0.9rem;
}

.google-btn:hover {
  border-color: #d1a056;
  background: #fffaf5;
  transform: translateY(-1px);
}

.google-btn img {
  width: 20px;
  height: 20px;
}

/* روابط إضافية */
.auth-note {
  text-align: center;
  margin-top: 1.2rem;
  color: #7f6b5a;
  font-size: 0.85rem;
}

.auth-note a {
  color: #d1a056;
  text-decoration: none;
  font-weight: 600;
}

.auth-note a:hover {
  text-decoration: underline;
}

/* تحسين التجاوب */
@media (max-width: 576px) {
  .auth-modal-content {
    width: 95%;
    border-radius: 24px;
  }
  .auth-tab {
    font-size: 0.9rem;
    padding: 0.6rem 0.5rem;
  }
  .auth-form {
    padding: 1rem 1.2rem 1.5rem;
  }
  .auth-form input {
    padding: 0.7rem 0.9rem;
  }
  .auth-btn, .google-btn {
    padding: 0.7rem;
  }
}

/* ==================== FOOTER ==================== */
footer {
  background: linear-gradient(165deg, #271007 0%, #3b170f 52%, #512516 100%);
  color: white;
  padding: var(--space-7) 5% var(--space-5);
  border-top: 1px solid rgba(212, 163, 115, 0.2);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-section h3 {
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.footer-section p {
  line-height: 1.8;
  opacity: 0.8;
}

.footer-section a {
  color: white;
  text-decoration: none;
  display: block;
  margin: 0.5rem 0;
  transition:
    color 0.22s ease,
    transform 0.22s ease;
}

.footer-section a:hover {
  color: var(--color-accent);
  transform: translateX(-6px);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  font-size: 1.5rem;
  margin: 0;
}

.social-links a:hover {
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(212, 163, 115, 0.2);
  opacity: 0.8;
}

.footer-bottom a {
  color: var(--color-accent);
  text-decoration: none;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
  .hero {
    padding: calc(var(--header-height) + 2rem) 3% 3rem;
    background-attachment: scroll;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 992px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-container {
    grid-template-columns: 1fr;
  }

  .cart-sidebar {
    width: 350px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  .header-container {
    padding: 0.6rem 1.5rem;
  }

  .logo h1 {
    font-size: 1.5rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, #3b170f, #5c2618);
    z-index: 1001;
    transition: right var(--transition-base);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    display: block;
  }

  .nav-links.active {
    right: 0;
  }

  .mobile-menu-close {
    display: flex;
  }

  .nav-links-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0;
  }

  .nav-link {
    padding: 1rem 1.5rem;
    border-radius: 0;
    white-space: normal;
    justify-content: flex-start;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .hero {
    padding: 85px 1rem 2rem;
    min-height: auto;
  }

  .hero-content {
    padding: var(--space-4);
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .products {
    padding: var(--space-5) 1rem;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .filter-buttons {
    flex-direction: column;
  }

  .filter-btn {
    width: 100%;
    text-align: center;
  }

  .cart-sidebar {
    width: 100%;
    left: -100%;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0.4rem 0.8rem;
  }

  .logo h1 {
    font-size: 1.2rem;
  }

  .logo-subtitle {
    display: none;
  }

  .hero-content h2 {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: var(--font-size-xl);
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .product-image {
    height: 180px;
  }

  .cart-sidebar {
    padding: 1rem;
  }

  .payment-grid {
    grid-template-columns: 1fr;
  }

  .contact-container {
    gap: 1.5rem;
  }
}


/* Print Styles */
@media print {
  header,
  .hero,
  footer,
  .btn,
  .filter-section,
  .cart-sidebar {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ==================== DARK MODE - FIXED & CONSISTENT ==================== */


/* ==================== DARK MODE - PURE BLACK BACKGROUND ==================== */
body.dark-mode {
  /* الألوان الأساسية - خلفية سوداء بالكامل */
  --color-bg: #000000;
  --color-surface: #0a0a0a;       /* للعناصر الرئيسية */
  --color-surface-soft: #111111;
  --color-card-bg: #0d0d0d;
  --color-input-bg: #1a1a1a;
  
  /* الألوان النصية والحدود */
  --color-primary: #f0e5d8;
  --color-secondary: #d4a574;
  --color-accent: #f7c271;
  --color-accent-strong: #f0b63d;
  --color-text: #f0e5d8;
  --color-text-muted: #b0a090;
  --color-border: rgba(255, 255, 255, 0.1);
  
  /* الألوان الوظيفية */
  --color-danger: #e74c3c;
  --color-success: #2ecc71;
  --color-warning: #f1c40f;
  --color-info: #3498db;
  --admin-gold: var(--color-accent);
  
  /* متغيرات إضافية */
  --color-hover-bg: rgba(247, 194, 113, 0.12);
  --color-focus-ring: rgba(247, 194, 113, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
  --shadow-accent: 0 16px 34px rgba(247, 194, 113, 0.15);
  
  /* خلفية الصفحة - سوداء صلبة (بدون تدرج) */
  background: #000000;
}

/* ==================== باقي عناصر الوضع الليلي ==================== */

/* الهيدر */
body.dark-mode .main-header {
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(12px);
}

/* جميع البطاقات والمنتجات */
body.dark-mode .product-card,
body.dark-mode .info-item,
body.dark-mode .cart-sidebar,
body.dark-mode .auth-modal,
body.dark-mode .hero-showcase-card,
body.dark-mode .filter-buttons {
  background: var(--color-card-bg);
  border-color: var(--color-border);
}

/* عناصر الهيرو (خلفيات شفافة على الأسود) */
body.dark-mode .hero-showcase-card {
  background: var(--color-card-bg) !important;
}
body.dark-mode .hero-note,
body.dark-mode .showcase-caption {
  background: rgba(0, 0, 0, 0.6);
  border-color: var(--color-border);
  color: var(--color-text-muted);
}
body.dark-mode .hero-metric {
  background: rgba(0, 0, 0, 0.7);
  border-color: var(--color-border);
}
body.dark-mode .hero-metric strong {
  color: var(--color-accent);
}
body.dark-mode .hero-content {
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
}

/* النصوص العامة */
body.dark-mode .product-info h3,
body.dark-mode .info-item h3,
body.dark-mode .cart-header h3,
body.dark-mode .section-title,
body.dark-mode .payment-methods h4,
body.dark-mode .auth-form h3 {
  color: var(--color-text);
}
body.dark-mode .product-description,
body.dark-mode .info-item p,
body.dark-mode .rating-count,
body.dark-mode .products-count,
body.dark-mode .auth-note,
body.dark-mode .summary-row span:first-child,
body.dark-mode .cart-item-price {
  color: var(--color-text-muted);
}

/* الأزرار والفلاتر */
body.dark-mode .filter-btn {
  border-color: var(--color-border);
  color: var(--color-text);
}
body.dark-mode .filter-btn.active,
body.dark-mode .filter-btn:hover {
  background: var(--color-accent);
  color: #000000;
}
body.dark-mode .search-input,
body.dark-mode .sort-select,
body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea,
body.dark-mode .coupon-input input,
body.dark-mode .auth-form input {
  background: var(--color-input-bg);
  border-color: var(--color-border);
  color: var(--color-text);
}
body.dark-mode .search-input:focus,
body.dark-mode .sort-select:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

/* سلة التسوق */
body.dark-mode .cart-summary-details {
  background: var(--color-input-bg);
}
body.dark-mode .cart-item,
body.dark-mode .cart-header,
body.dark-mode .summary-row {
  border-bottom-color: var(--color-border);
}
body.dark-mode .quantity-btn {
  background: var(--color-input-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
body.dark-mode .quantity-btn:hover {
  background: var(--color-accent);
  color: #000000;
}
body.dark-mode .payment-method {
  background: var(--color-input-bg);
  color: var(--color-text);
  border-color: var(--color-border);
}
body.dark-mode .payment-method.selected {
  background: var(--color-accent);
  color: #000000;
  border-color: var(--color-accent);
}
body.dark-mode .checkout-btn {
  background: linear-gradient(135deg, #000000, var(--color-secondary));
}
body.dark-mode .checkout-btn:hover {
  background: var(--color-accent);
  color: #000000;
}

/* نافذة تسجيل الدخول */
body.dark-mode .auth-modal-content {
    background: #000000;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.5);
}

body.dark-mode .auth-modal-close {
    background: #ff6f0000;
    color: #d1a056;
}

body.dark-mode .auth-modal-close:hover {
    background: #3a2e26;
    color: #e74c3c;
}

body.dark-mode .auth-tabs {
    background: #000000;
}

body.dark-mode .auth-tab {
    color: #b8a28c;
}

body.dark-mode .auth-tab.active {
    background: #d1a056;
    color: #1e1a16;
}

body.dark-mode .auth-tab:hover:not(.active) {
    background: #3a2e26;
    color: #d1a056;
}

body.dark-mode .auth-header h3 {
    color: #f5e6d3;
}

body.dark-mode .auth-subtitle {
    color: #b8a28c;
}

body.dark-mode .input-group input {
    background: #2c241e;
    border-color: #4a3a2e;
    color: #f5e6d3;
}

body.dark-mode .input-group input:focus {
    border-color: #d1a056;
    box-shadow: 0 0 0 3px rgba(209, 160, 86, 0.3);
}

body.dark-mode .input-group i,
body.dark-mode .toggle-password {
    color: #b8a28c;
}

body.dark-mode .checkbox-label,
body.dark-mode .checkbox-text {
    color: #b8a28c;
}

body.dark-mode .checkmark {
    background: #2c241e;
    border-color: #d1a056;
}

body.dark-mode .auth-divider::before,
body.dark-mode .auth-divider::after {
    background: #4a3a2e;
}

body.dark-mode .auth-divider span {
    background: #1e1a16;
    color: #b8a28c;
}

body.dark-mode .btn-google {
    background: #2c241e;
    border-color: #4a3a2e;
    color: #f5e6d3;
}

body.dark-mode .btn-google:hover {
    background: #3a2e26;
    border-color: #d1a056;
}

/* الفوتر */
body.dark-mode footer {
  background: #050505;
  border-top-color: var(--color-border);
}
body.dark-mode .footer-section a {
  color: var(--color-text-muted);
}
body.dark-mode .footer-section a:hover {
  color: var(--color-accent);
  transform: translateX(-6px);
}

/* شريط التمرير */
body.dark-mode ::-webkit-scrollbar-track {
  background: #0a0a0a;
}
body.dark-mode ::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 10px;
}
body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-strong);
}

/* صفحة التسجيل */
body.dark-mode .auth-form input[type="submit"] {
  background: linear-gradient(135deg, #000000, var(--color-secondary));
}

/* أقسام إضافية */
body.dark-mode .products,
body.dark-mode .contact {
  background: #000000;
}
body.dark-mode .hero {
  background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.9)),
    url("https://images.unsplash.com/photo-1544006593-1a0b9255782d?q=80&w=1463&auto=format&fit=crop") center/cover fixed;
}

body.dark-mode .mobile-menu-toggle {
  background: rgba(0, 0, 0, 0.6);
  color: var(--color-accent);
  border: 1px solid var(--color-border);
}

body.dark-mode .mobile-menu-toggle:hover {
  background: var(--color-accent);
  color: #000000;
  border-color: var(--color-accent);
}

/* القائمة الجانبية (التي تظهر عند الضغط) في الوضع الليلي */
body.dark-mode .nav-links {
  background: linear-gradient(135deg, #0a0a0a, #111111);
  border-left: 1px solid var(--color-border);
}

body.dark-mode .mobile-menu-close {
  color: var(--color-text);
  border-bottom-color: var(--color-border);
}

body.dark-mode .mobile-menu-close:hover {
  background: var(--color-hover-bg);
  color: var(--color-accent);
}