/* Bestsellers Section */
.bestsellers-section {
    background-color: #fff;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.bestsellers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px 15px;
    max-width: 1400px;
    margin: 0 auto;
}

.bestsellers-title {
    font-size: 20px;
    font-weight: 600;
    color: #212121;
    margin: 0;
    text-transform: uppercase;
}

/* Horizontal Scroll Container */
.bestsellers-container {
    display: flex;
    overflow-x: auto;
    padding: 0 10px 15px;
    /* Bottom padding for shadow */
    gap: 15px;
    max-width: 1400px;
    margin: 0 auto;
    scrollbar-width: none;
    /* Firefox */
    -webkit-overflow-scrolling: touch;
}

.bestsellers-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* Product Card */
.product-card {
    min-width: 200px;
    /* Default desktop width */
    max-width: 200px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
    cursor: pointer;
    transition: box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Image */
.product-image {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Rating Badge */
.rating-badge {
    display: inline-flex;
    align-items: center;
    background-color: #388e3c;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    margin-bottom: 8px;
    gap: 3px;
}

.rating-badge i {
    font-size: 10px;
}

.review-count {
    color: #878787;
    font-size: 13px;
    font-weight: 500;
    margin-left: 5px;
}

/* Title */
.product-title {
    font-size: 14px;
    font-weight: 500;
    color: #212121;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Standard property */
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
    /* Fixed height for 2 lines */
}

/* Price Section */
.price-block {
    margin-top: auto;
    /* Push to bottom */
}

.current-price {
    font-size: 16px;
    font-weight: 600;
    color: #212121;
    display: block;
    margin-bottom: 4px;
}

.original-price {
    font-size: 13px;
    color: #878787;
    text-decoration: line-through;
    margin-right: 8px;
}

.discount-text {
    font-size: 13px;
    color: #388e3c;
    font-weight: 600;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .bestsellers-container {
        padding: 0 10px 10px;
        gap: 10px;
    }

    .product-card {
        min-width: 160px;
        /* Smaller width for mobile */
        max-width: 160px;
        padding: 10px;
    }

    .product-image {
        height: 120px;
    }

    .product-title {
        font-size: 13px;
        height: 36px;
    }

    .product-title {
        font-size: 13px;
        height: 36px;
    }
}

/* Navigation Buttons */
.bestsellers-scroll-wrapper {
    position: relative;
}

.bestsellers-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    border: none;
    outline: none;
    transition: background-color 0.2s;
    border-radius: 4px;
    /* Optional rounded */
}

.bestsellers-nav-btn:hover {
    background-color: #fff;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.bestsellers-nav-btn.prev-btn {
    left: 0;
    border-radius: 0 4px 4px 0;
}

.bestsellers-nav-btn.next-btn {
    right: 0;
    border-radius: 4px 0 0 4px;
}

.bestsellers-nav-btn i {
    font-size: 24px;
    color: #212121;
}

/* Hide on mobile/touch if preferred */
@media (max-width: 768px) {
    .bestsellers-nav-btn {
        display: none;
    }
}