/* --- Global Reset & Variables --- */
:root {
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --text-dark: #1A1A1A;
    --text-muted: #666666;
    --accent-blue: #4A90E2;
    --accent-blue-hover: #357ABD;
    --accent-glow: rgba(74, 144, 226, 0.25);
    --border-color: #EAEAEA;
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 12px 40px rgba(0, 0, 0, 0.08);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Plus Jakarta Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-white);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* --- Layout Container & Utility --- */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background-color: var(--text-dark);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: var(--accent-blue);
    box-shadow: 0 10px 20px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-white {
    background-color: var(--bg-white);
    color: var(--text-dark);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* --- Navbar (Sticky on Scroll) --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-dark);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    outline: none;
    font-family: var(--font-main);
    font-size: 0.85rem;
    width: 200px;
    transition: var(--transition-smooth);
    background-color: var(--bg-light);
}

.search-box input:focus {
    width: 260px;
    border-color: var(--accent-blue);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.search-box i {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.cart-toggle-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    position: relative;
    color: var(--text-dark);
    transition: var(--transition-smooth);
}

.cart-toggle-btn:hover {
    color: var(--accent-blue);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: var(--text-dark);
    color: var(--bg-white);
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Hero Section --- */
.hero {
    max-width: 1300px;
    margin: 120px auto 4rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    min-height: 70vh;
}

.hero-subtitle {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--accent-blue);
    display: inline-block;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-image img {
    width: 85%;
    border-radius: 24px;
    object-fit: cover;
    z-index: 2;
    box-shadow: var(--shadow-medium);
}

.image-bg-blob {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--bg-light);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    top: -20px;
    z-index: 1;
}

/* --- Categories Section --- */
.categories-section {
    max-width: 1300px;
    margin: 6rem auto;
    padding: 0 2rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background-color: var(--bg-light);
    border-radius: 16px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.category-icon {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.category-card h3 {
    font-size: 1rem;
    font-weight: 600;
}

.category-card:hover, .category-card.active {
    background-color: var(--bg-white);
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-soft);
    transform: translateY(-5px);
}

.category-card:hover .category-icon, .category-card.active .category-icon {
    color: var(--accent-blue);
}

/* --- Deals Section --- */
.deals-section {
    max-width: 1300px;
    margin: 6rem auto;
    padding: 0 2rem;
}

.deal-banner {
    background: linear-gradient(135deg, #eef2f3 0%, #8e9eab 100%);
    background-image: url('https://images.unsplash.com/photo-1607082348824-0a96f2a4b9da?auto=format&fit=crop&w=1500&q=80');
    background-size: cover;
    background-position: center;
    border-radius: 24px;
    padding: 5rem 4rem;
    color: var(--bg-white);
    position: relative;
    overflow: hidden;
}

.deal-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.deal-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
}

.deal-tag {
    background-color: var(--accent-blue);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.deal-content h2 {
    font-size: 3rem;
    margin: 1rem 0;
    font-weight: 700;
    line-height: 1.2;
}

.deal-content p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* --- Products Section --- */
.products-section {
    max-width: 1300px;
    margin: 6rem auto;
    padding: 0 2rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: var(--bg-white);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 1rem;
    position: relative;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
    border-color: transparent;
}

.product-img-wrapper {
    background-color: var(--bg-light);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img-wrapper img {
    max-width: 100%;
    height: auto;
    transition: var(--transition-smooth);
}

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

.wishlist-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--bg-white);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    color: var(--text-muted);
    transition: var(--transition-smooth);
    z-index: 3;
}

.wishlist-btn:hover {
    color: #ef4444;
}

.wishlist-btn.active i {
    font-weight: 900;
    color: #ef4444;
}

.product-info {
    padding: 1rem 0.5rem 0.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.product-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--text-dark);
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
}

.add-cart-btn {
    background-color: var(--bg-light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.product-card:hover .add-cart-btn {
    background-color: var(--text-dark);
    color: var(--bg-white);
}

.add-cart-btn:hover {
    background-color: var(--accent-blue) !important;
    color: var(--bg-white) !important;
}

/* --- Testimonials --- */
.testimonials-section {
    background-color: var(--bg-light);
    padding: 6rem 2rem;
}

.testimonials-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.testimonial-card {
    background-color: var(--bg-white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.stars {
    color: #FFC107;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.testimonial-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-card h4 {
    font-weight: 600;
}

/* --- Cart Drawer Panel --- */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100%;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-medium);
    z-index: 1002;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.3);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.cart-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.close-cart-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
}

.cart-drawer-items {
    flex-grow: 1;
    padding: 2rem;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    background-color: var(--bg-light);
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.cart-item-price {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-blue);
}

.cart-item-qty {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1rem;
}

.cart-drawer-footer {
    padding: 2rem;
    border-top: 1px solid var(--border-color);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.checkout-btn {
    width: 100%;
    justify-content: center;
}

/* --- Toast Popups --- */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--text-dark);
    color: var(--bg-white);
    padding: 0.8rem 2rem;
    border-radius: 30px;
    box-shadow: var(--shadow-medium);
    z-index: 2000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 500;
}

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

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 5rem 2rem 2rem 2rem;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    line-height: 1.6;
    max-width: 320px;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-icons a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.social-icons a:hover {
    color: var(--accent-blue);
}

.footer-links h4, .footer-newsletter h4 {
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--text-dark);
}

.footer-newsletter p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    position: relative;
}

.newsletter-form input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    outline: none;
    font-family: var(--font-main);
}

.newsletter-form button {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--text-dark);
    color: var(--bg-white);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.newsletter-form button:hover {
    background-color: var(--accent-blue);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        margin-top: 100px;
    }
    .hero-description {
        margin: 0 auto 2.5rem auto;
    }
    .hero-image {
        order: -1;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .cart-drawer {
        width: 100%;
        right: -100%;
    }
    .nav-links {
        display: none; /* Desktop Links collapse on Mobile devices */
    }
    .deal-banner {
        padding: 3rem 1.5rem;
    }
    .deal-content h2 {
        font-size: 2rem;
    }
}