/* ==========================================================================
   Siyamattress - Refined & Classic Stylesheet
   ========================================================================== */

/* ---------------------------------
 * -- 1. BASE & VARIABLES
 * --------------------------------- */
:root {
    /* Color Palette (Slightly refined for a warmer, softer feel) */
    --primary-color: #0D1B2A; /* Royal Blue (Kept as is) */
    --secondary-color: #415A77; /* Shadow Blue (Kept as is) */
    --accent-color: #C09526; /* A slightly desaturated, more classic Gold */
    --bg-color: #FDFDFB; /* A warmer, off-white for a softer background */
    --light-text-color: #FFFFFF;
    --dark-text-color: #333;
    --border-color: #E0E1DD; /* A soft grey for subtle borders */

    /* Typography (Classic Serif/Sans-Serif pairing) */
    --body-font: 'Poppins', sans-serif;
    --heading-font: 'Lora', serif; /* Using a classic Serif for elegance */

    /* Effects & Transitions */
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.06); /* Softer shadow */
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.1); /* More subtle hover shadow */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Global Reset & Smooth Scroll */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevents horizontal scroll caused by overflowing elements */
}

/* Body & Typography */
body {
    font-family: var(--body-font);
    line-height: 1.7; /* Slightly increased line-height for readability */
    color: var(--dark-text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased; /* Smoother font rendering */
}

h1, h2, h3, h4 {
    font-family: var(--heading-font);
    font-weight: 600;
    color: var(--primary-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
    object-fit: contain;
}

/* ---------------------------------
 * -- 2. LAYOUT & HELPERS
 * --------------------------------- */
.container {
    max-width: 1200px; /* Wider container for a more spacious feel */
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0; /* Reduced padding for better balance */
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
}

/* NEW: Elegant divider for sections */
.section-divider {
    width: 80px;
    height: 2px;
    background-color: var(--accent-color);
    margin: 0 auto 4rem; /* Spacing below the divider */
}

.gold-text {
    color: var(--accent-color);
}

/* ---------------------------------
 * -- 3. HEADER
 * --------------------------------- */
header {
    background-color: rgba(253, 253, 251, 0.85); /* Default to light background */
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1002; /* Ensures header and its menu are above all other content */
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
    padding: 0.5rem 0;
}

header.transparent-header:not(.scrolled) {
    background-color: transparent;
    backdrop-filter: none;
    box-shadow: none;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px; /* Slightly reduced height */
}

header .logo {
    font-size: 1.8rem;
    font-weight: 600;
    font-family: var(--heading-font);
}

header ul {
    display: flex;
    list-style: none;
    gap: 1rem; /* Use gap for spacing */
}

header ul li a {
    color: var(--primary-color); /* Default to dark text */
    padding: 0.5rem 1rem;
    font-weight: 500;
    position: relative;
}

/* On the homepage, before scrolling, make the text light */
header.transparent-header:not(.scrolled) ul li a {
    color: var(--light-text-color);
}

/* Hover color for dark text links */
header ul li a:hover, header ul li a.nav-active {
    color: var(--accent-color);
}

/* Underline effect for desktop menu */
header ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}
/* On the homepage, before scrolling, the underline should be light to be visible */
header.transparent-header:not(.scrolled) ul li a::after {
    background-color: var(--light-text-color);
    transition: none; /* Disable transition for this specific case to avoid color flash */
}
header ul li a:hover::after, header ul li a.nav-active::after {
    width: 80%;
}


.hamburger { display: none; }

/* Dropdown Menu Styles */
.dropdown { position: relative; }
.dropdown .caret { font-size: 0.7rem; margin-left: 5px; transition: transform 0.3s ease; }
.dropdown:hover .caret { transform: rotate(180deg); }
.dropdown-menu {
    position: absolute;
    top: 120%; /* Increased distance from parent */
    left: 0;
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    list-style: none;
    padding: 0.5rem 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    top: 100%;
}
.dropdown-menu a {
    color: var(--primary-color) !important;
    display: block;
    padding: 0.75rem 1.5rem;
}
/* Ensure dropdown link hover color is correct on homepage */
header.transparent-header:not(.scrolled) .dropdown-menu a {
    color: var(--primary-color) !important;
}

.dropdown-menu a:hover { background-color: var(--bg-color); }


/* ---------------------------------
 * -- 4. BUTTONS
 * --------------------------------- */
.btn-primary, .btn-outline {
    display: inline-block;
    padding: 14px 35px; /* Slightly larger padding */
    border-radius: 8px; /* Softer, more classic radius */
    font-weight: 500;
    text-transform: uppercase; /* Classic button style */
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #a98421; /* Darker gold on hover */
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.btn-secondary {
    font-weight: 500;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 5px;
}
.btn-secondary::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}
.btn-secondary:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}


/* ---------------------------------
 * -- 5. HERO SLIDESHOW
 * --------------------------------- */
.hero-slider {
    position: relative;
    height: 100vh;
    overflow: hidden;
    background-color: var(--primary-color); /* Fallback color */
}
.slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 1s cubic-bezier(0.7, 0, 0.3, 1);
}
.slides .slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(13, 27, 42, 0.5), rgba(13, 27, 42, 0.8)); /* Gradient overlay for depth */
}
.slide-content {
    position: relative;
    z-index: 2;
    color: var(--light-text-color);
    max-width: 800px;
    padding: 1rem;
}
.slide-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem); /* Fluid typography */
    color: var(--light-text-color);
    margin-bottom: 1.5rem;
}
.slide-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    opacity: 0.9;
}
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 3;
    opacity: 0;
    transition: var(--transition);
}
.hero-slider:hover .slider-nav { opacity: 1; } /* Show controls on hover */
.slider-nav button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--light-text-color);
    font-size: 1.5rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: var(--transition);
}
.slider-nav button:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    border-color: var(--accent-color);
}
.slider-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background-color: transparent;
    cursor: pointer;
    transition: var(--transition);
}
.dot.active {
    background-color: var(--light-text-color);
    transform: scale(1.1);
}

/* --- Diwali Ticker Banner --- */
.diwali-banner {
    background: linear-gradient(45deg, #ff8c00, #ff4500); /* Orange to Red gradient */
    padding: 1rem 0;
    overflow: hidden;
    border-top: 3px solid var(--accent-color);
    border-bottom: 3px solid var(--accent-color);
}

.diwali-ticker {
    white-space: nowrap;
}

.diwali-ticker-content {
    display: inline-block;
    animation: ticker-scroll 30s linear infinite;
}

.diwali-ticker-content span {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    padding: 0 2rem;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%); /* Scrolls half the width for a seamless loop */
    }
}

/* ---------------------------------
 * -- 6. CATEGORY HIGHLIGHTS
 * --------------------------------- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
}
.category-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition);
}
.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}
.category-icon { margin: 0 auto 1.5rem; border-radius: 50%; }
.category-card h3 { margin-bottom: 0.5rem; }
.category-card p {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

/* ---------------------------------
 * -- 7. WHY CHOOSE US
 * --------------------------------- */
.why-us-section {
    background-color: #fff;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.why-us-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    text-align: center;
}
.feature-box .icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-family: var(--heading-font);
}
.feature-box h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 1.3rem;
}

/* ---------------------------------
 * -- 8. FEATURED PRODUCTS
 * --------------------------------- */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* Reduced min-width */
    align-items: stretch; /* Ensures all cards in a row have the same height */
    gap: 2.5rem;
}
.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}
.product-card img {
    height: 200px; /* Reduced height for a rectangular look */
    border-bottom: 1px solid var(--border-color);
    object-fit: cover; /* Ensures image covers the area without distortion */
}
.product-card .info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.product-card .info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    /* flex-grow: 1; */ /* Removed to reduce extra space */
}
.product-card .info .price {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Pricing styles copied from products.css for homepage consistency */
.product-price-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem; 
    /* margin-top: auto; Removed to stack content from top */
    margin-bottom: 1rem; /* Reduced space below price */
}

.selling-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
}

.mrp-price {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* ---------------------------------
 * -- 9. BRAND BANNER (PARALLAX)
 * --------------------------------- */
.brand-banner {
    background-color: var(--primary-color); /* Use the brand's primary dark blue */
    min-height: 450px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-text-color);
}
.banner-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}
.banner-content h2 {
    font-size: 2.8rem;
    color: var(--light-text-color);
    margin-bottom: 2rem;
}

/* ---------------------------------
 * -- 10. TESTIMONIALS
 * --------------------------------- */
.testimonial-slider { /* (Remaining styles are generally good) */ }
.testimonial-slides { /* (Remaining styles are generally good) */ }
.testimonial-slide .quote {
    font-size: 1.3rem; /* Slightly larger font */
    font-style: italic;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.testimonial-slide .author .stars {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    display: block;
    font-size: 1.2rem;
}


/* ---------------------------------
 * -- 11. FOOTER
 * --------------------------------- */
footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.7);
    padding: 5rem 1rem 2rem;
    margin-top: 4rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr); /* Give brand column more space */
    gap: 3rem;
    margin-bottom: 4rem;
}
.footer-brand .logo {
    font-family: var(--heading-font);
    font-size: 1.8rem;
}
.footer-brand .tagline {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}
footer h4 {
    color: var(--light-text-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 500;
}
.footer-links ul, .footer-contact { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.8rem; }
.footer-links a, .footer-contact a { color: rgba(255, 255, 255, 0.7); }
.footer-links a:hover, .footer-contact a:hover { color: var(--accent-color); padding-left: 5px; }
.social-icons { display: flex; gap: 1rem; }
.social-icons a { color: var(--light-text-color); font-size: 1.3rem; }
.social-icons a:hover { color: var(--accent-color); transform: scale(1.1); }
.footer-copyright {
    text-align: center;
    padding-top: 2.5rem;
    border-top: 1px solid var(--secondary-color);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* ---------------------------------
 * -- 12. ANIMATIONS & UTILITIES
 * --------------------------------- */
.animate-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-up.visible {
    opacity: 1;
    transform: translateY(0);
}
.back-to-top-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: var(--primary-color);
    color: var(--light-text-color);
    width: 50px;
    height: 50px;
    border-radius: 8px; /* Consistent border radius */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}
.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top-btn:hover { background-color: var(--accent-color); color: var(--primary-color); }


/* ---------------------------------
 * -- 13. RESPONSIVE DESIGN
 * --------------------------------- */
@media (max-width: 992px) {
    .why-us-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
        gap: 2rem;
    }
    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .section { padding: 4rem 0; }
    .section-title, .banner-content h2 { font-size: 2.2rem; }

    /* Mobile Menu Navigation */
    header ul {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background-color: var(--bg-color); /* Use background-color to ensure it's not transparent */
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 100%;
        transition: right 0.4s ease-in-out;
        z-index: 1010; /* Ensures menu is above other content */
        gap: 2rem;
    }
    header ul.nav-open { right: 0; }
    header ul li a, header.scrolled ul li a {
        font-size: 1.8rem;
        color: var(--primary-color);
    }
    /* This rule is more specific and ensures links are dark inside the open mobile menu, even on the homepage */
    header ul.nav-open li a {
        color: var(--primary-color) !important;
    }
    header ul li a::after { display: none; } /* Hide underline effect on mobile */

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 2rem;
        height: 2rem;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1011; /* Increased to be on top of the open menu (z-index: 1010) */
        position: relative;
    }
    .hamburger span {
        width: 2rem;
        height: 3px;
        background: var(--light-text-color); /* Removed redundant default color */
        border-radius: 10px;
        transition: all 0.3s linear;
        position: relative;
        transform-origin: 1px;
    }
    header.scrolled .hamburger span { background: var(--primary-color); }

    /* Hamburger color on transparent header */
    header.transparent-header:not(.scrolled) .hamburger span {
        background: var(--light-text-color);
    }

    /* Animated Hamburger Icon */
    .nav-open + .hamburger span:nth-child(1) { transform: rotate(45deg); }
    .nav-open + .hamburger span:nth-child(2) { opacity: 0; transform: translateX(20px); }
    .nav-open + .hamburger span:nth-child(3) { transform: rotate(-45deg); }
    /* When menu is open, force the close icon to be dark, regardless of scroll position */
    .nav-open + .hamburger span {
        background: var(--primary-color);
    }

    /* Mobile Dropdown */
    .dropdown { width: 100%; text-align: center; }
    .dropdown-menu {
        position: static;
        background: none;
        box-shadow: none;
        border: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        padding: 0;
        margin-top: 1rem;
        min-width: unset;
    }
    .dropdown.open .dropdown-menu { display: block; }
    .dropdown-menu a { font-size: 1.2rem; padding: 0.5rem 1rem; }

    /* Ensure dropdown links are dark on mobile */
    .dropdown-menu a, .dropdown-menu a:hover {
        color: var(--primary-color) !important;
    }

    /* Section Adjustments */
    .hero-slider { height: 80vh; min-height: 500px; }
    .brand-banner { background-attachment: scroll; } /* Disable parallax on mobile */
    .footer-grid, .social-icons { text-align: center; }
    .social-icons { justify-content: center; }
    .why-us-grid { grid-template-columns: 1fr; } /* Single column on mobile */
}

/* --- Custom Design Section --- */
.custom-design-section {
    padding: 6rem 0;
    background-color: var(--primary-color); /* Solid blue background */
    text-align: center;
    color: #fff; /* White text */
}

.custom-design-content {
    max-width: 800px;
    margin: 0 auto;
}

.custom-design-content .section-title {
    color: #fff; /* Ensure title is white */
    margin-bottom: 2rem;
}

.custom-design-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}