/* =============================================
   Namma Ooru Store – Enhanced Stylesheet
   Features: Multi-theme, WhatsApp, Mobile-first
   ============================================= */

/* ===== THEME DEFINITIONS ===== */
[data-theme="warm"] {
  --primary: #c8490a;
  --primary-dark: #a33908;
  --primary-rgb: 200,73,10;
  --accent: #f0a500;
  --dark: #1a1208;
  --dark2: #2d2010;
  --mid: #6b5b4e;
  --light: #fdf8f3;
  --lighter: #fff9f4;
  --white: #ffffff;
  --border: #e8ddd4;
  --shadow: 0 4px 24px rgba(26,18,8,.10);
  --shadow-lg: 0 12px 48px rgba(26,18,8,.18);
  --nav-bg: rgba(253,248,243,0.94);
  --card-bg: #ffffff;
}

[data-theme="ocean"] {
  --primary: #0077b6;
  --primary-dark: #005f99;
  --primary-rgb: 0,119,182;
  --accent: #00b4d8;
  --dark: #03045e;
  --dark2: #023e8a;
  --mid: #48788a;
  --light: #f0f8ff;
  --lighter: #e8f4fd;
  --white: #ffffff;
  --border: #cde7f5;
  --shadow: 0 4px 24px rgba(3,4,94,.10);
  --shadow-lg: 0 12px 48px rgba(3,4,94,.18);
  --nav-bg: rgba(240,248,255,0.94);
  --card-bg: #ffffff;
}

[data-theme="forest"] {
  --primary: #2d6a4f;
  --primary-dark: #1b4332;
  --primary-rgb: 45,106,79;
  --accent: #74c69d;
  --dark: #081c15;
  --dark2: #1b4332;
  --mid: #52796f;
  --light: #f0faf5;
  --lighter: #e8f6ef;
  --white: #ffffff;
  --border: #c3e6d5;
  --shadow: 0 4px 24px rgba(8,28,21,.10);
  --shadow-lg: 0 12px 48px rgba(8,28,21,.18);
  --nav-bg: rgba(240,250,245,0.94);
  --card-bg: #ffffff;
}

[data-theme="royal"] {
  --primary: #7b2fbe;
  --primary-dark: #5c2187;
  --primary-rgb: 123,47,190;
  --accent: #e040fb;
  --dark: #1a0533;
  --dark2: #2d0a5a;
  --mid: #7b5ea7;
  --light: #faf5ff;
  --lighter: #f3e8ff;
  --white: #ffffff;
  --border: #e2cffa;
  --shadow: 0 4px 24px rgba(26,5,51,.10);
  --shadow-lg: 0 12px 48px rgba(26,5,51,.18);
  --nav-bg: rgba(250,245,255,0.94);
  --card-bg: #ffffff;
}

[data-theme="dark"] {
  --primary: #ff6b35;
  --primary-dark: #e55a25;
  --primary-rgb: 255,107,53;
  --accent: #ffd166;
  --dark: #f5f5f5;
  --dark2: #e0e0e0;
  --mid: #aaaaaa;
  --light: #1e1e1e;
  --lighter: #252525;
  --white: #2d2d2d;
  --border: #3a3a3a;
  --shadow: 0 4px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 12px 48px rgba(0,0,0,.50);
  --nav-bg: rgba(30,30,30,0.96);
  --card-bg: #2d2d2d;
}

:root {
  --radius: 12px;
  --radius-lg: 20px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}

/* ===== UTILITIES ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.center-btn { text-align: center; margin-top: 48px; }
.full-w { width: 100%; }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all .25s ease;
  letter-spacing: .3px;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(var(--primary-rgb),.35); }

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--dark);
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--dark);
  cursor: pointer;
  transition: all .25s ease;
}
.btn-outline:hover { background: var(--dark); color: var(--light); }

.btn-white {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all .25s ease;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.15); }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: all .3s ease;
}
.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 20px rgba(var(--primary-rgb),.08);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 12px;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--dark);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo span { color: var(--primary); }

.nav-links { display: flex; gap: 28px; flex-shrink: 0; }
.nav-links a {
  color: var(--mid);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 100%;
  height: 2px; background: var(--primary);
  transition: right .25s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.nav-links a:hover, .nav-links a.active { color: var(--dark); }

.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.cart-btn {
  background: var(--primary);
  color: #fff;
  padding: 9px 18px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  display: flex; align-items: center; gap: 6px;
  transition: all .2s;
  white-space: nowrap;
}
.cart-btn:hover { background: var(--primary-dark); }
.cart-btn #cartCount {
  background: #fff;
  color: var(--primary);
  border-radius: 50%;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700;
}

/* ===== THEME TOGGLE BUTTON ===== */
.theme-btn {
  background: var(--lighter);
  border: 1.5px solid var(--border);
  color: var(--dark);
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  flex-shrink: 0;
}
.theme-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: rotate(20deg); }

/* ===== THEME PANEL ===== */
.theme-panel {
  position: fixed;
  top: 78px; right: 20px;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  z-index: 1200;
  box-shadow: var(--shadow-lg);
  width: 220px;
  display: none;
  animation: slideDown .2s ease;
}
.theme-panel.open { display: block; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.theme-panel h4 {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 14px;
}

.theme-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all .2s;
  background: var(--light);
}
.theme-option:hover { border-color: var(--primary); transform: scale(1.05); }
.theme-option.active { border-color: var(--primary); background: var(--lighter); }

.theme-swatch {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.theme-option span { font-size: .75rem; font-weight: 600; color: var(--dark); }

.swatch-warm { background: linear-gradient(135deg, #c8490a, #f0a500); }
.swatch-ocean { background: linear-gradient(135deg, #0077b6, #00b4d8); }
.swatch-forest { background: linear-gradient(135deg, #2d6a4f, #74c69d); }
.swatch-royal { background: linear-gradient(135deg, #7b2fbe, #e040fb); }
.swatch-dark { background: linear-gradient(135deg, #1e1e1e, #ff6b35); }

.hamburger { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--dark); }

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 12px 20px 20px;
  border-top: 1px solid var(--border);
  background: var(--nav-bg);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 10px 0;
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  padding-top: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 70% 40%, rgba(var(--primary-rgb),.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(var(--primary-rgb),.05) 0%, transparent 70%);
}
.hero-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(var(--primary-rgb),.03) 40px, rgba(var(--primary-rgb),.03) 41px),
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(var(--primary-rgb),.03) 40px, rgba(var(--primary-rgb),.03) 41px);
}

.hero-content {
  position: relative;
  max-width: 1200px; margin: 0 auto;
  padding: 80px 20px 40px;
}
.hero-tag {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 6px 18px;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 900;
  line-height: 1.05;
  color: var(--dark);
  margin-bottom: 24px;
}
.hero-content h1 span { color: var(--primary); }

.hero-sub {
  font-size: clamp(.95rem, 2vw, 1.25rem);
  color: var(--mid);
  max-width: 520px;
  margin-bottom: 40px;
  font-weight: 300;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats {
  position: relative;
  max-width: 1200px; margin: 0 auto;
  padding: 40px 20px 80px;
  display: flex; gap: 48px;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; }
.stat strong { font-family: var(--font-display); font-size: 2.5rem; color: var(--primary); }
.stat span { font-size: .9rem; color: var(--mid); font-weight: 500; }

/* ===== MARQUEE ===== */
.marquee-wrap {
  background: var(--dark2);
  color: var(--light);
  padding: 14px 0;
  overflow: hidden;
}
.marquee-track {
  display: flex; gap: 48px;
  width: max-content;
  animation: marquee 25s linear infinite;
  white-space: nowrap;
}
.marquee-track span {
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .5px;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== SECTION HEADS ===== */
.section-head { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block;
  color: var(--primary);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--dark);
}
.section-head h2 span { color: var(--primary); }

/* ===== CATEGORIES ===== */
.categories { background: var(--lighter); }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.cat-card {
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  text-decoration: none;
  display: block;
  transition: transform .3s ease, box-shadow .3s ease;
  position: relative; overflow: hidden;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.cat-mobile { background: linear-gradient(135deg, #fff5f2, #ffe8df); }
.cat-furniture { background: linear-gradient(135deg, #f5f0e8, #eedfc8); }
.cat-appliance { background: linear-gradient(135deg, #e8f4ff, #d0e9ff); }

[data-theme="dark"] .cat-mobile { background: linear-gradient(135deg, #3a2020, #4a2510); }
[data-theme="dark"] .cat-furniture { background: linear-gradient(135deg, #2d2a1e, #3a3020); }
[data-theme="dark"] .cat-appliance { background: linear-gradient(135deg, #1a2535, #1e3048); }

.cat-icon { font-size: 3.5rem; margin-bottom: 20px; display: block; }
.cat-card h3 { font-family: var(--font-display); font-size: 1.6rem; color: var(--dark); margin-bottom: 10px; }
.cat-card p { color: var(--mid); font-size: .95rem; line-height: 1.6; margin-bottom: 20px; }
.cat-link { color: var(--primary); font-weight: 700; font-size: .9rem; }

/* ===== PRODUCTS GRID ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.products-grid.list-view { grid-template-columns: 1fr; }

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  transition: all .3s ease;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }

.product-card.list-mode {
  flex-direction: row; align-items: flex-start; gap: 20px; padding: 20px;
}
.product-card.list-mode .product-emoji { font-size: 2.5rem; flex-shrink: 0; }
.product-card.list-mode .product-info { flex: 1; }

.badge {
  position: absolute; top: 16px; left: 16px;
  background: var(--primary);
  color: #fff;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: .75rem; font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.discount-tag {
  position: absolute; top: 16px; right: 16px;
  background: #22c55e;
  color: #fff;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: .75rem; font-weight: 700;
}
.product-emoji { font-size: 3.5rem; text-align: center; display: block; margin: 8px 0 4px; }
.product-brand { font-size: .78rem; font-weight: 700; color: var(--primary); letter-spacing: .8px; text-transform: uppercase; }
.product-name { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--dark); line-height: 1.3; margin: 4px 0; }
.product-desc { font-size: .82rem; color: var(--mid); line-height: 1.5; margin: 4px 0 8px; }

.product-features { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.product-features span {
  background: var(--lighter);
  border: 1px solid var(--border);
  color: var(--mid);
  font-size: .73rem; padding: 3px 9px;
  border-radius: 50px; font-weight: 500;
}

.product-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: .85rem; }
.stars { color: #f59e0b; }
.rating-val { font-weight: 700; color: var(--dark); }
.reviews { color: var(--mid); font-size: .82rem; }

.product-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.price { font-family: var(--font-display); font-size: 1.4rem; font-weight: 900; color: var(--primary); }
.old-price { font-size: .9rem; color: var(--mid); text-decoration: line-through; }

.add-to-cart {
  width: 100%; padding: 12px;
  background: var(--primary);
  color: #fff; border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
  margin-top: auto;
}
.add-to-cart:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ===== SCROLL REVEAL ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== OFFERS BANNER ===== */
.offers-banner {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 0;
}
.offer-card {
  padding: 60px 40px;
  text-align: center;
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
  color: #fff;
}
.offer-1 { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.offer-2 { background: linear-gradient(135deg, var(--dark2), var(--dark)); }
.offer-3 { background: linear-gradient(135deg, var(--accent), #e09400); }
.offer-card p { opacity: .85; font-size: .95rem; }
.offer-card h2 { font-family: var(--font-display); font-size: 2.2rem; font-weight: 900; }

/* ===== WHY US ===== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}
.why-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all .3s;
}
.why-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow); }
.why-icon { font-size: 2.5rem; margin-bottom: 16px; display: block; }
.why-card h4 { font-weight: 700; margin-bottom: 8px; color: var(--dark); }
.why-card p { font-size: .9rem; color: var(--mid); line-height: 1.6; }

/* ===== TESTIMONIALS ===== */
.testi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.testi-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all .3s;
}
.testi-card:hover { box-shadow: var(--shadow); }
.testi-card .stars { color: #f59e0b; font-size: 1.1rem; margin-bottom: 16px; }
.testi-card p { color: var(--mid); font-size: .95rem; line-height: 1.7; margin-bottom: 20px; font-style: italic; }
.testi-author { display: flex; align-items: center; gap: 10px; }
.testi-author strong { color: var(--dark); font-weight: 700; }
.testi-author span { color: var(--mid); font-size: .85rem; }

/* ===== CONTACT ===== */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-info h2 {
  font-family: var(--font-display);
  font-size: 2.5rem; font-weight: 900;
  color: var(--dark); margin-bottom: 32px;
}
.contact-info h2 span { color: var(--primary); }

.info-list { display: flex; flex-direction: column; gap: 16px; }
.info-item {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: .95rem; color: var(--mid);
}
.info-item span { color: var(--dark); font-weight: 500; }

.contact-form {
  display: flex; flex-direction: column; gap: 16px;
}
.contact-form h3 {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 700;
  color: var(--dark); margin-bottom: 8px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--dark);
  background: var(--card-bg);
  outline: none;
  transition: border-color .2s;
  width: 100%;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { border-color: var(--primary); }

/* ===== FOOTER ===== */
.footer { background: var(--dark2); color: var(--light); padding: 64px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-brand p { color: rgba(255,255,255,.6); font-size: .9rem; line-height: 1.7; margin: 16px 0 24px; }
.footer .logo { color: #fff; }
.footer .logo span { color: var(--primary); }
.socials { display: flex; gap: 12px; }
.socials a {
  background: rgba(255,255,255,.1);
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: background .2s;
  font-size: 1rem;
}
.socials a:hover { background: var(--primary); }

.footer-col h4 { font-weight: 700; font-size: .95rem; margin-bottom: 20px; color: #fff; }
.footer-col a {
  display: block; margin-bottom: 12px;
  color: rgba(255,255,255,.55);
  text-decoration: none; font-size: .9rem;
  transition: color .2s;
}
.footer-col a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 24px 0;
  text-align: center;
  font-size: .85rem;
  color: rgba(255,255,255,.4);
}

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--dark);
  color: #fff;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: .9rem; font-weight: 600;
  z-index: 9999;
  opacity: 0; pointer-events: none;
  transition: all .3s ease;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== WHATSAPP BUBBLE ===== */
.whatsapp-bubble {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 1500;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}

.wa-btn {
  width: 60px; height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  transition: all .3s ease;
  border: none;
  position: relative;
  animation: waPulse 2.5s ease infinite;
}
.wa-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 32px rgba(37,211,102,.6);
  animation: none;
}
.wa-btn svg { width: 32px; height: 32px; fill: #fff; }

@keyframes waPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,.45); }
  50% { box-shadow: 0 4px 36px rgba(37,211,102,.75), 0 0 0 8px rgba(37,211,102,.15); }
}

.wa-tooltip {
  background: var(--dark);
  color: #fff;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: .82rem; font-weight: 600;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transform: translateX(10px);
  transition: all .25s ease;
}
.whatsapp-bubble:hover .wa-tooltip {
  opacity: 1; transform: translateX(0);
}

/* ===== WA CHAT POPUP ===== */
.wa-popup {
  position: fixed;
  bottom: 100px; right: 28px;
  width: 320px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,.25);
  z-index: 1499;
  display: none;
  animation: popUp .3s ease;
  flex-direction: column;
}
.wa-popup.open { display: flex; }

@keyframes popUp {
  from { opacity: 0; transform: translateY(20px) scale(.95); }
  to { opacity: 1; transform: none; }
}

.wa-popup-header {
  background: #075e54;
  padding: 16px 20px;
  display: flex; align-items: center; gap: 12px;
}
.wa-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: #25d366;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.wa-popup-info { flex: 1; }
.wa-popup-info strong { color: #fff; font-size: .95rem; display: block; }
.wa-popup-info span { color: rgba(255,255,255,.7); font-size: .8rem; }
.wa-popup-close {
  background: none; border: none;
  color: rgba(255,255,255,.7); font-size: 1.1rem;
  cursor: pointer; padding: 4px;
  transition: color .2s;
}
.wa-popup-close:hover { color: #fff; }

.wa-popup-body {
  padding: 20px;
  background: #e5ddd5;
  display: flex; flex-direction: column; gap: 12px;
}
.wa-bubble-msg {
  background: #fff;
  padding: 12px 16px;
  border-radius: 0 12px 12px 12px;
  font-size: .88rem; line-height: 1.5;
  color: #333;
  max-width: 85%;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.wa-bubble-time { font-size: .72rem; color: #999; text-align: right; margin-top: 4px; }

.wa-quick-btns {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px 20px;
  background: #fff;
  border-top: 1px solid #eee;
}
.wa-quick-btns p { font-size: .8rem; color: #666; margin-bottom: 4px; font-weight: 600; }
.wa-quick-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: #f0faf3;
  border: 1.5px solid #25d366;
  border-radius: 10px;
  color: #075e54;
  font-size: .85rem; font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
}
.wa-quick-btn:hover { background: #25d366; color: #fff; }
.wa-quick-btn svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }

/* ===== STORE LAYOUT ===== */
.store-hero {
  padding: 120px 20px 60px;
  text-align: center;
  background: linear-gradient(135deg, var(--light), var(--lighter));
}
.store-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900; color: var(--dark);
  margin-bottom: 12px;
}
.store-hero h1 span { color: var(--primary); }
.store-hero p { color: var(--mid); font-size: 1rem; }

.store-layout {
  max-width: 1200px; margin: 0 auto;
  padding: 40px 20px 80px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

.sidebar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: sticky; top: 90px;
  display: flex; flex-direction: column; gap: 24px;
}
.sidebar h3 {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 700; color: var(--dark);
}

.filter-group { display: flex; flex-direction: column; gap: 10px; }
.filter-label { font-size: .82rem; font-weight: 700; color: var(--mid); text-transform: uppercase; letter-spacing: .8px; }
.filter-options { display: flex; flex-direction: column; gap: 6px; }

/* Mobile sidebar toggle */
.sidebar-toggle {
  display: none;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
  margin-bottom: 8px;
}

.filt-btn {
  text-align: left;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--light);
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--mid);
  cursor: pointer;
  transition: all .2s;
}
.filt-btn:hover, .filt-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}
.price-display {
  font-size: .9rem;
  color: var(--mid);
  font-weight: 500;
}

.sidebar select,
.search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--dark);
  background: var(--card-bg);
  outline: none;
  cursor: pointer;
  transition: border-color .2s;
}
.sidebar select:focus, .search-input:focus { border-color: var(--primary); }

/* ===== STORE MAIN ===== */
.store-main { display: flex; flex-direction: column; gap: 24px; }

.store-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  flex-wrap: wrap; gap: 10px;
}
.result-count { font-size: .9rem; color: var(--mid); font-weight: 500; }
.view-toggle { display: flex; gap: 8px; }
.view-btn {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--light);
  font-size: .85rem;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font-body);
  color: var(--dark);
}
.view-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.no-results {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 20px;
}
.no-results p:first-child { font-size: 3rem; margin-bottom: 16px; }
.no-results h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 8px; color: var(--dark); }
.no-results p { color: var(--mid); margin-bottom: 24px; }

/* ===== CART SIDEBAR ===== */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.cart-overlay.show { opacity: 1; pointer-events: all; }

.cart-sidebar {
  position: fixed; top: 0; right: -420px; bottom: 0;
  width: 420px; max-width: 100vw;
  background: var(--card-bg);
  z-index: 1001;
  display: flex; flex-direction: column;
  transition: right .3s ease;
  box-shadow: var(--shadow-lg);
}
.cart-sidebar.open { right: 0; }

.cart-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.cart-header h3 { font-family: var(--font-display); font-size: 1.3rem; color: var(--dark); }
.close-cart {
  background: none; border: none;
  font-size: 1.3rem; cursor: pointer;
  color: var(--mid); padding: 4px;
  transition: color .2s;
}
.close-cart:hover { color: var(--dark); }

.cart-items {
  flex: 1; overflow-y: auto;
  padding: 20px 24px;
  display: flex; flex-direction: column; gap: 16px;
}

.empty-cart {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; text-align: center;
  color: var(--mid);
}

.cart-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.cart-item-emoji { font-size: 2rem; flex-shrink: 0; }
.cart-item-info { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.cart-item-name { font-weight: 600; font-size: .9rem; color: var(--dark); line-height: 1.3; }
.cart-item-price { font-weight: 700; color: var(--primary); }
.qty-controls { display: flex; align-items: center; gap: 10px; }
.qty-controls button {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--light);
  font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: all .2s;
  display: flex; align-items: center; justify-content: center;
  color: var(--dark);
}
.qty-controls button:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.qty-controls span { font-weight: 600; color: var(--dark); }

.cart-remove {
  background: none; border: none;
  color: #ccc; font-size: .9rem; cursor: pointer;
  padding: 4px; transition: color .2s; flex-shrink: 0;
}
.cart-remove:hover { color: #e74c3c; }

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 12px;
}
.cart-total {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 1.1rem; color: var(--dark);
}
.cart-total strong { font-family: var(--font-display); font-size: 1.4rem; color: var(--primary); }

/* WhatsApp checkout button */
.btn-whatsapp {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #25d366; color: #fff;
  border: none; border-radius: 50px;
  padding: 13px 20px;
  font-family: var(--font-body);
  font-size: .95rem; font-weight: 700;
  cursor: pointer; transition: all .25s;
  text-decoration: none;
  width: 100%;
}
.btn-whatsapp:hover { background: #1ebe5b; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,211,102,.4); }
.btn-whatsapp svg { width: 20px; height: 20px; fill: #fff; flex-shrink: 0; }

/* ===== CHECKOUT MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 1100;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay[style*="flex"] { display: flex !important; }

.modal {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  max-width: 600px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  position: relative;
}
.modal h2 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 28px; color: var(--dark); }

.close-modal {
  position: absolute; top: 20px; right: 20px;
  background: none; border: none;
  font-size: 1.2rem; cursor: pointer;
  color: var(--mid); padding: 4px;
}
.close-modal:hover { color: var(--dark); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--mid); }
.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--dark);
  background: var(--card-bg);
  outline: none;
  transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--primary); }

.pay-options { display: flex; flex-direction: column; gap: 10px; }
.pay-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .9rem;
  transition: all .2s;
  color: var(--dark);
}
.pay-opt:has(input:checked) { border-color: var(--primary); background: var(--lighter); }
.pay-opt input { accent-color: var(--primary); }

.order-summary-mini {
  background: var(--light);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0 24px;
}
.order-summary-mini h4 { font-weight: 700; margin-bottom: 12px; color: var(--dark); }
.mini-item {
  display: flex; justify-content: space-between;
  font-size: .9rem; color: var(--mid);
  padding: 6px 0; border-bottom: 1px solid var(--border);
}
.summary-total {
  display: flex; justify-content: space-between;
  font-size: 1rem; font-weight: 600;
  margin-top: 12px;
  color: var(--dark);
}
.summary-total strong { color: var(--primary); font-size: 1.2rem; }

/* Checkout action buttons */
.checkout-actions { display: flex; flex-direction: column; gap: 12px; }

/* ===== SUCCESS MODAL ===== */
.success-modal { text-align: center; }
.success-icon { font-size: 4rem; margin-bottom: 20px; }
.success-modal h2 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 12px; color: var(--dark); }
.success-modal p { color: var(--mid); margin-bottom: 8px; line-height: 1.7; }
.order-id {
  font-family: monospace;
  background: var(--light);
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .store-layout { grid-template-columns: 220px 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav-links { gap: 20px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  
  .hero-content h1 { font-size: 2.8rem; }
  .hero-stats { gap: 28px; flex-wrap: wrap; padding-bottom: 60px; }
  
  .store-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .sidebar-toggle { display: flex; }
  .sidebar-content { display: none; }
  .sidebar-content.open { display: flex; flex-direction: column; gap: 20px; }

  .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .modal { padding: 28px 20px; }
  .offers-banner { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
  .product-card { padding: 16px; }
  .product-emoji { font-size: 2.5rem; }
  .price { font-size: 1.1rem; }

  .wa-popup { right: 12px; width: calc(100vw - 24px); max-width: 340px; }
  .whatsapp-bubble { right: 16px; bottom: 20px; }
}

@media (max-width: 480px) {
  .section { padding: 60px 0; }
  .hero-cta { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .product-card { padding: 12px; }
  .store-toolbar { flex-direction: column; gap: 12px; align-items: flex-start; }
  .cart-sidebar { width: 100vw; }
  .modal { padding: 24px 16px; }
  .hero-stats { gap: 20px; }
  .stat strong { font-size: 1.8rem; }
  .theme-panel { right: 10px; width: calc(100vw - 20px); max-width: 280px; }
}
