html,
body {
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: contain
}

#bestsellers-page-section {
    padding: 20px;
    border-radius: 12px;
    margin: 20px auto;
    max-width: 1200px
}

#bestsellers-title {
    text-align: center;
    color: #333;
    font-size: 2rem;
    margin-bottom: 30px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1)
}

#bestsellers-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    justify-content: center;
    margin: 20px 0
}

#bestsellers-products-grid .product-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    width: 100% !important
}

#bestsellers-products-grid .product-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15)
}

#bestsellers-products-grid .product-box img {
    border-radius: 8px 8px 0 0;
    transition: transform 0.3s ease
}

#bestsellers-products-grid .product-box:hover img {
    transform: scale(1.05)
}

#bestsellers-pagination {
    margin: 30px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap
}

#bestsellers-pagination .pagination-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

#bestsellers-pagination button {
    padding: 10px 15px;
    background: linear-gradient(45deg, #f9a825, #ff6f00);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 45px
}

#bestsellers-pagination button:hover:not(:disabled) {
    background: linear-gradient(45deg, #ff6f00, #f9a825);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(249, 168, 37, 0.3)
}

#bestsellers-pagination button:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6
}

#bestsellers-pagination .pagination-info {
    color: #666;
    font-weight: 500;
    margin: 0 15px
}

.empty-message {
    text-align: center;
    color: #666;
    font-size: 1.2rem;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    margin: 20px 0
}

.error-message {
    text-align: center;
    color: #dc3545;
    font-size: 1.1rem;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    margin: 20px 0;
    border: 2px solid #dc3545
}

@media (max-width: 1280px) {
    #bestsellers-products-grid {
        grid-template-columns: repeat(3, 1fr)
    }
}

@media (max-width: 768px) {
    #bestsellers-page-section {
        padding: 15px;
        margin: 10px
    }

    #bestsellers-title {
        font-size: 1.5rem;
        margin-bottom: 20px
    }

    #bestsellers-products-grid {
        gap: 1rem;
        grid-template-columns: repeat(2, 1fr)
    }

    #bestsellers-pagination {
        gap: 5px
    }

    #bestsellers-pagination button {
        padding: 8px 12px;
        min-width: 40px;
        font-size: 0.9rem
    }

    #bestsellers-pagination .pagination-info {
        font-size: 0.9rem;
        margin: 0 10px
    }
}

@media (max-width: 480px) {
    #bestsellers-page-section {
        padding: 10px;
        margin: 5px
    }

    #bestsellers-title {
        font-size: 1.3rem
    }

    #bestsellers-products-grid {
        gap: 0.5rem;
        grid-template-columns: repeat(2, 1fr)
    }

    #bestsellers-products-grid .product-box {
        min-width: 0;
        max-width: 100%
    }

    #bestsellers-products-grid .product-box img {
        height: 120px;
        object-fit: cover
    }

    #bestsellers-products-grid .product-box .product-title {
        font-size: 0.9rem;
        line-height: 1.2;
        margin: 8px 0;
        height: 2.4rem;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical
    }

    #bestsellers-products-grid .product-box .product-price {
        font-size: 1rem;
        font-weight: 700;
        color: #f9a825;
        margin: 5px 0
    }

    #bestsellers-products-grid .product-box .product-short-desc {
        font-size: 0.75rem;
        color: #888;
        margin: 5px 0
    }

    #bestsellers-products-grid .product-box .add-cart {
        padding: 6px 12px;
        font-size: 0.8rem;
        width: 100%;
        margin-top: 8px
    }

    #bestsellers-products-grid .product-box .badges-container {
        position: absolute;
        top: 5px;
        left: 5px;
        z-index: 2
    }

    #bestsellers-products-grid .product-box .badge-discount,
    #bestsellers-products-grid .product-box .badge-out-of-stock {
        font-size: 0.7rem;
        padding: 3px 6px;
        border-radius: 4px
    }

    #bestsellers-pagination button {
        padding: 6px 10px;
        min-width: 35px;
        font-size: 0.8rem
    }
}

.products-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 40px;
    min-height: 200px;
    background: #fff;
    border-radius: 8px;
    margin: 20px 0
}

.lds-dual-ring {
    display: inline-block;
    width: 50px;
    height: 50px
}

.lds-dual-ring:after {
    content: " ";
    display: block;
    width: 40px;
    height: 40px;
    margin: 5px;
    border-radius: 50%;
    border: 5px solid #f9a825;
    border-color: #f9a825 transparent #f9a825 transparent;
    animation: lds-dual-ring 1s linear infinite
}

@keyframes lds-dual-ring {
    0% {
        transform: rotate(0deg)
    }

    100% {
        transform: rotate(360deg)
    }
}

.products-spinner span {
    color: #666;
    font-size: 1.1rem;
    font-weight: 500
}

.topnav #myLinks {
    right: 0 !important;
    transform: translateX(100%) !important
}

.topnav #myLinks.closing {
    transform: translateX(100%) !important
}

.topnav.open #myLinks {
    transform: translateX(0) !important
}

#myLinks.drawer {
    left: 0 !important;
    transform: translateX(-100%) !important
}

.topnav.open #myLinks.drawer {
    transform: translateX(0) !important
}

#myLinks.drawer.closing-right {
    transform: translateX(-100%) !important
}

#app-menu-drawer,
.app-cart {
    max-width: 100vw
}

.app-cart {
    left: 0 !important;
    transform: translateX(-100%);
    transition: transform 0.35s ease !important
}

.app-cart.active {
    transform: translateX(0) !important;
    z-index: 10001
}

/* end of bestsellers.css */