* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

.hero-section {
    background: linear-gradient(to right, #007cf0, #00dfd8);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}

.badge-custom {
    background-color: white;
    color: #007cf0;
    font-weight: 600;
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    margin: 0.3rem 0;
}

.highlight {
    color: gold;
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 1rem auto 2rem;
    line-height: 1.5;
}

.explore-btn {
    background: white;
    color: #007cf0;
    padding: 0.7rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.explore-btn:hover {
    background: #f0f0f0;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-item h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.stat-item p {
    margin: 0;
    font-size: 1rem;
}


/* Responsive Design */

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }
    .hero-section p {
        font-size: 1rem;
        padding: 0 1rem;
    }
    .explore-btn {
        font-size: 0.95rem;
        padding: 0.6rem 1.2rem;
    }
    .stats {
        gap: 1.5rem;
        margin-top: 2rem;
    }
    .stat-item h2 {
        font-size: 1.6rem;
    }
}

.mobile-toggle-btn {
    display: none;
    background: #007bff;
    color: white;
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
}

.filter-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: #fff;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.2);
    padding: 1rem;
    transition: left 0.3s ease;
    z-index: 1000;
}

.filter-sidebar.active {
    left: 0;
}

.filter-sidebar h2 {
    margin-top: 0;
}

.filter-sidebar .close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    float: right;
    cursor: pointer;
}

.filter-form input,
.filter-form select,
.filter-form button {
    width: 100%;
    margin-bottom: 1rem;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.filter-form button {
    background-color: #28a745;
    color: white;
    border: none;
}


/* Desktop filter form */

.desktop-filter {
    display: flex;
    gap: 0.7rem;
    background-color: #f5f5f5;
    padding: 2rem;
    border-radius: 8px;
    align-items: flex-end;
}

.desktop-filter .form-group {
    flex: 1 1 18%;
}

.desktop-filter label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: bold;
}

.desktop-filter input,
.desktop-filter select {
    width: 100%;
    padding: 7px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.desktop-filter .submit-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 9px;
    width: 100%;
    border-radius: 4px;
}


/* Mobile styles */

@media (max-width: 768px) {
    .mobile-toggle-container {
        display: flex;
        justify-content: center;
        margin: 1rem 0;
    }
    .mobile-toggle-btn {
        background-color: #007bff;
        color: white;
        font-size: 1rem;
        font-weight: bold;
        padding: 0.7rem 1.5rem;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        transition: background-color 0.2s ease;
    }
    .mobile-toggle-btn:hover {
        background-color: #0056b3;
    }
    @media screen and (min-width: 768px) {
        .mobile-toggle-container {
            display: none;
            /* Hide button on desktop */
        }
    }
    .mobile-toggle-btn {
        display: flex;
        align-items: center;
        margin-bottom: 1rem;
    }
    .desktop-filter {
        display: none;
    }
}


/* Grid layout for responsiveness */

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


/* Card container */

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 8px 6px 5px 2px rgb(0 0 0 / 25%);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
}


/* Discount badge */

.discount-badge {
    right: 2px;
    position: absolute;
    top: 2px;
    /* left: 1px; */
    background: #ff2c2c;
    color: white;
    font-size: 0.6rem;
    font-weight: bold;
    padding: 3px 5px;
    border-radius: 20px;
    z-index: 2;
}


/* Product image */

.product-image {
    margin: 0 auto;
    display: block;
    width: 70%;
    object-fit: cover;
    border-bottom: 1px solid #f0f0f0;
}


/* Info section */

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
}

.product-category {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}


/* Pricing */

.price-section {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.3rem;
    color: #2563eb;
    font-weight: bold;
}

.product-original {
    font-size: 1rem;
    color: #aaa;
    text-decoration: line-through;
}


/* Button */

.btn-primary {
    display: inline-block;
    width: 70%;
    text-align: center;
    background-color: #2563eb;
    color: white;
    padding: 10px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}


/* Base style: 2 per row */

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 1rem;
}


/* For small tablets and up (≥768px): 3 per row */

.custom-btn {
    display: inline-block;
    padding: 10px 18px;
    background-color: #007bff;
    /* Primary blue */
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease;
}

.custom-btn:hover {
    background-color: #0056b3;
    /* Darker blue on hover */
}


/* Phone view adjustments */

@media (max-width: 576px) {
    .custom-btn {
        width: 100%;
        padding: 12px 0;
        font-size: 1.05rem;
    }
    .product-image {
        height: 120px;
    }
}

@media (min-width: 768px) {
    .product-image {
        width: 12rem;
        height: 13rem;
        object-fit: cover;
        border-bottom: 1px solid #f0f0f0;
    }
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* For desktops and larger (≥1024px): 4 per row */

@media (min-width: 1024px) {
    .product-grid {
        .discount-badge {
            top: 4px;
            right: 5px;
            font-size: 0.8rem;
            padding: 4px 8px;
        }
        padding: 1rem 4rem;
        grid-template-columns: repeat(4, 1fr);
    }
}