/* --- BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #1a1a1a;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 8%;
    position: fixed; 
    width: 100%;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(10px); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    transition: all 0.3s ease;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span {
    color: #ff4757; 
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #ff4757;
}

.nav-icons {
    display: flex;
    gap: 25px;
    font-size: 1.2rem;
}

.nav-icons a:hover {
    color: #ff4757;
}

/* Hide hamburger on desktop */
.menu-toggle {
    display: none;
}

/* --- HERO SECTION --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 150px 8% 80px; 
    background: linear-gradient(135deg, #ffffff 0%, #f0f2f5 100%);
    min-height: 100vh;
}

.hero-text {
    width: 50%;
}

.badge {
    background: #ffeaa7;
    color: #d63031;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
}

.hero-text h1 {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 20px;
}

.highlight {
    color: #ff4757;
}

.hero-text p {
    font-size: 1.2rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 80%;
}

.btn {
    display: inline-block;
    background: #1a1a1a;
    color: white;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.3s, background 0.3s;
}

.btn:hover {
    background: #ff4757;
    transform: translateY(-3px);
}

/* --- HERO IMAGE --- */
.hero-image {
    width: 50%;
    display: flex;
    justify-content: center;
}

.hero-image img {
    width: 100%;
    max-width: 600px;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    animation: float 5s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(-2deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* --- PRODUCTS SECTION --- */
.products-section {
    padding: 100px 5%; 
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
    margin-top: 10px;
}

/* --- PRODUCT GRID (EXACTLY 3 COLUMNS) --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: white;
    border-radius: 20px;
    padding: 15px; 
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex; 
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.image-box {
    position: relative;
    background: #f4f4f4;
    border-radius: 15px;
    height: 220px; 
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    padding: 15px; 
    transition: transform 0.4s ease;
}

.product-card:hover .image-box img {
    transform: scale(1.1);
}

.add-to-cart {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: #1a1a1a;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.add-to-cart:hover {
    background: #ff4757;
    transform: scale(1.1);
}

.product-info {
    padding: 15px 5px 5px;
}

.product-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.product-info p {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.price {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ff4757;
}

/* --- SHOPPING CART STYLES --- */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px; 
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: right 0.4s ease;
}

.cart-sidebar.active {
    right: 0; 
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid #eee;
}

.cart-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

.empty-msg {
    color: #888;
    text-align: center;
    margin-top: 50px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.cart-item-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-info span {
    color: #ff4757;
    font-weight: 700;
}

.remove-item {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.remove-item:hover {
    color: #ff4757;
}

.cart-footer {
    padding: 25px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.checkout-btn {
    width: 100%;
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 18px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.checkout-btn:hover {
    background: #ff4757;
}

#cart-count {
    background: #ff4757;
    color: white;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
    font-weight: 800;
}

/* --- ACTIVE NAVIGATION LINK --- */
.nav-links a.active {
    color: #ff4757;
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -8px; 
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #ff4757;
    border-radius: 3px;
    animation: fadeIn 0.3s ease;
}

/* --- SMOOTH PAGE TRANSITION --- */
body {
    animation: pageFadeIn 0.6s ease-in-out; 
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px); 
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- FOOTER --- */
footer {
    background: #1a1a1a;
    color: #e5e5e5;
    padding: 70px 8% 0;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 50px;
}

.footer-brand h3 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 15px;
    color: #fff;
}

.footer-brand h3 span {
    color: #ff4757;
}

.footer-brand p {
    color: #999;
    line-height: 1.7;
    font-size: 0.95rem;
    max-width: 300px;
}

.footer-col h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col ul li a {
    color: #999;
    font-size: 0.95rem;
    transition: color 0.3s, padding-left 0.3s;
}

.footer-col ul li a:hover {
    color: #ff4757;
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #999;
    font-size: 0.95rem;
}

.footer-contact li i {
    color: #ff4757;
    width: 18px;
}

.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e5e5e5;
    font-size: 1rem;
    transition: background 0.3s, transform 0.3s;
}

.footer-socials a:hover {
    background: #ff4757;
    transform: translateY(-3px);
}

/* --- FIXED FOOTER BOTTOM (CENTERED) --- */
.footer-bottom {
    border-top: 1px solid #2a2a2a;
    padding: 25px 0;
    color: #777;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
}

.footer-bottom p {
    margin: 4px 0;
}

/* --- SEARCH BAR --- */
.search-bar-container {
    position: fixed;
    top: 80px; 
    left: 0;
    width: 100%;
    background: white;
    padding: 0 8%;
    height: 0;
    overflow: hidden; 
    transition: height 0.3s ease, box-shadow 0.3s ease;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 rgba(0,0,0,0); 
}

.search-bar-container.active {
    height: 80px; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.08); 
}

.search-inner {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 800px;
    background: #f4f4f4;
    padding: 15px 25px;
    border-radius: 50px;
    gap: 15px;
}

.search-inner i {
    color: #888;
    font-size: 1.2rem;
}

.search-inner input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    color: #1a1a1a;
}

.close-search {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-search:hover {
    color: #ff4757;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 900px) {
    /* Show hamburger icon */
    .menu-toggle {
        display: block;
    }

    /* Mobile Dropdown Menu */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        align-items: center;
        padding: 0;
        gap: 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        max-height: 0; /* Hidden by default */
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
    }

    /* When JS adds 'active' class */
    .nav-links.active {
        max-height: 300px; 
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 18px 0;
        border-bottom: 1px solid #f4f4f4;
        width: 100%;
    }

    /* Hide the underline on mobile */
    .nav-links a.active::after {
        display: none;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }
    .hero-text, .hero-image {
        width: 100%;
    }
    .hero-text h1 {
        font-size: 3.5rem;
    }
    .hero-text p {
        margin: 0 auto 30px auto;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .search-bar-container.active {
        height: 70px; 
    }
    .search-inner {
        padding: 12px 20px;
    }
}

/* --- PHONE SPECIFIC TWEAKS (600px and below) --- */
@media (max-width: 600px) {
    .logo {
        font-size: 1.5rem;
    }

    .nav-icons {
        gap: 15px;
        font-size: 1.1rem;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }
    
    .hero {
        padding-top: 100px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .products-section {
        padding: 60px 5%;
    }

    .search-bar-container.active {
        height: 60px;
        padding: 0 4%;
    }
    .search-inner input {
        font-size: 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    .footer-brand p {
        max-width: 100%;
    }
}