/* =====================
   BASE: MOBILE FIRST
===================== */

.header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 10px 0;
}

/* Logo */
.header-logo img {
    width: 10rem;
}

/* Navegación (menu oculto mobile) */
.navegacion {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(360px, 90vw);
    background: #fff;
    z-index: 220;
    padding: 84px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: -18px 0 40px rgba(0, 0, 0, .12);

    transform: translateX(105%);
    visibility: hidden;
    pointer-events: none;
    transition: transform .28s ease, visibility .28s ease;
}

.is-menu-open .navegacion {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

/* Links */
.navegacion-link {
    text-decoration: none;
    color: var(--color-negro);
    font-size: 1.6rem;
    font-weight: 600;
    padding: 10px 8px;
    border-radius: 10px;
}

.navegacion-link:hover {
    background: rgba(var(--color-principal-rgb), .08);
}

/* Acciones */
.header-buscador-acciones {
    margin-left: auto;
    display: flex;
    gap: .6rem;
    align-items: center;
}

/* Buscador oculto en mobile */
.header-buscador {
    display: none;
}

/* Botones iconos */
.header-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.header-icon-btn img {
    width: 22px;
    height: 22px;
}

/* Botón menú */
.header-icon-btn--menu {
    position: relative;
    z-index: 230;
}

/* Hamburguesa */
.header-menu-bars {
    width: 34px;
    height: 3px;
    background: var(--color-negro);
    border-radius: 3px;
    position: relative;
}

.header-menu-bars::before,
.header-menu-bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 34px;
    height: 3px;
    background: var(--color-negro);
    border-radius: 3px;
}

.header-menu-bars::before {
    top: -10px;
}

.header-menu-bars::after {
    top: 10px;
}

/* Backdrop */
.header-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, .38);
    z-index: 210;
    opacity: 0;
    pointer-events: none;
    transition: opacity .24s ease;
}

.header.is-menu-open .header-backdrop {
    opacity: 1;
    pointer-events: auto;
}

body.is-menu-open {
    overflow: hidden;
}


/* =====================
   TABLET / DESKTOP
===================== */

@media (min-width: 1120px) {

    .header {
        justify-content: space-between;
    }

    /* Logo */
    .header-logo img {
        width: 13rem;
    }

    /* Navegación normal */
    .navegacion {
        position: static;
        transform: none;
        visibility: visible;
        pointer-events: auto;
        height: auto;
        width: auto;
        flex-direction: row;
        gap: 2rem;
        padding: 0;
        box-shadow: none;
    }

    .navegacion-link {
        font-size: 1.4rem;
        padding: 0;
    }

    .navegacion-link:hover {
        background: transparent;
        color: var(--color-principal);
    }

    /* Mostrar buscador */
    .header-buscador {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;

        background-color: #F3F3F3;
        padding: .5rem 1.5rem;
        border-radius: 2rem;
        border: 1px solid #D9D9D9;
        min-width: 25rem;
    }

    .header-buscador input {
        border: none;
        outline: none;
        background-color: transparent;
        font-size: 1.4rem;
    }

    .header-buscador button {
        border: none;
        background: transparent;
        cursor: pointer;
    }

    .header-buscador button img {
        width: 1.8rem;
    }

    /* Ocultar botones mobile */
    .header-icon-btn {
        display: none;
    }

    .header-backdrop {
        display: none;
    }

    .header-buscador-acciones {
        gap: 3rem;
        margin-left: 0;
    }
}

/* =====================
   HEADER BASE
===================== */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.header-logo img {
    width: 10rem;
}

/* =====================
   BOTÓN LUPA
===================== */

.header-icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.header-icon-btn img {
    width: 22px;
}

.header {
    position: relative;
}

.header-buscador {
    position: relative;
}

@media (max-width: 1119px) {

    .header-buscador {
        display: none !important;
    }

    .header-contenedor.is-search-open .header-buscador {
        display: flex !important;
        position: fixed !important;

        top: 88px;
        left: 20px;
        right: 20px;
        width: auto;
        height: 48px;

        z-index: 99999;

        align-items: center;
        gap: 10px;

        background: #F3F3F3;
        padding: 0 10px 0 16px;
        border-radius: 24px;
        border: 1px solid #D9D9D9;
        box-shadow: 0 10px 25px rgba(0, 0, 0, .12);
    }

    .header-contenedor.is-search-open .header-buscador input {
        flex: 1;
        border: none;
        outline: none;
        background: transparent;
        font-size: 1.4rem;
    }

    .header-contenedor.is-search-open .header-buscador button {
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 50%;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .header-contenedor.is-search-open .header-buscador button img {
        width: 18px;
        height: 18px;
    }

    .header-contenedor.is-search-open .tour-search-results {
        top: calc(100% + 8px);
    }
}

.tour-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .1);
    z-index: 9999;
    overflow: hidden;
}

.tour-search-results.active {
    display: block;
}

.tour-search-item {
    display: block;
    padding: 12px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #eee;
}

.tour-search-item:last-child {
    border-bottom: none;
}

.tour-search-item:hover {
    background: #f8f8f8;
}

.tour-search-title {
    font-size: 14px;
    line-height: 1.25;
    font-weight: 600;
    margin-bottom: 4px;
}

.tour-search-description {
    font-size: 12px;
    line-height: 1.35;
    color: #666;
}

.tour-search-item {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tour-search-image {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.tour-search-info {
    min-width: 0;
}

@media (max-width: 768px) {
    .tour-search-title {
        font-size: 13px;
    }

    .tour-search-description {
        font-size: 11px;
    }
}
