/* Produtos / WooCommerce page */

/* Fallback para variáveis usadas nesta folha (garante cores mesmo se carregamento mudar) */
:root {
    --brand: #0A2342;
    --white: #ffffff;
    --text: #111827;
    --muted: #6b7280;
}

.shop-page .page-head {
    padding: 72px 0 24px;
    background: linear-gradient(180deg, rgba(10, 35, 66, 0.05) 0%, transparent 100%);
}

.shop-page .page-head .crumbs {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 10px;
}

.shop-page .page-head .crumbs a {
    color: var(--brand);
    font-weight: 700;
}

.shop-page .page-head .sep {
    margin: 0 8px;
    opacity: 0.55;
}

.shop-page .page-head h1 {
    margin: 0 0 12px;
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    line-height: 1.05;
    color: var(--text);
}

.shop-page .page-head p {
    margin: 0;
    max-width: 760px;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.75;
}

.shop-page .section {
    padding: 24px 0 88px;
}

.shop-layout {
    display: grid;
    grid-template-columns: 284px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.filters {
    position: sticky;
    top: 132px;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--brand-soft);
    box-shadow: var(--shadow);
    overflow: auto;
}

.filters h3 {
    margin: 0 0 14px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
}

.filter-block {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(10, 35, 66, 0.08);
}

.filter-block:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-block label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    font-size: 0.95rem;
    color: var(--text);
    cursor: pointer;
}

.filter-block label input {
    accent-color: var(--brand);
}

.filter-block label .ct {
    margin-left: auto;
    font-size: 0.78rem;
    color: var(--muted);
}

.price-range-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--muted);
}

.price-range-row--current {
    font-weight: 700;
    color: var(--text);
}

.price-range-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.price-range-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    cursor: default;
}

.price-range-field span {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand);
}

.price-range-field input {
    width: 100%;
    border: 1px solid rgba(10, 35, 66, 0.14);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    color: var(--text);
    background: var(--white);
    box-shadow: none;
    appearance: textfield;
}

.price-range-field input::-webkit-outer-spin-button,
.price-range-field input::-webkit-inner-spin-button {
    appearance: none;
    margin: 0;
}

.price-range-field input:focus {
    outline: none;
    border-color: var(--brand);
}

.range-bar {
    height: 4px;
    background: rgba(10, 35, 66, 0.12);
    border-radius: 999px;
    position: relative;
    margin: 16px 0;
}

.range-bar::after {
    content: '';
    position: absolute;
    left: 10%;
    right: 30%;
    top: 0;
    bottom: 0;
    background: var(--brand);
    border-radius: 999px;
}

.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.shop-toolbar .count {
    font-size: 0.86rem;
    color: var(--muted);
}

.shop-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 10px;
}

.shop-sort__label {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--brand);
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.shop-sort select {
    border: 1px solid rgba(10, 35, 66, 0.12);
    border-radius: 8px;
    padding: 8px 36px 8px 12px;
    background: #fff;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%230a2342' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.shop-sort select:focus {
    outline: none;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.shop-results.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.shop-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid rgba(10, 35, 66, 0.08);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: 0 18px 36px rgba(10, 35, 66, 0.08);
}

.img-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    overflow: hidden;
    background: var(--gray-soft);
    margin-bottom: 12px;
    display: block;
}

.img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--brand);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge--sale {
    background: var(--promo-deep);
}

.stock {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 10px;
}

.stock .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #16a34a;
}

.shop-card .name {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
    line-height: 1.35;
    color: var(--text);
    font-weight: 700;
}

.price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.price .now {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.1;
}

.price .now ins {
    text-decoration: none;
    font-weight: 700;
    color: var(--promo-deep);
}

.price .now del {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
    opacity: 0.85;
}

.stars {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #f59e0b;
    margin-bottom: 12px;
}

.stars .count {
    color: var(--muted);
}

.product-btn {
    display: block;
    width: 100%;
    padding: 10px 18px;
    margin-top: auto;
    background: var(--brand);
    color: var(--white);
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    border: none;
    box-shadow: 0 4px 12px rgba(10, 35, 66, 0.12);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    letter-spacing: 0.01em;
}

.product-btn:hover,
.product-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(10, 35, 66, 0.16);
    background: #081f38;
}

.product-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(10, 35, 66, 0.1);
}

.shop-empty {
    grid-column: 1 / -1;
    padding: 32px;
    border-radius: var(--radius);
    background: var(--gray-light);
    border: 1px solid var(--brand-soft);
    display: flex;
    align-items: center;
    flex-direction: column;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 26px;
}

.pagination ul.page-numbers {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Em telas estreitas, remove o "vazio" lateral quando o primeiro/último é o current
   (WP omite prev na pág 1 e next na última, deixando um gap que parece btn vazio) */
@media (max-width: 480px) {
    .pagination ul.page-numbers {
        gap: 6px;
    }
}

.pagination li {
    display: inline-flex;
}

.pagination .page-numbers {
    background: transparent;
    border: 0;
    color: var(--text);
    text-decoration: none;
}

.pagination li .page-numbers {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 12px;
    background: var(--white);
    border: 1px solid rgba(10, 35, 66, 0.1);
    color: var(--text);
    font-weight: 700;
    line-height: 1;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, color .15s ease;
}

.pagination a.page-numbers:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.pagination li .page-numbers.current,
.pagination .current {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--white);
    cursor: default;
    box-shadow: 0 4px 12px rgba(10, 35, 66, 0.25);
    transform: scale(1.08);
}

.pagination .dots {
    min-width: 0;
    padding: 0 6px;
    background: transparent;
    border-color: transparent;
    color: var(--text);
    opacity: 0.6;
    cursor: default;
    letter-spacing: 1px;
}

/* Esconde os "btns vazios" de prev/next quando WordPress renderiza como <span> (sem href) */
.pagination li:has(> span.prev.page-numbers),
.pagination li:has(> span.next.page-numbers) {
    display: none;
}

.brands {
    padding: 18px 0 70px;
}

.brand-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.brand-logo {
    display: grid;
    place-items: center;
    min-height: 66px;
    border-radius: 16px;
    background: var(--white);
    border: 1px solid rgba(10, 35, 66, 0.08);
    font-weight: 800;
    color: var(--text);
    box-shadow: 0 12px 22px rgba(10, 35, 66, 0.05);
}

@media (max-width: 1180px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .filters {
        position: static;
    }

    .shop-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .brand-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Botão de toggle (escondido no desktop) */
.filters-toggle {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 14px 18px;
    margin: 0 0 12px;
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--brand-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font: inherit;
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.filters-wrapper {
    display: contents;
}

.filters-toggle:hover {
    background: rgba(10, 35, 66, 0.02);
}

.filters-toggle__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--brand);
    transition: transform 0.3s ease;
}

.filters-toggle[aria-expanded="true"] .filters-toggle__icon {
    transform: rotate(180deg);
}

@media (max-width: 760px) {
    .shop-page .page-head {
        padding-top: 28px;
    }

    .shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shop-toolbar {
        align-items: stretch;
    }

    .shop-sort {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .shop-sort__label {
        flex-shrink: 0;
    }

    .shop-sort select {
        width: 100%;
    }

    .brand-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Mobile: filtros minimizados com animação de altura */
    .filters-wrapper {
        display: flex;
        flex-direction: column;
    }

    .filters-toggle {
        display: flex;
        margin: 0 0 -1px;
        border-radius: var(--radius) var(--radius) 0 0;
        position: relative;
        z-index: 1;
        box-shadow: 0 -2px 6px rgba(10, 35, 66, 0.04), 0 1px 2px rgba(10, 35, 66, 0.04);
    }

    .filters-wrapper > .filters {
        display: block;
        max-height: 0;
        padding: 0 24px;
        border-width: 0;
        opacity: 0;
        overflow: hidden;
        border-radius: 0 0 var(--radius) var(--radius);
        transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                    padding-top 0.35s ease,
                    padding-bottom 0.35s ease,
                    border-width 0.35s ease,
                    opacity 0.3s ease;
    }

    .filters-wrapper > .filters.is-open {
        max-height: 2000px !important;
        padding: 24px !important;
        border-width: 1px !important;
        opacity: 1 !important;
    }
}

/* Search Bar Compact Styles */

.search-bar-compact {
    margin-bottom: 24px;
}

.search-bar-compact__inner {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--white);
    border: 1px solid rgba(10, 35, 66, 0.12);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 1px 3px rgba(10, 35, 66, 0.04);
}

.search-bar-compact__icon {
    color: var(--ink-mute);
    flex-shrink: 0;
    margin: 0 10px;
    transition: color 180ms var(--ease);
}

.search-bar-compact__inner:focus-within .search-bar-compact__icon {
    color: var(--brand);
}

.search-bar-compact__input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--ff-body);
    font-size: 14px;
    color: var(--text);
    padding: 6px 8px;
    outline: none;
    min-width: 0;
}

.search-bar-compact__input::placeholder {
    color: var(--ink-faint);
}

/* Responsive Search Bar */
@media (max-width: 768px) {
    .search-bar-compact {
        margin-bottom: 20px;
    }

    .search-bar-compact__input {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .search-bar-compact {
        margin-bottom: 16px;
    }

    .search-bar-compact__inner {
        padding: 8px;
    }

    .search-bar-compact__icon {
        margin: 0 8px;
        width: 16px;
        height: 16px;
    }

    .search-bar-compact__input {
        padding: 4px 6px;
        font-size: 15px;
    }
}