/* ==========================================================================
   InstaChulha - Modern Web Standards Stylesheet
   Crafted with Theme-Aware CSS Variables, Glassmorphism & Responsive Design
   NexGen Digital Partner Standard (HTML5 + CSS3 + ES6+)
   ========================================================================== */

/* ===== 1. CSS VARIABLES & THEME TOKENS ===== */
:root, html.light {
    --primary: #005AD0;
    --primary-hover: #0047A5;
    --primary-light: #EFF6FF;
    --primary-glow: rgba(0, 90, 208, 0.18);
    
    --accent: #FF1100;
    --accent-hover: #D90E00;
    --accent-orange: #FF6B00; /* NexGen Accent */
    --accent-orange-light: #FFF7ED;
    --accent-light: #FEF2F2;
    --accent-glow: rgba(255, 17, 0, 0.25);
    
    --bg: #F8FAFC;
    --bg-alt: #F1F5F9;
    --surface: #FFFFFF;
    --surface-glass: rgba(255, 255, 255, 0.88);
    --surface-translucent: rgba(255, 255, 255, 0.72);
    
    --line: #E2E8F0;
    --line-subtle: #F1F5F9;
    
    --text: #0F172A;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --accentText: #FFFFFF;
    
    --success: #10B981;
    --success-light: #ECFDF5;
    --warning: #F59E0B;
    --warning-light: #FFFBEB;
    --danger: #EF4444;
    --danger-light: #FEF2F2;
    
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-pill: 999px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 14px -1px rgba(15, 23, 42, 0.07), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 30px -4px rgba(15, 23, 42, 0.11), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
    --shadow-glow: 0 0 24px rgba(0, 90, 208, 0.15);
    
    --border-glass: 1px solid rgba(226, 232, 240, 0.85);
    --safe: env(safe-area-inset-bottom, 0px);
    --container: 1140px;
    
    --color-scheme: light;
}

html.dark {
    --primary: #3B82F6;
    --primary-hover: #60A5FA;
    --primary-light: rgba(59, 130, 246, 0.15);
    --primary-glow: rgba(59, 130, 246, 0.35);
    
    --accent: #FF3B30;
    --accent-hover: #FF5A50;
    --accent-orange: #FF6B00;
    --accent-orange-light: rgba(255, 107, 0, 0.15);
    --accent-light: rgba(255, 59, 48, 0.15);
    --accent-glow: rgba(255, 59, 48, 0.4);
    
    --bg: #090E17;
    --bg-alt: #0F172A;
    --surface: #131D31;
    --surface-glass: rgba(19, 29, 49, 0.88);
    --surface-translucent: rgba(19, 29, 49, 0.72);
    
    --line: #1E293B;
    --line-subtle: #172235;
    
    --text: #F8FAFC;
    --text-muted: #94A3B8;
    --text-light: #64748B;
    --accentText: #FFFFFF;
    
    --success: #10B981;
    --success-light: rgba(16, 185, 129, 0.15);
    --warning: #FBBF24;
    --warning-light: rgba(251, 191, 36, 0.15);
    --danger: #F87171;
    --danger-light: rgba(248, 113, 113, 0.15);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow: 0 4px 14px -1px rgba(0, 0, 0, 0.45), 0 2px 6px -2px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 14px 35px -4px rgba(0, 0, 0, 0.65);
    --shadow-glow: 0 0 24px rgba(59, 130, 246, 0.25);
    
    --border-glass: 1px solid rgba(255, 255, 255, 0.08);
    --color-scheme: dark;
}

/* ===== 2. BASE & RESET ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    color-scheme: var(--color-scheme);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

html, body {
    min-height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font: inherit;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

/* ===== 3. SVG ICON SYSTEM ===== */
.svg-icon {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.15em;
    fill: currentColor;
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

.svg-icon-stroke {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.svg-icon-sm {
    width: 0.95em;
    height: 0.95em;
}

.svg-icon-lg {
    width: 1.45em;
    height: 1.45em;
    vertical-align: -0.22em;
}

.svg-icon-xl {
    width: 2em;
    height: 2em;
}

/* ===== 4. LAYOUT & CONTAINERS ===== */
#app {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.wrap {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    background: var(--surface);
    position: relative;
    transition: background-color 0.3s ease;
}

@media (min-width: 1024px) {
    .wrap {
        border-left: 1px solid var(--line);
        border-right: 1px solid var(--line);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.04);
    }
}

main {
    flex: 1;
    min-height: 0;
    padding-bottom: 84px;
}

@media (min-width: 768px) {
    main {
        padding-bottom: 40px;
    }
}

/* Fast & Smooth View Transitions */
@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#view {
    animation: fadeSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ===== 5. TOPBAR & NAVIGATION WITH GLASSMORPHISM ===== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--surface-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.topbar-inner {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    max-width: var(--container);
    margin: 0 auto;
}

.topbar-branding {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.title {
    font-family: 'Poppins', sans-serif;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    white-space: nowrap;
}

.title span {
    color: var(--accent);
}

/* NexGen Header Attribution */
.nexgen-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--line);
}

.nexgen-header-logo {
    height: 20px;
    width: auto;
    object-fit: contain;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nexgen-header-logo:hover {
    opacity: 0.85;
    transform: scale(1.03);
}

/* Desktop Navigation Links */
.desktop-nav {
    display: none;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    margin-right: 12px;
}

@media (min-width: 820px) {
    .desktop-nav {
        display: flex;
    }
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text);
    background: var(--bg-alt);
}

.nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    border-radius: var(--radius-pill);
}

.icon-round {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    background: var(--surface);
    display: inline-grid;
    place-items: center;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.icon-round:hover {
    background: var(--primary-light);
}

.icon-round:active {
    transform: scale(0.92);
}

/* ===== 6. THREE-WAY THEME SWITCHER (SEGMENTED PILL) ===== */
.theme-switcher {
    display: inline-flex;
    align-items: center;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    padding: 3px;
    gap: 2px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    margin-left: auto;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

@media (min-width: 820px) {
    .theme-switcher {
        margin-left: 0;
    }
}

.theme-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 30px;
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
}

.theme-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.2s ease, transform 0.2s ease;
}

.theme-btn:hover {
    color: var(--text);
    transform: scale(1.05);
}

.theme-btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* NexGen Orange active highlight for Light theme button */
html.light .theme-btn[data-theme="light"].active {
    color: var(--accent-orange);
}

html.dark .theme-btn.active {
    background: #1E293B;
    color: #38BDF8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* ===== 7. TABBAR NAVIGATION (MOBILE BOTTOM) ===== */
.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    background: var(--surface-glass);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding-bottom: var(--safe);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

@media (min-width: 768px) {
    .tabbar {
        display: none !important;
    }
}

.tabbar-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 6px 8px calc(8px + var(--safe));
}

.tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    padding: 6px 4px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    font-size: 11px;
    font-weight: 700;
}

.tab .svg-icon {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    color: var(--accent);
    background: var(--accent-light);
    transform: translateY(-1px);
}

.tab.active .svg-icon {
    transform: scale(1.12);
}

/* ===== 8. CARDS, FORMS & UI COMPONENTS ===== */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.card.pad {
    padding: 22px;
}

.muted {
    color: var(--text-muted);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.chip:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: scale(1.02);
}

/* Inputs & Form Controls */
input, textarea, select {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-alt);
    font: inherit;
    color: var(--text);
    transition: all 0.2s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--surface);
}

textarea {
    min-height: 96px;
    resize: vertical;
}

label {
    font-size: 13px;
    color: var(--text-muted);
    margin: 14px 0 6px;
    display: block;
    font-weight: 700;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
    font-size: 15px;
    border: none;
    border-radius: var(--radius);
    padding: 14px 22px;
    background: var(--accent);
    color: var(--accentText);
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 6px 20px var(--accent-glow);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(2px) scale(0.98);
}

.btn-primary {
    background: var(--primary);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: none;
    font-weight: 800;
}

.btn-outline:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.btn-outline:active {
    transform: scale(0.98);
}

.btn-block {
    width: 100%;
}

@keyframes pulseRed {
    0% { box-shadow: 0 0 0 0 rgba(255, 17, 0, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(255, 17, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 17, 0, 0); }
}

.btn-pulse {
    animation: pulseRed 2.4s infinite;
}

/* Shimmer gradient text */
.shimmer-text {
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, var(--primary) 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shimmer 2.8s linear infinite;
    font-weight: 900;
}

@keyframes shimmer {
    to { background-position: 200% center; }
}

/* ===== 9. URGENCY & MARKETING BANNERS ===== */
.urgency-box {
    background: var(--danger-light);
    border: 2px dashed var(--danger);
    color: var(--danger);
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    box-shadow: inset 0 0 10px rgba(239, 68, 68, 0.05);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.urgency-box .svg-icon {
    font-size: 24px;
    color: var(--danger);
    flex-shrink: 0;
}

.scare-banner {
    background: #0F172A;
    color: #FFFFFF;
    padding: 12px 20px;
    display: flex;
    gap: 12px;
    align-items: center;
    border-bottom: 3px solid var(--danger);
}

.scare-banner-text {
    flex: 1;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.scare-banner-text span {
    color: #F87171;
    font-weight: 900;
    font-size: 14px;
}

.animated-banner-wrap {
    background: linear-gradient(90deg, #DC2626, #991B1B);
    color: #FFFFFF;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    height: 38px;
    line-height: 38px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #7F1D1D;
}

.animated-banner-text {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 18s linear infinite;
}

@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* Ratings */
.star-rating {
    color: #F59E0B;
    font-size: 13px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Quantity Button */
.size-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    min-width: 48px;
    padding: 0 14px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-weight: 800;
    font-size: 17px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.size-btn.active, .size-btn:hover {
    background: var(--danger-light);
    border-color: var(--accent);
    color: var(--accent);
}

.price-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.strike {
    color: var(--text-light);
    text-decoration: line-through;
    font-size: 13px;
    font-weight: 600;
}

/* Badges */
.badge-off {
    background: linear-gradient(135deg, var(--accent), #B91C1C);
    color: var(--accentText);
    border-radius: 6px;
    font-size: 12px;
    padding: 3px 8px;
    font-weight: 900;
}

.flash-deal-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    padding: 6px 12px;
    border-radius: 12px 0 14px 0;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.trust-badge-rzp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 11px 16px;
    background: var(--success-light);
    border: 1px solid var(--success);
    border-radius: var(--radius);
    color: #047857;
    font-size: 13px;
    font-weight: 800;
}

html.dark .trust-badge-rzp {
    color: #34D399;
}

.free-delivery-badge {
    background: var(--success-light);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #059669;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 9px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    text-transform: uppercase;
    width: fit-content;
}

html.dark .free-delivery-badge {
    color: #34D399;
}

/* ===== 10. PRODUCT GRID & CARDS ===== */
.filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 20px;
    scrollbar-width: none;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    transition: background-color 0.3s ease;
}

.filters::-webkit-scrollbar {
    display: none;
}

.grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, 1fr);
    padding: 16px;
    background: var(--bg);
    transition: background-color 0.3s ease;
}

@media (min-width: 640px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
        padding: 20px;
    }
}

@media (min-width: 1024px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        padding: 24px;
    }
}

.p-card {
    overflow: hidden;
    position: relative;
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease, border-color 0.22s ease;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.p-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-glow);
}

.p-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #FFFFFF;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--line-subtle);
}

.p-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.p-card:hover .p-img img {
    transform: scale(1.06);
}

.p-meta {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: flex-start;
}

.p-title {
    font-weight: 700;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 6px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 38px;
}

.quick-buy-btn {
    width: calc(100% - 20px);
    padding: 11px 0;
    margin: 0 10px 12px 10px;
    font-size: 13px;
    font-weight: 800;
    border-radius: var(--radius-sm);
    box-shadow: none;
    background: #0F172A;
    color: #FFFFFF;
    transition: all 0.2s ease;
}

html.dark .quick-buy-btn {
    background: var(--primary);
    color: #FFFFFF;
}

.quick-buy-btn:hover {
    background: var(--primary);
    transform: translateY(-1px);
}

.hero-img {
    margin: 16px 20px;
    border-radius: var(--radius);
    overflow: hidden;
    max-height: 420px;
    display: flex;
    box-shadow: var(--shadow);
}

.hero-img img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
}

/* Slider */
.slider-wrap {
    position: relative;
    background: #FFFFFF;
    border-bottom: 1px solid var(--line);
    padding-bottom: 24px;
}

.img-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.img-slider::-webkit-scrollbar {
    display: none;
}

.img-slider .slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    width: 100%;
    max-height: 380px;
    object-fit: contain;
    mix-blend-mode: multiply;
    padding: 24px;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
}

.slider-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #CBD5E1;
    transition: all 0.3s ease;
}

.slider-dots .dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
}

/* Customer Reviews */
.review-card {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
}

.review-card:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.review-name {
    font-weight: 800;
    font-size: 14px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.verified-badge {
    color: var(--success);
    font-size: 14px;
}

.review-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.55;
    font-weight: 500;
}

/* Cart & Checkout */
.cart-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.cart-item {
    display: grid;
    grid-template-columns: 84px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.cart-item img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: #fff;
}

.qty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.circle-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    background: var(--bg-alt);
    color: var(--text);
    font-weight: 800;
    font-size: 15px;
    transition: all 0.2s ease;
}

.circle-btn.primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.sticky-sheet {
    position: sticky;
    bottom: 0;
    background: var(--surface-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding: 18px 20px;
    z-index: 15;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sep {
    height: 1px;
    background: var(--line);
    margin: 14px 0;
}

/* Animations & Special States */
.success-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    text-align: center;
}

.check-anim {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--success);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 40px;
    margin-bottom: 20px;
    animation: pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.4);
}

@keyframes pop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.confetti {
    position: relative;
    width: 100%;
    height: 0;
    overflow: visible;
}

.confetti span {
    position: absolute;
    width: 8px;
    height: 16px;
    border-radius: 4px;
    animation: fall 1.5s linear forwards;
}

@keyframes fall {
    to { transform: translateY(300px) rotate(360deg); opacity: 0; }
}

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(84px + var(--safe));
    transform: translateX(-50%);
    background: #0F172A;
    color: #FFFFFF;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 100;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (min-width: 768px) {
    .toast {
        bottom: 32px;
    }
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

/* Loader */
.loader {
    text-align: center;
    padding: 70px 20px;
    color: var(--text-muted);
}

.loader .dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    background: var(--primary);
    border-radius: 50%;
    margin: 0 5px;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loader .dot:nth-child(1) { animation-delay: -0.32s; }
.loader .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

/* Crying Cylinder Animation */
@keyframes tearDrop {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(25px) scale(0.3); opacity: 0; }
}
@keyframes shakeCylinder {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.cylinder-svg {
    animation: shakeCylinder 1s infinite ease-in-out;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.tear {
    animation: tearDrop 1s infinite linear;
    transform-origin: top;
    fill: #38BDF8;
}
.tear-2 {
    animation-delay: 0.5s;
}

/* Like Button */
.like-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-pill);
    background: var(--surface-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: grid;
    place-items: center;
    color: var(--text-light);
    font-size: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    z-index: 10;
    border: 1px solid var(--line);
}

.like-btn.liked {
    color: #EF4444;
    transform: scale(1.08);
    border-color: #FECACA;
    background: var(--danger-light);
}

.profile-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 16px 0 20px;
}

.avatar {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-pill);
    overflow: hidden;
    border: 3px solid var(--surface);
    box-shadow: var(--shadow);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== 11. INTERACTIVE SAVINGS CALCULATOR ===== */
.calc-card {
    background: linear-gradient(135deg, var(--surface) 0%, var(--bg-alt) 100%);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    box-shadow: var(--shadow-lg);
    margin: 28px 0;
}

.calc-title {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calc-title span {
    color: var(--primary);
}

.calc-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 20px;
}

.calc-hour-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.calc-hour-btn {
    flex: 1;
    min-width: 68px;
    padding: 10px 8px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-weight: 800;
    font-size: 13px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.calc-hour-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 4px 12px var(--primary-glow);
    transform: scale(1.02);
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

@media (max-width: 480px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }
}

.calc-box {
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
}

.calc-box.highlight {
    background: var(--success-light);
    border-color: var(--success);
}

.calc-box-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.calc-box-value {
    font-size: 22px;
    font-weight: 900;
    color: var(--text);
}

.calc-box.highlight .calc-box-value {
    color: #047857;
}

html.dark .calc-box.highlight .calc-box-value {
    color: #34D399;
}

.savings-banner {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #FFFFFF;
    padding: 14px 18px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

/* ===== 12. VALUE & TRUST PILLARS ===== */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 24px 0;
}

@media (min-width: 768px) {
    .pillars-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

.pillar-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pillar-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.pillar-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--primary-light);
    color: var(--primary);
    display: grid;
    place-items: center;
    font-size: 20px;
}

.pillar-title {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin: 0;
}

.pillar-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* ===== 13. COMPARISON MATRIX ===== */
.matrix-wrap {
    overflow-x: auto;
    margin: 24px 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.matrix-table th, .matrix-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.matrix-table th {
    background: var(--bg-alt);
    font-weight: 800;
    color: var(--text);
    font-size: 14px;
}

.matrix-table tr:last-child td {
    border-bottom: none;
}

.matrix-table td strong {
    color: var(--text);
}

/* ===== 14. 3-STEP TRANSITION GUIDE ===== */
.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 24px 0;
}

@media (min-width: 640px) {
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-pill);
    background: var(--primary);
    color: #fff;
    font-weight: 900;
    font-size: 14px;
    margin-bottom: 12px;
}

.step-title {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.step-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ===== 15. FAQ ACCORDION ===== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 24px 0;
}

.faq-item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-question {
    width: 100%;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
}

.faq-chevron {
    transition: transform 0.25s ease;
    color: var(--text-muted);
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    padding: 0 20px 16px 20px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    display: none;
}

.faq-item.open .faq-answer {
    display: block;
}

/* Technical Specifications Table */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.specs-table tr:nth-child(even) {
    background: var(--bg-alt);
}

.specs-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
}

.specs-table tr:last-child td {
    border-bottom: none;
}

.specs-table td:first-child {
    font-weight: 700;
    color: var(--text);
    width: 40%;
}

.specs-table td:last-child {
    color: var(--text-muted);
}

/* ===== 16. CHATBOT POPUP ===== */
.chatbot-icon {
    position: fixed;
    bottom: calc(88px + var(--safe));
    right: 20px;
    z-index: 45;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-pill);
    background: #0F172A;
    color: #FFFFFF;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

@media (min-width: 768px) {
    .chatbot-icon {
        bottom: 28px;
    }
}

html.dark .chatbot-icon {
    background: var(--primary);
}

.chatbot-icon:hover {
    transform: scale(1.08);
}

.chatbot-popup {
    position: fixed;
    bottom: calc(154px + var(--safe));
    right: 20px;
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: 500px;
    height: 480px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    z-index: 46;
    transform: scale(0.95) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s;
    overflow: hidden;
}

@media (min-width: 768px) {
    .chatbot-popup {
        bottom: 96px;
    }
}

.chatbot-popup.visible {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.chatbot-header {
    background: #0F172A;
    color: #FFFFFF;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Poppins', sans-serif;
}

.chatbot-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg);
}

.chatbot-msg-container.user-msg {
    align-self: flex-end;
    max-width: 85%;
}

.chatbot-msg-container.bot-msg {
    align-self: flex-start;
    max-width: 85%;
}

.chatbot-msg {
    background: #0F172A;
    color: #FFFFFF;
    padding: 10px 14px;
    border-radius: 16px;
    word-wrap: break-word;
    box-shadow: var(--shadow-sm);
    font-size: 13px;
    font-weight: 500;
    border-bottom-right-radius: 4px;
    line-height: 1.5;
}

.chatbot-msg.bot {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 16px;
}

.chatbot-footer-input {
    display: flex;
    padding: 10px;
    background: var(--surface);
    border-top: 1px solid var(--line);
    gap: 8px;
}

.chatbot-footer-input input {
    flex: 1;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    margin: 0;
    border: 1px solid var(--line);
}

.chatbot-footer-input button {
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 15px;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.chatbot-footer-input button:active {
    transform: scale(0.9);
}

.chatbot-questions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.chatbot-questions .question-chip {
    padding: 8px 12px;
    background: var(--danger-light);
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--danger);
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    transition: background-color 0.2s ease;
}

.chatbot-questions .question-chip:hover {
    background: #FFE4E6;
}

/* AI Recipe Feature */
.ai-recipe-btn {
    background: linear-gradient(135deg, #8B5CF6, #D946EF);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius);
    padding: 16px;
    width: 100%;
    font-weight: 800;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(217, 70, 239, 0.3);
    transition: all 0.2s ease;
    margin-top: 16px;
    cursor: pointer;
}

.ai-recipe-btn:hover {
    box-shadow: 0 6px 20px rgba(217, 70, 239, 0.45);
}

.ai-recipe-btn:active {
    transform: scale(0.98);
}

.recipe-result-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-wrap;
    display: none;
}

/* Admin Styles */
#admin-app { display: none; }
.admin-wrap { padding: 20px; padding-bottom: 120px; }
.admin-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 18px; }
.admin-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface-glass); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 14px calc(14px + var(--safe)); display: flex; gap: 10px; max-width: var(--container); margin: 0 auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: left; vertical-align: middle; }
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 32px; text-align: center; background: var(--bg-alt); color: var(--text-muted); cursor: pointer; transition: 0.2s; }
.dropzone:hover { border-color: var(--primary); background: var(--primary-light); }

.thumb-wrap { position: relative; display: inline-block; }
.thumb { width: 80px; height: 80px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-del { position: absolute; top: -6px; right: -6px; background: #EF4444; color: #fff; border: none; border-radius: 50%; width: 22px; height: 22px; font-size: 11px; font-weight: bold; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.2); z-index: 5; display: flex; align-items: center; justify-content: center; }

/* ===== 17. PROFESSIONAL FOOTER & ATTRIBUTION ===== */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 40px 20px calc(96px + var(--safe));
    color: var(--text-muted);
    font-size: 13px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

@media (min-width: 768px) {
    .site-footer {
        padding-bottom: 48px;
    }
}

.footer-content {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.footer-top {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-brand {
    font-family: 'Poppins', sans-serif;
    font-size: 21px;
    font-weight: 900;
    color: var(--primary);
    margin: 0;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-brand span {
    color: var(--accent);
}

.footer-desc {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
    max-width: 560px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.footer-link {
    color: var(--text);
    font-weight: 600;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-link:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 12px;
}

.footer-nexgen-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-nexgen-attribution {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-muted);
}

.footer-nexgen-attribution a {
    color: var(--text);
    font-weight: 700;
    transition: color 0.2s ease;
}

.footer-nexgen-attribution a:hover {
    color: var(--accent-orange);
}

.footer-nexgen-logo {
    height: 18px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

/* ===== 18. RESPONSIVENESS & ACCESSIBILITY ===== */
@media (max-width: 480px) {
    .topbar-inner {
        padding: 0 12px;
        gap: 8px;
    }
    
    .title {
        font-size: 18px;
    }
    
    .nexgen-header-badge {
        padding-left: 8px;
        gap: 6px;
    }
    
    .nexgen-header-logo {
        height: 16px;
    }
    
    .theme-switcher {
        padding: 2px;
    }
    
    .theme-btn {
        width: 28px;
        height: 26px;
    }
    
    .theme-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .grid {
        gap: 10px;
        padding: 10px;
    }
    
    .p-meta {
        padding: 10px;
    }
    
    .p-title {
        font-size: 12px;
        height: 34px;
    }
    
    .quick-buy-btn {
        font-size: 12px;
        padding: 9px 0;
    }
}

/* High contrast & reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
