/*
Theme Name: Sreemaa's 'Elan
Author: Siddhant
Version: 1.5 (Final Combined)
*/

/* ================= ROOT & RESET ================= */
:root {
    --gold: #D4AF37;
    --orange: #E65100;
    --light-gold: #F9F1D8;
    --dark: #333;
    --gray: #777;
    --border: #eaeaec;
    --white: #fff;
    --bg-light: #fdfdfd;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
html { scroll-behavior: smooth; }
body { background: var(--bg-light); color: var(--dark); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* ================= HEADER ================= */
header {
    position: sticky; top: 0; z-index: 1000; background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 5%; height: 80px; position: relative;
}
.logo-container img { height: 50px; width: auto; }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a {
    font-weight: 600; text-transform: uppercase; font-size: 0.9rem;
    transition: 0.3s; color: var(--dark);
}
.nav-links a:hover { color: var(--orange); }
.mobile-menu-btn { display: none; font-size: 24px; color: var(--orange); cursor: pointer; }

/* ================= HERO SECTION ================= */
.hero {
    display: flex; justify-content: space-between; align-items: center;
    padding: 40px 5%; min-height: 80vh;
    background: linear-gradient(135deg, var(--light-gold), #fff);
}
.hero-text { flex: 1; padding-right: 20px; }
.hero-text h1 { font-size: 3.5rem; color: var(--orange); line-height: 1.2; margin-bottom: 15px; }
.hero-text span { color: var(--gold); }
.hero-text p { font-size: 1.1rem; margin-bottom: 30px; color: #555; }

.cta-btn {
    padding: 12px 30px; border-radius: 30px; background: var(--orange);
    color: #fff; font-weight: bold; border: 2px solid var(--orange);
    transition: 0.4s; display: inline-block;
}
.cta-btn:hover { background: transparent; color: var(--orange); }
.hero-image { flex: 1; display: flex; justify-content: center; }
.hero-image img { max-height: 500px; border-radius: 20px; box-shadow: -10px 10px 30px rgba(212,175,55,0.35); }

/* ================= COMMON ELEMENTS ================= */
.section-title { text-align: center; font-size: 2.2rem; margin: 50px 0 30px; }
.section-title span { border-bottom: 3px solid var(--gold); padding-bottom: 5px; }

/* --- PRODUCT CARD STYLES --- */
.product-card {
    background: #fff; border-radius: 12px; border: 1px solid #eee;
    transition: 0.3s; position: relative; overflow: hidden;
    display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

/* Image Area */
.product-img-box, .image-container {
    aspect-ratio: 3/4; width: 100%; background: #fafafa;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; position: relative;
}
.product-img-box,
.image-container {
    height: 380px;        /* Same height for all cards */
    width: 100%;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card:hover img { transform: scale(1.05); }

/* Rating Badge */
.rating {
    position: absolute; bottom: 10px; left: 10px;
    background: rgba(255,255,255,0.95); padding: 4px 8px;
    border-radius: 4px; font-size: 0.8rem; font-weight: bold;
    display: flex; align-items: center; gap: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.rating i { color: #03a685; font-size: 0.7rem; }

/* Card Info */
.product-info, .card-info { padding: 12px; text-align: center; flex: 1; display: flex; flex-direction: column; }
.product-cat { font-size: 0.75rem; color: var(--gold); text-transform: uppercase; font-weight: 700; }
.product-name, .brand { font-size: 1rem; margin: 5px 0; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand a { text-decoration: none; color: inherit; }

.price-box { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 0.95rem; margin-bottom: 10px; }
.product-price, .price { color: var(--dark); font-weight: 700; }
.old-price { text-decoration: line-through; color: #999; font-size: 0.85rem; }
.desc { font-size: 0.85rem; color: #777; margin-bottom: 5px; }

.add-btn {
    width: 100%; padding: 10px; background: var(--dark); color: #fff;
    border: none; font-weight: 600; text-transform: uppercase;
    margin-top: auto; cursor: pointer; transition: 0.3s;
    opacity: 0; transform: translateY(10px); display: block; text-align: center;
}
.product-card:hover .add-btn { opacity: 1; transform: translateY(0); }

/* ================= HOME PAGE SLIDERS ================= */
.slider-wrapper { position: relative; padding: 0 5%; margin-bottom: 40px; }
.slider-container {
    display: flex; gap: 20px; overflow-x: auto; padding: 20px 5px;
    scrollbar-width: none; scroll-behavior: smooth;
}
.slider-container::-webkit-scrollbar { display: none; }
.slider-container .product-card { min-width: 260px; }

.slide-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; background: #fff;
    border: 1px solid var(--border); border-radius: 50%;
    color: var(--dark); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 10;
}
.prev-btn { left: 10px; } .next-btn { right: 10px; }

/* ================= COLLECTION (SHOP) PAGE ================= */
.collection-container { display: flex; padding: 30px 5%; gap: 30px; max-width: 1400px; margin: 0 auto; }
.sidebar {
    width: 250px; flex-shrink: 0; position: sticky; top: 90px;
    height: fit-content; background: #fff; padding: 20px;
    border: 1px solid var(--border); border-radius: 8px;
}
.filter-header { font-weight: 700; margin-bottom: 15px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.filter-group { margin-bottom: 20px; }
.filter-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 10px; text-transform: uppercase; }
.checkbox-list label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: #555; cursor: pointer; }
.color-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.color-circle { width: 24px; height: 24px; border-radius: 50%; border: 1px solid #ddd; cursor: pointer; }

.main-content { flex: 1; }
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-title h1 { font-size: 1.4rem; color: var(--dark); text-transform: uppercase; }

/* Sorting Dropdown */
.woocommerce-ordering select, .sort-select {
    padding: 8px 12px; border: 1px solid var(--border);
    border-radius: 4px; outline: none; cursor: pointer; background: #fff;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.products-grid .product-card { min-width: auto; width: 100%; }

/* ================= SINGLE PRODUCT PAGE ================= */
.single-product-container { display: flex; max-width: 1200px; margin: 50px auto; padding: 0 20px; gap: 50px; }
.product-gallery { flex: 1; }
.main-image {
    width: 100%; border: 1px solid var(--border); border-radius: 8px;
    overflow: hidden; margin-bottom: 20px;
}
.main-image img { width: 100%; height: auto; display: block; object-fit: cover; }

.thumbnail-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; }
.thumb-box {
    width: 80px; height: 100px; flex-shrink: 0; border: 1px solid var(--border);
    border-radius: 4px; cursor: pointer; opacity: 0.6; transition: 0.3s;
}
.thumb-box img { width: 100%; height: 100%; object-fit: cover; }
.thumb-box:hover, .thumb-box.active { opacity: 1; border-color: var(--orange); border-width: 2px; }

.product-details { flex: 1; padding-top: 10px; }
.product-title { font-size: 2.2rem; color: var(--dark); margin-bottom: 15px; line-height: 1.2; }
.product-price-single {
    margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 20px;
}
.product-price-single del { color: #999; font-size: 1.2rem; margin-right: 10px; }
.product-short-desc { font-size: 1rem; color: #555; line-height: 1.6; margin-bottom: 30px; }

/* Add To Cart Form */
.add-to-cart-wrapper form.cart { display: flex; gap: 15px; align-items: center; margin-bottom: 30px; flex-wrap: wrap; }
.add-to-cart-wrapper input.qty {
    width: 70px; padding: 10px; text-align: center;
    border: 1px solid var(--dark); border-radius: 4px; font-size: 1rem;
}
.add-to-cart-wrapper button[type="submit"] {
    background-color: var(--dark); color: #fff; padding: 12px 40px;
    border: none; border-radius: 30px; font-weight: 700; text-transform: uppercase;
    cursor: pointer; transition: 0.3s;
}
.add-to-cart-wrapper button[type="submit"]:hover { background-color: var(--orange); }
.product-meta { font-size: 0.9rem; color: #888; margin-top: 20px; border-top: 1px solid #eee; padding-top: 20px; }

/* ================= FOOTER ================= */
.contact-section { background: #1f1f1f; color: var(--light-gold); padding: 50px 5%; text-align: center; }
.contact-grid { display: flex; justify-content: center; gap: 40px; margin-top: 30px; flex-wrap: wrap; }
.whatsapp-float {
    position: fixed; bottom: 25px; right: 25px;
    width: 55px; height: 55px; background: #25d366; color: #fff;
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 28px; z-index: 1000; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
    .collection-container { flex-direction: column; padding: 20px; }
    .sidebar { width: 100%; position: static; margin-bottom: 20px; }
    .products-grid { grid-template-columns: repeat(3, 1fr); gap: 15px; }
}

@media (max-width: 768px) {
    .navbar { padding: 10px 20px; }
    .mobile-menu-btn { display: block; }
    
    .nav-links {
        position: fixed; top: 80px; left: -100%; width: 100%; height: calc(100vh - 80px);
        background: #fff; flex-direction: column; padding-top: 40px;
        transition: 0.4s ease-in-out; z-index: 999; box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    }
    .nav-links.active { left: 0; }
    .nav-links li { margin: 15px 0; }
    .nav-links li a { font-size: 1.2rem; }

    .hero { flex-direction: column-reverse; text-align: center; padding: 30px 20px; }
    .hero-text { padding-right: 0; margin-top: 20px; }
    .hero-text h1 { font-size: 2.5rem; }
    .hero-image img { max-height: 350px; }

    .products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .add-btn { opacity: 1; transform: translateY(0); padding: 8px; font-size: 0.8rem; }
    
    .single-product-container { flex-direction: column; gap: 30px; }
    .product-title { font-size: 1.8rem; }
    .contact-grid { flex-direction: column; align-items: center; gap: 20px; }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .slider-container .product-card { min-width: 100%; }
}

/* ================= PRODUCT DESCRIPTION SECTION ================= */
.product-full-description {
    background-color: #fff;
    padding: 40px 5%;
    margin-top: 30px;
    border-top: 1px solid var(--border);
}

.desc-container {
    max-width: 1200px;
    margin: 0 auto;
}

.desc-container h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 20px;
    text-transform: uppercase;
    border-left: 4px solid var(--gold);
    padding-left: 15px;
}

.desc-content {
    font-size: 1rem;
    color: #555;
    line-height: 1.8;
}

.desc-content p {
    margin-bottom: 15px;
}

.desc-content ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 15px;
}

.desc-content li {
    margin-bottom: 5px;
}

/* ================= BUY NOW BUTTON STYLE ================= */
.buy-now-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #25d366; /* WhatsApp Green */
    color: #fff !important;
    padding: 14px 40px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.3s ease;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    margin-bottom: 20px;
}

.buy-now-btn i {
    font-size: 1.3rem;
}

.buy-now-btn:hover {
    background-color: #128c7e; /* Darker Green */
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
}

/* Add spacing for description section */
.product-full-description {
    margin-top: 50px;
    border-top: 1px solid #eee;
    padding-top: 40px;
}

/* ================= PRICE FILTER STYLES ================= */

/* 1. Ribbon Header Style */
.filter-header-ribbon {
    background-color: #a8002a; /* Deep Red */
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 10px 20px;
    display: inline-block;
    position: relative;
    margin-bottom: 25px;
    margin-left: -20px; /* Pull slightly outside sidebar padding */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

/* Triangle/Ribbon effect on right */
.filter-header-ribbon::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 0;
    width: 0;
    height: 0;
    border-left: 20px solid #a8002a;
    border-top: 22px solid transparent;
    border-bottom: 22px solid transparent;
}

/* 2. Input Boxes */
.price-inputs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 15px;
}

.price-inputs input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #eebb5d; /* Golden/Yellow Border */
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    outline: none;
}

/* 3. Slider Track */
#price-slider {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    border: none;
    margin: 20px 5px;
    position: relative;
}

/* Active Range Line (Red) */
#price-slider .ui-slider-range {
    background: #a8002a;
    border-radius: 3px;
}

/* Slider Handles (Round Red Buttons) */
#price-slider .ui-slider-handle {
    width: 18px;
    height: 18px;
    background: #a8002a;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    top: -7px;
    cursor: pointer;
    outline: none;
}

/* Apply Button */
.filter-btn {
    background: #a8002a;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: bold;
    width: 100%;
    transition: 0.3s;
}
.filter-btn:hover {
    background: #800020;
}

/* ================= FILTER RIBBON DESIGN ================= */
.filter-ribbon {
    background-color: #a9001f; /* Dark Red */
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 10px 15px;
    position: relative;
    margin-bottom: 25px;
    display: inline-block;
    padding-right: 30px; /* Space for arrow */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

/* Arrow Effect on Right */
.filter-ribbon::after {
    content: '';
    position: absolute;
    top: 0;
    right: -20px; /* Push outside */
    width: 0;
    height: 0;
    border-left: 20px solid #a9001f;
    border-top: 22px solid transparent;
    border-bottom: 22px solid transparent;
}

/* ================= PRICE INPUTS (Yellow Border) ================= */
.price-inputs {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.price-inputs input {
    width: 100%;
    padding: 8px;
    border: 2px solid #f3c648; /* Yellow/Gold Border */
    border-radius: 5px;
    font-size: 1rem;
    color: #333;
    outline: none;
    font-weight: 600;
}

/* ================= SLIDER TRACK (Red Theme) ================= */
#price-slider {
    height: 5px;
    background: #e0e0e0;
    border: none;
    margin: 20px 5px;
    position: relative;
    border-radius: 5px;
}

/* Filled Bar (Red) */
#price-slider .ui-slider-range {
    background: #a9001f;
    border-radius: 5px;
}

/* Handles (Circles) */
#price-slider .ui-slider-handle {
    width: 16px;
    height: 16px;
    background: #a9001f;
    border: 2px solid #fff;
    border-radius: 50%;
    position: absolute;
    top: -6px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    outline: none;
}

/* Apply Button */
.apply-btn {
    width: 100%;
    background: #a9001f;
    color: #fff;
    border: none;
    padding: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}
.apply-btn:hover { background: #800015; }

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 25px;
}

.cart-icon {
    position: relative;
}

.cart-icon i {
    font-size: 20px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #E65100;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 50%;
}


html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

.site-content,
main {
    flex: 1;
}

.single-product-container,
.woocommerce-cart {
    min-height: 60vh;
}

/* ===== CART PAGE LAYOUT ===== */

.woocommerce-cart .woocommerce {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.woocommerce-cart table.shop_table {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.woocommerce-cart table.shop_table th {
    background: #f9f9f9;
    font-weight: 600;
    padding: 15px;
}

.woocommerce-cart table.shop_table td {
    padding: 15px;
}

.woocommerce-cart .cart_totals {
    background: #fafafa;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* ===== PROCEED TO CHECKOUT BUTTON ===== */

.woocommerce-cart .checkout-button {
    background: #E65100 !important;
    color: #fff !important;
    padding: 15px 40px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: 30px !important;
    text-transform: uppercase;
    transition: 0.3s ease;
    box-shadow: 0 4px 12px rgba(230, 81, 0, 0.3);
}

.woocommerce-cart .checkout-button:hover {
    background: #c54300 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(230, 81, 0, 0.4);
}


/* ===== FORCE PROCEED TO CHECKOUT BUTTON STYLE ===== */

.woocommerce a.checkout-button,
.woocommerce .wc-proceed-to-checkout a,
.woocommerce-cart .wc-proceed-to-checkout a {
    background-color: #E65100 !important;
    color: #fff !important;
    padding: 16px 45px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: 35px !important;
    text-transform: uppercase !important;
    display: inline-block !important;
    text-align: center !important;
    box-shadow: 0 6px 18px rgba(230, 81, 0, 0.35) !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.woocommerce a.checkout-button:hover,
.woocommerce .wc-proceed-to-checkout a:hover {
    background-color: #c54300 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 22px rgba(230, 81, 0, 0.45) !important;
}


/* ===== ULTRA FORCE CHECKOUT BUTTON FIX ===== */

.woocommerce .wc-proceed-to-checkout a,
.woocommerce-cart .wc-proceed-to-checkout a,
.woocommerce a.button.checkout-button,
.woocommerce .button.checkout-button {
    background: var(--orange) !important;
    color: #fff !important;
    padding: 18px 50px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: 40px !important;
    text-transform: uppercase !important;
    display: inline-block !important;
    text-align: center !important;
    box-shadow: 0 8px 22px rgba(230, 81, 0, 0.35) !important;
    border: none !important;
}

.woocommerce .wc-proceed-to-checkout a:hover {
    background: #c54300 !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(230, 81, 0, 0.45);
}


.hero-image {
    position: relative;
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: 20px;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 500px; /* fixed height for smooth transition */
}

.hero-slider .hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    object-fit: contain;
    border-radius: 20px;

    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slider .hero-slide.active {
    opacity: 1;
}

@media (max-width: 768px) {
    .hero-slider {
        height: 350px;
    }
}


/* FORCE PRODUCT GRID WIDTH FIX */
.main-content {
    flex: 1 !important;
    width: 100% !important;
}

.woocommerce ul.products,
.products-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 25px !important;
    width: 100% !important;
}

.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
}


/* ===== RESET DESKTOP GRID ===== */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 25px !important;
}


/* Desktop */
.products-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 25px !important;
}

/* Tablet */
@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
