* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Tajawal", sans-serif;
}

:root {
  --primary: #6366f1;
  --secondary: #8b5cf6;
  --dark: #0f172a;
  --light: #f8fafc;
  --bg-color: #f8fafc;
  --bg-gradient: linear-gradient(-45deg, #f1f5f9, #e2e8f0, #dee2e6, #f8fafc);
  --text-color: #1e293b;
  --card-bg: rgba(255, 255, 255, 0.7);
  --navbar-bg: rgba(255, 255, 255, 0.85);
  --hero-bg: rgba(255, 255, 255, 0.4);
  --border-color: rgba(0, 0, 0, 0.1);
  --blob-1-bg: radial-gradient(circle, #818cf8, transparent 70%);
  --blob-2-bg: radial-gradient(circle, #a78bfa, transparent 70%);
  --blob-3-bg: radial-gradient(circle, #f472b6, transparent 60%);
  --blob-4-bg: radial-gradient(circle, #60a5fa, transparent 70%);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --price-color: #d97706;
}

[data-theme="dark"] {
  --bg-color: #0f172a;
  --bg-gradient: linear-gradient(-45deg, #0f172a, #1e293b, #312e81, #1e1b4b);
  --text-color: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.06);
  --navbar-bg: rgba(15, 23, 42, 0.85);
  --hero-bg: rgba(255, 255, 255, 0.03);
  --border-color: rgba(255, 255, 255, 0.1);
  --blob-1-bg: radial-gradient(circle, #6366f1, transparent 70%);
  --blob-2-bg: radial-gradient(circle, #8b5cf6, transparent 70%);
  --blob-3-bg: radial-gradient(circle, #ec4899, transparent 60%);
  --blob-4-bg: radial-gradient(circle, #3b82f6, transparent 70%);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  --price-color: #facc15;
}

/* ===================== BASE ===================== */
body {
  background: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  transition: background 0.4s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* ===================== MESH BG — performance optimized ===================== */
.mesh-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--bg-color);
  overflow: hidden;
  transition: background-color 0.4s ease;
  will-change: auto;
}

.color-blob {
  position: absolute;
  filter: blur(80px);
  border-radius: 50%;
  opacity: 0.5;
  will-change: transform;
}

/* Only animate blobs on non-mobile for perf */
@media (min-width: 769px) {
  .color-blob { animation: float 25s infinite alternate ease-in-out; }
  .blob-1 { animation-duration: 28s; }
  .blob-2 { animation-duration: 22s; animation-direction: alternate-reverse; }
  .blob-3 { animation-duration: 32s; }
  .blob-4 { animation-duration: 24s; }
}

.blob-1 { width: 500px; height: 500px; background: var(--blob-1-bg); top: -150px; left: -150px; }
.blob-2 { width: 400px; height: 400px; background: var(--blob-2-bg); bottom: -100px; right: -80px; }
.blob-3 { width: 600px; height: 600px; background: var(--blob-3-bg); top: 40%; left: 30%; opacity: 0.3; }
.blob-4 { width: 350px; height: 350px; background: var(--blob-4-bg); bottom: 10%; left: 5%; }

@keyframes float {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(60px, -80px) scale(1.05); }
  66%  { transform: translate(-60px, 80px) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}

/* ===================== NAVBAR ===================== */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 1200px;
  height: 65px;
  background: var(--navbar-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  z-index: 2000;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transition: all 0.4s ease;
  gap: 15px;
}

.navbar.scrolled {
  top: 8px;
  height: 58px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: 0.3s;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo:hover { transform: scale(1.04); }

/* Desktop nav */
.navbar nav {
  display: flex;
  gap: 5px;
  align-items: center;
}

.navbar nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 10px;
  transition: 0.3s;
  white-space: nowrap;
}

.navbar nav a:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

.navbar nav a.active {
  background: var(--primary);
  color: white;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#searchInput {
  padding: 9px 14px;
  border-radius: 25px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-color);
  width: 130px;
  font-size: 13px;
  outline: none;
  transition: 0.4s ease;
  font-family: "Tajawal", sans-serif;
}

#searchInput:focus {
  width: 200px;
  border-color: var(--primary);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.2);
}

.theme-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.theme-btn:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

.badge {
  position: absolute;
  top: -5px;
  left: -3px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  min-width: 17px;
  height: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: bold;
  pointer-events: none;
}

/* Hamburger - hidden on desktop */
.hamburger {
  display: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-color);
  padding: 5px;
  flex-shrink: 0;
}

/* ===== MOBILE NAVBAR ===== */
@media (max-width: 900px) {
  .navbar {
    padding: 0 16px;
    height: 60px;
    gap: 10px;
  }

  /* Hide desktop nav links */
  .navbar nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    padding: 15px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    z-index: 999;
    gap: 5px;
  }

  .navbar nav.open {
    display: flex;
  }

  .navbar nav a {
    padding: 12px 16px;
    font-size: 15px;
    text-align: right;
    border-radius: 10px;
  }

  .hamburger {
    display: block;
    order: -1;
  }

  /* Hide search on tablet, show icon only */
  #searchInput {
    display: none;
  }
}

@media (max-width: 480px) {
  .navbar {
    top: 12px;
    width: 95%;
    padding: 0 14px;
    height: 56px;
  }

  .logo {
    font-size: 17px;
  }

  .logo span {
    display: none; /* Show only icon on very small screens */
  }

  .theme-btn {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 30px 100px;
  margin: 100px auto 40px;
  max-width: 1200px;
  border-radius: 28px;
  background: var(--hero-bg);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  overflow: hidden;
  width: 92%;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}

.hero::before {
  top: -80px; left: -80px;
  width: 280px; height: 280px;
  background: rgba(99, 102, 241, 0.5);
  animation: floatOrb 10s infinite alternate ease-in-out;
}

.hero::after {
  bottom: -100px; right: -40px;
  width: 240px; height: 240px;
  background: rgba(139, 92, 246, 0.4);
  animation: floatOrb 14s infinite alternate-reverse ease-in-out;
}

@keyframes floatOrb {
  0%   { transform: translateY(0) scale(1); }
  100% { transform: translateY(40px) scale(1.08); }
}

.hero > div {
  position: relative;
  z-index: 1;
  max-width: 750px;
  width: 100%;
}

.hero h1 {
  font-size: clamp(32px, 6vw, 62px);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 20px;
  color: var(--text-color);
}

.hero h1 .moving-text {
  background: linear-gradient(90deg, #38bdf8, #a78bfa, #f8fafc, #a78bfa, #38bdf8);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmerText 3s linear infinite;
  display: inline-block;
}

@keyframes shimmerText {
  to { background-position: 200% center; }
}

.hero p {
  font-size: clamp(15px, 2.5vw, 19px);
  color: var(--text-color);
  opacity: 0.75;
  margin-bottom: 35px;
  line-height: 1.7;
}

.btn {
  display: inline-block;
  padding: 14px 40px;
  border-radius: 50px;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  color: white;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: 0.4s ease;
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.35);
  font-family: "Tajawal", sans-serif;
}

.btn:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 14px 30px rgba(99, 102, 241, 0.5);
}

/* ===================== PRODUCTS ===================== */
.products-section {
  padding: 60px 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.products-section h2 {
  text-align: center;
  font-size: clamp(24px, 4vw, 32px);
  margin-bottom: 30px;
  font-weight: 800;
}

/* Category chips */
.category-filters {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  padding: 0 10px;
}

.category-chip {
  padding: 9px 18px;
  border-radius: 25px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-color);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: 0.25s;
  backdrop-filter: blur(8px);
  font-family: "Tajawal", sans-serif;
  white-space: nowrap;
}

.category-chip.active,
.category-chip:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(99, 102, 241, 0.3);
}

/* Product Grid — fully responsive */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 360px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Product Card */
.product-card {
  position: relative;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border-radius: 18px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  box-shadow: var(--shadow);
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

@media (max-width: 600px) {
  .product-card img {
    height: 160px;
  }
}

.product-card:hover img {
  transform: scale(1.06);
}

.product-card h3 {
  padding: 12px 14px 6px;
  font-size: clamp(13px, 2vw, 15px);
  line-height: 1.4;
  font-weight: 700;
}

.product-card p {
  padding: 0 14px;
  font-size: 13px;
  opacity: 0.7;
  line-height: 1.5;
}

.price {
  padding: 10px 14px;
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 800;
  color: var(--price-color);
}

.product-card > button:last-child {
  display: block;
  width: calc(100% - 28px);
  margin: 0 14px 14px;
  padding: 11px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  color: white;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: 0.25s;
  font-family: "Tajawal", sans-serif;
}

.product-card > button:last-child:hover {
  transform: scale(1.03);
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

/* Rating */
.rating {
  display: flex;
  gap: 2px;
  font-size: 12px;
  padding: 6px 14px 0;
  align-items: center;
  flex-wrap: wrap;
}

.rating span {
  font-size: 12px;
  opacity: 0.7;
  margin-right: 4px;
}

/* Wishlist btn */
.wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: 0.3s;
  backdrop-filter: blur(8px);
  font-size: 14px;
}

.wishlist-btn:hover {
  color: #f43f5e;
  border-color: #f43f5e;
  transform: scale(1.1);
}

.wishlist-btn.active {
  background: #f43f5e;
  color: white;
  border-color: #f43f5e;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.4);
}

/* ===================== QUICK VIEW MODAL ===================== */
.modal {
  display: none;
  position: fixed;
  z-index: 3000;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.modal-content {
  background: var(--bg-color);
  color: var(--text-color);
  width: 100%;
  max-width: 880px;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  max-height: 90vh;
  overflow-y: auto;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 26px;
  cursor: pointer;
  z-index: 10;
  color: var(--text-color);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border-radius: 50%;
  transition: 0.3s;
  border: 1px solid var(--border-color);
  line-height: 1;
}

.close-modal:hover {
  background: #f43f5e;
  color: white;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
}

.modal-info {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-info h2 {
  font-size: clamp(20px, 3vw, 28px);
  margin-bottom: 10px;
  font-weight: 800;
}

/* Modal responsive */
@media (max-width: 680px) {
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    max-height: 92vh;
    border-radius: 20px;
  }

  .carousel-container {
    height: 240px;
  }

  .modal-info {
    padding: 20px;
  }

  .modal-info h2 {
    font-size: 18px;
  }
}

/* Carousel */
.carousel-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  min-height: 300px;
}

.carousel-slides {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.carousel-img {
  min-width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.carousel-prev:hover,
.carousel-next:hover { background: var(--primary); }

.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

/* ===================== CART PANEL ===================== */
.cart-panel {
  position: fixed;
  top: 0;
  right: -110%;
  width: 420px;
  max-width: 100%;
  height: 100vh;
  background: var(--bg-color);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  z-index: 5000;
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .cart-panel { background: rgba(248, 250, 252, 0.97); }
[data-theme="dark"]  .cart-panel { background: rgba(15, 23, 42, 0.97); }

.cart-panel.open { right: 0; }

@media (max-width: 480px) {
  .cart-panel { width: 100%; }
}

.cart-header {
  padding: 24px 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.cart-header h3 {
  font-size: 20px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary);
}

.cart-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  overscroll-behavior: contain;
}

.cart-content::-webkit-scrollbar { width: 4px; }
.cart-content::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--card-bg);
  border-radius: 20px;
  margin-bottom: 14px;
  border: 1px solid var(--border-color);
  transition: 0.3s;
  animation: itemEntrance 0.5s ease forwards;
  opacity: 0;
}

.cart-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.cart-item-info { flex: 1; }

.cart-item-info h4 {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.4;
}

@keyframes itemEntrance {
  from { opacity: 0; transform: translateX(30px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

.cart-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cart-controls button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: 0.2s;
}

.cart-controls button:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.checkout-area {
  padding: 20px 24px 28px;
  border-top: 1px solid var(--border-color);
  background: rgba(99, 102, 241, 0.03);
}

.cart-summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
}

.cart-grand-total {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 20px;
}

.checkout-btn {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  color: white;
  font-weight: 900;
  font-size: 16px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: 0.3s;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
  font-family: "Tajawal", sans-serif;
}

.checkout-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.5);
}

.empty-state {
  text-align: center;
  padding: 80px 24px;
}

.empty-state i {
  font-size: 70px;
  margin-bottom: 20px;
  display: block;
  background: linear-gradient(var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===================== OVERLAY ===================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  z-index: 3500;
  pointer-events: none;
  transition: all 0.5s ease;
}

.overlay.active {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

/* ===================== TOAST ===================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 480px) {
  .toast-container {
    left: 12px;
    right: 12px;
    bottom: 16px;
  }
}

.toast {
  background: var(--card-bg);
  color: var(--text-color);
  padding: 14px 20px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-right: 4px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInToast 0.4s ease forwards;
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 600;
  max-width: 320px;
}

@keyframes slideInToast {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ===================== NEWSLETTER ===================== */
.newsletter {
  padding: 80px 5%;
  margin-top: 40px;
}

.newsletter-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  padding: 50px 40px;
  border-radius: 32px;
  text-align: center;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.newsletter-card h2 {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  margin-bottom: 12px;
}

.newsletter-card p {
  opacity: 0.7;
  font-size: 15px;
  line-height: 1.6;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 28px auto 0;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 25px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-color);
  outline: none;
  font-size: 14px;
  font-family: "Tajawal", sans-serif;
  transition: 0.3s;
}

.newsletter-form input:focus {
  border-color: var(--primary);
}

.newsletter-form button {
  padding: 14px 28px;
  border-radius: 25px;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .newsletter-form { flex-direction: column; }
  .newsletter-card { padding: 36px 24px; }
}

/* ===================== FOOTER ===================== */
.main-footer {
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  padding: 70px 5% 30px;
  margin-top: 80px;
  border-top: 1px solid var(--border-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 50px;
}

.footer-col h4 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--primary);
  font-weight: 800;
}

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 10px; }

.footer-col ul li a {
  color: var(--text-color);
  text-decoration: none;
  opacity: 0.65;
  transition: 0.25s;
  font-size: 14px;
}

.footer-col ul li a:hover {
  opacity: 1;
  color: var(--primary);
  padding-right: 4px;
}

.footer-bottom {
  text-align: center;
  padding-top: 25px;
  border-top: 1px solid var(--border-color);
  opacity: 0.55;
  font-size: 13px;
}

/* ===================== SCROLL REVEAL ===================== */
/* Default: visible — JS will add the animation class if supported */
.reveal {
  opacity: 1;
  transform: none;
}

/* Only hide if JS has initialised reveal system */
.js-reveal-ready .reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js-reveal-ready .reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== FLY TO CART ===================== */
.fly-item {
  position: fixed;
  z-index: 9999;
  width: 45px;
  height: 45px;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
  transition: all 0.75s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid var(--primary);
}

/* ===================== PRODUCTS SECTION PADDING FIX ===================== */
@media (max-width: 768px) {
  .products-section { padding: 40px 4%; }
  .category-filters { gap: 6px; }
  .category-chip { padding: 8px 14px; font-size: 13px; }

  .hero {
    margin-top: 85px;
    padding: 80px 20px 70px;
    border-radius: 20px;
    width: 94%;
  }
}

@media (max-width: 480px) {
  .hero {
    margin-top: 78px;
    padding: 70px 16px 60px;
    border-radius: 16px;
  }

  .products-section { padding: 32px 3.5%; }

  .newsletter { padding: 50px 4%; }
  .main-footer { padding: 50px 5% 24px; }
  .footer-grid { gap: 28px; }
}