/* GCZBD-style product catalog (cards & top-up listing) */

.gczbd-catalog {
    background: #121212;
    min-height: 60vh;
    padding: 28px 0 48px;
}

.gczbd-catalog__layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.gczbd-catalog-sidebar {
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    padding: 20px 16px;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow: auto;
}

.gczbd-catalog-sidebar__title {
    color: #e5e7eb;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.gczbd-catalog-sidebar__subtitle {
    color: #9ca3af;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 14px;
}

.gczbd-catalog-cat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #e5e7eb;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
    border: 1px solid transparent;
    margin-bottom: 4px;
}

.gczbd-catalog-cat:hover {
    background: rgba(21, 180, 139, 0.08);
    color: #fff;
}

.gczbd-catalog-cat.is-active {
    background: rgba(21, 180, 139, 0.12);
    border-color: rgba(21, 180, 139, 0.35);
    box-shadow: inset 3px 0 0 #15b48b;
}

.gczbd-catalog-cat__icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #121212;
    border: 1px solid #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.gczbd-catalog-cat__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gczbd-catalog-cat__icon i {
    font-size: 0.95rem;
    color: #9ca3af;
}

.gczbd-catalog-cat__name {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 600;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gczbd-catalog-cat__count {
    font-size: 0.78rem;
    color: #9ca3af;
    font-weight: 600;
}

.gczbd-catalog-featured {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #2a2a2a;
}

.gczbd-catalog-featured__title {
    color: #9ca3af;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.gczbd-catalog-featured__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    text-decoration: none;
    color: #e5e7eb;
}

.gczbd-catalog-featured__item:hover {
    color: #15b48b;
}

.gczbd-catalog-featured__thumb {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    background: #121212;
    flex-shrink: 0;
}

.gczbd-catalog-featured__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gczbd-catalog-featured__text strong {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
}

.gczbd-catalog-featured__text small {
    color: #9ca3af;
    font-size: 0.7rem;
}

.gczbd-catalog-main {
    min-width: 0;
}

.gczbd-catalog-main__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.gczbd-catalog-main__title {
    color: #fff;
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0;
}

.gczbd-catalog-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gczbd-catalog-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: #e5e7eb;
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 40px;
}

.gczbd-catalog-filter-btn i {
    color: #9ca3af;
}

.gczbd-catalog-filter-btn select {
    background: transparent;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    outline: none;
    padding-right: 4px;
}

.gczbd-catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.gczbd-catalog-card {
    background: #141414 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.gczbd-catalog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(21, 180, 139, 0.35) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.gczbd-catalog-card__media {
    position: relative;
    aspect-ratio: 1 / 1 !important; /* Square aspect ratio matching homepage */
    background: #121212;
    overflow: hidden;
}

.gczbd-catalog-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
}

.gczbd-catalog-card:hover .gczbd-catalog-card__media img {
    transform: scale(1.05);
}

.gczbd-catalog-card__flag {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 20px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    background: #141414 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gczbd-catalog-card__flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: none;
}

.gczbd-catalog-card__flag i {
    font-size: 0.7rem;
    color: #9ca3af;
}

.gczbd-catalog-card__body {
    padding: 10px 8px 12px !important; /* Padding matching homepage */
    background: #141414 !important;
}

.gczbd-catalog-card__title {
    color: #ffffff !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    line-height: 1.35 !important;
    text-align: center !important; /* Center text matching homepage */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gczbd-catalog-pagination {
    margin-top: 28px;
    display: flex;
    justify-content: center;
}

/* Mega menu — category + region panels */
.gczbd-mega-menu {
    width: min(920px, 92vw) !important;
    padding: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: #1c1d22 !important;
    background-color: #1c1d22 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.65) !important;
}

.gczbd-mega-menu__inner {
    display: grid;
    grid-template-columns: 1.6fr 0.6fr;
    gap: 0;
    min-height: 320px;
}

.gczbd-mega-menu__label {
    color: #9ca3af;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.gczbd-mega-menu__categories {
    padding: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.gczbd-mega-menu__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    max-height: 280px;
    overflow: auto;
}

.gczbd-mega-cat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    text-decoration: none;
    color: #e5e7eb;
    transition: background 0.2s, border-color 0.2s;
}

.gczbd-mega-cat:hover,
.gczbd-mega-cat.is-active {
    background: rgba(21, 180, 139, 0.1);
    border-color: rgba(21, 180, 139, 0.35);
}

.gczbd-mega-cat__icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #1e1e1e;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.gczbd-mega-cat__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gczbd-mega-cat__text {
    flex: 1;
    min-width: 0;
}

.gczbd-mega-cat__text strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
}

.gczbd-mega-cat__text small {
    color: #9ca3af;
    font-size: 0.7rem;
}

.gczbd-mega-cat__arrow {
    font-size: 0.65rem;
    color: #6b7280;
}

.gczbd-mega-menu__regions {
    padding: 20px;
}

.gczbd-mega-region-panels {
    max-height: 280px;
    overflow: auto;
}

.gczbd-mega-region-panel[hidden] {
    display: none !important;
}

.gczbd-mega-region-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #e5e7eb;
    transition: background 0.2s;
}

.gczbd-mega-region-item:hover {
    background: rgba(21, 180, 139, 0.1);
}

.gczbd-mega-region-item__flag {
    width: 28px;
    height: 20px;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1e1e1e;
    flex-shrink: 0;
}

.gczbd-mega-region-item__flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gczbd-mega-region-item__text strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
}

.gczbd-mega-region-item__text small {
    color: #9ca3af;
    font-size: 0.72rem;
}

/* Product hero region switcher */
.gczbd-region-switcher {
    position: relative;
    display: inline-flex;
}

.gczbd-region-switcher__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #fff;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.gczbd-region-switcher__toggle img {
    width: 22px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
}

.gczbd-region-switcher__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    z-index: 20;
    padding: 6px;
    display: none;
}

.gczbd-region-switcher.is-open .gczbd-region-switcher__menu {
    display: block;
}

.gczbd-region-switcher__option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.gczbd-region-switcher__option:hover,
.gczbd-region-switcher__option.is-active {
    background: rgba(21, 180, 139, 0.12);
    color: #15b48b;
}

.gczbd-region-switcher__option img {
    width: 22px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
}

@media (max-width: 1199px) {
    .gczbd-catalog-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 991px) {
    .gczbd-catalog__layout {
        grid-template-columns: 1fr;
    }

    .gczbd-catalog-sidebar {
        display: none !important;
    }

    .gczbd-mega-menu__inner {
        grid-template-columns: 1fr;
    }

    .gczbd-mega-menu__categories {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .gczbd-mega-menu__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gczbd-catalog-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }
}

@media (max-width: 767px) {
    .gczbd-catalog-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .gczbd-catalog-main__title {
        font-size: 1.35rem;
    }
}

@media (max-width: 479px) {
    .gczbd-catalog-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
}

/* ── Light Mode Theme Overrides ── */
html[data-theme="light"] .gczbd-catalog {
    background: #F6F8F9 !important;
}

html[data-theme="light"] .gczbd-catalog-sidebar {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

html[data-theme="light"] .gczbd-catalog-sidebar__title {
    color: #1c1c1c !important;
}

html[data-theme="light"] .gczbd-catalog-sidebar__subtitle {
    color: rgba(0, 0, 0, 0.45) !important;
}

html[data-theme="light"] .gczbd-catalog-cat {
    color: #374151 !important;
}

html[data-theme="light"] .gczbd-catalog-cat:hover {
    background: rgba(0, 0, 0, 0.03) !important;
}

html[data-theme="light"] .gczbd-catalog-cat.active {
    background: rgba(21, 180, 139, 0.1) !important;
    color: #15b48b !important;
}

html[data-theme="light"] .gczbd-catalog-filters__title {
    color: #1c1c1c !important;
}

html[data-theme="light"] .gczbd-catalog-search__input {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #1c1c1c !important;
}

html[data-theme="light"] .gczbd-catalog-search__input:focus {
    border-color: #15b48b !important;
}

html[data-theme="light"] .gczbd-catalog-search__icon {
    color: rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="light"] .gczbd-catalog-filter-btn {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #1c1c1c !important;
}

html[data-theme="light"] .gczbd-catalog-filter-btn i {
    color: rgba(0, 0, 0, 0.45) !important;
}

html[data-theme="light"] .gczbd-catalog-filter-btn select option {
    background: #ffffff !important;
    color: #1c1c1c !important;
}

html[data-theme="light"] .gczbd-catalog-card {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
}

html[data-theme="light"] .gczbd-catalog-card:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08) !important;
}

html[data-theme="light"] .gczbd-catalog-card__media {
    background: #F6F8F9 !important;
}

html[data-theme="light"] .gczbd-catalog-card__body {
    background: #ffffff !important;
}

html[data-theme="light"] .gczbd-catalog-card__title {
    color: #1c1c1c !important;
}

html[data-theme="light"] .gczbd-catalog-card__flag {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] .gczbd-catalog-card__flag i {
    color: rgba(0, 0, 0, 0.45) !important;
}
