/* ============================================================
   CATÁLOGO — archive-product
   Adicionar em: nectech-child/assets/css/catalog.css
   Importar via functions.php: wp_enqueue_style('nectech-catalog', ...)
   ============================================================ */

/* ---- Aliases locais do catálogo -> tokens canônicos v3 (colors_and_type.css) ----
   Só a camada de COR foi reconciliada. Layout/grid/lógica intactos.
   --verde, --roxo e --branco NÃO são redefinidos aqui: resolvem do :root global v3. */
:root {
  --azul:       var(--azul-prime);    /* #1D3A5A */
  --laranja:    var(--laranja-prime); /* #E74F1C */
  --laranja-dk: var(--laranja-dark);  /* #BF4415 */
  --cinza:      #8A9BAD;               /* cinza-azulado claro p/ texto sobre fundo escuro */
}

/* ===== CONTAINER ===== */

.nec-results-bar__sort form,
.nec-results-bar__sort .woocommerce-ordering {
    margin: 0;
    width: auto;
}

.nec-results-bar__sort select {
    width: auto;
    max-width: 200px;
}


.nec-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== HEADER DO CATÁLOGO ===== */
.nec-catalog-header {
    background: var(--azul);
    padding: 3rem 0 2.5rem;
    border-bottom: 3px solid var(--laranja);
}

.nec-catalog-header__inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.nec-catalog-header__eyebrow {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--laranja);
    margin-bottom: 0.5rem;
}

.nec-catalog-header__h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--branco);
    margin: 0 0 0.25rem;
    line-height: 1.15;
}

.nec-catalog-header__desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--cinza);
    margin: 0;
}

/* SearchWP no header */
.nec-catalog-header__search .facetwp-search-wrap {
    position: relative;
}

.nec-catalog-header__search input[type="search"],
.nec-catalog-header__search .facetwp-search {
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: var(--branco);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    width: 320px;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}

.nec-catalog-header__search input[type="search"]::placeholder,
.nec-catalog-header__search .facetwp-search::placeholder {
    color: var(--cinza);
}

.nec-catalog-header__search input[type="search"]:focus,
.nec-catalog-header__search .facetwp-search:focus {
    border-color: var(--laranja);
    background: rgba(255,255,255,0.12);
}

/* ===== CORPO ===== */
.nec-catalog-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2.5rem;
    padding: 2.5rem 0 4rem;
    align-items: start;
}

/* ===== SIDEBAR ===== */
/* Estilo dos checkboxes FacetWP */
.nec-catalog-sidebar .facetwp-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: #444;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s;
    position: relative;
    padding-left: 1.75rem;
}

.nec-catalog-sidebar .facetwp-checkbox::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 1.5px solid rgba(31,36,70,0.25);
    border-radius: 3px;
    background: #fff;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}

.nec-catalog-sidebar .facetwp-checkbox.checked::before {
    background: var(--laranja);
    border-color: var(--laranja);
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='white' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.nec-catalog-sidebar .facetwp-checkbox:hover {
    color: var(--laranja);
}

.nec-catalog-sidebar .facetwp-checkbox.checked {
    color: var(--laranja);
    font-weight: 600;
}

.nec-catalog-sidebar .facetwp-checkbox .facetwp-display-value {
    flex: 1;
}

.nec-catalog-sidebar .facetwp-counter {
    font-size: 0.75rem;
    color: var(--cinza);
}

/* Grupos de facets */
.nec-facet-group {
    border-bottom: 1px solid rgba(31,36,70,0.08);
    margin-bottom: 0;
}

.nec-facet-group__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 1rem 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--azul);
}

.nec-chevron {
    transition: transform 0.25s;
    flex-shrink: 0;
    color: var(--cinza);
}

.nec-facet-group__toggle[aria-expanded="false"] .nec-chevron {
    transform: rotate(-90deg);
}

.nec-facet-group__body {
    padding-bottom: 1rem;
    padding-left: 8px;
    overflow: visible;
}

.nec-facet-group__body[hidden] {
    display: none;
}

.nec-catalog-sidebar .facetwp-checkbox:hover {
    color: var(--laranja);
}

.nec-catalog-sidebar .facetwp-checkbox.checked {
    color: var(--laranja);
    font-weight: 600;
}

.nec-catalog-sidebar .facetwp-checkbox .facetwp-display-value {
    flex: 1;
}

.nec-catalog-sidebar .facetwp-checkbox .facetwp-counter {
    font-size: 0.75rem;
    color: var(--cinza);
}

/* WhatsApp sidebar */
.nec-sidebar-whatsapp {
    margin-top: 1.75rem;
    background: var(--azul);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
}

.nec-sidebar-whatsapp p {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--cinza);
    margin: 0 0 0.875rem;
    line-height: 1.4;
}

.nec-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--verde);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
    width: 100%;
    justify-content: center;
}

.nec-btn-whatsapp:hover {
    filter: brightness(0.92);
}

/* ===== ÁREA DE RESULTADOS ===== */
.nec-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(31,36,70,0.1);
}

.nec-results-bar__count {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--cinza);
    white-space: nowrap;
}

.nec-results-bar__sort {
    flex-shrink: 0;
    flex-grow: 0;
}


.nec-results-bar__sort select {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    border: none;
    border-bottom: 1.5px solid var(--azul);
    border-radius: 0;
    padding: 0.4rem 2rem 0.4rem 0.25rem;
    color: var(--azul);
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 7L11 1' stroke='%231f2446' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.25rem center;
    font-weight: 600;
    width: auto;
    max-width: 200px;
}

.nec-results-bar__sort select:focus {
    outline: none;
    border-bottom-color: var(--laranja);
}

/* ===== GRID DE PRODUTOS ===== */
.nec-products-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

/* ===== CARD DE PRODUTO ===== */
.nec-product-card {
    background: #fff;
    border: 1px solid rgba(31,36,70,0.08);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s, transform 0.25s;
}

.nec-product-card:hover {
    box-shadow: 0 8px 32px rgba(31,36,70,0.12);
    transform: translateY(-3px);
}

.nec-product-card__link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Imagem */
.nec-product-card__image {
    position: relative;
    background: #f5f5f5;
    aspect-ratio: 4/3;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nec-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.75rem;
    transition: transform 0.3s;
}

.nec-product-card:hover .nec-product-card__image img {
    transform: scale(1.04);
}

.nec-product-card__no-image {
    color: #ccc;
}

/* Badge */
.nec-badge {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: #fff;
    background: var(--cinza);
}

.nec-badge--laranja { background: var(--laranja); }
.nec-badge--verde   { background: var(--verde); }
.nec-badge--roxo    { background: var(--roxo); }

/* Info */
.nec-product-card__info {
    padding: 1rem 1rem 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.nec-product-card__title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--azul);
    margin: 0;
    line-height: 1.3;
}

.nec-product-card__aplicacao,
.nec-product-card__ref {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.nec-product-card__meta-label {
    font-weight: 600;
    color: var(--azul);
}

/* Pills de marca */
.nec-product-card__marcas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.25rem;
}

.nec-pill {
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--azul);
    background: rgba(31,36,70,0.07);
    border-radius: 3px;
    padding: 0.15rem 0.4rem;
}

/* Footer do card */
.nec-product-card__footer {
    padding: 0.75rem 1rem 1rem;
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid rgba(31,36,70,0.06);
}

.nec-btn-orcar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--laranja);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.55rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    flex: 1;
}

.nec-btn-orcar:hover {
    background: var(--laranja-dk);
}

.nec-btn-detalhes {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--azul);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.55rem 0.875rem;
    border-radius: 6px;
    border: 1.5px solid rgba(31,36,70,0.2);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.nec-btn-detalhes:hover {
    border-color: var(--azul);
    color: var(--azul);
}

/* ===== SEM RESULTADOS ===== */
.nec-no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--cinza);
    grid-column: 1 / -1;
}

.nec-no-results h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.25rem;
    color: var(--azul);
    margin: 1rem 0 0.5rem;
}

.nec-no-results p {
    font-family: 'Inter', sans-serif;
    margin: 0 0 1.5rem;
}

/* ===== PAGINAÇÃO ===== */
.nec-pagination {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}

.nec-pagination .facetwp-pager a,
.nec-pagination .facetwp-page {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(31,36,70,0.15);
    border-radius: 6px;
    margin: 0 0.2rem;
    color: var(--azul);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.nec-pagination .facetwp-page.active,
.nec-pagination .facetwp-pager a:hover {
    background: var(--laranja);
    border-color: var(--laranja);
    color: #fff;
}

/* ===== MOBILE FILTROS ===== */
.nec-mobile-filter-btn {
    display: none;
    position: fixed;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
    background: var(--azul);
    color: var(--branco);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(31,36,70,0.35);
    white-space: nowrap;
}

.nec-mobile-filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 950;
}

.nec-mobile-filter-panel {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 960;
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
    overflow-y: auto;
    padding: 0 1.5rem 2rem;
}

.nec-mobile-filter-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0 1rem;
    border-bottom: 1px solid rgba(31,36,70,0.1);
    position: sticky;
    top: 0;
    background: #fff;
}

.nec-mobile-filter-panel__header span {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: var(--azul);
}

.nec-mobile-filter-panel__header button {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--cinza);
    padding: 0.25rem;
}

.nec-mobile-filter-panel__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(31,36,70,0.1);
    margin-top: 1.5rem;
    position: sticky;
    bottom: 0;
    background: #fff;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 960px) {
    .nec-catalog-body {
        grid-template-columns: 1fr;
    }

    .nec-catalog-sidebar {
        display: none;
        overflow: visible;
        padding-left: 24px;
    }

    .nec-mobile-filter-btn {
        display: inline-flex !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .nec-catalog-header__search input[type="search"],
    .nec-catalog-header__search .facetwp-search {
        width: 100%;
        max-width: 100%;
    }

    .nec-catalog-header__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .nec-catalog-header__search {
        width: 100%;
    }

}

@media (max-width: 640px) {
    .nec-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .nec-catalog-header {
        padding: 2rem 0 1.75rem;
    }
}

@media (max-width: 480px) {
    .nec-products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 400px) {
    .nec-products-grid {
        grid-template-columns: 1fr;
    }
}
