/* Brand Details Page Styles */
.brand-details-wrapper {
    background-color: #ffffff;
    --cat-font: 'Poppins', sans-serif;
}

/* .brand-banner-container {
    max-width: 1640px;
    margin: 0 auto;
    padding: 0 15px;
} */

.brand-banner {
    display: flex;
    width: 100%;
    gap: 10px;
}

.brand-banner-left {
    width: 1030px;
    height: 600px;
    background: linear-gradient(13.02deg, #173158 7.25%, #E83161 89.94%);
    padding: 70px 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    color: #ffffff;
}

.brand-banner-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 60px;
    font-weight: 700;
    /* bold */
    line-height: 1.1;
    margin-bottom: 20px;
}

.brand-subtitle {
    font-size: 34px;
    line-height: 1.3;
    margin-bottom: 20px;
    font-weight: 500;
}

.brand-desc {
    font-size: 20px;
    line-height: 1.5;
    margin-bottom: 80px;
    max-width: 520px;
    font-weight: 400;
}

.brand-banner-actions {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: auto;
}

.brand-btn-join {
    width: 210px;
    height: 60px;
    background-color: #E83161;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    /* semibold */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: none;
    border-radius: 0;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.brand-btn-join:hover {
    background-color: #FFFFFF !important;
    color: #183158 !important;
}

.brand-btn-join:hover svg path {
    fill: #E73161 !important;
}

.brand-link-browse {
    font-size: 18px;
    font-weight: 600;
    /* semibold */
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-banner-svg {
    position: absolute;
    bottom: 0px;
    right: -1px;
    z-index: 1;
}

.brand-banner-right {
    width: 600px;
    height: 600px;
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #BAC2CD;
}

.brand-banner-img-box {
    width: 500px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-banner-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Products Section */
.brand-products-section {
    background-color: #ffffff;
}

.brand-details-breadcrumb {
    font-size: 14px;
    color: #173158;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: var(--nav-mega-top, 140px) !important;
    z-index: 950 !important;
    background: #ffffff !important;
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    transition: top 0.3s ease-in-out !important;
}

@media (max-width: 767.98px) {
    .brand-details-breadcrumb {
        top: var(--nav-mega-top, 9.25rem) !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }
}

.brand-details-breadcrumb a {
    color: #173158;
    text-decoration: none;
}

.brand-details-breadcrumb .sep {
    color: #173158;
}

.brand-details-breadcrumb .active {
    color: #E83161;
    font-weight: 700;
}

.brand-products-title {
    font-size: 48px;
    font-weight: 600;
    /* semibold */
    color: #152C50;
}

.filter-box {
    width: 300px;
    height: 48px;
    background-color: #ffffff;
    border: 1px solid #BAC2CD;
    font-size: 16px;
    color: #152C50;
    font-weight: 500;
    cursor: pointer;
}

/* Product Cards */
.brand-product-card {
    background-color: #ffffff;
    padding: 0;
    transition: box-shadow 0.3s ease;
}

.brand-product-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.brand-product-img-box {
    width: 387px;
    height: 387px;
    max-width: 100%;
    /* For smaller screens */
    display: flex;
    align-items: center;
    justify-content: center;
    /* background-color: #F8FAFC; */
    overflow: hidden;
    border: 2px solid #EDEFF2;
}

.brand-product-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.discount-badge {
    background-color: #E83161;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pc-badge-percent {
    font-size: 0.55em !important;
    font-weight: 700 !important;
    display: inline-block !important;
    transform: translateY(-0.25em) !important;
    margin-left: 0.05em !important;
    line-height: 1 !important;
}

.brand-product-meta {
    font-size: 14px;
    color: #5D6F8A;
}

.prod-card-separator {
    display: inline-block;
    width: 2px;
    height: 15px;
    background-color: #D1D1D1;
    margin: 0 10px;
    vertical-align: middle;
}

.brand-product-name {
    font-size: 18px;
    color: #183158;
    font-weight: 600;
    line-height: 1.4;
}

.brand-product-desc {
    font-size: 14px;
    color: #183158;
    line-height: 1.5;
}

.brand-product-action {
    padding: 0 0 20px;
}

.btn-signup-buy {
    width: 168px;
    height: 42px;
    border: 2px solid #E83161;
    color: #E83161;
    font-size: 14px;
    font-weight: 500;
    background-color: transparent;
    transition: all 0.3s ease;
    gap: 10px;
}

.btn-signup-buy:hover {
    background-color: #E83161;
    color: #ffffff;
}

.btn-signup-buy:hover svg path {
    fill: #ffffff;
}

/* Mobile Specific Styles */
@media (max-width: 711.98px) {
    .mobile-product-img {
        width: 156px;
        height: 156px;
        margin: 0 auto;
    }

    .mobile-discount-badge {
        width: 33px;
        height: 30px;
        font-size: 14px;
        margin-top: 0 !important;
        margin-right: 0 !important;
        top: 10px !important;
        right: 10px !important;
    }

    .mobile-product-info {
        margin-top: 10px !important;
    }

    .mobile-product-cat {
        font-size: 8px !important;
        margin-bottom: 5px !important;
    }

    .mobile-product-title {
        font-size: 12px !important;
        margin-bottom: 5px !important;
        line-height: 1.2;
    }

    .mobile-product-desc {
        font-size: 8px !important;
        margin-bottom: 35px !important;
        /* Leave space for the 30x30 action box */
    }

    .prod-card-separator {
        height: 10px;
        margin: 0 6px;
    }

    /* Remove hover shadow on mobile product cards */
    .brand-product-card:hover {
        box-shadow: none !important;
    }
}

/* ═══════════════════════════════════════════
   BRAND PAGINATION
   ═══════════════════════════════════════════ */
.brand-pagination {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.brand-pagination nav {
    width: 100%;
}

.brand-pagination nav>.d-none.flex-sm-fill.d-sm-flex.align-items-sm-center.justify-content-sm-between {
    width: 100%;
}

.brand-pagination .pagination {
    margin-top: 0;
    margin-bottom: 0;
    gap: 0.5rem;
    justify-content: center;
}

.brand-pagination .page-item {
    margin: 0;
}

.brand-pagination .page-link {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    color: #152C50;
    background: #f9fafb;
    padding: 0;
    transition: all 0.25s ease;
}

.brand-pagination .page-link:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.brand-pagination .page-item.active .page-link {
    background: #E83161;
    border-color: #E83161;
    color: #fff;
    font-weight: 600;
}

.brand-pagination .page-item.disabled .page-link {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #d1d5db;
    cursor: not-allowed;
}

@media (max-width: 576px) {
    .brand-pagination .page-link span {
        display: none;
    }

    .brand-pagination .page-link {
        padding: 0 12px !important;
        min-width: 40px;
    }
}

/* Laptop Screen Overrides (992px to 1639.98px) */
@media (min-width: 992px) and (max-width: 1639.98px) {

    .kp-container,
    .brand-banner-container,
    .brand-products-section .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 40px !important;
        padding-right: 40px !important;
    }

    /* Hero Banner Laptop Adjustments */
    .brand-banner-left {
        height: 500px !important;
        padding: 60px 45px !important;
        width: calc(62.8% - 6px) !important;
    }

    .brand-banner-right {
        height: 500px !important;
        width: calc(37.2% - 4px) !important;
    }

    .brand-title {
        font-size: 44px !important;
        margin-bottom: 25px !important;
    }

    .brand-subtitle {
        font-size: 24px !important;
        margin-bottom: 20px !important;
        line-height: 1.2 !important;
    }

    .brand-desc {
        font-size: 16px !important;
        margin-bottom: 30px !important;
        line-height: 1.4 !important;
        max-width: 500px;
    }

    .brand-banner-actions {
        gap: 20px !important;
    }

    .brand-btn-join {
        width: 180px !important;
        height: 52px !important;
        font-size: 15px !important;
    }

    .brand-link-browse {
        font-size: 16px !important;
    }

    /* Product Cards Laptop Adjustments */
    .brand-product-img-box {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        border: 2px solid #EDEFF2 !important;
    }

    .brand-product-img-box img {
        width: 80% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        object-fit: contain !important;
    }

    .brand-product-name {
        font-size: 16px !important;
        margin-bottom: 8px !important;
    }

    .brand-product-desc {
        margin-bottom: 15px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   Tablet Screen Overrides (768px to 991.98px)
   The brand banner uses fixed `width: 1030px + 600px = 1640px` blocks
   and the global .kp-container is 1640px — both overflow tablet
   viewports. Product cards (387×387) also need to shrink for tablet.

   Mobile <768 keeps the existing `(max-width: 767px)` rules, and
   laptop 992–1639.98 keeps its own block. PC ≥1640 is not touched.
   ═══════════════════════════════════════════════════════════════════ */
/* ───────── Shift Breakpoint for Brand Details Page (apply mobile until 712px, then tablet) ───────── */
@media (min-width: 712px) and (max-width: 767.98px) {

    /* Hide Mobile Layout */
    .d-md-none {
        display: none !important;
    }

    /* Show Tablet/Desktop Layout */
    .d-none.d-md-block {
        display: block !important;
    }

    .d-none.d-md-flex {
        display: flex !important;
    }

    .d-none.d-md-inline {
        display: inline !important;
    }
}

@media (min-width: 712px) and (max-width: 991.98px) {

    /* Containers: make fluid for the tablet range. */
    .kp-container,
    .brand-banner-container,
    .brand-products-section .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    /* Hero banner — release the fixed 1030 + 600 = 1640px blocks into
       a fluid flex pair with a shorter height for tablet. */
    .brand-banner {
        gap: 10px !important;
    }

    .breadcrumb-nav {
        top: 85px !important;
    }

    .brand-banner-left {
        height: 360px !important;
        padding: 32px 32px !important;
        width: calc(50% - 5px) !important;
    }

    .brand-banner-right {
        height: 360px !important;
        width: calc(50% - 5px) !important;
    }

    .brand-banner-content {
        max-width: 100% !important;
    }

    .brand-title {
        font-size: 32px !important;
        margin-bottom: 12px !important;
        line-height: 1.15 !important;
    }

    .brand-subtitle {
        font-size: 18px !important;
        margin-bottom: 12px !important;
        line-height: 1.25 !important;
    }

    .brand-desc {
        font-size: 13px !important;
        margin-bottom: 22px !important;
        line-height: 1.45 !important;
    }

    .brand-banner-actions {
        gap: 16px !important;
        flex-wrap: wrap !important;
    }

    .brand-btn-join {
        width: 200px !important;
        height: 44px !important;
        font-size: 13px !important;
    }

    .brand-link-browse {
        font-size: 13px !important;
    }

    /* Decorative SVG (`.brand-banner-svg`) inside the gradient card —
       clamp so it doesn't dominate the smaller tablet card. */
    .brand-banner-svg svg {
        display: none;
        max-width: 240px !important;
        max-height: 240px !important;
        opacity: 0.45 !important;
    }

    /* Right image box — the logo container shrinks proportionally with
       the right block. */
    .brand-banner-img-box {
        width: 100% !important;
        max-width: 320px !important;
        height: auto !important;
        padding: 24px !important;
    }

    .brand-banner-img {
        max-width: 100% !important;
        max-height: 200px !important;
    }

    /* Products section heading */
    .brand-products-title {
        font-size: 28px !important;
    }

    .filter-box {
        width: 220px !important;
        height: 40px !important;
        font-size: 14px !important;
    }

    /* Product cards — 387×387 too big for tablet; mirror the laptop
       block's fluid card approach. */
    .brand-product-img-box {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
    }

    .brand-product-img-box img {
        width: 78% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        object-fit: contain !important;
    }

    .discount-badge {
        width: 34px !important;
        height: 34px !important;
        font-size: 13px !important;
    }

    .brand-product-name {
        font-size: 14px !important;
        margin-bottom: 6px !important;
        line-height: 1.35 !important;
    }

    .brand-product-meta {
        font-size: 12px !important;
    }

    .brand-product-desc {
        font-size: 12px !important;
        margin-bottom: 14px !important;
        line-height: 1.45 !important;
    }

    .btn-signup-buy {
        width: 140px !important;
        height: 38px !important;
        font-size: 12px !important;
    }
}

/* ──────────────────────────────────────────
   Filter Dropdowns & Modals Styles
   ────────────────────────────────────────── */
.cat-filter-dropdown-wrap {
    position: relative;
    display: inline-block;
}

/* Toggle element borders and interaction */
.cat-filter-toggle {
    transition: border-color 0.2s, background-color 0.2s;
}

.cat-filter-toggle:hover,
.cat-filter-toggle.is-open {
    border-color: #BAC2CD !important;
}

.cat-filter-toggle.is-open {
    border-bottom-color: transparent !important;
    z-index: 601;
}

/* Toggle icon behavior (+ / -) */
.cat-filter-toggle .cat-filter-icon {
    display: inline-block;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.cat-filter-toggle .cat-icon-minus {
    display: none;
}

.cat-filter-toggle.is-open .cat-icon-plus {
    display: none;
}

.cat-filter-toggle.is-open .cat-icon-minus {
    display: inline-block;
}

/* Mobile plus icon rotating to close cross */
.cat-filter-toggle.is-open .cat-filter-icon:not(.cat-icon-minus):not(.cat-icon-plus) {
    transform: rotate(45deg);
}

/* Dropdown Menu Panel */
.cat-filter-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 100%;
    background: #fff;
    border: 1px solid #BAC2CD;
    border-top: none;
    border-radius: 0 !important;
    z-index: 600;
}

/* Selected Count & Reset Header */
.cat-fdd-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #F7F8F9;
    margin: 12px 16px 8px;
    border-bottom: none;
}

.cat-fdd-count-text {
    font-size: 14px;
    color: #183158;
    font-family: var(--cat-font);
    font-weight: 400;
}

.cat-fdd-count {
    font-weight: 500;
    color: #E83161;
    font-size: 16px;
    margin-right: 2px;
}

.cat-fdd-reset {
    font-size: 14px;
    font-weight: 500;
    color: #E83161;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: var(--cat-font);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.cat-fdd-reset:hover {
    text-decoration: underline;
}

/* Options List Scrollbox */
.cat-fdd-list {
    max-height: 260px;
    overflow-y: auto;
    padding: 4px 0 6px;
}

.cat-fdd-list::-webkit-scrollbar {
    width: 4px;
}

.cat-fdd-list::-webkit-scrollbar-track {
    background: #F7F8F9;
}

.cat-fdd-list::-webkit-scrollbar-thumb {
    background: #BAC2CD;
}

/* Individual Option Item */
.cat-fdd-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 16px;
    cursor: pointer;
    margin: 0;
    font-weight: normal;
    transition: background 0.12s;
}

.cat-fdd-item:hover {
    background: #F7F8F9;
}

.cat-fdd-item:hover .cat-fdd-item-label {
    color: #E83161;
}

/* Hide native checkbox */
.cat-fdd-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Custom Checkbox Design */
.cat-fdd-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    min-width: 16px;
    border: 1.5px solid #BAC2CD;
    background: #fff;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}

.cat-fdd-checkbox:checked+.cat-fdd-box {
    background: #fff;
    border-color: #E83161;
}

.cat-fdd-checkbox:checked+.cat-fdd-box::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: #E83161;
}

.cat-fdd-item-label {
    font-size: 14px;
    color: #183158;
    font-family: var(--cat-font);
    transition: color 0.15s;
    line-height: 1.45;
    flex: 1;
    min-width: 0;
}

/* Responsive Overrides */
@media (max-width: 767.98px) {
    .cat-filter-dropdown-menu {
        width: 100%;
        min-width: 100%;
        left: 0;
        right: auto;
    }

    /* Mobile Categories dropdown: extends right to cover Categories + Brands full row width */
    .cat-filter-dropdown-wrap:has([data-filter-type="category_id"]) .cat-filter-dropdown-menu {
        left: 0;
        right: auto;
        width: 322px;
        min-width: unset;
    }

    /* Mobile Brands dropdown: extends left to cover Categories + Brands full row width */
    .cat-filter-dropdown-wrap:has([data-filter-type="brand_id"]) .cat-filter-dropdown-menu {
        left: -177px;
        right: auto;
        width: 322px;
        min-width: unset;
    }
}

/* ─── Mobile JOIN TO BUY Button Hover ─── */
.mobile-join-btn {
    transition: background 0.25s ease, color 0.25s ease !important;
}

.mobile-join-btn:hover {
    background: #ffffff !important;
    color: #173158 !important;
}

.mobile-join-btn:hover .mobile-join-btn-svg path {
    fill: #E83161;
    transition: fill 0.25s ease;
}