/* =========================================================
   MSB Promotion Category
   ========================================================= */
.msb_promo_cat_wrap {
    padding: 40px 0;
}

.msb_promo_cat_inner {
    max-width: 1366px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================================
   Header
   ========================================================= */
.msb_promo_cat_header {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.msb_promo_cat_title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: #091E42;
}

/* Year Filter in Header */
.msb_promo_cat_year_filter {
    position: relative;
}

.msb_promo_cat_year_select_header {
    min-width: 250px;
    height: 44px;
    margin-bottom: 0px;
    padding: 0 36px 0 16px;
    border: 1px solid #DEE5EF;
    border-radius: 8px;
    background-color: #fff;
    font-size: 14px;
    color: #091E42;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.2s ease;
}

.msb_promo_cat_year_select_header:focus {
    outline: none;
    border-color: #F4600C;
}

.msb_promo_cat_year_select_header:hover {
    border-color: #F4600C;
}

/* =========================================================
   Tabs
   ========================================================= */
.msb_promo_cat_tabs {
    margin-bottom: 24px;
}

.msb_promo_cat_tabs_list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.msb_promo_cat_tab {
    position: relative;
    margin-bottom: 0px;
}

.msb_promo_cat_tab a {
    display: block;
    padding: 8px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #091E42;
    text-decoration: none;
    border: 1px solid #DEE5EF;
    border-radius: 100px;
    background: #fff;
    transition: all 0.2s ease;
}

.msb_promo_cat_tab a:hover {
    border-color: #F4600C;
    color: #F4600C;
}

.msb_promo_cat_tab.active a {
    color: #F4600C;
    /* font-weight: 600; */
    border-color: #F4600C;
    background: #FFF4EC;
}

/* =========================================================
   Content Container
   ========================================================= */
.msb_promo_cat_content {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.msb_promo_cat_main {
    flex: 1;
    min-width: 0;
}

/* =========================================================
   Sidebar
   ========================================================= */
.msb_promo_cat_sidebar {
    width: 33.3333%;
    flex-shrink: 0;
    /* position: sticky; */
    /* top: 100px; */
}

/* Search */
.msb_promo_cat_search {
    margin-bottom: 24px;
}

.msb_promo_cat_search_input_wrap {
    position: relative;
}

.msb_promo_cat_search_icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #091E42;
    pointer-events: none;
}

.msb_promo_cat_search_input {
    width: 100%;
    height: 48px !important;
    padding: 0 16px 0 44px !important;
    border: 1px solid #DEE5EF !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: #091E42 !important;
    background: #fff;
    transition: border-color 0.2s ease !important;
    box-shadow: none !important;
    margin-bottom: 0px !important;
}

.msb_promo_cat_search_input:focus {
    outline: none;
    border-color: #F4600C;
}

.msb_promo_cat_search_input::placeholder {
    color: #9CA3AF;
}

/* Filter Group */
.msb_promo_cat_filter_group {
    margin-bottom: 24px;
}

/* Radio Filter */
.msb_promo_cat_radio_wrap {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.msb_promo_cat_radio {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 16px;
    color: #091E42;
    margin-bottom: 0px;
    font-weight: 500;
}

.msb_promo_cat_radio input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #DEE5EF;
    border-radius: 50%;
    margin: 0;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: border-color 0.2s ease;
}

.msb_promo_cat_radio input[type="radio"]:checked {
    border-color: #F4600C;
}

.msb_promo_cat_radio input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #F4600C;
    border-radius: 50%;
}

.msb_promo_cat_radio span {
    line-height: 1;
}

.msb_promo_cat_filter_title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: #091E42;
}

/* Select */
.msb_promo_cat_select_wrap {
    position: relative;
}

.msb_promo_cat_year_select {
    width: 100%;
    height: 48px;
    padding: 0 40px 0 16px;
    border: 1px solid #DEE5EF;
    border-radius: 8px;
    background-color: #fff;
    font-size: 14px;
    color: #091E42;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.msb_promo_cat_year_select:focus {
    outline: none;
    border-color: #F4600C;
}

/* =========================================================
   Posts Grid
   ========================================================= */
.msb_promo_cat_posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    min-height: 200px;
    position: relative;
}

/* Khi có sidebar thì grid 2 cột */
.msb_promo_cat_content.has-sidebar .msb_promo_cat_posts {
    grid-template-columns: repeat(2, 1fr);
}

.msb_promo_cat_posts.loading {
    opacity: 0.5;
    pointer-events: none;
}

.msb_promo_cat_posts.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #F4600C;
    border-radius: 50%;
    animation: promo-spin 1s linear infinite;
}

@keyframes promo-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* =========================================================
   Card
   ========================================================= */
.msb_promo_card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0px 0px 4px 0px #1D293926;
    backdrop-filter: blur(24px);
}

.msb_promo_card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.msb_promo_card_link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.msb_promo_card_thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f5f5f5;
}

.msb_promo_card_thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.msb_promo_card:hover .msb_promo_card_thumb img {
    transform: scale(1.05);
}

.msb_promo_card_thumb_placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.msb_promo_card_body {
    padding: 16px;
}

.msb_promo_card_title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #091E42;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.msb_promo_card_date {
    margin: 0 0 8px;
    font-size: 14px;
    color: #6B7280;
}

.msb_promo_card_date.ending {
    color: #F4600C;
}

.msb_promo_card_date.expired {
    color: #EF4444;
}

.msb_promo_card_desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #6B7280;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================================
   Pagination
   ========================================================= */
.msb_promo_cat_pagination {
    margin-top: 32px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.msb_promo_cat_pagination .page-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.msb_promo_cat_pagination .page-list li {
    margin: 0;
}

.msb_promo_cat_pagination .page-list a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #091E42;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.msb_promo_cat_pagination .page-list a:hover,
.msb_promo_cat_pagination .page-list a.current {
    background-color: #fff;
    border-color: #F8A06D;
    color: #F4600C;
}

.msb_promo_cat_pagination .prev,
.msb_promo_cat_pagination .next {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #DEE5EF;
    border-radius: 8px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.msb_promo_cat_pagination .prev:hover,
.msb_promo_cat_pagination .next:hover {
    border-color: #F8A06D;
}

.msb_promo_cat_pagination .prev img,
.msb_promo_cat_pagination .next img {
    width: 14px;
    height: 14px;
}

.msb_promo_cat_pagination .prev .icon-prev {
    transform: rotate(180deg);
}

.msb_promo_cat_pagination .prev.disabled,
.msb_promo_cat_pagination .next.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.no-posts-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #6B7280;
    font-size: 16px;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1199px) {
    .msb_promo_cat_posts {
        grid-template-columns: repeat(2, 1fr);
    }

    .msb_promo_cat_sidebar {
        width: 240px;
    }

    .msb_promo_cat_content {
        gap: 30px;
    }
}

@media (max-width: 991px) {
    .msb_promo_cat_content {
        flex-direction: column;
    }

    .msb_promo_cat_content.has-sidebar {
        flex-direction: column;
    }

    .msb_promo_cat_sidebar {
        width: 100%;
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .msb_promo_cat_search {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }

    .msb_promo_cat_filter_group {
        margin-bottom: 0;
    }

    .msb_promo_cat_content.has-sidebar .msb_promo_cat_posts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .msb_promo_cat_wrap {
        padding: 24px 0;
    }

    .msb_promo_cat_header {
        flex-direction: column;
        align-items: flex-start;
    }

    .msb_promo_cat_inner {
        padding: 0 16px;
    }

    .msb_promo_cat_title {
        font-size: 24px;
    }

    .msb_promo_cat_tabs_list {
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .msb_promo_cat_tab a {
        padding: 8px 16px;
        font-size: 14px;
        white-space: nowrap;
    }

    .msb_promo_cat_sidebar {
        grid-template-columns: 1fr;
    }

    .msb_promo_cat_posts,
    .msb_promo_cat_content.has-sidebar .msb_promo_cat_posts {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .msb_promo_card_title {
        font-size: 16px;
    }

    .msb_promo_card_body {
        padding: 12px;
    }

    .msb_promo_cat_pagination {
        justify-content: center;
    }
}