/* =======================================================
   STYLE VIBE — STOREFRONT STYLESHEET
   ======================================================= */

:root {
    --primary: #111827;
    --accent: #e11d48;
    --accent-hover: #be123c;
    --whatsapp: #25D366;
    --call-btn: #0284c7;
    --bg-light: #f8fafc;
    --text-dark: #1f2937;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius: 14px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --font-main: 'Hind Siliguri', 'Poppins', sans-serif;
    color-scheme: light;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    width: 92%;
    max-width: 1180px;
    margin: 0 auto;
}

/* Helper Classes */
.font-bold { font-weight: 700; }
.text-center { text-align: center; }

/* ================= PAGE LOADER / EMPTY STATES ================= */
#pageLoader {
    position: fixed;
    inset: 0;
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 100000;
    transition: opacity 0.3s ease;
}
#pageLoader .spinner {
    width: 42px;
    height: 42px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
#pageLoader p { color: var(--text-muted); font-size: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

.store-error-box {
    max-width: 480px;
    margin: 80px auto;
    text-align: center;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 40px 25px;
    box-shadow: var(--shadow);
}
.store-error-box i { font-size: 40px; color: var(--accent); margin-bottom: 14px; }
.store-error-box h3 { margin-bottom: 8px; color: var(--primary); }
.store-error-box p { color: var(--text-muted); font-size: 14px; }

.empty-inventory-msg {
    padding: 14px;
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
    text-align: center;
}

/* ================= 1. HEADER ================= */
header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary);
}
.header-content i { font-size: 26px; color: var(--accent); }
.header-content h1 { font-size: 24px; font-weight: 700; letter-spacing: 0.5px; }

/* ================= 2. HERO SECTION ================= */
.hero-section {
    padding: 35px 0 25px;
    text-align: center;
}
.hero-badge {
    display: inline-block;
    background: #ffe4e6;
    color: var(--accent);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}
.hero-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--primary);
}
.video-wrapper {
    width: 100%;
    max-width: 860px;
    aspect-ratio: 16 / 9; /* 16:9 Perfect Ratio */
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    border: 4px solid #fff;
    background: #000;
    position: relative;
}
.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
/* Click-to-load YouTube facade: avoids loading YouTube's heavy iframe
   bundle until the visitor actually wants to watch, which is one of the
   biggest real-world speed wins for a page like this. */
.video-facade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #000;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-facade .play-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(225, 29, 72, 0.92);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.35);
    transition: transform 0.2s;
}
.video-facade:hover .play-btn { transform: scale(1.08); }

.hero-cta-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-top: 25px;
    flex-wrap: wrap;
}
.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    min-width: 210px;
}
.hero-btn.call-btn { background: linear-gradient(135deg, #0284c7, #0369a1); }
.hero-btn.call-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(2, 132, 199, 0.35); }
.hero-btn.wa-btn { background: linear-gradient(135deg, #25D366, #128C7E); }
.hero-btn.wa-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(37, 211, 102, 0.35); }

/* ================= 3. PRODUCT SHOWCASE ================= */
.product-showcase {
    padding: 50px 0;
    background: #ffffff;
    border-radius: 24px;
    margin: 30px 0;
    box-shadow: var(--shadow);
}
.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 0 20px;
}

/* 9:16 Aspect Ratio Slider */
.slider-box {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 9 / 16;
    max-width: 350px;
    margin: 0 auto;
    width: 100%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: #e2e8f0;
}
.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease-in-out;
}
.slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
    display: block;
}
.color-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(17, 24, 39, 0.88);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
}
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    font-size: 15px;
    color: var(--primary);
    transition: all 0.2s;
    z-index: 5;
}
.slider-btn:hover { background: var(--accent); color: #fff; }
.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }

/* Product Details */
.product-details { padding-right: 20px; }
.product-title { font-size: 28px; font-weight: 700; margin-bottom: 10px; }
.product-price { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; flex-wrap: wrap; }
.current-price { font-size: 30px; font-weight: 700; color: var(--accent); }
.old-price { font-size: 18px; color: var(--text-muted); text-decoration: line-through; }
.discount-tag { background: #dcfce7; color: #166534; padding: 4px 10px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.section-subhead { font-size: 17px; font-weight: 600; margin: 16px 0 8px; color: var(--primary); display: flex; align-items: center; gap: 8px;}
.feature-list { list-style: none; margin-bottom: 20px; }
.feature-list li { position: relative; padding-left: 24px; margin-bottom: 8px; color: #374151; font-size: 14px; }
.feature-list li i { position: absolute; left: 0; top: 4px; color: #10b981; }
.cta-btn-link {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.35);
    transition: all 0.3s;
}
.cta-btn-link:hover { background: var(--accent-hover); transform: translateY(-2px); }

/* ================= 4. REVIEWS SECTION ================= */
.reviews-section { padding: 40px 0; }
.section-header { text-align: center; margin-bottom: 25px; }
.section-header h2 { font-size: 26px; font-weight: 700; }
.section-desc { color: var(--text-muted); font-size: 14px; }

.review-slider {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 10px 0 16px;
    scrollbar-width: thin;
}
.review-slider::-webkit-scrollbar { height: 6px; }
.review-slider::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.review-card {
    min-width: 190px;
    max-width: 190px;
    aspect-ratio: 9 / 16;
    background: #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    scroll-snap-align: start;
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
    flex-shrink: 0;
}
.review-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.review-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 3px 8px;
    border-radius: 15px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}
.review-tag.wa { background: #25D366; }

/* ================= 5. ORDER SECTION ================= */
.order-section {
    padding: 45px 0;
    background: #ffffff;
    border-radius: 24px;
    margin-bottom: 50px;
    box-shadow: var(--shadow);
}
.order-inner { padding: 0 20px; }

/* Color Slider Horizontal */
.color-slider-container { position: relative; margin-top: 15px; }
.color-slider-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px 2px 14px;
    scrollbar-width: thin;
}
.color-slider-track::-webkit-scrollbar { height: 6px; }
.color-slider-track::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.slider-arrow-btn {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: all 0.2s;
}
.slider-arrow-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.slider-arrow-btn.left { left: -14px; }
.slider-arrow-btn.right { right: -14px; }

.product-card {
    min-width: 125px;
    max-width: 125px;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 7px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: #fafafa;
    user-select: none;
}
.product-card:hover:not(.disabled) { border-color: #cbd5e1; }
.product-card.active { border-color: var(--accent); background: #fff1f2; }
.product-card.disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(100%); }

.select-check {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 17px;
    height: 17px;
    background: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: transparent;
    transition: all 0.2s ease;
}
.product-card.active .select-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.product-card img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; margin-bottom: 5px; display: block; background: #e2e8f0; }
.product-card h4 { font-size: 12px; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-card span { font-weight: 700; color: var(--accent); font-size: 12px; display: block; }

/* Size Grid */
.size-selection-area {
    margin: 22px 0 30px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.size-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.size-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.size-card {
    border: 2px solid var(--border-color);
    background: #ffffff;
    border-radius: 8px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.size-card:hover:not(.disabled) { border-color: #cbd5e1; }
.size-card.active { border-color: var(--accent); background: #fff1f2; }
.size-card.disabled { opacity: 0.5; cursor: not-allowed; background: #e2e8f0; }

.size-radio-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #94a3b8;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.size-card.active .size-radio-circle { border-color: var(--accent); }
.size-card.active .size-radio-circle::after { content: ''; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; display: block; }
.size-card strong { font-size: 14px; color: var(--primary); }
.size-card span { font-size: 12px; color: var(--text-muted); }

/* Checkout Grid & Summary */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 30px;
    border-top: 1px dashed var(--border-color);
    padding-top: 30px;
}
.form-header-title { font-size: 18px; margin-bottom: 18px; display: flex; align-items: center; gap: 8px;}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 5px; font-size: 14px; font-weight: 600; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: #fdfdfd;
    outline: none;
    transition: border 0.2s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.field-error { color: var(--accent); font-size: 12.5px; margin-top: 4px; display: none; }
.field-error.show { display: block; }
.form-group input.invalid, .form-group textarea.invalid { border-color: var(--accent); }

/* Summary Box */
.order-summary-box {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
}
.order-summary-box h3 { font-size: 17px; margin-bottom: 15px; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }
.selected-items-list { max-height: 200px; overflow-y: auto; margin-bottom: 12px; padding-right: 5px; }
.selected-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #edf2f7;
    font-size: 13px;
}
.item-info { flex: 1; padding-right: 8px; }
.item-name { font-weight: 600; display: block; }
.item-unit-price { color: var(--text-muted); font-size: 12px; }
.item-total-price { font-weight: 700; color: var(--accent); min-width: 55px; text-align: right; }
.empty-cart-msg { color: var(--accent); font-size: 13px; padding: 10px 0; text-align: center; }

.summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.delivery-options {
    margin: 12px 0;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.delivery-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 13px;
}
.delivery-option:last-child { margin-bottom: 0; }
.delivery-option input { accent-color: var(--accent); margin-right: 6px; }
.free-badge { color: #10b981; font-weight: 700; }
.total-row { border-top: 2px dashed var(--border-color); padding-top: 12px; margin-top: 12px; font-size: 18px; font-weight: 700; color: var(--accent); }

.submit-btn {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.submit-btn:hover { background: var(--accent-hover); }
.submit-btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.submit-btn .btn-spinner {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
    animation: spin 0.7s linear infinite; display: none;
}
.submit-btn.loading .btn-spinner { display: inline-block; }
.submit-btn.loading .btn-label { opacity: 0.8; }

/* ================= 6. FOOTER ================= */
footer {
    background: #111827;
    color: #cbd5e1;
    padding: 40px 0;
    text-align: center;
}
.footer-socials {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 15px;
}
.footer-socials a {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
    transition: all 0.3s;
    text-decoration: none;
}
.footer-socials a:hover { background: var(--accent); transform: translateY(-3px); }
.footer-copyright { font-size: 14px; }

/* ================= 7. FLOATING WHATSAPP ================= */
.floating-whatsapp {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: var(--whatsapp);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.45);
    z-index: 999;
    text-decoration: none;
    animation: pulseWa 2s infinite;
    transition: transform 0.2s;
}
.floating-whatsapp:hover { transform: scale(1.1); }
@keyframes pulseWa {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ================= 8. RESPONSIVE QUERIES ================= */
@media (max-width: 991px) {
    .showcase-grid, .checkout-grid { grid-template-columns: 1fr; }
    .product-details { padding-right: 0; }
    .slider-box { max-width: 320px; }
    .order-section, .product-showcase { padding: 30px 15px; }
    .hero-btn { width: 100%; }
    .slider-arrow-btn { display: none; /* Rely on touch scroll for mobile */ }
    .hero-title { font-size: 24px; }
}

/* ================= 9. DARK MODE (follows system preference) ================= */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg-light: #0b1120;
        --text-dark: #e5e7eb;
        --text-muted: #94a3b8;
        --border-color: #1f2937;
    }
    header, .product-showcase, .order-section, .review-card, .product-card, .size-card, .order-summary-box, .delivery-options, .store-error-box {
        background: #111827;
        color: var(--text-dark);
    }
    .form-group input, .form-group textarea { background: #0b1120; color: var(--text-dark); border-color: #1f2937; }
    .size-selection-area { background: #0f172a; }
}
