/* ============================================
   JA Passeios Nauticos — Tour Listing Page
   ============================================ */

/* --- Listing Header --- */
.listing-header-section {
    padding-top: 7rem;
    background: linear-gradient(180deg, var(--light) 0%, #FFFFFF 100%);
    padding-bottom: 2rem;
}

.listing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.listing-header h1 {
    margin-bottom: 0;
    color: var(--primary);
}

/* --- Breadcrumb tweaks for listing --- */
.listing-header-section .breadcrumb {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* --- Screen reader only --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Category Boxes --- */
.filters-section {
    padding: 0;
    margin-bottom: 0;
}

.category-boxes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 2rem;
    margin-top: -1rem;
}

.category-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 800;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--dark);
    background-color: var(--white);
    text-decoration: none;
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition), background-color var(--transition), box-shadow var(--transition);
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.category-box:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    box-shadow: 0 12px 26px rgba(30, 58, 138, 0.12);
}

.category-box.active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}

.category-box.disabled {
    color: var(--gray);
    background-color: var(--light);
    border-color: var(--gray-light);
    cursor: not-allowed;
    opacity: 0.6;
    position: relative;
    overflow: hidden;
}

.category-box.disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -10%;
    width: 120%;
    height: 2px;
    background-color: var(--gray);
    transform: rotate(-15deg);
    transform-origin: center;
}

/* --- Listing Section --- */
.listing-section {
    padding-top: 1rem;
    padding-bottom: 4rem;
}

/* --- Card image placeholder (gradient) --- */
.card-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    min-height: 180px;
}

/* --- No Results / Empty State --- */
.no-results {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--gray);
}

.no-results svg {
    margin: 0 auto 1.5rem;
    color: var(--gray-light);
}

.no-results h3 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.no-results p {
    font-size: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.no-results a {
    color: var(--primary-light);
    text-decoration: underline;
}

.no-results a:hover {
    color: var(--primary);
}

/* --- Responsive Adjustments --- */
@media (max-width: 767px) {
    .listing-header {
        display: block;
    }

    .listing-header h1 {
        font-size: 2rem;
    }

    .filters-rail {
        margin-left: -1rem;
        margin-right: -1rem;
    }

    .filters-scrollbar {
        height: 4px;
        margin: 0 1rem 1.5rem;
        background: rgba(22, 59, 92, 0.12);
        border-radius: 999px;
        position: relative;
        overflow: hidden;
        opacity: 0;
        transition: opacity 180ms ease;
    }

    .filters-scrollbar.is-overflow {
        opacity: 1;
    }

    .filters-scrollbar-thumb {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 30%;
        background: linear-gradient(90deg, var(--primary), var(--primary-light));
        border-radius: 999px;
        cursor: grab;
        will-change: transform, width;
    }

    .filters-scrollbar.is-dragging .filters-scrollbar-thumb {
        cursor: grabbing;
    }

    .category-boxes {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0.5rem;
        padding: 0 1rem 0.25rem;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scroll-padding-inline: 1rem;
        -webkit-overflow-scrolling: touch;
        /* Hide native scrollbar (custom one above takes over visually) */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .category-boxes::-webkit-scrollbar {
        display: none;
    }

    .category-box {
        flex: 0 0 auto;
        min-height: 44px;
        padding: 0.55rem 1rem;
        font-size: 0.84rem;
        scroll-snap-align: start;
    }

    .listing-header-section {
        padding-top: 6.25rem;
        padding-bottom: 1.25rem;
    }

    .listing-section {
        padding-top: 0.5rem;
    }
}

@media (min-width: 768px) {
    .listing-header-section {
        padding-bottom: 1.5rem;
    }

    .category-boxes {
        margin-top: -0.75rem;
    }
}
