/**
 * Arquivo de Tours - Borboleta Travel
 * Hero, barra de filtros, grid de resultados e paginação
 *
 * @package Borboleta_Travel
 */

.tours-archive {
    background-color: var(--bt-bg-body);
    padding-bottom: var(--bt-space-20);
}

/* Remove o espaçamento entre o header e o hero do arquivo */
.site-content:has(.tours-archive) {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* ==========================================================================
   1. Hero do Arquivo
   ========================================================================== */
.tours-archive-hero {
    position: relative;
    background-size: cover;
    background-position: center 42%;
    background-repeat: no-repeat;
    padding: var(--bt-space-20) 0 var(--bt-space-16);
    display: flex;
    align-items: flex-end;
    min-height: 380px;
}

.tours-archive-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(14, 38, 35, 0.5) 0%, rgba(14, 38, 35, 0.86) 62%, #0e2623 100%);
    z-index: 1;
}

.tours-archive-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    color: var(--bt-color-white);
}

/* Breadcrumbs */
.tours-archive-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--bt-space-2);
    font-family: var(--bt-font-family-ui);
    font-size: var(--bt-fs-xs);
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: var(--bt-space-5);
}

.tours-archive-breadcrumbs a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    transition: color var(--bt-transition-fast);
}

.tours-archive-breadcrumbs a:hover {
    color: var(--bt-color-amber);
}

.tours-archive-breadcrumbs .breadcrumb-separator {
    color: rgba(255, 255, 255, 0.4);
}

.tours-archive-breadcrumbs .breadcrumb-current {
    color: var(--bt-color-white);
    font-weight: 600;
}

/* Eyebrow */
.tours-archive-eyebrow {
    display: inline-block;
    padding: 5px 14px;
    border-radius: var(--bt-radius-full);
    background: rgba(226, 157, 56, 0.18);
    border: 1px solid rgba(226, 157, 56, 0.45);
    color: var(--bt-color-amber);
    font-family: var(--bt-font-family-ui);
    font-size: var(--bt-fs-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: var(--bt-space-4);
}

.tours-archive-title {
    font-family: var(--bt-font-family-heading);
    font-size: clamp(2rem, 4.5vw, 3.15rem);
    font-weight: 700;
    line-height: var(--bt-line-height-tight);
    color: var(--bt-color-white);
    margin: 0 0 var(--bt-space-4);
}

.tours-archive-description {
    max-width: 620px;
    font-family: var(--bt-font-family-body);
    font-size: var(--bt-fs-md);
    line-height: var(--bt-line-height-base);
    color: rgba(255, 255, 255, 0.82);
}

.tours-archive-description p {
    margin: 0;
}

.tours-archive-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: var(--bt-space-6) 0 0;
    font-family: var(--bt-font-family-ui);
    font-size: var(--bt-fs-sm);
    font-weight: 600;
    color: var(--bt-color-white);
}

.tours-archive-count svg {
    color: var(--bt-color-amber);
    flex-shrink: 0;
}

/* ==========================================================================
   2. Barra de Filtros
   ========================================================================== */
.tours-archive-toolbar {
    position: sticky;
    /* Fica logo abaixo do header fixo quando a página é rolada */
    top: var(--bt-header-height, 84px);
    z-index: 20;
    background: var(--bt-bg-surface);
    border-bottom: 1px solid var(--bt-border-color);
    box-shadow: var(--bt-shadow-sm);
}

.tours-archive-toolbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--bt-space-4);
    padding-top: var(--bt-space-4);
    padding-bottom: var(--bt-space-4);
}

/* Pills de categoria */
.tours-filter-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--bt-space-2);
}

.tours-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--bt-radius-full);
    border: 1px solid var(--bt-border-color);
    background: var(--bt-color-gray-50);
    font-family: var(--bt-font-family-ui);
    font-size: var(--bt-fs-sm);
    font-weight: 600;
    color: var(--bt-text-muted);
    text-decoration: none;
    white-space: nowrap;
    transition:
        background var(--bt-transition-fast),
        color var(--bt-transition-fast),
        border-color var(--bt-transition-fast);
}

.tours-filter-pill:hover {
    background: var(--bt-color-white);
    border-color: var(--bt-color-terracotta);
    color: var(--bt-color-terracotta);
}

.tours-filter-pill.is-active {
    background: var(--bt-color-teal);
    border-color: var(--bt-color-teal);
    color: var(--bt-color-white);
}

.tours-filter-pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: var(--bt-radius-full);
    background: var(--bt-color-gray-200);
    color: var(--bt-text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.5;
}

.tours-filter-pill.is-active .tours-filter-pill-count {
    background: rgba(255, 255, 255, 0.2);
    color: var(--bt-color-white);
}

/* Formulário de busca e ordenação */
.tours-archive-form {
    display: flex;
    align-items: center;
    gap: var(--bt-space-2);
    flex-wrap: wrap;
}

.tours-search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: 42px;
    border: 1px solid var(--bt-border-color);
    border-radius: var(--bt-radius-full);
    background: var(--bt-color-gray-50);
    transition: border-color var(--bt-transition-fast), background var(--bt-transition-fast);
}

.tours-search-field:focus-within {
    border-color: var(--bt-color-terracotta);
    background: var(--bt-color-white);
}

.tours-search-field svg {
    color: var(--bt-color-gray-400);
    flex-shrink: 0;
}

.tours-search-field input[type="search"] {
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--bt-font-family-ui);
    font-size: var(--bt-fs-sm);
    color: var(--bt-text-main);
    width: 200px;
    max-width: 100%;
    padding: 0;
    box-shadow: none;
}

.tours-order-select {
    height: 42px;
    padding: 0 38px 0 16px;
    border: 1px solid var(--bt-border-color);
    border-radius: var(--bt-radius-full);
    background-color: var(--bt-color-gray-50);
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    -webkit-appearance: none;
    appearance: none;
    font-family: var(--bt-font-family-ui);
    font-size: var(--bt-fs-sm);
    font-weight: 600;
    color: var(--bt-text-main);
    cursor: pointer;
    transition: border-color var(--bt-transition-fast);
}

.tours-order-select:focus {
    outline: none;
    border-color: var(--bt-color-terracotta);
}

.tours-filter-submit {
    height: 42px;
    padding: 0 22px;
    border: none;
    border-radius: var(--bt-radius-full);
    background: var(--bt-color-terracotta);
    color: var(--bt-color-white);
    font-family: var(--bt-font-family-ui);
    font-size: var(--bt-fs-sm);
    font-weight: 700;
    cursor: pointer;
    transition: background var(--bt-transition-fast), transform var(--bt-transition-fast);
}

.tours-filter-submit:hover {
    background: var(--bt-pastel-terracotta);
    transform: translateY(-1px);
}

/* ==========================================================================
   3. Resultados
   ========================================================================== */
.tours-archive-body {
    padding-top: var(--bt-space-12);
}

.tours-archive-active-search {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--bt-space-3);
    margin: 0 0 var(--bt-space-8);
    font-family: var(--bt-font-family-ui);
    font-size: var(--bt-fs-base);
    font-weight: 600;
    color: var(--bt-text-heading);
}

.tours-clear-search {
    font-size: var(--bt-fs-sm);
    font-weight: 600;
    color: var(--bt-color-terracotta);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

.tours-clear-search:hover {
    color: var(--bt-pastel-terracotta);
}

/* O grid do arquivo herda integralmente .featured-tours-grid da home
   (4 colunas > 2 no tablet > 1 no mobile). Nada a sobrescrever aqui. */

/* ==========================================================================
   4. Paginação
   ========================================================================== */
.tours-archive-pagination {
    margin-top: var(--bt-space-14);
}

.tours-archive-pagination .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--bt-space-2);
}

.tours-archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: var(--bt-radius-full);
    border: 1px solid var(--bt-border-color);
    background: var(--bt-bg-surface);
    font-family: var(--bt-font-family-ui);
    font-size: var(--bt-fs-sm);
    font-weight: 700;
    color: var(--bt-text-muted);
    text-decoration: none;
    transition:
        background var(--bt-transition-fast),
        color var(--bt-transition-fast),
        border-color var(--bt-transition-fast);
}

.tours-archive-pagination .page-numbers:hover {
    border-color: var(--bt-color-terracotta);
    color: var(--bt-color-terracotta);
}

.tours-archive-pagination .page-numbers.current {
    background: var(--bt-color-terracotta);
    border-color: var(--bt-color-terracotta);
    color: var(--bt-color-white);
}

.tours-archive-pagination .page-numbers.dots {
    border-color: transparent;
    background: transparent;
}

/* ==========================================================================
   5. Estado Vazio
   ========================================================================== */
.tours-archive-empty {
    max-width: 540px;
    margin: 0 auto;
    padding: var(--bt-space-16) var(--bt-space-6);
    text-align: center;
}

.tours-archive-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    margin-bottom: var(--bt-space-6);
    border-radius: 50%;
    background: var(--bt-color-white);
    color: var(--bt-accent);
    box-shadow: var(--bt-shadow-sm);
}

.tours-archive-empty h2 {
    font-family: var(--bt-font-family-heading);
    font-size: var(--bt-fs-2xl);
    color: var(--bt-text-heading);
    margin: 0 0 var(--bt-space-3);
}

.tours-archive-empty p {
    font-family: var(--bt-font-family-body);
    font-size: var(--bt-fs-base);
    color: var(--bt-text-muted);
    line-height: var(--bt-line-height-base);
    margin: 0 0 var(--bt-space-8);
}

.tours-archive-empty-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--bt-space-3);
}

.tours-empty-cta {
    display: inline-flex;
    align-items: center;
    padding: var(--bt-space-4) var(--bt-space-8);
    border-radius: var(--bt-radius-full);
    border: 1.5px solid var(--bt-color-teal);
    background: transparent;
    font-family: var(--bt-font-family-ui);
    font-size: var(--bt-fs-base);
    font-weight: 700;
    color: var(--bt-color-teal);
    cursor: pointer;
    transition: background var(--bt-transition-fast), color var(--bt-transition-fast);
}

.tours-empty-cta:hover {
    background: var(--bt-color-teal);
    color: var(--bt-color-white);
}

/* ==========================================================================
   6. Responsivo
   ========================================================================== */
@media (max-width: 1024px) {
    .tours-archive-hero {
        padding: var(--bt-space-16) 0 var(--bt-space-12);
        min-height: 320px;
    }

    .tours-archive-toolbar-inner {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .tours-archive-toolbar {
        position: static;
    }

    .tours-filter-pills {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: var(--bt-space-2);
        scrollbar-width: none;
    }

    .tours-filter-pills::-webkit-scrollbar {
        display: none;
    }

    .tours-archive-form {
        width: 100%;
    }

    .tours-search-field {
        flex: 1 1 200px;
    }

    .tours-search-field input[type="search"] {
        width: 100%;
    }

    .tours-order-select {
        flex: 1 1 160px;
    }

    .tours-archive-body {
        padding-top: var(--bt-space-10);
    }
}

@media (max-width: 600px) {
    .tours-archive-hero {
        min-height: 280px;
        padding: var(--bt-space-12) 0 var(--bt-space-10);
    }

    .tours-filter-submit {
        width: 100%;
    }

    .tours-archive-empty-actions .btn-explore-tours,
    .tours-empty-cta {
        width: 100%;
        justify-content: center;
    }
}
