﻿/* Best Sellers Section */
.best-sellers-section {
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 15px;
}

    .section-title::after {
        content: '';
        width: 80px;
        height: 3px;
        background: linear-gradient(90deg, #ff4c4c, #ff8c4c);
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
    }

/* Carousel */
.carousel-inner {
    padding: 1rem 0;
}

.carousel-control-prev,
.carousel-control-next {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    transition: all 0.3s ease;
}

.carousel-control-prev {
    left: -20px;
}

.carousel-control-next {
    right: -20px;
}

    .carousel-control-prev:hover,
    .carousel-control-next:hover {
        background: rgba(0, 0, 0, 0.2);
    }

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: brightness(0) saturate(100%) invert(25%) sepia(98%) saturate(7484%) hue-rotate(357deg) brightness(101%) contrast(112%);
    width: 1.5rem;
    height: 1.5rem;
}

/* Product Card */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }

.product-image {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 100%; /* Tỉ lệ 1:1 */
}

    .product-image img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Badges */
.sold-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 2;
}

.discount-flag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff4c4c;
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

/* Product Info */
.product-info {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    height: 3em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

    .product-name a {
        color: inherit;
        transition: color 0.3s ease;
    }

        .product-name a:hover {
            color: #ff4c4c;
        }

/* Price Section */
.price-section {
    margin: 0.5rem 0;
    position: relative;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
}

.final-price {
    color: #d70018;
    font-weight: 700;
    font-size: 1.1rem;
}

.discount-percent {
    position: absolute;
    top: 0;
    right: 0;
    background: #ffebee;
    color: #d70018;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.currency {
    text-decoration: none;
    font-weight: 400;
}

/* Button */
.btn-add-to-cart {
    background: #ff4c4c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
}

    .btn-add-to-cart:hover {
        background: #e63939;
        transform: translateY(-2px);
    }

/* Responsive */
@media (max-width: 1199.98px) {
    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 767.98px) {
    .section-title {
        font-size: 1.5rem;
    }

    .carousel-control-prev {
        left: 0;
    }

    .carousel-control-next {
        right: 0;
    }

    .product-info {
        padding: 1rem;
    }
}

@media (max-width: 575.98px) {
    .carousel-inner {
        padding: 0;
    }

    .product-name {
        font-size: 0.9rem;
        height: 2.8em;
    }

    .final-price {
        font-size: 1rem;
    }
}
