@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary: #1a3a5c;
  --primary-dark: #0f2540;
  --primary-light: #2a5080;
  --accent: #3a9a5c;
  --accent-dark: #2a7a45;
  --accent-light: #4dbf73;
  --gold: #c9a84c;
  --bg: #f8f9fa;
  --bg2: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6c757d;
  --border: #e0e6f0;
  --shadow: 0 8px 30px rgba(26,58,92,0.12);
  --shadow-lg: 0 20px 60px rgba(26,58,92,0.18);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ======================== SCROLLBAR ======================== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

/* ======================== NAV ======================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(26,58,92,0.97);
  backdrop-filter: blur(20px);
  padding: 0 2rem;
  box-shadow: 0 2px 30px rgba(0,0,0,0.3);
  transition: var(--transition);
}
.navbar.scrolled {
  padding: 0 2rem;
  background: rgba(15,37,64,0.99);
}
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.nav-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.1);
}
.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.nav-logo-text .brand { color: #fff; font-weight: 800; font-size: 0.95rem; }
.nav-logo-text .brand-sub { color: var(--accent-light); font-size: 0.7rem; font-weight: 500; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.12);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 50%; right: 50%;
  height: 2px;
  background: var(--accent-light);
  border-radius: 2px;
  animation: expandLine 0.3s forwards;
}
@keyframes expandLine {
  to { left: 10%; right: 10%; }
}

/* Admin link — always-visible icon button next to cart (fixes Edge/mobile visibility) */
.nav-admin-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: rgba(255,255,255,0.75);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.15);
}
.nav-admin-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
}
.nav-admin-label { display: inline; }

.nav-cart-btn {
  position: relative;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.nav-cart-btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.cart-badge {
  position: absolute;
  top: -8px; left: -8px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--primary);
  transition: var(--transition);
}
.cart-badge.hidden { display: none; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile nav — fixed for Edge: use visibility+opacity instead of display:none+transform
   to avoid the known Edge rendering bug where display:none breaks translateY animation */
.mobile-nav {
  position: fixed;
  top: 72px; left: 0; right: 0;
  background: rgba(15,37,64,0.99);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  padding: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  /* Use visibility+opacity+transform instead of display:none for Edge compatibility */
  visibility: hidden;
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.mobile-nav.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-nav a {
  display: block;
  color: rgba(255,255,255,0.9);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
}
.mobile-nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
/* Admin link in mobile nav — highlighted for visibility */
.mobile-admin-link {
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 0.75rem !important;
  color: var(--accent-light) !important;
  font-weight: 700 !important;
}
.mobile-admin-link:hover { color: #fff !important; }

/* Hide admin label text on very small screens to save space */
@media (max-width: 400px) {
  .nav-admin-label { display: none; }
}

/* ======================== HERO ======================== */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #1e4d70 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.06);
  animation: rotateSlow 20s linear infinite;
}
.hero-circle:nth-child(1) { width: 600px; height: 600px; top: -200px; right: -150px; }
.hero-circle:nth-child(2) { width: 400px; height: 400px; top: -100px; right: -50px; animation-duration: 15s; animation-direction: reverse; border-color: rgba(58,154,92,0.1); }
.hero-circle:nth-child(3) { width: 800px; height: 800px; bottom: -300px; left: -250px; animation-duration: 25s; }
.hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}
.hero-glow {
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(58,154,92,0.15) 0%, transparent 70%);
  top: 50%; right: 10%;
  transform: translateY(-50%);
  border-radius: 50%;
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: translateY(-50%) scale(1); opacity: 0.8; } 50% { transform: translateY(-50%) scale(1.1); opacity: 1; } }
@keyframes rotateSlow { to { transform: rotate(360deg); } }

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}
.hero-text { color: #fff; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(58,154,92,0.2);
  border: 1px solid rgba(58,154,92,0.4);
  color: var(--accent-light);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.6s ease forwards;
}
.hero-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1rem;
  animation: fadeInDown 0.6s ease 0.1s forwards;
}
.hero-title .highlight {
  background: linear-gradient(135deg, var(--accent-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 2rem;
  animation: fadeInDown 0.6s ease 0.2s forwards;
}
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
  animation: fadeInDown 0.6s ease 0.3s forwards;
}
.hero-stat { text-align: center; }
.hero-stat-num { font-size: 2rem; font-weight: 900; color: var(--accent-light); line-height: 1; }
.hero-stat-label { font-size: 0.78rem; color: rgba(255,255,255,0.6); margin-top: 0.2rem; }
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInDown 0.6s ease 0.4s forwards;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: fadeInUp 0.8s ease 0.2s forwards;
}
.hero-logo-container {
  position: relative;
  width: 340px; height: 340px;
  display: flex; align-items: center; justify-content: center;
}
.hero-logo-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(58,154,92,0.3);
  animation: rotateSlow 10s linear infinite;
}
.hero-logo-ring:nth-child(1) { width: 100%; height: 100%; }
.hero-logo-ring:nth-child(2) { width: 80%; height: 80%; border-color: rgba(255,255,255,0.1); animation-duration: 7s; animation-direction: reverse; }
.hero-logo-ring:nth-child(3) { width: 60%; height: 60%; border-color: rgba(201,168,76,0.2); animation-duration: 5s; }
.hero-logo-img {
  width: 200px; height: 200px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 10px 40px rgba(58,154,92,0.3));
  animation: float 4s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ======================== BUTTONS ======================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(58,154,92,0.35); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.7); transform: translateY(-2px); }
.btn-dark { background: var(--primary); color: #fff; }
.btn-dark:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-sm { padding: 0.5rem 1.2rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.05rem; }
.btn-cart { background: var(--accent); color: #fff; width: 100%; justify-content: center; }
.btn-cart:hover { background: var(--accent-dark); transform: translateY(-2px); }

/* ======================== SECTION ======================== */
.section { padding: 6rem 0; }
.section-alt { background: var(--bg2); }
.container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(26,58,92,0.08);
  color: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 1rem;
}
.section-title span { color: var(--accent); }
.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}
.divider {
  width: 80px; height: 4px;
  background: linear-gradient(to left, var(--accent), var(--primary));
  border-radius: 2px;
  margin: 1.5rem auto;
}

/* ======================== CATEGORIES GRID ======================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}
.cat-card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
  color: var(--text);
}
.cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--cat-color, var(--primary)), transparent);
  opacity: 0;
  transition: var(--transition);
}
.cat-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.cat-card:hover::before { opacity: 0.08; }
.cat-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  transition: transform 0.35s ease;
}
.cat-card:hover .cat-icon { transform: scale(1.15) rotate(-5deg); }
.cat-name { font-weight: 700; font-size: 1rem; }
.cat-count { color: var(--text-muted); font-size: 0.82rem; margin-top: 0.3rem; }

/* ======================== PRODUCTS GRID ======================== */
.products-filter {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  align-items: center;
}
.filter-btn {
  padding: 0.45rem 1.1rem;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: var(--bg2);
  color: var(--text-muted);
  font-family: 'Cairo', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn.active, .filter-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.search-bar {
  position: relative;
  margin-right: auto;
}
.search-bar input {
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
  width: 260px;
  background: var(--bg2);
  transition: var(--transition);
  direction: rtl;
}
.search-bar input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,58,92,0.1); }
.search-bar .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(26,58,92,0.15);
}
.product-img-wrap {
  position: relative;
  background: linear-gradient(135deg, #f0f4ff, #fff);
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%; height: 100%;
  gap: 0.5rem;
}
.product-img-placeholder .brand-initials {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
}
.product-img-placeholder .product-brand-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}
.product-card:hover .product-img { transform: scale(1.05); }
.product-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
}
.product-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,58,92,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}
.product-card:hover .product-overlay { opacity: 1; }

.product-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-brand {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}
.product-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.product-barcode {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: monospace;
  margin-bottom: 0.75rem;
}
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.product-price {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--primary);
}
.product-price .currency { font-size: 0.75rem; margin-right: 2px; }
.add-to-cart-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.add-to-cart-btn:hover { background: var(--accent); transform: scale(1.1); }

/* ======================== CART SIDEBAR ======================== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: min(420px, 100vw);
  height: 100vh;
  background: var(--bg2);
  z-index: 1999;
  box-shadow: 4px 0 40px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-sidebar.open { transform: translateX(0); }
.cart-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary);
  color: #fff;
}
.cart-header h3 { font-size: 1.1rem; font-weight: 700; }
.cart-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.cart-close:hover { background: rgba(255,255,255,0.25); }
.cart-body { flex: 1; overflow-y: auto; padding: 1rem; }
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-muted);
  text-align: center;
  gap: 0.5rem;
}
.cart-empty-icon { font-size: 3rem; }
.cart-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
  background: var(--bg);
  transition: var(--transition);
}
.cart-item:hover { border-color: var(--primary); }
.cart-item-img {
  width: 60px; height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #f0f4ff;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 0.82rem; font-weight: 600; line-height: 1.3; margin-bottom: 0.25rem; }
.cart-item-brand { font-size: 0.7rem; color: var(--accent); font-weight: 600; }
.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.qty-btn {
  background: var(--border);
  border: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.qty-btn:hover { background: var(--primary); color: #fff; }
.qty-display {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 24px;
  text-align: center;
}
.item-price { font-weight: 800; color: var(--primary); font-size: 0.9rem; }
.item-remove {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.25rem;
  transition: var(--transition);
  border-radius: 4px;
}
.item-remove:hover { background: #fef2f2; }
.cart-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  border-top: 2px solid var(--primary);
  margin-bottom: 1rem;
}
.export-btns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
}
.export-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg2);
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  transition: var(--transition);
}
.export-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.export-btn.pdf { border-color: #ef4444; color: #ef4444; }
.export-btn.pdf:hover { background: #fef2f2; }
.export-btn.excel { border-color: #22c55e; color: #22c55e; }
.export-btn.excel:hover { background: #f0fdf4; }
.export-btn.whatsapp { border-color: #25d366; color: #25d366; }
.export-btn.whatsapp:hover { background: #f0fdf4; }
.export-icon { font-size: 1.3rem; }
.clear-btn {
  width: 100%;
  margin-top: 0.5rem;
  background: none;
  border: 1.5px solid #ef4444;
  color: #ef4444;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  font-family: 'Cairo', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.clear-btn:hover { background: #fef2f2; }

/* ======================== ABOUT ======================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-img-wrap {
  position: relative;
}
.about-img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}
.about-badge-float {
  position: absolute;
  bottom: -1.5rem;
  left: -1.5rem;
  background: var(--primary);
  color: #fff;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
}
.about-badge-float .num { font-size: 2rem; font-weight: 900; color: var(--accent-light); }
.about-badge-float .label { font-size: 0.75rem; opacity: 0.8; }
.about-text { }
.about-text h2 { font-size: 2.2rem; font-weight: 900; color: var(--primary); margin-bottom: 1rem; }
.about-text p { color: var(--text-muted); line-height: 1.8; margin-bottom: 1.25rem; }
.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
.about-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.about-feature-icon {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.about-feature-text { font-size: 0.85rem; font-weight: 600; }

/* ======================== SERVICES ======================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.service-card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service-card:hover::after { transform: scaleX(1); }
.service-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}
.service-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; }
.service-desc { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }

/* ======================== STATS BANNER ======================== */
.stats-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 4rem 0;
  color: #fff;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat-item .num {
  font-size: 3rem;
  font-weight: 900;
  color: var(--accent-light);
  line-height: 1;
}
.stat-item .label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.4rem;
}

/* ======================== CONTACT ======================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
}
.contact-info-card {
  background: var(--primary);
  border-radius: var(--radius);
  padding: 2.5rem;
  color: #fff;
}
.contact-info-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.contact-info-sub { color: rgba(255,255,255,0.7); margin-bottom: 2rem; font-size: 0.9rem; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.contact-item-icon {
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.contact-item-text label { display: block; font-size: 0.75rem; color: rgba(255,255,255,0.6); margin-bottom: 0.15rem; }
.contact-item-text span { font-weight: 600; }
.contact-socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
}
.social-link {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1rem;
  transition: var(--transition);
}
.social-link:hover { background: var(--accent); transform: translateY(-3px); }

.contact-form {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
  background: var(--bg);
  transition: var(--transition);
  direction: rtl;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,58,92,0.1);
  background: var(--bg2);
}
textarea.form-control { min-height: 120px; resize: vertical; }

/* ======================== FOOTER ======================== */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand img {
  height: 50px;
  object-fit: contain;
  margin-bottom: 1rem;
}
.footer-brand p { font-size: 0.88rem; line-height: 1.8; color: rgba(255,255,255,0.6); }
.footer-title { color: #fff; font-weight: 700; margin-bottom: 1rem; font-size: 0.95rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--accent-light); padding-right: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

/* ======================== ADMIN ======================== */
.admin-body { background: #f1f5f9; }
.admin-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.admin-sidebar {
  background: var(--primary-dark);
  color: #fff;
  padding: 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-logo { padding: 1rem 0 2rem; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 1.5rem; text-align: center; }
.admin-logo img { height: 50px; object-fit: contain; margin: 0 auto 0.5rem; }
.admin-logo span { display: block; font-size: 0.78rem; color: rgba(255,255,255,0.5); }
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  background: none;
  width: 100%;
  text-align: right;
  font-family: 'Cairo', sans-serif;
}
.admin-nav-item:hover, .admin-nav-item.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.admin-nav-item.active { color: var(--accent-light); }
.admin-main { padding: 2rem; overflow-y: auto; }
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.admin-header h1 { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.admin-stat-card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.admin-stat-icon {
  width: 50px; height: 50px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.admin-stat-info .num { font-size: 1.7rem; font-weight: 900; color: var(--primary); }
.admin-stat-info .label { font-size: 0.8rem; color: var(--text-muted); }
.admin-table-wrap {
  background: var(--bg2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.admin-table-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.admin-table-header h3 { font-weight: 700; }
.admin-search {
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Cairo', sans-serif;
  font-size: 0.88rem;
  direction: rtl;
}
.admin-search:focus { outline: none; border-color: var(--primary); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  background: var(--bg);
  padding: 0.75rem 1rem;
  text-align: right;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}
.admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  vertical-align: middle;
}
.admin-table tr:hover td { background: var(--bg); }
.admin-table .barcode { font-family: monospace; font-size: 0.78rem; color: var(--text-muted); }
.cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(26,58,92,0.08);
  color: var(--primary);
}
.edit-btn, .del-btn {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: 'Cairo', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}
.edit-btn { background: rgba(26,58,92,0.1); color: var(--primary); }
.edit-btn:hover { background: var(--primary); color: #fff; }
.del-btn { background: #fef2f2; color: #ef4444; }
.del-btn:hover { background: #ef4444; color: #fff; }

/* ======================== MODAL ======================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.modal-header h3 { font-size: 1.2rem; font-weight: 800; }
.modal-close {
  background: var(--bg);
  border: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: #fee2e2; color: #ef4444; }

/* ======================== LOGIN ======================== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 2rem;
}
.login-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 3rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.login-card img { height: 70px; object-fit: contain; margin: 0 auto 1.5rem; }
.login-card h2 { font-size: 1.4rem; font-weight: 800; color: var(--primary); margin-bottom: 0.25rem; }
.login-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.login-error {
  background: #fef2f2;
  color: #dc2626;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-top: 1rem;
  display: none;
}

/* ======================== TOAST ======================== */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.toast {
  background: var(--primary);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 260px;
  animation: slideInToast 0.3s ease;
  border-right: 4px solid var(--accent);
}
.toast.success { border-right-color: #22c55e; }
.toast.error { border-right-color: #ef4444; }
@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ======================== PAGE HEADER ======================== */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}
.page-hero-content { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 900; margin-bottom: 0.5rem; }
.page-hero p { color: rgba(255,255,255,0.75); font-size: 1.05rem; }
.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}
.breadcrumb a { color: var(--accent-light); }

/* ======================== ANIMATIONS ======================== */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.anim-fade-up {
  will-change: transform, opacity; opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.anim-fade-up.visible { opacity: 1; transform: translateY(0); }
.anim-fade-in { opacity: 0; transition: opacity 0.6s ease; }
.anim-fade-in.visible { opacity: 1; }
/* Fallback: if JS animations fail, show content after delay */
@supports not (animation-timeline: scroll()) {
  .anim-fade-up, .anim-fade-in { animation: fallbackShow 0.1s ease 1.5s forwards; }
}
@keyframes fallbackShow { to { opacity: 1; transform: translateY(0); } }
.delay-1 { transition-delay: 0.1s !important; }
.delay-2 { transition-delay: 0.2s !important; }
.delay-3 { transition-delay: 0.3s !important; }
.delay-4 { transition-delay: 0.4s !important; }

/* ======================== RESPONSIVE ======================== */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-stats { justify-content: center; }
  .hero-actions { justify-content: center; }
  .hero-visual { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
  .admin-stats-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-content { padding: 5rem 1.5rem 3rem; }
  .section { padding: 4rem 0; }
  .about-features { grid-template-columns: 1fr; }
  .admin-stats-row { grid-template-columns: 1fr 1fr; }
  .products-filter { flex-direction: column; align-items: flex-start; }
  .search-bar { width: 100%; }
  .search-bar input { width: 100%; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: 1fr 1fr; }
  .export-btns { grid-template-columns: 1fr 1fr; }
  .admin-stats-row { grid-template-columns: 1fr; }
}

/* ======================== UTILITIES ======================== */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-full { width: 100%; }
.no-results {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
}
.no-results-icon { font-size: 3rem; margin-bottom: 1rem; }

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


/* ======================== ANIMATION SAFETY FALLBACK ======================== */
/* Ensures content is never permanently invisible if animations fail */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .anim-fade-up, .anim-fade-in { opacity: 1 !important; transform: none !important; }
}
/* Safety: all hero animated elements must always be visible */
.hero-badge, .hero-title, .hero-subtitle, .hero-stats, .hero-actions, .hero-visual {
  animation-fill-mode: both;
}
/* Force content visible after 2s via animation fallback */
.hero-badge, .hero-title, .hero-subtitle, .hero-stats, .hero-actions {
  min-height: 0;
}

/* Hero elements - always visible (animation enhances, not requires) */
.hero-badge, .hero-title, .hero-subtitle, .hero-stats, .hero-actions, .hero-visual,
.hero-title .highlight { opacity: 1; }
.hero-badge { animation-fill-mode: both; }

/* ================================================================
   ✨ VISUAL EFFECTS ENHANCEMENT — v4
   ================================================================ */

/* --- Shimmer loading skeleton --- */
@keyframes shimmer {
  0%   { background-position: -800px 0; }
  100% { background-position:  800px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}

/* --- Enhanced product card --- */
.product-card {
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.product-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(26,58,92,0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.product-card:hover {
  transform: translateY(-10px) scale(1.01);
  box-shadow: 0 20px 60px rgba(26,58,92,0.15), 0 6px 20px rgba(26,58,92,0.1);
  border-color: rgba(26,58,92,0.2);
}
.product-card:hover::after { opacity: 1; }

/* Glow ring on image wrap hover */
.product-img-wrap::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--primary), var(--gold, #c9a84c));
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: -1;
}
.product-card:hover .product-img-wrap::after { opacity: 0.18; }

/* Add-to-cart button pulse */
.add-to-cart-btn {
  box-shadow: 0 2px 8px rgba(26,58,92,0.25);
  position: relative;
  overflow: hidden;
}
.add-to-cart-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  transition: transform 0.35s ease;
}
.add-to-cart-btn:hover::before { transform: scale(2.5); opacity: 0; }
.add-to-cart-btn:hover { transform: scale(1.15) rotate(15deg); background: var(--accent); box-shadow: 0 4px 16px rgba(58,154,92,0.4); }

/* --- Enhanced category cards --- */
.cat-card {
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.cat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cat-color, var(--primary)), var(--accent));
  transform: scaleX(0);
  transition: transform 0.35s ease;
  transform-origin: right;
}
.cat-card:hover { transform: translateY(-10px) scale(1.02); }
.cat-card:hover::after { transform: scaleX(1); transform-origin: left; }
.cat-icon-img {
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  margin-bottom: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.cat-card:hover .cat-icon-img { transform: scale(1.2) rotate(-8deg); }

/* --- Glowing buttons --- */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transform: translate(-50%,-50%);
  transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
}
.btn-primary:hover::before { width: 300px; height: 300px; opacity: 0; }
.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(26,58,92,0.35);
  transform: translateY(-2px);
}

/* --- Section header animated underline --- */
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: 2px;
  margin: 0.75rem auto 0;
  animation: expandLine 0.8s ease forwards;
  transform-origin: center;
}
@keyframes expandLine {
  from { width: 0; opacity: 0; }
  to   { width: 60px; opacity: 1; }
}

/* --- Floating dots background on sections --- */
.section:nth-child(even)::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(26,58,92,0.04) 1.5px, transparent 1.5px);
  background-size: 32px 32px;
  pointer-events: none;
}
.section { position: relative; }

/* --- Hero badge pulse glow --- */
.hero-badge {
  animation: fadeInDown 0.6s ease forwards, badgePulse 3s ease-in-out 1s infinite;
}
@keyframes badgePulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(58,154,92,0); }
  50%      { box-shadow: 0 0 0 8px rgba(58,154,92,0.12); }
}

/* --- Hero stat numbers shimmer text --- */
.hero-stat-num {
  background: linear-gradient(90deg, var(--accent-light), #fff, var(--accent-light));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textShimmer 3s linear 1s infinite;
}
@keyframes textShimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* --- Filter buttons --- */
.filter-btn {
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.filter-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(26,58,92,0.15); }
.filter-btn.active { box-shadow: 0 4px 16px rgba(26,58,92,0.25); }

/* --- Product price highlight --- */
.product-price {
  background: linear-gradient(135deg, var(--primary), #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.2rem;
}

/* --- Scroll reveal animation --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-fade-up {
  opacity: 0;
  animation: fadeInUp 0.55s ease forwards;
}
.anim-fade-up.visible { opacity: 1; }

/* --- Service cards enhanced --- */
.service-card {
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.35s ease;
}
.service-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 50px rgba(26,58,92,0.12);
}

/* --- Stats grid numbers glow --- */
.stat-num {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Footer link hover --- */
.footer a {
  position: relative;
}
.footer a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.footer a:hover::after { transform: scaleX(1); }

/* --- Nav link hover underline --- */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform 0.28s ease;
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

/* --- Input focus glow --- */
.form-control:focus {
  box-shadow: 0 0 0 3px rgba(58,154,92,0.15), 0 0 0 1px var(--accent);
  border-color: var(--accent);
  outline: none;
}

/* --- Card entrance animation delays --- */
.product-card:nth-child(1)  { animation-delay: 0.05s; }
.product-card:nth-child(2)  { animation-delay: 0.10s; }
.product-card:nth-child(3)  { animation-delay: 0.15s; }
.product-card:nth-child(4)  { animation-delay: 0.20s; }
.product-card:nth-child(5)  { animation-delay: 0.25s; }
.product-card:nth-child(6)  { animation-delay: 0.30s; }
.product-card:nth-child(7)  { animation-delay: 0.35s; }
.product-card:nth-child(8)  { animation-delay: 0.40s; }
.cat-card:nth-child(1) { animation-delay: 0.05s; }
.cat-card:nth-child(2) { animation-delay: 0.10s; }
.cat-card:nth-child(3) { animation-delay: 0.15s; }
.cat-card:nth-child(4) { animation-delay: 0.20s; }
.cat-card:nth-child(5) { animation-delay: 0.25s; }
.cat-card:nth-child(6) { animation-delay: 0.30s; }
.cat-card:nth-child(7) { animation-delay: 0.35s; }
.cat-card:nth-child(8) { animation-delay: 0.40s; }

/* --- Scrollbar styling --- */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* --- Selection color --- */
::selection { background: rgba(58,154,92,0.25); color: var(--primary-dark); }

/* --- Page transition --- */
body { animation: pageLoad 0.4s ease forwards; }
@keyframes pageLoad { from { opacity: 0.7; } to { opacity: 1; } }

.toast.warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }

/* Cross-browser tap delay fix — removes 300ms delay on all buttons/links */
button, a, input, select, textarea {
  touch-action: manipulation;
}

@media print {
  .navbar, .mobile-nav, .cart-sidebar, .cart-overlay, #cartSidebar, #cartOverlay,
  .nav-cart-btn, .add-to-cart-btn, .product-overlay { display: none !important; }
  body { background: #fff; color: #000; }
  .product-card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
}
