* {
    font-family: sans-serif;
}

.best-selling-product {
    padding: 80px 0;
    text-align: center;
    background: #fff;
    width: 100%;
    margin: 0 auto;
}

.best-selling-product h2 {
    font-size: 42px;
    color: #0D1B39;
    margin-bottom: 40px;
    font-weight: 700;
}

.product-filters {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
}

.filter-btn {
    padding: 12px 32px;
    border: none;
    background: #F7F7F7;
    border-radius: 30px;
    color: #0D1B39;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
}

.filter-btn.active {
    background: #0D1B39;
    color: white;
}

.product-carousel {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 60px;
}

.carousel-btn {
    background: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #0D1B39;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: #0D1B39;
    color: white;
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

.product-filters {
    background: rgba(238, 238, 238, 0.8);
    width: 27vw;
    border-radius: 50px;
    margin: auto;
    padding: 12px 10px;
}

.product-container {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 20px;
    width: 100%;
    padding: 20px 0;
}

.product-container::-webkit-scrollbar {
    display: none;
}

.product-card {
    width: calc(25% - 22.5px);
    /* 25% width minus the gap */
    padding: 20px;
    background: white;
    border-radius: 20px;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.product-card:hover {
    /* transform: translateY(-50px); */
    transform: scale(1.12);
}

.product-filters button:hover{
    transform: translateY(-10px);
}

.product-card img {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
}

.category {
    color: #8D8D8D;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.product-card h3 {
    margin: 8px 0;
    color: #0D1B39;
    font-size: 20px;
    font-weight: 600;
}

.rating {
    color: #FFB23F;
    margin-bottom: 15px;
    font-size: 18px;
    display: flex;
    gap: 4px;
}

.star {
    color: #FFB23F;
    font-size: 16px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 24px;
    font-weight: bold;
    color: #0D1B39;
}

.price::before {
    content: "$";
    font-size: 16px;
    vertical-align: top;
    margin-right: 2px;
}

.add-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #0D1B39;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.add-btn:hover {
    background: #FFB23F;
}

.view-all {
    display: inline-flex;
    align-items: center;
    margin-top: 40px;
    color: #FFB23F;
    text-decoration: none;
    font-weight: 500;
    gap: 8px;
    font-size: 18px;
}

.view-all span {
    transition: transform 0.3s ease;
}

.view-all:hover span {
    transform: translateX(5px);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .product-container {
        justify-content: flex-start;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        padding: 20px 0;
    }

    .product-card {
        scroll-snap-align: start;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .best-selling-product {
        padding: 40px 15px;
    }

    .best-selling-product h2 {
        font-size: 32px;
        margin-bottom: 30px;
    }

    .product-filters {
        flex-wrap: wrap;
        gap: 10px;
        padding: 0 10px;
        margin-bottom: 30px;
    }

    .filter-btn {
        font-size: 14px;
        padding: 8px 20px;
    }

    .product-carousel {
        padding: 0 10px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .product-card {
        width: 250px;
        padding: 20px;
    }

    .product-card h3 {
        font-size: 16px;
    }

    .category {
        font-size: 12px;
    }

    .price {
        font-size: 18px;
    }

    .star {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .best-selling-product h2 {
        font-size: 28px;
    }

    .product-card {
        width: 220px;
        padding: 15px;
    }

    .carousel-btn {
        display: none;
    }

    .product-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .product-filters {
        padding: 10px 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 80vw;
    }
}