.ratio-3x4 {
    --bs-aspect-ratio: 133.33%;
}

.widget-title {
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 8px 12px;
}

    .widget-title .title {
        color: black;
        margin: 0;
        font-size: 14px;
        font-weight: normal;
    }

.select-filter {
    padding: var(--spacer-1) 9px var(--spacer-1) 9px;
    min-width: 97px;
    max-width: 97px;
    border: 1px solid;
    border-radius: 10px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    line-height: 1;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding-right: 15px;
}

.select-filter-wrapper {
    position: relative;
    margin-left: 8px;
}

    .select-filter-wrapper::after {
        content: "";
        position: absolute;
        top: 50%;
        right: 15px;
        background: url(/images/icon/caret-down.svg) no-repeat;
        background-size: 11px;
        background-position: center;
        width: 11px;
        height: 11px;
        transform: translateY(-50%) rotate(0deg);
        transition: transform 0.3s ease;
        pointer-events: none;
    }

@media (min-width: 992px) {
    .main-section-widgetRepeater-filter {
        position: relative;
        top: -85px;
    }

    .bg-download-icon > svg {
        width: 42px !important;
        height: 60px !important;
    }
}

@media (max-width: 991.98px) {
    .widget-repeater__filters--top {
        justify-content: flex-start;
    }

    .bg-download-icon > svg {
        width: 21px !important;
        height: 39px !important;
    }
}

/* Pagination Container */
.pagination-container {
    margin-top: 20px;
}

/* Pagination List */
.pagination-list {
    list-style: none;
    gap: 15px;
    display: flex
}

/* Pagination Links */
.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    text-decoration: none;
    font-weight: bold;
    font-family: "Kittithada Pro";
    font-size: var(--font-size-8);
    transition: all 0.25s;
}

    /* Hover Effect */
    .pagination-link:hover {
        background-color: var(--color-gray) !important;
        color: var(--color-black);
        box-shadow: none;
        transform: none;
        transition: all 0.25s;
    }

/* Active Page */
.pagination-current {
    font-weight: bold;
    border-radius: 6px;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #007bff;
    background-image: none;
    box-shadow: none;
    color: white;
}

.pagination-link.pagination-current:hover {
    background-color: var(--color-red-50) !important;
    color: var(--color-white) !important;
}

/* Disabled Buttons */
.pagination-link.disabled {
    pointer-events: none;
    /* background-color: #e0e0e0;
    color: #888;
    border: 2px solid #ccc; */
    cursor: not-allowed;
}

/* Ellipsis */
.pagination-ellipsis span {
    font-weight: bold;
    font-family: "Kittithada Pro";
    color: #555;
}

.hidden-mobile {
    display: none !important;
}

.bg-download-icon {
    padding: 5px 14px;
    background-color: #f3f4f5;
    border: solid 1px #f9f9fa;
}

/* --- featureBanner CLS fix ---
   These MUST live in a <head> stylesheet (this file), NOT the in-partial <style>: the
   partial's <style> is parsed after the banner markup and its blocking splide.min.js, so it
   applies too late to stop the initial "3 slides stacked (~N×536px), then collapse on mount"
   paint. Kept here so the banner's footprint is correct from the very first paint. */
.banner--home .banner__slide { min-height: 536px !important; }
@media (max-width: 1199.98px) { .banner--home .banner__slide { min-height: 400px !important; } }
@media (max-width: 767.98px)  { .banner--home .banner__slide { min-height: 280px !important; } }
@media (max-width: 575.98px)  { .banner--home .banner__slide { min-height: 180px !important; } }
/* Before Splide mounts (adds .is-initialized), show only the first slide so the stacked
   <ul> doesn't inflate the height and then collapse — the main source of the banner CLS. */
.banner.splide:not(.is-initialized) .splide__slide:not(:first-child) { display: none !important; }

/* Remaining banner LAYOUT rules — moved here from featureBanner.cshtml's in-body style.
   The absolute positioning of the overlay text/button MUST apply at first paint; if it
   lands late (as an in-body style block does, after the banner + its blocking splide.min.js),
   the text is briefly in normal flow, then flips to absolute and shifts the page (CLS).
   Order matters: the min-height rules above must precede the max-width:991.98px block below
   so the mobile `min-height:0` override still wins.
   NOTE: Splide arrow/pagination COSMETIC overrides deliberately stay in the partial's
   in-body style (after splide.min.css) — placed here they lose to Splide's defaults and the
   arrow SVG gets squished into a square. */
.featureBanner, .featureBanner .banner.splide { width: 100%; }
.featureBanner { padding: 0 !important; margin: 0 !important; }
.featureBanner .feature__body { padding: 0; margin: 0; }
.featureBanner .splide__track,
.featureBanner .banner__slide { border-radius: 0 !important; }
/* V13 banner placement: text top-left, button bottom-left (absolute over the slide). */
.featureBanner .wrapper-item .item { position: absolute; top: 50px; left: 100px; z-index: 15; }
.featureBanner .wrapper-item a.btn-banner { position: absolute; left: 100px; bottom: 50px; z-index: 15; }
/* Wide screens: align text/button to the centered content column (V13 behaviour). */
@media (min-width: 1400px) {
    .featureBanner .wrapper-item .item,
    .featureBanner .wrapper-item a.btn-banner {
        left: 50%;
        transform: translateX(calc(-43% - 4px));
        width: 100%;
        max-width: 1316px;
    }
}
/* Narrow screens (V13 layout): stack title/description ABOVE the image, drop the image
   below at a fixed cover-cropped height, keep the red button over the image bottom-left. */
@media (max-width: 991.98px) {
    .featureBanner .banner__slide,
    .banner--home .banner__slide {
        min-height: 0 !important;
        display: flex;
        flex-direction: column;
        position: relative;
    }
    .featureBanner .banner__slide > .wrapper-item { order: 1; }
    .featureBanner .banner__slide > img {
        position: static !important;
        order: 2;
        width: 100%;
        height: 240px !important;
    }
    .featureBanner .wrapper-item .item {
        position: static;
        top: auto; left: auto; right: auto;
        margin: 0 !important;
        padding: 1.25rem 1rem 0.75rem;
    }
    .banner--home .wrapper-item .item { padding-top: 4.5rem; }
    .featureBanner .wrapper-item a.btn-banner { left: 1rem; bottom: 1rem; transform: none; }
}
@media (max-width: 575.98px) {
    .featureBanner .banner__slide > img { height: 180px !important; }
}

/* Widget - Regional Network (widgetRegionalNetwork.cshtml): per-region map cards.
   The per-card colour comes from the region's Color property, passed in as the
   --rn-color / --rn-on-color custom properties on .rnCard by the partial. */

.rnCard {
    height: 100%;
    margin-bottom: 1em;
}

.rnCard-map {
    margin: 0 0 .5rem;
    border-radius: .5rem;
    overflow: hidden;
    background: var(--bs-tertiary-bg, #f4f7fb);
}

    /* Cap the map height so a large upload can't blow the card up. */
    .rnCard-map img {
        display: block;
        width: 100%;
        max-height: 450px;
        height: auto;
        object-fit: contain;
    }

.rnCard-head {
    background: var(--rn-color);
    color: var(--rn-on-color);
    border-radius: .375rem;
    padding: .4rem .75rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    text-align: start;
    line-height: 1.35;
}

.rnCard-list {
    list-style: none;
    margin: .4rem 0 0;
    padding: .35rem .5rem;
    background: var(--bs-tertiary-bg, #f8f9fa);
    border-radius: .375rem;
    font-size: .8125rem;
}

/* Two columns only: name, then the right-aligned quantity. */
.rnCard-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: .1rem .5rem;
    padding: .15rem .1rem;
}

.rnCard-name {
    color: #000;
    font-style: italic;
    font-weight: 600;
    min-width: 0;
}

.rnCard-qty {
    font-style: italic;
    font-weight: 700;
    white-space: nowrap;
    text-align: right;
}