/* Brand Section Styles */
.wrap-brands {
    width: 100%;
}

.wrap-brands .list-brands {
    margin-bottom: 0;
}

.wrap-brands .brand-item {
    display: none;
}

.wrap-brands.is-expanded .brand-item {
    display: block;
}

.wrap-brands:not(.is-expanded) .brand-item:nth-child(-n + 2) {
    display: block;
}

@media (min-width: 576px) {
    .wrap-brands:not(.is-expanded) .brand-item:nth-child(-n + 3) {
        display: block;
    }
}

@media (min-width: 768px) {
    .wrap-brands:not(.is-expanded) .brand-item:nth-child(-n + 4) {
        display: block;
    }
}

@media (min-width: 992px) {
    .wrap-brands:not(.is-expanded) .brand-item:nth-child(-n + 6) {
        display: block;
    }
}

.wrap-brands .brand-card {
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wrap-brands .brand-card-body {
    padding: 0.9rem 0.65rem;
}

.wrap-brands .brand-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12);
}

.wrap-brands .brand-logo {
    max-height: 64px;
    object-fit: contain;
}

.wrap-brands .brand-label {
    color: #333;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.3;
}

.wrap-brands .more-brands {
    min-width: 170px;
}

/* Product Card Compact Styles */
.product-list:not(.carousel-item) {
    max-height: 420px;
    display: flex;
    flex-direction: column;
}

/* Carousel items must not override Bootstrap's display:none/block behaviour */
.product-list.carousel-item {
    display: none;
}
.product-list.carousel-item.active {
    display: block;
}

/* Constrain image inside carousel so it doesn't push/overlap content below */
.product-list.carousel-item .img-container {
    height: 280px;
    overflow: hidden;
}
.product-list.carousel-item .img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-list .inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px;
}

.product-list .img-container {
    /* height: 180px; */
    overflow: hidden;
    margin-bottom: 8px;
}

.product-list .img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-list h2 {
    font-size: 14px;
    margin: 4px 0;
}

.product-list h2 a {
    font-size: 14px;
    margin: 4px 0;
    text-decoration: none;
}

.product-list .price {
    margin: 4px 0;
}

.product-list .price .underline {
    font-size: 12px;
}

.product-list .price-discount {
    font-size: 12px;
    margin: 2px 0;
}

.product-list .quantity {
    font-size: 12px;
    margin: 2px 0;
}

.product-list .info-btn {
    padding: 4px 8px;
    font-size: 12px;
    margin: 4px 0;
}

.product-list .add-to-cart {
    margin: 2px 0;
}

.product-list .add-to-cart a {
    font-size: 12px;
    padding: 4px 8px;
}

/* News Section Styles */
.row:has(.top-news-home) {
    align-items: stretch;
}

.top-news-home,
.top-news-home .top-news-card {
    height: 100%;
}

.bestsellers-table tbody tr {
    padding: 15px 0;
}

.bestsellers-table .product-thumbnail {
    padding: 8px;
    width: 30%;
}

.bestsellers-table .product-thumbnail img {
    width: 100%;
    height: auto;
    max-height: 90px;
    object-fit: cover;
}

.bestsellers-table .product-info {
    padding: 8px;
    vertical-align: middle;
}

.bestsellers-table .product-info p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.bestsellers-table .product-info a {
    text-decoration: none;
    color: #333;
}

.bestsellers-table .product-info a:hover {
    color: #26c6da;
}

/* Blog page body should use full available width */
#blog.body {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Blog grid: responsive and at least 4 cards per row on desktop */
#blog .blog-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-left: 0;
    margin-right: 0;
}

#blog .blog-posts-grid > .blog-col {
    margin-bottom: 0 !important;
    padding-left: 0;
    padding-right: 0;
}

#blog .blog-posts-grid .blog-card {
    max-width: none;
}

@media (min-width: 576px) {
    #blog .blog-posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    #blog .blog-posts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    #blog .blog-posts-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1400px) {
    #blog .blog-posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}
