/* ==========================================================================
   BLOCK / SECTION: PRODUCT CAROUSEL & GRID (SẢN PHẨM NỔI BẬT: 4 TRÊN - 3 DƯỚI)
   Path: carbon-block/templates/sections/product-carousel/style.css
   Hoạt động độc lập và tương thích 100% với mọi Theme WordPress (GeneratePress, Astra, Hello Elementor, Flatsome...)
   ========================================================================== */

/* 1. ÉP SECTION TRÀN VIỀN MÀN HÌNH (BREAKOUT FULLWIDTH CHỐNG BỊ KẸT KHUNG THEME) */
.product-carousel.crb-block-fullwidth,
.crb-block-fullwidth.product-carousel {
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    box-sizing: border-box !important;
    clear: both !important;
}

.product-carousel {
    width: 100%;
    position: relative;
    padding-top: 50px !important;
    padding-bottom: 70px !important;
    background-color: #F6EEEA;
    box-sizing: border-box !important;
}

/* 2. KHUNG CONTAINER CHUẨN 1200PX NẰM GIỮA */
.product-carousel__container.crb-container,
.product-carousel__container {
    width: 100% !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
}

/* 3. RESET CÁC THẺ TRONG SECTION CHỐNG THEME CAN THIỆP */
.product-carousel * {
    box-sizing: border-box !important;
}

.product-carousel a {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

/* 4. HEADER SECTION */
.product-carousel__header {
    text-align: center !important;
    margin: 0 auto 36px auto !important;
    max-width: 800px !important;
}

.product-carousel__title {
    font-family: var(--font-heading, 'Cormorant SC', 'Playfair Display', serif) !important;
    font-size: var(--fs-h2, 32px) !important;
    line-height: var(--lh-h2, 1.25) !important;
    font-weight: var(--fw-h2, 700) !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    margin: 0 0 10px 0 !important;
    letter-spacing: 0.5px !important;
}

.product-carousel__subtitle {
    font-family: var(--font-body, 'Nunito Sans', sans-serif) !important;
    font-size: var(--fs-body-m, 16px) !important;
    line-height: 1.4 !important;
    color: var(--text-grey, #7B8A99) !important;
    margin: 0 0 8px 0 !important;
}

.product-carousel__desc {
    font-family: var(--font-body, 'Nunito Sans', sans-serif) !important;
    font-size: var(--fs-body-s, 14.5px) !important;
    line-height: 1.6 !important;
    color: var(--text-grey, #7B8A99) !important;
    margin: 0 auto !important;
    max-width: 650px !important;
}

/* 5. HỆ THỐNG LƯỚI GRID SẢN PHẨM: 4 CỘT TRÊN - 3 CỘT TO DƯỚI */
.product-grid__row {
    display: grid !important;
    gap: 20px !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    list-style: none !important;
    width: 100% !important;
}

.product-grid__row--top {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.product-grid__row--bottom {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    margin-bottom: 0 !important;
}

.product-grid__col {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Tinh chỉnh typography cho 3 card to hàng dưới */
.product-grid__row--bottom .card-standard--product .card-standard__title {
    font-size: 16.5px !important;
}

.product-grid__row--bottom .card-standard--product .card-standard__price {
    font-size: 16px !important;
}

/* 6. RESPONSIVE CHO TABLET & MOBILE */
@media screen and (max-width: 1024px) {
    .product-carousel {
        padding-top: 40px !important;
        padding-bottom: 50px !important;
    }

    .product-grid__row--top {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 16px !important;
        margin-bottom: 16px !important;
    }

    .product-grid__row--bottom {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }

    .product-grid__row--bottom .product-grid__col:last-child {
        grid-column: span 2 !important;
        max-width: 60% !important;
        margin: 0 auto !important;
        width: 100% !important;
    }
}

@media screen and (max-width: 576px) {
    .product-carousel {
        padding-top: 30px !important;
        padding-bottom: 40px !important;
    }

    .product-carousel__title {
        font-size: 22px !important;
    }

    .product-grid__row--top,
    .product-grid__row--bottom {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
        margin-bottom: 12px !important;
    }

    .product-grid__row--bottom .product-grid__col:last-child {
        grid-column: span 2 !important;
        max-width: 100% !important;
    }
}
