/* --- ROOT VARIABLES & RESET --- */
:root {
    --primary: #4a6cf7;
    --primary-dark: #324bc2;
    --secondary: #ff6b6b;
    --text-main: #2b3445;
    --text-light: #7d879c;
    --bg-light: #f6f9fc;
    --white: #ffffff;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 25px rgba(0,0,0,0.15);
    --radius: 8px;
    --transition: all 0.3s ease;
}

body.dark-mode {
    --bg-light: #121212;
    --white: #1e1e2d;
    --text-main: #e0e0e0;
    --text-light: #a0a0a0;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
body { background-color: var(--bg-light); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }

/* --- HEADER & NAV --- */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    padding: 15px 0;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.header .container { display: flex; align-items: center; justify-content: space-between; }

.logo a { font-size: 28px; font-weight: 800; color: var(--primary); letter-spacing: -1px; }
.logo span { color: var(--secondary); }

.nav-menu { display: flex; gap: 30px; }
.nav-link { font-weight: 500; color: var(--text-main); position: relative; font-size: 15px; }
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--primary); transition: var(--transition);
}
.nav-link:hover::after { width: 100%; }

.header-icons { display: flex; align-items: center; gap: 20px; }
.icon-btn { font-size: 20px; color: var(--text-main); position: relative; background: none; transition: var(--transition); }
.icon-btn:hover { color: var(--primary); transform: translateY(-2px); }
.cart-count {
    position: absolute; top: -8px; right: -8px; background: var(--secondary);
    color: white; font-size: 11px; width: 18px; height: 18px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* --- HERO SLIDER --- */
.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #000;
}
.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; transition: opacity 1s ease-in-out;
    background-size: cover; background-position: center;
}
.slide.active { opacity: 1; }
.slide::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); /* Overlay for text readability */
}

.hero-content {
    position: relative; z-index: 2; height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
    color: white; padding-left: 50px;
}
.hero-content h2 { font-size: 20px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px; animation: slideUp 0.8s ease forwards; }
.hero-content h1 { font-size: 60px; font-weight: 800; line-height: 1.1; margin-bottom: 20px; animation: slideUp 1s ease forwards; }
.hero-content p { font-size: 18px; margin-bottom: 30px; max-width: 600px; opacity: 0.9; animation: slideUp 1.2s ease forwards; }

/* Buttons */
.btn {
    padding: 12px 30px; border-radius: 50px; font-weight: 600; text-transform: uppercase;
    font-size: 14px; letter-spacing: 1px; transition: var(--transition); display: inline-block;
}
.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 15px rgba(74, 108, 247, 0.4); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-3px); box-shadow: 0 6px 20px rgba(74, 108, 247, 0.6); }

/* --- SECTIONS --- */
.section-padding { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 36px; font-weight: 700; color: var(--text-main); margin-bottom: 10px; }
.section-title p { color: var(--text-light); }

/* Features (Why Choose Us) */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.feature-box {
    background: var(--white); padding: 30px; border-radius: var(--radius);
    text-align: center; box-shadow: var(--shadow-sm); transition: var(--transition);
}
.feature-box:hover { transform: translateY(-10px); box-shadow: var(--shadow-md); }
.feature-icon { font-size: 40px; color: var(--primary); margin-bottom: 20px; }
.feature-box h3 { font-size: 18px; margin-bottom: 10px; }

/* Product Grid */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 30px; }
.product-card {
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm); transition: var(--transition); position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-5px); }

.product-img { position: relative; height: 250px; overflow: hidden; background: #f0f0f0; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.product-card:hover .product-img img { transform: scale(1.1); }
.product-overlay {
    position: absolute; bottom: -50px; left: 0; width: 100%; display: flex; justify-content: center;
    gap: 10px; padding: 15px; background: rgba(255,255,255,0.9); transition: 0.3s;
}
.product-card:hover .product-overlay { bottom: 0; }

.card-btn {
    width: 40px; height: 40px; border-radius: 50%; background: var(--text-main); color: white;
    display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.card-btn:hover { background: var(--primary); }

.product-details { padding: 20px; }
.category-tag { font-size: 12px; color: var(--primary); font-weight: 600; text-transform: uppercase; }
.product-name { font-size: 16px; font-weight: 600; margin: 5px 0 10px; color: var(--text-main); }
.product-price { font-size: 18px; font-weight: 700; color: var(--text-main); }
.rating { color: #FFD700; font-size: 12px; float: right; margin-top: 4px; }

/* Testimonials */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.testimonial-card { background: var(--white); padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.user-profile { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.user-img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.user-info h4 { font-size: 16px; margin: 0; }
.user-info span { font-size: 12px; color: var(--text-light); }
.quote { font-style: italic; color: var(--text-light); }

/* --- FOOTER --- */
.footer { background: #1a1a1a; color: #fff; padding: 70px 0 20px; margin-top: 50px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 50px; }
.footer-col h3 { font-size: 18px; margin-bottom: 20px; color: var(--white); position: relative; padding-bottom: 10px; }
.footer-col h3::after { content: ''; position: absolute; bottom: 0; left: 0; width: 40px; height: 2px; background: var(--primary); }
.footer-col p { color: #a0a0a0; margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #a0a0a0; transition: 0.3s; }
.footer-col ul li a:hover { color: var(--primary); padding-left: 5px; }

.social-links a {
    display: inline-flex; width: 35px; height: 35px; background: rgba(255,255,255,0.1);
    align-items: center; justify-content: center; border-radius: 50%; margin-right: 10px; transition: 0.3s;
}
.social-links a:hover { background: var(--primary); }

.copyright { text-align: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; color: #777; font-size: 14px; }

/* Toast Notification */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 2000; }
.toast {
    background: white; padding: 15px 25px; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px;
    margin-bottom: 10px; border-left: 4px solid var(--primary); animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Mobile Menu */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.bar { width: 25px; height: 3px; background: var(--text-main); transition: 0.3s; }

@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-menu {
        position: fixed; top: 70px; left: -100%; width: 100%; height: 100vh;
        background: var(--white); flex-direction: column; align-items: center;
        padding-top: 50px; transition: 0.3s;
    }
    .nav-menu.active { left: 0; }
    .hero-content h1 { font-size: 36px; }
    .hero-slider { height: 500px; }
}