:root {
  --primary: #3d7eea;
  --primary-dark: #2563eb;
  --primary-light: #dbeafe;
  --secondary: #f97316;
  --secondary-dark: #ea6c00;
  --dark: #1a1a2e;
  --gray: #6b7280;
  --light-gray: #f3f4f6;
  --white: #ffffff;
  --success: #10b981;
  --error: #ef4444;
  --border: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.08);
  --shadow-md: 0 10px 25px -5px rgba(0,0,0,0.12);
  --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.2);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: #f5f7ff; color: var(--dark); line-height: 1.6; overflow-x: hidden; max-width: 100vw; }
a { text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ─── NAVBAR ─── */
.navbar {
  background: var(--white);
  position: sticky; top: 0; z-index: 900;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.nav-container {
  max-width: 1280px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; gap: 16px;
}
.nav-logo img { height: 44px; transition: var(--transition); }
.nav-logo:hover img { transform: scale(1.04); }
.nav-search {
  flex: 1; max-width: 560px;
  display: flex;
}
.nav-search input {
  flex: 1; padding: 10px 18px;
  border: 2px solid var(--border); border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 14px; outline: none; transition: var(--transition);
  background: var(--light-gray);
}
.nav-search input:focus { border-color: var(--primary); background: white; }
.nav-search button {
  padding: 10px 18px;
  background: var(--primary); color: white;
  border: none; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 16px; transition: var(--transition);
}
.nav-search button:hover { background: var(--primary-dark); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.btn-nav {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; transition: var(--transition);
}
.btn-primary { background: var(--primary); color: white; border: none; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--dark); border: 2px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-secondary { background: var(--secondary); color: white; border: none; }
.btn-secondary:hover { background: var(--secondary-dark); transform: translateY(-1px); }
.cart-btn {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  border: 2px solid var(--border); background: transparent; color: var(--dark);
  transition: var(--transition);
}
.cart-btn:hover { border-color: var(--secondary); color: var(--secondary); }
.cart-count {
  position: absolute; top: -8px; right: -8px;
  background: var(--secondary); color: white;
  font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 10px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
}

/* ─── HERO ─── */
.hero {
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 40%, #24243e 70%, #1a5fb4 100%);
  padding: 90px 24px 80px;
  color: white; text-align: center; position: relative; overflow: hidden;
}
.hero-blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.25; pointer-events: none;
}
.hero-blob-1 { width: 600px; height: 600px; background: var(--primary); top: -200px; left: -100px; }
.hero-blob-2 { width: 400px; height: 400px; background: var(--secondary); bottom: -100px; right: -50px; }
.hero-content { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  padding: 6px 16px; border-radius: 50px; font-size: 13px; font-weight: 500;
  margin-bottom: 28px; backdrop-filter: blur(8px);
}
.badge-dot { width: 8px; height: 8px; background: var(--secondary); border-radius: 50%; animation: blink 1.5s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.hero h1 { font-size: clamp(2.2rem,5vw,3.8rem); font-weight: 900; line-height: 1.1; margin-bottom: 20px; letter-spacing: -1px; }
.hero h1 .brand { color: var(--secondary); }
.hero p { font-size: 1.15rem; opacity: 0.85; margin-bottom: 36px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }
.btn-hero {
  padding: 14px 34px; border-radius: 50px;
  font-size: 1rem; font-weight: 700; transition: var(--transition);
}
.btn-hero-filled { background: var(--secondary); color: white; border: none; box-shadow: 0 8px 24px rgba(249,115,22,0.4); }
.btn-hero-filled:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(249,115,22,0.5); background: var(--secondary-dark); }
.btn-hero-ghost { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.4); }
.btn-hero-ghost:hover { background: rgba(255,255,255,0.08); border-color: white; }
.hero-stats { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { font-size: 2rem; font-weight: 900; color: var(--secondary); letter-spacing: -1px; }
.stat-label { font-size: 12px; opacity: 0.7; text-transform: uppercase; letter-spacing: 1px; font-weight: 500; }

/* ─── SECTION ─── */
.section { max-width: 1280px; margin: 0 auto; padding: 56px 24px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.section-title { font-size: 1.7rem; font-weight: 800; color: var(--dark); }
.section-title span { color: var(--primary); }

/* ─── FILTERS ─── */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-chip {
  padding: 7px 18px; border-radius: 50px;
  border: 2px solid var(--border); background: white;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: var(--transition); color: var(--gray); white-space: nowrap;
}
.filter-chip:hover, .filter-chip.active {
  background: var(--primary); border-color: var(--primary); color: white;
  box-shadow: 0 4px 12px rgba(61,126,234,0.3);
}
.sort-select {
  padding: 9px 14px; border: 2px solid var(--border);
  border-radius: var(--radius); font-size: 13px; font-weight: 500;
  background: white; cursor: pointer; outline: none; color: var(--dark);
  transition: var(--transition);
}
.sort-select:focus { border-color: var(--primary); }

/* ─── PRODUCT GRID ─── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
.product-card {
  background: white; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--border); transition: var(--transition);
  cursor: pointer;
}
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.product-img-wrap { position: relative; overflow: hidden; aspect-ratio: 1; background: #f8f9ff; }
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-img-wrap img { transform: scale(1.05); }
.product-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--secondary); color: white;
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 50px;
}
.product-info { padding: 16px; }
.product-cat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--primary); margin-bottom: 6px; }
.product-name { font-size: 14px; font-weight: 600; color: var(--dark); margin-bottom: 10px; min-height: 2.4em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { font-size: 1.3rem; font-weight: 900; color: var(--primary); margin-bottom: 14px; }
.product-price .rupee { font-size: 14px; font-weight: 600; }
.btn-add-cart {
  width: 100%; padding: 10px;
  background: var(--primary); color: white; border: none;
  border-radius: var(--radius); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: var(--transition);
}
.btn-add-cart:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-add-cart.added { background: var(--success); }

/* ─── LOADING / EMPTY ─── */
.loading-wrap { grid-column: 1/-1; display: flex; justify-content: center; padding: 80px 0; }
.spinner { width: 44px; height: 44px; border: 4px solid var(--primary-light); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { grid-column: 1/-1; text-align: center; padding: 80px 20px; color: var(--gray); }
.empty-icon { font-size: 4rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.2rem; font-weight: 700; color: var(--dark); margin-bottom: 8px; }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65); z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: white; border-radius: var(--radius-lg);
  max-width: 900px; width: 100%; max-height: 90vh; overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.4,0,0.2,1);
  position: relative;
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  background: rgba(0,0,0,0.08); border: none;
  width: 38px; height: 38px; border-radius: 50%;
  font-size: 18px; transition: var(--transition);
}
.modal-close:hover { background: rgba(0,0,0,0.16); }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; }
.modal-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.modal-body { padding: 36px; display: flex; flex-direction: column; }
.modal-cat { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); }
.modal-name { font-size: 1.7rem; font-weight: 900; margin: 10px 0; line-height: 1.2; }
.modal-price { font-size: 2.2rem; font-weight: 900; color: var(--primary); margin: 12px 0; }
.modal-price .rupee { font-size: 16px; }
.modal-desc { color: var(--gray); line-height: 1.8; margin-bottom: 20px; }
.specs-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; color: var(--dark); }
.spec-row { display: flex; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.spec-row:last-child { border: none; }
.spec-key { color: var(--gray); width: 40%; font-weight: 500; }
.spec-val { color: var(--dark); font-weight: 600; }
.modal-stock { font-size: 13px; margin-top: 12px; }
.in-stock { color: var(--success); font-weight: 600; }
.out-stock { color: var(--error); font-weight: 600; }
.btn-modal-cart {
  margin-top: auto; padding: 14px;
  background: var(--secondary); color: white; border: none;
  border-radius: var(--radius); font-size: 1rem; font-weight: 700;
  transition: var(--transition);
}
.btn-modal-cart:hover { background: var(--secondary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(249,115,22,0.4); }

/* ─── TOAST ─── */
.toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 3000;
  background: var(--dark); color: white;
  padding: 14px 22px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-lg); max-width: 320px;
  animation: toastIn 0.35s cubic-bezier(0.4,0,0.2,1);
}
.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
@keyframes toastIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ─── FOOTER ─── */
.footer { background: var(--dark); color: rgba(255,255,255,0.75); padding: 64px 24px 32px; margin-top: 80px; }
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 48px; margin-bottom: 48px; }
.footer-brand-logo { height: 44px; filter: brightness(10) saturate(0); margin-bottom: 20px; }
.footer-brand p { font-size: 14px; line-height: 1.8; color: rgba(255,255,255,0.5); max-width: 280px; }
.footer-title { font-size: 14px; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 18px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: rgba(255,255,255,0.55); font-size: 14px; transition: var(--transition); }
.footer-links a:hover { color: var(--secondary); padding-left: 4px; }
.footer-app { max-width: 190px; }
.footer-qr { display: inline-block; background: white; padding: 8px; border-radius: var(--radius); line-height: 0; transition: var(--transition); }
.footer-qr img { width: 128px; height: 128px; }
.footer-qr:hover { transform: translateY(-3px); box-shadow: 0 12px 24px -8px rgba(0,0,0,0.6); }
.footer-app-note { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,0.5); margin-top: 14px; }
.footer-app-note strong { color: var(--secondary); font-weight: 600; }
.footer-divider { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin-bottom: 28px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: rgba(255,255,255,0.4); }
.footer-bottom a { color: rgba(255,255,255,0.55); }

/* ─── FORMS ─── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--dark); }
.form-input {
  width: 100%; padding: 12px 16px;
  border: 2px solid var(--border); border-radius: var(--radius);
  font-size: 14px; outline: none; transition: var(--transition);
  background: white; color: var(--dark);
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(61,126,234,0.12); }
.form-input.error { border-color: var(--error); }
.form-error { font-size: 12px; color: var(--error); margin-top: 6px; font-weight: 500; }
textarea.form-input { resize: vertical; min-height: 100px; }

/* ─── BREADCRUMB ─── */
.breadcrumb { font-size: 13px; color: var(--gray); padding: 16px 0; }
.breadcrumb a { color: var(--primary); }
.breadcrumb span { margin: 0 8px; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) {
  .nav-container { flex-wrap: wrap; padding: 10px 16px; }
  .nav-search { order: 3; flex: 0 0 100%; max-width: 100%; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-img { border-radius: var(--radius-lg) var(--radius-lg) 0 0; aspect-ratio: 16/9; }
  .hero { padding: 60px 16px; }
  .hero-stats { gap: 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 12px; }
}
@media (max-width: 540px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-info { padding: 10px; }
  .product-price { font-size: 1.1rem; }
  .btn-add-cart { font-size: 11px; padding: 8px 6px; }
  .nav-actions .btn-nav .btn-label { display: none; }
  .toast { bottom: 10px; right: 10px; left: 10px; max-width: unset; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ─── PRODUCT DETAILS PAGE ─── */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  margin-top: 20px;
  align-items: start;
}
.product-detail-gallery {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}
.product-detail-gallery img {
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  border-radius: var(--radius);
}
.product-detail-info {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.product-detail-cat {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
}
.product-detail-name {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--dark);
}
.product-detail-price {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary);
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.product-detail-price .rupee {
  font-size: 18px;
  font-weight: 700;
}
.product-detail-desc {
  color: var(--gray);
  line-height: 1.8;
  font-size: 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.product-detail-stock {
  font-size: 14px;
}
.product-detail-buy {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.qty-selector {
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}
.qty-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 700;
  color: var(--gray);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.qty-btn:hover {
  background: var(--light-gray);
  color: var(--dark);
}
.qty-val-input {
  width: 44px;
  height: 38px;
  border: none;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  outline: none;
  background: transparent;
}
.btn-add-detail-cart {
  flex: 1;
  min-width: 180px;
  padding: 12px 24px;
  background: var(--secondary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}
.btn-add-detail-cart:hover {
  background: var(--secondary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(249,115,22,0.3);
}
.btn-add-detail-cart.added {
  background: var(--success);
}
.btn-buy-now {
  flex: 1;
  min-width: 180px;
  padding: 12px 24px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}
.btn-buy-now:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(61,126,234,0.3);
}
.btn-buy-now:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.product-specs-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-top: 24px;
}
.product-specs-section h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--dark);
}

@media (max-width: 768px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .product-detail-gallery {
    min-height: 300px;
  }
}

