/**
 * US Top Sellers Plugin - Styles
 */

/* Section Container */
.us-top-sellers-section {
    padding: 60px 0;
    background: #EDF0F74A;
}

.us-top-sellers-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Section */
.us-top-sellers-header {
    text-align: center;
    margin-bottom: 50px;
}

.us-top-sellers-header .top-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 147%;
    letter-spacing: 0.3em;
    text-align: center;
    text-transform: capitalize;
    color: #EA272F;
    margin: 0 0 15px 0;
}

.us-top-sellers-header .main-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.us-top-sellers-header .main-heading .hot-icon {
    width: 104px;
    height: 94px;
    object-fit: contain;
}

.us-top-sellers-header .main-heading h2 {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 48px;
    line-height: 1.2;
    color: #444444;
    text-transform: capitalize;
    letter-spacing: 1px;
    margin: 0;
}

.us-top-sellers-header .description {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 150%;
    text-align: center;
    color: #484848;
    max-width: 900px;
    margin: 0 auto;
}

/* Slider Wrapper */
.us-top-sellers-slider-wrapper {
    position: relative;
    padding: 0 60px;
    max-width: 1134px; /* 4 slides: (240px * 4) + (18px * 3) = 1014px + 60px padding each side */
    margin: 0 auto;
}

.us-top-sellers-slider {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: auto !important;
    -webkit-overflow-scrolling: auto;
}

.us-top-sellers-slider::-webkit-scrollbar {
    display: none;
}

/* Navigation Buttons */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.3s ease;
    padding: 0;
}

.slider-nav:hover {
    opacity: 0.7;
}

.slider-nav.prev {
    left: 0;
}

.slider-nav.next {
    right: 0;
}

.slider-nav img {
    display: block;
}

.slider-nav:disabled,
.slider-nav.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Product Slide Box */
.product-slide-box {
    min-width: 240px;
    max-width: 240px;
    height: 412px;
    border: 1px solid #cccccc;
    border-radius: 10px;
    padding: 8px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #ffffff;
    transition: box-shadow 0.3s ease;
}

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

/* Product Title */
.product-slide-box .product-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14.05px;
    line-height: 19.57px;
    text-align: center;
    color: #000000;
    margin: 0 0 8px 0;
    height: 85px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.product-slide-box .product-title a {
    color: #000000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-slide-box .product-title a:hover {
    color: #EA272F;
}

/* Reviews */
.product-reviews {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.product-reviews i {
    font-family: 'Font Awesome 5 Pro', 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 8.68px;
    line-height: 8.68px;
    color: #FBAE24;
}

.product-reviews .review-count {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 9.47px;
    line-height: 9.47px;
    color: #999999;
    margin-left: 3px;
}

/* Add to Cart Button */
.product-slide-box .product-add-to-cart {
    width: 100%;
    margin-bottom: 12px;
}

.product-slide-box .product-add-to-cart .button {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 11px;
    line-height: 1;
    color: #FFFFFF;
    background: #EB4227;
    border: none;
    border-radius: 5px;
    padding: 10px 16px;
    width: 100%;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s ease;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.product-slide-box .product-add-to-cart .button:hover {
    background: #c21f26;
}

.product-slide-box .product-add-to-cart .button.loading {
    opacity: 0.7;
    cursor: wait;
}

.product-slide-box .product-add-to-cart .button.added,
.product-slide-box .product-add-to-cart .button.added_to_cart_button {
    background: #304b92;
}

.product-slide-box .product-add-to-cart .button.added_to_cart_button:hover {
    background: #1e3a8a;
}

.product-slide-box .product-add-to-cart .button.product_out_of_stock {
    background: #999999;
    cursor: not-allowed;
    opacity: 0.6;
}

.product-slide-box .product-add-to-cart .button.product_out_of_stock:hover {
    background: #999999;
}

/* Hide default WooCommerce "View Cart" link in slider */
.product-slide-box a.added_to_cart.wc-forward {
    display: none !important;
}

/* Product Image */
.product-image {
    width: 160px;
    height: 190px;
    margin-bottom: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* Product Price */
.product-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.product-price .regular-price {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 17.21px;
    line-height: 21.31px;
    color: #000000;
}

.product-price .current-price {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 17.21px;
    line-height: 21.31px;
    color: #EB4227;
}

.product-price .old-price {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 15.39px;
    text-decoration: line-through;
    color: #999999;
}

.product-price .discount-badge {
    width: 52px;
    height: 20px;
    background: #EB4227;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 10.68px;
    line-height: 20px;
    text-transform: uppercase;
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}

/* Product Footer */
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: auto;
}

.product-footer .purchase-count {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 11.47px;
    line-height: 14.21px;
    color: #999999;
}

.product-footer .purchase-count strong {
    color: #000000;
    font-weight: 600;
}

/* Wishlist Button */
.wishlist-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 20px;
    height: 20px;
}

.wishlist-btn img {
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

.wishlist-btn .heart-active {
    opacity: 0;
}

.wishlist-btn:hover .heart-default,
.wishlist-btn.active .heart-default {
    opacity: 0;
}

.wishlist-btn:hover .heart-active,
.wishlist-btn.active .heart-active {
    opacity: 1;
}

/* Login Modal */
.wishlist-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

.wishlist-modal-content {
    background-color: #ffffff;
    margin: 15% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wishlist-modal-close {
    color: #999999;
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.wishlist-modal-close:hover,
.wishlist-modal-close:focus {
    color: #EA272F;
}

.wishlist-login-btn {
    display: inline-block;
    background: #EA272F;
    color: #ffffff;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.wishlist-login-btn:hover {
    background: #c21f26;
    color: #ffffff;
}

/* Responsive Design */
@media screen and (max-width: 992px) {
    .us-top-sellers-header .main-heading h2 {
        font-size: 36px;
    }

    .us-top-sellers-header .main-heading .hot-icon {
        width: 80px;
        height: 72px;
    }

    .us-top-sellers-slider-wrapper {
        padding: 0 50px;
    }
}

@media screen and (max-width: 768px) {
    .us-top-sellers-section {
        padding: 40px 0;
    }

    .us-top-sellers-header .main-heading {
        flex-direction: column;
        gap: 10px;
    }

    .us-top-sellers-header .main-heading h2 {
        font-size: 28px;
    }

    .us-top-sellers-slider-wrapper {
        padding: 0 50px;
        max-width: 340px; /* 240px slide + 50px padding on each side */
        margin: 0 auto;
    }

    .us-top-sellers-slider {
        justify-content: flex-start;
        padding: 0;
    }

    .slider-nav.prev {
        left: 10px;
    }

    .slider-nav.next {
        right: 10px;
    }
}

@media screen and (max-width: 480px) {
    .us-top-sellers-header .main-heading h2 {
        font-size: 24px;
    }

    .us-top-sellers-header .description {
        font-size: 11px;
    }

    .us-top-sellers-slider-wrapper {
        padding: 0 40px;
        max-width: 320px; /* 240px slide + 40px padding on each side */
    }

    .slider-nav.prev {
        left: 5px;
    }

    .slider-nav.next {
        right: 5px;
    }

    .product-slide-box {
        min-width: 230px;
        max-width: 230px;
    }

    .wishlist-modal-content {
        margin: 30% auto;
        padding: 25px 20px;
    }
}
