/**
 * GoBoost Shop - Estilos da Tela Dedicada de Produtos (produtos.php)
 * Suporte completo a tema Dark/Light, Busca Facetada, Grade Responsiva e Modo Gaveta Mobile
 */

/* ==========================================================================
 * WRAPPER E LAYOUT GLOBAL
 * ========================================================================== */
.gbp-page {
    background-color: var(--gb-bg, #0D0C12);
    color: var(--gb-text, #F8F8FC);
    min-height: 100vh;
}

.gbp-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 18px 64px;
}

/* Helpers de visibilidade */
.gbp-only-mobile {
    display: none !important;
}

@media (max-width: 860px) {
    .gbp-only-mobile {
        display: inline-flex !important;
    }
    .gbp-only-desktop {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .gbp-wrapper {
        padding: 0 12px 48px;
    }
}

.gbp-wrapper .gb-breadcrumb-nav {
    margin-bottom: 14px;
}

/* Botões base */
.gbp-btn-primary {
    background: linear-gradient(135deg, var(--gb-primary, #8A4FFF) 0%, var(--gb-primary-dark, #6E32E3) 100%);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px var(--gb-primary-glow, rgba(138, 79, 255, 0.32));
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.gbp-btn-primary:hover {
    background: linear-gradient(135deg, var(--gb-primary-hover, #7B3FE4) 0%, var(--gb-primary-dark, #6E32E3) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--gb-primary-glow, rgba(138, 79, 255, 0.45));
}

.gbp-btn-outline {
    background: transparent;
    color: var(--gb-text, #F8F8FC);
    border: 1px solid var(--gb-border, rgba(255, 255, 255, 0.12));
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.gbp-btn-outline:hover {
    border-color: var(--gb-primary, #8A4FFF);
    color: var(--gb-primary-light, #A678FF);
    background: var(--gb-primary-soft, rgba(138, 79, 255, 0.08));
    transform: translateY(-1px);
}

.gbp-link-btn {
    background: transparent;
    border: none;
    color: var(--gb-primary-light, #A678FF);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gbp-link-btn:hover {
    color: var(--gb-text, #F8F8FC);
    text-decoration: underline;
}

.gbp-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--gb-border, rgba(255, 255, 255, 0.12));
    background: var(--gb-card, #1A1824);
    color: var(--gb-text, #F8F8FC);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.15s ease;
}

.gbp-icon-btn:hover {
    border-color: var(--gb-primary, #8A4FFF);
    color: var(--gb-primary-light, #A678FF);
}

/* ==========================================================================
 * HERO / CABEÇALHO DO CONTEXTO
 * ========================================================================== */
.gbp-hero {
    background: linear-gradient(135deg, rgba(138, 79, 255, 0.09) 0%, rgba(26, 24, 36, 0.7) 100%);
    border: 1px solid var(--gb-border, rgba(255, 255, 255, 0.09));
    border-radius: 18px;
    padding: 22px 26px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.gbp-hero-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gbp-hero-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--gb-primary, #8A4FFF) 0%, var(--gb-primary-dark, #6E32E3) 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 6px 18px var(--gb-primary-glow, rgba(138, 79, 255, 0.35));
    flex-shrink: 0;
}

.gbp-hero-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gb-primary, #8A4FFF);
    box-shadow: 0 4px 14px var(--gb-primary-glow, rgba(138, 79, 255, 0.35));
    flex-shrink: 0;
}

.gbp-hero-main h1 {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--gb-text, #F8F8FC);
    margin: 0 0 4px 0;
    font-family: var(--gb-font-heading, 'Urbanist', sans-serif);
    letter-spacing: -0.02em;
}

.gbp-hero-sub {
    font-size: 0.88rem;
    color: var(--gb-text-secondary, #ABA7BA);
    margin: 0;
    font-weight: 500;
}

@media (max-width: 600px) {
    .gbp-hero {
        padding: 16px 18px;
    }
    .gbp-hero-icon,
    .gbp-hero-avatar {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
    .gbp-hero-main h1 {
        font-size: 1.3rem;
    }
}

/* ==========================================================================
 * CHIPS DE SUBCATEGORIAS (ATALHO SUPERIOR)
 * ========================================================================== */
.gbp-subchips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 14px;
    margin-bottom: 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.gbp-subchips::-webkit-scrollbar {
    display: none;
}

.gbp-chip {
    background: var(--gb-card, #1A1824);
    color: var(--gb-text-secondary, #ABA7BA);
    border: 1px solid var(--gb-border, rgba(255, 255, 255, 0.09));
    border-radius: 999px;
    padding: 7px 15px;
    font-size: 0.84rem;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.gbp-chip i {
    font-size: 0.95rem;
}

.gbp-chip:hover {
    border-color: var(--gb-primary, #8A4FFF);
    color: var(--gb-text, #F8F8FC);
    background: var(--gb-card-hover, #221F2F);
    transform: translateY(-1px);
}

.gbp-chip.is-active {
    background: var(--gb-primary, #8A4FFF);
    border-color: var(--gb-primary, #8A4FFF);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--gb-primary-glow, rgba(138, 79, 255, 0.32));
}

.gbp-chip.is-dim:not(.is-active) {
    opacity: 0.55;
}

.gbp-chip em {
    font-style: normal;
    font-size: 0.72rem;
    font-weight: 700;
    opacity: 0.78;
    margin-left: 2px;
}

.gbp-chip button {
    background: transparent;
    border: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
    padding: 2px;
    cursor: pointer;
    border-radius: 50%;
    opacity: 0.85;
    transition: opacity 0.15s ease;
}

.gbp-chip button:hover {
    opacity: 1;
}

/* ==========================================================================
 * LAYOUT DE 2 COLUNAS (SIDEBAR + RESULTADOS)
 * ========================================================================== */
.gbp-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1080px) {
    .gbp-layout {
        grid-template-columns: 250px 1fr;
        gap: 18px;
    }
}

@media (max-width: 860px) {
    .gbp-layout {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
 * SIDEBAR DE FILTROS & GAVETA MOBILE
 * ========================================================================== */
.gbp-sidebar {
    position: sticky;
    top: 132px;
    max-height: calc(100vh - 148px);
    display: flex;
    flex-direction: column;
    background: var(--gb-card, #1A1824);
    border: 1px solid var(--gb-border, rgba(255, 255, 255, 0.09));
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: var(--gb-shadow-sm, 0 4px 16px rgba(0, 0, 0, 0.28));
}

.gbp-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--gb-border, rgba(255, 255, 255, 0.08));
}

.gbp-sidebar-head strong {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--gb-text, #F8F8FC);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

.gbp-sidebar-head strong i {
    color: var(--gb-primary-light, #A678FF);
    font-size: 1.15rem;
}

.gbp-sidebar-body {
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--gb-surface, #242132) transparent;
}

.gbp-sidebar-body::-webkit-scrollbar {
    width: 5px;
}

.gbp-sidebar-body::-webkit-scrollbar-thumb {
    background: var(--gb-surface, #242132);
    border-radius: 10px;
}

/* Gaveta Offcanvas no Mobile */
@media (max-width: 860px) {
    .gbp-sidebar {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 85vh;
        height: auto;
        border-radius: 20px 20px 0 0;
        z-index: 1000;
        transform: translateY(105%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.28s;
        padding: 18px 20px calc(18px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.55);
    }

    body.gbp-drawer-open .gbp-sidebar {
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0s;
    }

    body.gbp-drawer-open {
        overflow: hidden;
    }

    .gbp-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.65);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 999;
        transition: opacity 0.2s ease;
    }

    .gbp-sidebar-foot {
        padding-top: 14px;
        margin-top: 10px;
        border-top: 1px solid var(--gb-border, rgba(255, 255, 255, 0.08));
    }

    .gbp-sidebar-foot .gbp-btn-primary {
        width: 100%;
    }
}

/* ==========================================================================
 * FACETAS (<details class="gbp-facet">)
 * ========================================================================== */
.gbp-facet {
    border-bottom: 1px solid var(--gb-border, rgba(255, 255, 255, 0.06));
    padding: 4px 0;
}

.gbp-facet:last-child {
    border-bottom: none;
}

.gbp-facet summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 4px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--gb-text, #F8F8FC);
    cursor: pointer;
    user-select: none;
    border-radius: 6px;
    transition: color 0.15s ease;
}

.gbp-facet summary::-webkit-details-marker {
    display: none;
}

.gbp-facet summary::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--gb-text-muted, #726E82);
    border-bottom: 2px solid var(--gb-text-muted, #726E82);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-right: 4px;
}

.gbp-facet[open] summary::after {
    transform: rotate(-135deg);
}

.gbp-facet summary:hover {
    color: var(--gb-primary-light, #A678FF);
}

.gbp-facet-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 4px 0 10px;
    max-height: 280px;
    overflow-y: auto;
}

.gbp-facet-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 8px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--gb-text-secondary, #ABA7BA);
    font-size: 0.84rem;
    font-family: inherit;
    text-decoration: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
    transition: all 0.15s ease;
}

.gbp-facet-item i {
    font-size: 0.95rem;
    flex-shrink: 0;
}

.gbp-facet-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gbp-facet-item em {
    font-style: normal;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--gb-text-muted, #726E82);
    background: var(--gb-surface, #242132);
    padding: 2px 7px;
    border-radius: 999px;
    margin-left: auto;
    flex-shrink: 0;
}

.gbp-facet-item:hover {
    background: var(--gb-primary-soft, rgba(138, 79, 255, 0.1));
    color: var(--gb-text, #F8F8FC);
}

.gbp-facet-item.is-active {
    background: var(--gb-primary-soft, rgba(138, 79, 255, 0.16));
    color: var(--gb-primary-light, #A678FF);
    font-weight: 700;
}

.gbp-facet-item.is-active em {
    background: var(--gb-primary, #8A4FFF);
    color: #ffffff;
}

.gbp-facet-item.is-dim {
    opacity: 0.42;
}

.gbp-facet-empty {
    font-size: 0.8rem;
    color: var(--gb-text-muted, #726E82);
    padding: 6px 8px;
    margin: 0;
}

/* Checkbox / Radio visual */
.gbp-mark {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid var(--gb-border-strong, rgba(255, 255, 255, 0.22));
    background: var(--gb-surface, #242132);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.gbp-mark-radio {
    border-radius: 50%;
}

.gbp-facet-item.is-active .gbp-mark {
    background: var(--gb-primary, #8A4FFF);
    border-color: var(--gb-primary, #8A4FFF);
}

.gbp-facet-item.is-active .gbp-mark::after {
    content: '';
    width: 5px;
    height: 9px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(45deg) translate(-1px, -1px);
}

.gbp-facet-item.is-active .gbp-mark-radio::after {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    transform: none;
}

/* Busca interna dentro da faceta (ex: lojas) */
.gbp-facet-search {
    position: relative;
    margin: 4px 0 8px;
}

.gbp-facet-search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gb-text-muted, #726E82);
    font-size: 0.85rem;
}

.gbp-facet-search input {
    width: 100%;
    background: var(--gb-surface, #242132);
    border: 1px solid var(--gb-border, rgba(255, 255, 255, 0.08));
    border-radius: 8px;
    padding: 6px 10px 6px 30px;
    font-size: 0.82rem;
    color: var(--gb-text, #F8F8FC);
    outline: none;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.gbp-facet-search input:focus {
    border-color: var(--gb-primary, #8A4FFF);
}

/* Inputs de Preço Mínimo / Máximo */
.gbp-price-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0 10px;
}

.gbp-price-inputs label {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: var(--gb-surface, #242132);
    border: 1px solid var(--gb-border, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    padding: 0 8px;
    font-size: 0.82rem;
    color: var(--gb-text-muted, #726E82);
}

.gbp-price-inputs label:focus-within {
    border-color: var(--gb-primary, #8A4FFF);
}

.gbp-price-inputs label span {
    font-size: 0.74rem;
    font-weight: 700;
    margin-right: 4px;
}

.gbp-price-inputs input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--gb-text, #F8F8FC);
    font-size: 0.84rem;
    font-family: inherit;
    padding: 7px 0;
    min-width: 0;
}

.gbp-price-inputs input::-webkit-outer-spin-button,
.gbp-price-inputs input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.gbp-dash {
    color: var(--gb-text-muted, #726E82);
    font-weight: 600;
}

.gbp-price-inputs .gbp-apply {
    background: var(--gb-primary, #8A4FFF);
    color: #ffffff;
    border-color: var(--gb-primary, #8A4FFF);
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.gbp-price-inputs .gbp-apply:hover {
    background: var(--gb-primary-hover, #7B3FE4);
}

/* Select Dropdown estilizado */
.gbp-select-wrap {
    margin: 6px 0 8px;
}

.gbp-select-wrap select {
    width: 100%;
    background: var(--gb-surface, #242132);
    color: var(--gb-text, #F8F8FC);
    border: 1px solid var(--gb-border, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}

.gbp-select-wrap select:focus {
    border-color: var(--gb-primary, #8A4FFF);
}

/* Switch Toggles */
.gbp-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    font-size: 0.84rem;
    color: var(--gb-text-secondary, #ABA7BA);
    cursor: pointer;
    user-select: none;
}

.gbp-toggle input {
    display: none;
}

.gbp-toggle span {
    width: 34px;
    height: 18px;
    background: var(--gb-surface, #242132);
    border-radius: 999px;
    position: relative;
    border: 1px solid var(--gb-border-strong, rgba(255, 255, 255, 0.18));
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.gbp-toggle span::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gb-text-muted, #726E82);
    transition: all 0.2s ease;
}

.gbp-toggle input:checked + span {
    background: var(--gb-primary, #8A4FFF);
    border-color: var(--gb-primary, #8A4FFF);
}

.gbp-toggle input:checked + span::after {
    left: 18px;
    background: #ffffff;
}

.gbp-toggle:hover {
    color: var(--gb-text, #F8F8FC);
}

/* Bloco de loja travada via ?loja= */
.gbp-locked-seller {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--gb-surface, #242132);
    border: 1px solid var(--gb-primary-border, rgba(138, 79, 255, 0.42));
    border-radius: 10px;
    margin: 6px 0 10px;
}

.gbp-locked-seller img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.gbp-locked-seller span {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--gb-text, #F8F8FC);
    flex: 1;
}

/* ==========================================================================
 * SEÇÃO DE RESULTADOS & TOOLBAR
 * ========================================================================== */
.gbp-results {
    min-width: 0;
}

.gbp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    min-height: 40px;
}

.gbp-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 0;
}

.gbp-chips:empty {
    display: none;
}

.gbp-chips .gbp-chip {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gbp-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

@media (max-width: 860px) {
    .gbp-chips {
        order: 3;
        flex: 1 1 100%;
        width: 100%;
    }
}

.gbp-badge {
    background: var(--gb-primary, #8A4FFF);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    margin-left: 4px;
}

/* Seletor de Ordenação */
.gbp-sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gb-card, #1A1824);
    border: 1px solid var(--gb-border, rgba(255, 255, 255, 0.1));
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 0.82rem;
    color: var(--gb-text-secondary, #ABA7BA);
}

.gbp-sort span {
    font-weight: 600;
    color: var(--gb-text-muted, #726E82);
}

.gbp-sort select {
    background: transparent;
    border: none;
    color: var(--gb-text, #F8F8FC);
    font-size: 0.84rem;
    font-weight: 600;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}

/* Seletor de Densidade da Grade */
.gbp-density {
    display: inline-flex;
    background: var(--gb-card, #1A1824);
    border: 1px solid var(--gb-border, rgba(255, 255, 255, 0.1));
    border-radius: 10px;
    padding: 2px;
    gap: 2px;
}

.gbp-density button {
    background: transparent;
    border: none;
    color: var(--gb-text-muted, #726E82);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.15s ease;
}

.gbp-density button:hover {
    color: var(--gb-text, #F8F8FC);
}

.gbp-density button.is-active {
    background: var(--gb-surface, #242132);
    color: var(--gb-primary-light, #A678FF);
}

@media (max-width: 640px) {
    .gbp-density {
        display: none;
    }
    .gbp-toolbar {
        gap: 8px;
    }
    .gbp-toolbar-right {
        flex: 1 1 auto;
        justify-content: flex-end;
    }
    .gbp-sort {
        width: auto;
        max-width: 100%;
        justify-content: space-between;
    }
}

/* ==========================================================================
 * GRADE DE PRODUTOS & DENSIDADE
 * ========================================================================== */
.gbp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 16px;
    transition: opacity 0.2s ease;
}

.gbp-grid.is-loading {
    opacity: 0.45;
    pointer-events: none;
}

.gbp-grid.is-compact {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}

.gbp-grid.is-compact .gb-product-card-body {
    padding: 10px 12px;
}

.gbp-grid.is-compact .gb-card-title {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
}

.gbp-grid.is-compact .gb-card-price {
    font-size: 0.96rem;
}

@media (max-width: 600px) {
    .gbp-grid,
    .gbp-grid.is-compact {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* ==========================================================================
 * EMPTY STATE E ROLAGEM INFINITA / CARREGAR MAIS
 * ========================================================================== */
.gbp-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--gb-card, #1A1824);
    border: 1px dashed var(--gb-border, rgba(255, 255, 255, 0.12));
    border-radius: 18px;
    margin: 20px 0;
}

.gbp-empty i {
    font-size: 54px;
    color: var(--gb-primary-light, #A678FF);
    opacity: 0.7;
    margin-bottom: 12px;
    display: inline-block;
}

.gbp-empty h1,
.gbp-empty h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--gb-text, #F8F8FC);
    margin: 0 0 8px 0;
}

.gbp-empty p {
    font-size: 0.9rem;
    color: var(--gb-text-secondary, #ABA7BA);
    max-width: 440px;
    margin: 0 auto 20px;
    line-height: 1.5;
}

.gbp-empty-cats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 720px;
    margin: 0 auto;
}

.gbp-loadmore {
    text-align: center;
    padding: 30px 16px;
}

.gbp-loading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--gb-text-secondary, #ABA7BA);
    font-weight: 600;
}

.gbp-loading i {
    font-size: 1.2rem;
    color: var(--gb-primary-light, #A678FF);
}

/* ==========================================================================
 * TEMA LIGHT
 * ========================================================================== */
[data-theme="light"] .gbp-page {
    background-color: var(--gb-bg, #F6F6FA);
    color: var(--gb-text, #13111B);
}

[data-theme="light"] .gbp-hero {
    background: linear-gradient(135deg, rgba(138, 79, 255, 0.08) 0%, rgba(255, 255, 255, 0.9) 100%);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .gbp-sidebar,
[data-theme="light"] .gbp-chip:not(.is-active),
[data-theme="light"] .gbp-sort,
[data-theme="light"] .gbp-density,
[data-theme="light"] .gbp-empty {
    background: #FFFFFF;
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .gbp-chip:not(.is-active):hover {
    border-color: var(--gb-primary, #8A4FFF);
    color: var(--gb-primary-dark, #6E32E3);
    background: #F6F3FF;
}

[data-theme="light"] .gbp-chip.is-active {
    background: var(--gb-primary, #8A4FFF);
    border-color: var(--gb-primary, #8A4FFF);
    color: #FFFFFF;
    box-shadow: 0 4px 14px var(--gb-primary-glow, rgba(138, 79, 255, 0.32));
}

[data-theme="light"] .gbp-sidebar-head strong i,
[data-theme="light"] .gbp-link-btn,
[data-theme="light"] .gbp-density button.is-active {
    color: var(--gb-primary-dark, #6E32E3);
}

[data-theme="light"] .gbp-facet summary {
    color: #13111B;
}

[data-theme="light"] .gbp-facet summary:hover {
    color: var(--gb-primary-dark, #6E32E3);
}

[data-theme="light"] .gbp-facet-item:hover {
    background: rgba(138, 79, 255, 0.08);
    color: #13111B;
}

[data-theme="light"] .gbp-facet-item.is-active {
    background: rgba(138, 79, 255, 0.14);
    color: var(--gb-primary-dark, #6E32E3);
}

[data-theme="light"] .gbp-facet-item em,
[data-theme="light"] .gbp-mark,
[data-theme="light"] .gbp-facet-search input,
[data-theme="light"] .gbp-price-inputs label,
[data-theme="light"] .gbp-select-wrap select,
[data-theme="light"] .gbp-toggle span {
    background: #F1F0F7;
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .gbp-facet-item.is-active em {
    background: var(--gb-primary, #8A4FFF);
    color: #FFFFFF;
}

[data-theme="light"] .gbp-facet-search input,
[data-theme="light"] .gbp-price-inputs input,
[data-theme="light"] .gbp-select-wrap select {
    color: #13111B;
}

[data-theme="light"] .gbp-btn-outline {
    border-color: rgba(0, 0, 0, 0.15);
    color: #13111B;
}

[data-theme="light"] .gbp-btn-outline:hover {
    border-color: var(--gb-primary, #8A4FFF);
    color: var(--gb-primary-dark, #6E32E3);
    background: rgba(138, 79, 255, 0.08);
}

/* ==========================================================================
 * SEGMENTOS DE BANNER (PÁGINA DEDICADA 1..14)
 * ========================================================================== */
.gbp-segment-nav-strip {
    margin: 8px 0 18px;
    position: relative;
}

.gbp-segment-nav-track {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.gbp-segment-nav-track::-webkit-scrollbar {
    display: none;
}

.gbp-segment-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--gb-card, #1A1823);
    border: 1px solid var(--gb-border, rgba(255, 255, 255, 0.08));
    color: var(--gb-text-secondary, #A09DB1);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.gbp-segment-nav-pill i {
    font-size: 1rem;
    color: var(--gb-primary, #8A4FFF);
    transition: transform 0.2s ease;
}

.gbp-segment-nav-pill:hover {
    border-color: var(--gb-primary, #8A4FFF);
    color: var(--gb-text, #F8F8FC);
    background: rgba(138, 79, 255, 0.08);
    transform: translateY(-1px);
}

.gbp-segment-nav-pill.is-active {
    background: linear-gradient(135deg, rgba(138, 79, 255, 0.25) 0%, rgba(110, 50, 227, 0.35) 100%);
    border-color: var(--gb-primary, #8A4FFF);
    color: #FFFFFF;
    font-weight: 700;
    box-shadow: 0 4px 14px var(--gb-primary-glow, rgba(138, 79, 255, 0.28));
}

.gbp-segment-nav-pill.is-active i {
    color: #FFFFFF;
}

/* HERO BANNER SECTION */
.gbp-segment-hero-section {
    margin: 10px 0 16px;
    width: 100%;
}

.gb-banner-slot.is-segment-hero {
    margin: 0;
    width: 100%;
}

.gb-banner-slot.is-segment-hero .gb-slide-ofertas {
    border-radius: 16px;
    border: 1px solid var(--gb-border, rgba(255, 255, 255, 0.12));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
    .gbp-segment-hero-section {
        margin: 10px 0 14px;
    }

    .gb-banner-slot.is-segment-hero {
        width: calc(100% + 24px) !important;
        margin-left: -12px !important;
        margin-right: -12px !important;
        max-width: 100vw !important;
    }

    .gb-banner-slot.is-segment-hero .gb-slide-ofertas,
    .gb-banner-slot.is-segment-hero .gb-banner-skeleton {
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }
}

/* CHIPS DE PRATELEIRAS DO SEGMENTO */
.gbp-segment-shelf-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 14px;
    margin-bottom: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.gbp-segment-shelf-chips::-webkit-scrollbar {
    display: none;
}

.gbp-segment-shelf-chips .gbp-chip {
    cursor: pointer;
    border: 1px solid var(--gb-border, rgba(255, 255, 255, 0.1));
    background: var(--gb-card, #1A1823);
    color: var(--gb-text-secondary, #A09DB1);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.gbp-segment-shelf-chips .gbp-chip:hover {
    border-color: var(--gb-primary, #8A4FFF);
    color: var(--gb-text, #F8F8FC);
    background: rgba(138, 79, 255, 0.08);
}

.gbp-segment-shelf-chips .gbp-chip.is-active {
    background: var(--gb-primary, #8A4FFF);
    border-color: var(--gb-primary, #8A4FFF);
    color: #FFFFFF;
    font-weight: 700;
    box-shadow: 0 4px 14px var(--gb-primary-glow, rgba(138, 79, 255, 0.32));
}

/* Light theme overrides para Segmentos */
[data-theme="light"] .gbp-segment-nav-pill {
    background: #FFFFFF;
    border-color: rgba(0, 0, 0, 0.08);
    color: #555068;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .gbp-segment-nav-pill:hover {
    border-color: var(--gb-primary, #8A4FFF);
    color: var(--gb-primary-dark, #6E32E3);
    background: rgba(138, 79, 255, 0.06);
}

[data-theme="light"] .gbp-segment-nav-pill.is-active {
    background: linear-gradient(135deg, var(--gb-primary, #8A4FFF) 0%, var(--gb-primary-dark, #6E32E3) 100%);
    border-color: transparent;
    color: #FFFFFF;
}

[data-theme="light"] .gb-banner-slot.is-segment-hero .gb-slide-ofertas {
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .gbp-segment-shelf-chips .gbp-chip {
    background: #FFFFFF;
    border-color: rgba(0, 0, 0, 0.1);
    color: #555068;
}

[data-theme="light"] .gbp-segment-shelf-chips .gbp-chip:hover {
    border-color: var(--gb-primary, #8A4FFF);
    color: var(--gb-primary-dark, #6E32E3);
    background: rgba(138, 79, 255, 0.06);
}

[data-theme="light"] .gbp-segment-shelf-chips .gbp-chip.is-active {
    background: var(--gb-primary, #8A4FFF);
    border-color: var(--gb-primary, #8A4FFF);
    color: #FFFFFF;
}


