/* RESET */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Segoe UI',sans-serif;
}

body{
    background:#f5f7fa;
    color:#333;
    transition:0.3s;
}

/* DARK MODE */

body.dark{
    background:#121212;
    color:white;
}

body.dark .product-card,
body.dark .dashboard-card,
body.dark .modal-content,
body.dark .featured-product,
body.dark .compare-section,
body.dark .recent-section{
    background:#1e1e1e;
    color:white;
}

/* NAVBAR */

.navbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:15px 8%;
    background:#0d6efd;
    color:white;
    position:sticky;
    top:0;
    z-index:1000;
}

.nav-actions{
    display:flex;
    gap:15px;
    align-items:center;
}

.nav-actions div,
#themeToggle{
    background:white;
    color:#333;
    padding:8px 15px;
    border-radius:8px;
    font-weight:600;
}

#themeToggle{
    cursor:pointer;
    border:none;
}

/* HERO */

.hero{
    height:60vh;
    display:flex;
    justify-content:center;
    align-items:center;
    text-align:center;
    background:linear-gradient(135deg,#0d6efd,#4dabf7);
    color:white;
}

.hero-content h1{
    font-size:3rem;
    margin-bottom:20px;
}

.hero-content p{
    max-width:700px;
    margin:auto;
    margin-bottom:20px;
}

.hero-content button{
    padding:12px 25px;
    border:none;
    border-radius:8px;
    background:white;
    color:#0d6efd;
    font-weight:bold;
    cursor:pointer;
}

/* PRODUCT OF DAY */

.featured-product{
    margin:30px;
    padding:25px;
    background:white;
    border-radius:15px;
    text-align:center;
    box-shadow:0 4px 12px rgba(0,0,0,.1);
}

.featured-product h2{
    margin-bottom:20px;
}

/* DASHBOARD */

.dashboard{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
    padding:20px 8%;
}

.dashboard-card{
    background:white;
    padding:25px;
    border-radius:15px;
    text-align:center;
    box-shadow:0 4px 10px rgba(0,0,0,.08);
}

.dashboard-card h3{
    font-size:2rem;
    color:#0d6efd;
}

/* FILTERS */

.controls{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:15px;
    padding:30px 20px;
}

.controls input,
.controls select{
    padding:12px;
    min-width:220px;
    border:1px solid #ddd;
    border-radius:10px;
    outline:none;
}

.price-filter{
    text-align:center;
    margin-bottom:25px;
}

.price-filter input{
    width:250px;
}

/* PRODUCT GRID */

.product-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:25px;
    padding:20px 8%;
}

.product-card{
    background:white;
    border-radius:15px;
    overflow:hidden;
    box-shadow:0 4px 12px rgba(0,0,0,.08);
    transition:0.3s;
    position:relative;
}

.product-card:hover{
    transform:translateY(-8px);
}

.product-card img{
    width:100%;
    height:220px;
    object-fit:cover;
}

.product-info{
    padding:18px;
}

.product-info h3{
    margin-bottom:10px;
}

.price{
    font-size:1.3rem;
    color:#0d6efd;
    font-weight:bold;
}

.rating{
    color:#ffc107;
    margin:8px 0;
}

.in-stock{
    color:green;
    font-weight:600;
}

.out-stock{
    color:red;
    font-weight:600;
}

/* BADGES */

.badge{
    position:absolute;
    top:12px;
    left:12px;
    background:#ff5722;
    color:white;
    padding:6px 10px;
    border-radius:20px;
    font-size:.8rem;
    font-weight:bold;
}

.badge.sale{
    background:#dc3545;
}

.badge.new{
    background:#198754;
}

.badge.trending{
    background:#ff9800;
}

/* BUTTONS */

.product-buttons{
    display:flex;
    gap:10px;
    margin-top:15px;
}

.btn{
    flex:1;
    padding:10px;
    border:none;
    border-radius:8px;
    cursor:pointer;
    font-weight:600;
}

.cart-btn{
    background:#0d6efd;
    color:white;
}

.wishlist-btn{
    background:#ff4081;
    color:white;
}

.quick-btn{
    background:#20c997;
    color:white;
}

/* PAGINATION */

.pagination{
    display:flex;
    justify-content:center;
    gap:10px;
    margin:30px 0;
}

.pagination button{
    padding:10px 15px;
    border:none;
    border-radius:8px;
    cursor:pointer;
    background:#0d6efd;
    color:white;
}

.pagination button.active{
    background:#198754;
}

/* COMPARE SECTION */

.compare-section{
    margin:30px;
    padding:25px;
    background:white;
    border-radius:15px;
}

.compare-section h2{
    margin-bottom:15px;
}

/* RECENTLY VIEWED */

.recent-section{
    margin:30px;
    padding:25px;
    background:white;
    border-radius:15px;
}

.recent-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:15px;
}

/* MODAL */

.modal{
    display:none;
    position:fixed;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.6);
    z-index:2000;
}

.modal-content{
    background:white;
    width:80%;
    max-width:700px;
    margin:5% auto;
    padding:25px;
    border-radius:15px;
    position:relative;
}

.close{
    position:absolute;
    right:20px;
    top:15px;
    font-size:30px;
    cursor:pointer;
}

.modal img{
    width:100%;
    border-radius:10px;
}

/* SCROLL TOP */

#scrollTopBtn{
    position:fixed;
    bottom:20px;
    right:20px;
    width:50px;
    height:50px;
    border:none;
    border-radius:50%;
    background:#0d6efd;
    color:white;
    font-size:22px;
    cursor:pointer;
    display:none;
}

/* FOOTER */

footer{
    background:#0d6efd;
    color:white;
    text-align:center;
    padding:30px;
    margin-top:40px;
}

footer h3{
    margin-bottom:10px;
}

/* RESPONSIVE */

@media(max-width:768px){

    .navbar{
        flex-direction:column;
        gap:15px;
    }

    .hero-content h1{
        font-size:2rem;
    }

    .controls{
        flex-direction:column;
        align-items:center;
    }

    .controls input,
    .controls select{
        width:90%;
    }

    .product-buttons{
        flex-direction:column;
    }
}

@media(max-width:480px){

    .hero{
        height:50vh;
    }

    .hero-content h1{
        font-size:1.6rem;
    }

    .dashboard{
        padding:20px;
    }

    .product-grid{
        padding:20px;
    }
}