/* ═══════════════════════════════════════════
   CSS Variables
═══════════════════════════════════════════ */
:root {
  --green-dark:   #084d1a;
  --green:        #0b6623;
  --green-mid:    #1c8c3b;
  --green-light:  #e8f5e1;
  --gold:         #f4c542;
  --gold-light:   #ffd24d;
  --cream:        #faf9f4;
  --white:        #ffffff;
  --text:         #1f2a1f;
  --text-muted:   #556055;
  --border:       #e0e8dc;
  --shadow-sm:    0 2px 8px rgba(11,102,35,0.08);
  --shadow-md:    0 8px 28px rgba(11,102,35,0.13);
  --shadow-lg:    0 18px 48px rgba(11,102,35,0.18);
  --radius:       16px;
  --radius-sm:    10px;
  --radius-pill:  999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Cairo', system-ui, sans-serif;
  background: var(--cream);
  color: var(--text);
  direction: rtl;
  line-height: 1.75;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* Global hidden class */
.hidden { display: none !important; }

/* Layout */
.container { width: min(1160px, 100% - 32px); margin-inline: auto; padding-inline: 16px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section { padding-block: 80px; }

/* Tags & Titles */
.section-tag {
  display: inline-block;
  background: var(--green-light);
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}
.section-title {
  font-family: 'Almarai', sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  color: var(--green-dark);
  margin-bottom: 0.5em;
  line-height: 1.2;
  text-align: center;
}
.section-title.text-right { text-align: right; }
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 620px;
  margin-inline: auto;
  margin-bottom: 3rem;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px 28px;
  border-radius: var(--radius-pill);
  font-family: 'Cairo', sans-serif;
  font-weight: 700; font-size: 1rem;
  cursor: pointer; border: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--gold); color: var(--green-dark); box-shadow: 0 4px 16px rgba(244,197,66,0.35); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(244,197,66,0.5); }
.btn-secondary { background: var(--green); color: white; width: 100%; }
.btn-secondary:hover { background: var(--green-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; border: 2px solid rgba(255,255,255,0.7); color: white; }
.btn-outline:hover { background: rgba(255,255,255,0.15); }
.btn-danger { background: #c62828; color: white; }
.btn-danger:hover { background: #b71c1c; transform: translateY(-2px); }
.full-width { width: 100%; }

/* ═══ HEADER ═══ */
.top-bar {
  background: var(--green-dark);
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.logo-wrapper { position: relative; display: inline-flex; align-items: center; }
.logo { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.logo-image {
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover; border: 2.5px solid var(--gold);
  box-shadow: 0 0 0 4px rgba(244,197,66,0.2);
  transition: all 0.3s ease;
}
.logo:hover .logo-image { transform: scale(1.08) rotate(3deg); }
.logo-text { font-family: 'Almarai', sans-serif; font-weight: 800; font-size: 1.35rem; color: var(--gold); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: rgba(255,255,255,0.85); font-weight: 600; font-size: 0.92rem;
  padding: 7px 12px; border-radius: var(--radius-pill); transition: all 0.2s;
}
.nav-links a:hover { color: var(--gold); background: rgba(255,255,255,0.07); }

/* Cart badge */
.cart-badge {
  position: absolute; top: 2px; right: -8px;
  background: #e53935; color: white; font-size: 0.72rem; font-weight: 800;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--green-dark);
  animation: pop 0.3s ease;
}
.cart-badge.hidden { display: none; }
@keyframes pop { 0% { transform: scale(0.5); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* Register Tooltip (guide nouveaux visiteurs) */
.register-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  right: 50%;
  transform: translateX(50%);
  background: var(--gold);
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(244,197,66,0.4);
  z-index: 300;
  animation: bounce 2s infinite;
  pointer-events: none;
}
.register-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 50%;
  transform: translateX(50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--gold);
}
.register-tooltip.hidden { display: none; }

@keyframes bounce {
  0%, 100% { transform: translateX(50%) translateY(0); }
  50% { transform: translateX(50%) translateY(5px); }
}

.btn-auth { position: relative; }

/* Auth Nav */
.auth-nav { display: flex; align-items: center; gap: 8px; }
.auth-guest { display: flex; gap: 8px; align-items: center; }
.auth-user { display: flex; align-items: center; gap: 10px; position: relative; }
.auth-user.hidden { display: none; }
.auth-guest.hidden { display: none; }

.btn-auth {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-family: 'Cairo', sans-serif;
  font-weight: 700; font-size: 0.88rem;
  cursor: pointer; border: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-login { background: transparent; border: 1.5px solid rgba(255,255,255,0.5); color: white; }
.btn-login:hover { background: rgba(255,255,255,0.1); }
.btn-register { background: var(--gold); color: var(--green-dark); }
.btn-register:hover { background: var(--gold-light); }
.btn-orders { background: rgba(255,255,255,0.12); border: none; color: white; }
.btn-orders:hover { background: rgba(255,255,255,0.22); }

.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold); color: var(--green-dark);
  font-weight: 800; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 2px solid rgba(255,255,255,0.3);
  transition: all 0.2s;
}
.user-avatar:hover { transform: scale(1.1); }

.user-menu {
  position: absolute; top: calc(100% + 10px); left: 0;
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); min-width: 180px;
  padding: 8px; border: 1px solid var(--border);
  z-index: 300;
}
.user-menu.hidden { display: none; }
.user-menu-name { padding: 8px 12px; font-weight: 700; color: var(--green-dark); font-size: 0.95rem; }
.user-menu hr { border: none; border-top: 1px solid var(--border); margin: 6px 0; }
.user-menu button {
  display: block; width: 100%; text-align: right;
  background: none; border: none; padding: 9px 12px;
  border-radius: var(--radius-sm); font-family: 'Cairo', sans-serif;
  font-size: 0.92rem; cursor: pointer; color: var(--text);
  transition: background 0.2s;
}
.user-menu button:hover { background: var(--green-light); }

/* Burger */
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.burger span { display: block; width: 24px; height: 2px; background: white; border-radius: 2px; transition: all 0.3s; }
.burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ═══ INSTALL BANNER ═══ */
.install-banner {
  background: var(--green-dark);
  color: white;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 150;
  border-bottom: 2px solid var(--gold);
}
.install-banner.hidden { display: none; }
.install-content { display: flex; align-items: center; gap: 12px; }
.install-content img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--gold); }
.install-content strong { display: block; font-size: 0.95rem; }
.install-content small { font-size: 0.8rem; opacity: 0.8; }
.install-actions { display: flex; align-items: center; gap: 8px; }
.install-actions .btn { padding: 8px 18px; font-size: 0.88rem; }
.btn-close-banner { background: none; border: none; color: white; font-size: 1.2rem; cursor: pointer; padding: 4px 8px; opacity: 0.7; }
.btn-close-banner:hover { opacity: 1; }

/* ═══ HERO ═══ */
.hero {
  position: relative; padding: 80px 0 60px;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 50%, #2da84e 100%);
  color: white; overflow: hidden;
}
.hero-bg-decor {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(244,197,66,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(255,255,255,0.04) 0%, transparent 60%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.hero-label {
  display: inline-block; background: rgba(244,197,66,0.2);
  border: 1px solid rgba(244,197,66,0.4); color: var(--gold);
  font-size: 0.9rem; font-weight: 600; padding: 6px 18px;
  border-radius: var(--radius-pill); margin-bottom: 18px;
}
.hero h1 { font-family: 'Almarai', sans-serif; font-weight: 800; font-size: clamp(2.4rem, 5.5vw, 4rem); line-height: 1.1; margin-bottom: 0.6em; }
.hero h1 .highlight { color: var(--gold); display: block; }
.hero-grid .hero-text > p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 1.8em; }
.hero-benefits { list-style: none; padding: 0; margin-bottom: 2.2em; display: flex; flex-direction: column; gap: 10px; }
.hero-benefits li { font-size: 1.05rem; opacity: 0.92; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-img-wrapper { position: relative; }
.hero-img-wrapper img { width: 100%; border-radius: 24px; box-shadow: var(--shadow-lg); object-fit: cover; aspect-ratio: 4/3; }
.hero-badge-float {
  position: absolute; bottom: -18px; right: 24px;
  background: var(--gold); color: var(--green-dark);
  border-radius: var(--radius); padding: 14px 22px;
  box-shadow: var(--shadow-md); text-align: center; font-weight: 800;
}
.hero-badge-float span { display: block; font-size: 1.1rem; }
.hero-badge-float small { font-size: 0.8rem; font-weight: 600; opacity: 0.8; }

/* ═══ STATS ═══ */
.stats-bar { background: white; border-bottom: 1px solid var(--border); padding: 28px 0; box-shadow: var(--shadow-sm); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-item { text-align: center; padding: 12px; }
.stat-item strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--green); font-family: 'Almarai', sans-serif; }
.stat-item span { font-size: 0.9rem; color: var(--text-muted); }

/* ═══ PRODUCTS ═══ */
.products { background: var(--cream); }
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.product-card {
  background: white; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: all 0.3s ease; position: relative;
}
.product-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }
.product-card.featured { border-color: var(--gold); box-shadow: 0 6px 24px rgba(244,197,66,0.2); }
.product-badge {
  position: absolute; top: 14px; right: 14px;
  background: var(--gold); color: var(--green-dark);
  font-size: 0.8rem; font-weight: 800; padding: 5px 14px;
  border-radius: var(--radius-pill); z-index: 1;
}
.product-img-wrap { overflow: hidden; height: 200px; }
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-img-wrap img { transform: scale(1.06); }
.product-body { padding: 20px; }
.product-body h3 { font-family: 'Almarai', sans-serif; font-size: 1.6rem; color: var(--green-dark); margin-bottom: 8px; }
.product-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 16px; }
.product-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.price { font-size: 1.6rem; font-weight: 800; color: var(--green); font-family: 'Almarai', sans-serif; }
.price small { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
.free-delivery { font-size: 0.82rem; background: var(--green-light); color: var(--green); padding: 4px 10px; border-radius: var(--radius-pill); font-weight: 600; }

/* ═══ CART ═══ */
.cart-summary { margin-top: 48px; background: var(--green-dark); color: white; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); }
.cart-header { padding: 20px 28px; background: rgba(0,0,0,0.15); border-bottom: 1px solid rgba(255,255,255,0.1); }
.cart-header h3 { font-size: 1.25rem; font-family: 'Almarai', sans-serif; }
#cart-items { list-style: none; padding: 16px 28px; display: flex; flex-direction: column; gap: 10px; min-height: 60px; }
#cart-items li {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,0.07); border-radius: var(--radius-sm);
  padding: 10px 16px; font-size: 0.97rem;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }
.cart-item-info { flex: 1; font-weight: 600; }
.cart-item-qty-controls { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.1); border-radius: var(--radius-pill); padding: 4px 14px; }
.qty-btn { width: 28px; height: 28px; background: rgba(255,255,255,0.18); color: white; border: none; border-radius: 50%; font-size: 1.1rem; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.qty-btn:hover { background: rgba(255,255,255,0.35); transform: scale(1.1); }
.qty-display { min-width: 24px; text-align: center; font-weight: 700; }
.cart-totals { padding: 16px 28px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; gap: 10px; }
.total-row { display: flex; justify-content: space-between; font-size: 0.97rem; color: rgba(255,255,255,0.85); }
.total-row.grand { margin-top: 8px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.2); font-size: 1.15rem; font-weight: 800; color: var(--gold); }
.cart-actions { display: flex; gap: 14px; padding: 20px 28px 24px; flex-wrap: wrap; }
.cart-actions .btn-primary { flex: 1; min-width: 200px; }
.cart-actions .btn-danger { white-space: nowrap; }

/* ═══ ABOUT ═══ */
.about { background: white; }
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: start; }
.about-content p { color: var(--text-muted); margin-bottom: 1.4em; font-size: 1.05rem; }
.about-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; margin-top: 1.4em; }
.about-list li { display: flex; align-items: center; gap: 12px; font-size: 1.02rem; background: var(--green-light); padding: 12px 18px; border-radius: var(--radius-sm); }
.check { color: var(--green); font-weight: 800; font-size: 1.1rem; flex-shrink: 0; }
.about-highlight { background: var(--cream); border: 1px solid var(--border); border-radius: 20px; padding: 30px; }
.about-highlight h3 { font-family: 'Almarai', sans-serif; color: var(--green-dark); margin-bottom: 20px; font-size: 1.2rem; }
.info-grid { display: flex; flex-direction: column; gap: 14px; }
.info-item { display: flex; justify-content: space-between; padding: 12px 16px; background: white; border-radius: var(--radius-sm); font-size: 0.95rem; border: 1px solid var(--border); }
.info-label { color: var(--text-muted); font-weight: 500; }

/* ═══ PROCESS ═══ */
.process { background: var(--cream); }
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.process-step { background: white; border-radius: 20px; padding: 28px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); transition: all 0.3s ease; }
.process-step:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.step-number { font-size: 3.5rem; font-weight: 800; font-family: 'Almarai', sans-serif; color: var(--green-light); line-height: 1; margin-bottom: 12px; }
.process-step h3 { font-family: 'Almarai', sans-serif; color: var(--green-dark); font-size: 1.25rem; margin-bottom: 10px; }
.process-step p { color: var(--text-muted); font-size: 0.97rem; margin-bottom: 18px; }
.process-step.modern h3 { color: var(--green-mid); }
.process-step.traditional h3 { color: #6d4c2a; }
.process-img { width: 100%; border-radius: var(--radius-sm); object-fit: cover; aspect-ratio: 16/9; box-shadow: var(--shadow-sm); }

/* ═══ REVIEWS ═══ */
.reviews { background: var(--cream); }

.review-form-wrap {
  background: white;
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-sm);
}
.review-form-wrap h3 {
  font-family: 'Almarai', sans-serif;
  color: var(--green-dark);
  margin-bottom: 24px;
  font-size: 1.3rem;
}

.review-login-prompt {
  background: var(--green-light);
  border: 2px dashed var(--green);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  margin-bottom: 48px;
}
.review-login-prompt p {
  font-size: 1.1rem;
  color: var(--green-dark);
  margin-bottom: 16px;
  font-weight: 600;
}

.star-rating-input {
  margin-bottom: 24px;
}
.star-rating-input label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}
.stars-input {
  display: flex;
  gap: 8px;
  font-size: 2rem;
}
.stars-input .star {
  cursor: pointer;
  color: #ddd;
  transition: all 0.2s;
  user-select: none;
}
.stars-input .star:hover,
.stars-input .star.active {
  color: var(--gold);
  transform: scale(1.15);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.reviews-loading,
.reviews-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.review-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
  animation: fadeIn 0.5s ease;
}
.review-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.review-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  font-family: 'Almarai', sans-serif;
  flex-shrink: 0;
}
.review-user-info {
  flex: 1;
}
.review-user-name {
  font-weight: 700;
  color: var(--green-dark);
  font-size: 1.05rem;
  font-family: 'Almarai', sans-serif;
}
.review-date {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.review-stars {
  display: flex;
  gap: 4px;
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 12px;
}

.review-text {
  color: var(--text);
  line-height: 1.7;
  font-size: 0.97rem;
}

.review-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--green-light);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-top: 12px;
}

.reviews-show-more {
  text-align: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px dashed var(--border);
}

.reviews-show-more.hidden {
  display: none !important;
}

.reviews-show-more .btn {
  min-width: 200px;
  background: var(--green);
  color: white;
  border: 2px solid var(--green);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  box-shadow: 0 4px 12px rgba(11, 102, 35, 0.2);
  transition: all 0.3s ease;
}

.reviews-show-more .btn:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(11, 102, 35, 0.3);
}

.reviews-show-more .btn #toggle-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: white;
}

.review-card.hidden-review {
  display: none;
}

/* ═══ CONTACT ═══ */
.contact { background: white; }
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.contact-form-wrap p { color: var(--text-muted); margin-bottom: 1.6em; }
.order-form { display: flex; flex-direction: column; }

@keyframes highlightForm {
  0%, 100% { transform: scale(1); box-shadow: none; }
  50% { transform: scale(1.02); box-shadow: 0 0 0 8px rgba(244, 197, 66, 0.3); }
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; color: var(--text); margin-bottom: 7px; font-size: 0.95rem; }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px 18px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: 'Cairo', sans-serif; font-size: 1rem;
  background: var(--cream); color: var(--text); transition: all 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--green); background: white;
  box-shadow: 0 0 0 4px rgba(11,102,35,0.1);
}
.form-group textarea { resize: vertical; }
.contact-info { display: flex; flex-direction: column; gap: 18px; }
.contact-card { background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: all 0.25s; }
.contact-card:hover { border-color: var(--green); box-shadow: var(--shadow-sm); }
.contact-icon { font-size: 1.8rem; margin-bottom: 8px; }
.contact-card h4 { font-family: 'Almarai', sans-serif; color: var(--green-dark); font-size: 1.05rem; margin-bottom: 6px; }
.contact-card p, .contact-card a { font-size: 0.97rem; color: var(--text-muted); }
.contact-link { font-size: 1.2rem; font-weight: 800; color: var(--green) !important; }

/* ═══ FOOTER ═══ */
.footer { background: var(--green-dark); color: rgba(255,255,255,0.8); padding: 36px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer-logo { display: flex; align-items: center; gap: 10px; color: var(--gold); font-family: 'Almarai', sans-serif; font-weight: 700; font-size: 1.1rem; }
.footer-logo-img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; }
.footer-copy { font-size: 0.9rem; opacity: 0.75; }
.admin-link { font-size: 0.82rem; opacity: 0.5; color: var(--gold); transition: opacity 0.2s; }
.admin-link:hover { opacity: 1; }

/* ═══ NOTIFICATION ═══ */
.notification {
  position: fixed; top: 24px; left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: var(--green); color: white;
  padding: 13px 30px; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg); font-weight: 700;
  z-index: 3000; opacity: 0; pointer-events: none;
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1); font-size: 0.97rem;
}
.notification.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.notification.hidden { display: none; }

/* Scroll to top */
.scroll-top {
  position: fixed; bottom: 28px; left: 28px;
  width: 46px; height: 46px; background: var(--green);
  color: white; border: none; border-radius: 50%; font-size: 1.2rem;
  cursor: pointer; box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transition: all 0.3s; z-index: 500;
}
.scroll-top.visible { opacity: 1; pointer-events: all; }
.scroll-top:hover { background: var(--green-dark); transform: translateY(-3px); }

/* ═══════════════════════════════════════════
   MODALS
═══════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }

.modal {
  background: white; border-radius: 24px;
  padding: 36px; position: relative;
  width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
  animation: modalIn 0.3s cubic-bezier(0.34,1.4,0.64,1);
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
}
.modal-wide { max-width: 720px; }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute; top: 16px; left: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--cream); border: 1px solid var(--border);
  font-size: 1rem; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: all 0.2s; color: var(--text);
}
.modal-close:hover { background: #fee2e2; border-color: #fca5a5; color: #c62828; }

.modal-header {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; margin-bottom: 28px; text-align: center;
}
.modal-header img { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--gold); }
.modal-header h2 { font-family: 'Almarai', sans-serif; color: var(--green-dark); font-size: 1.5rem; }

.modal-title {
  font-family: 'Almarai', sans-serif; color: var(--green-dark);
  font-size: 1.4rem; margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.modal-switch { text-align: center; margin-top: 20px; color: var(--text-muted); font-size: 0.95rem; }
.modal-switch a { color: var(--green); font-weight: 700; cursor: pointer; }
.modal-switch a:hover { text-decoration: underline; }

.form-error {
  background: #fee2e2; border: 1px solid #fca5a5; color: #c62828;
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-size: 0.9rem; margin-bottom: 16px;
}
.form-error.hidden { display: none; }

/* ═══ ORDER HISTORY ═══ */
.history-content { display: flex; flex-direction: column; gap: 16px; }
.history-empty { text-align: center; padding: 40px; color: var(--text-muted); }
.history-empty span { font-size: 3rem; display: block; margin-bottom: 12px; }

.order-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: all 0.2s;
}
.order-card:hover { box-shadow: var(--shadow-sm); }

.order-card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; background: var(--cream);
  border-bottom: 1px solid var(--border);
}
.order-id { font-weight: 700; color: var(--green-dark); font-size: 0.92rem; }
.order-date { font-size: 0.82rem; color: var(--text-muted); }

.order-card-body { padding: 14px 18px; }
.order-items-summary { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 10px; }
.order-total-line { font-weight: 700; color: var(--green-dark); }

.order-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px; border-top: 1px solid var(--border);
  background: var(--cream);
}
.order-footer .btn { padding: 8px 18px; font-size: 0.88rem; }

/* Status Badge */
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: var(--radius-pill);
  font-size: 0.82rem; font-weight: 700;
}
.status-pending   { background: #fef3c7; color: #92400e; }
.status-confirmed { background: #dbeafe; color: #1e40af; }
.status-preparing { background: #ede9fe; color: #5b21b6; }
.status-shipped   { background: #d1fae5; color: #065f46; }
.status-delivered { background: #dcfce7; color: #14532d; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

/* ═══ TRACKING ═══ */
.tracking-info { margin-bottom: 28px; }
.tracking-info h3 { font-family: 'Almarai', sans-serif; color: var(--green-dark); margin-bottom: 6px; }
.tracking-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.tracking-meta-item { background: var(--cream); border-radius: var(--radius-sm); padding: 12px; border: 1px solid var(--border); }
.tracking-meta-item label { font-size: 0.82rem; color: var(--text-muted); display: block; margin-bottom: 4px; }
.tracking-meta-item span { font-weight: 700; color: var(--green-dark); font-size: 0.95rem; }

.tracking-steps { display: flex; flex-direction: column; gap: 0; }
.tracking-step {
  display: flex; gap: 16px; align-items: flex-start;
  padding-bottom: 24px; position: relative;
}
.tracking-step:last-child { padding-bottom: 0; }
.tracking-step-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0; border: 3px solid var(--border);
  background: white; position: relative; z-index: 1;
}
.tracking-step.done .tracking-step-icon { background: var(--green); border-color: var(--green); }
.tracking-step.active .tracking-step-icon { background: var(--gold); border-color: var(--gold); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(244,197,66,0.4); } 50% { box-shadow: 0 0 0 10px rgba(244,197,66,0); } }
.tracking-step:not(:last-child)::before {
  content: '';
  position: absolute; top: 40px; right: 19px;
  width: 2px; height: calc(100% - 16px);
  background: var(--border);
}
.tracking-step.done:not(:last-child)::before { background: var(--green); }
.tracking-step-content { padding-top: 8px; }
.tracking-step-content h4 { font-family: 'Almarai', sans-serif; color: var(--green-dark); font-size: 1rem; }
.tracking-step-content p { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }
.tracking-step.pending .tracking-step-content h4 { color: var(--text-muted); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 920px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 80px; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-img-wrapper { max-width: 420px; margin-inline: auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 72px; right: 0; left: 0;
    background: var(--green-dark); padding: 16px 24px;
    gap: 4px; box-shadow: 0 8px 24px rgba(0,0,0,0.2); z-index: 100;
  }
  .top-bar { position: relative; }
  .burger { display: flex; }
  .auth-nav { gap: 6px; }
  .btn-auth { padding: 6px 10px; font-size: 0.8rem; }
  .btn-orders span { display: none; }
  
  /* Tooltip mobile adjustments */
  .register-tooltip {
    font-size: 0.75rem;
    padding: 5px 10px;
    white-space: normal;
    max-width: 120px;
    text-align: center;
    line-height: 1.3;
  }
  
  .about-highlight { position: static; }
  .contact-info { padding-top: 0; }
  .form-row { grid-template-columns: 1fr; }
  .cart-actions { flex-direction: column; }
  .cart-actions .btn-primary { min-width: unset; }
  .tracking-meta { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding-block: 50px; }
  .hero { padding: 48px 0 70px; }
  .products-grid { grid-template-columns: 1fr; }
  .modal { padding: 24px 18px; }
  .install-banner { flex-direction: column; gap: 10px; text-align: center; }
}
