/* ============================================
   CheckedIn — assets/css/header.css
   Header público — estilo Airbnb / Tripadvisor
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Fraunces:wght@400;500;700&display=swap');

/* ===== VARIABLES GLOBALES PÚBLICAS ===== */
:root {
    --primary:       #FF385C;
    --primary-dark:  #E31C5F;
    --primary-soft:  #FF385C10;
    --dark:          #222222;
    --gray:          #717171;
    --gray-light:    #B0B0B0;
    --border:        #EBEBEB;
    --bg:            #F7F7F7;
    --white:         #FFFFFF;
    --success:       #00A699;
    --warning:       #FFB400;
    --radius:        16px;
    --radius-sm:     10px;
    --shadow-sm:     0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:     0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg:     0 8px 32px rgba(0,0,0,0.14);
    --max-width:     1200px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--white);
    color: var(--dark);
    -webkit-font-smoothing: antialiased;
    font-size: 15px;
    line-height: 1.6;
}

/* ===== HEADER PRINCIPAL ===== */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* ===== LOGO ===== */
.header-logo {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 25px;
    font-weight: 900;
    color: var(--dark);
    text-decoration: none;
    letter-spacing: -0.6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0px;
}

.header-logo span { color: var(--primary); }

.logo-badge {
    background: var(--primary);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 2px;
}

/* ===== BARRA DE BÚSQUEDA ===== */
.header-search {
    flex: 1;
    max-width: 440px;
}

.search-bar {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: 100px;
    background: var(--white);
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, border-color 0.2s;
    height: 48px;
}

.search-bar:focus-within {
    border-color: var(--dark);
    box-shadow: var(--shadow-md);
}

.search-field {
    flex: 1;
    border: none;
    outline: none;
    padding: 0 16px;
    font-family: inherit;
    font-size: 14px;
    color: var(--dark);
    background: transparent;
    height: 100%;
}

.search-field::placeholder { color: var(--gray-light); }

.search-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    flex-shrink: 0;
}

.search-city {
    border: none;
    outline: none;
    padding: 0 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--dark);
    background: transparent;
    height: 100%;
    min-width: 110px;
    cursor: pointer;
}

.search-city::placeholder { color: var(--gray-light); }

.search-btn {
    background: var(--primary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 4px;
    flex-shrink: 0;
    transition: background 0.15s;
}

.search-btn:hover { background: var(--primary-dark); }
.search-btn svg { width: 16px; height: 16px; color: white; }

/* ===== NAV DERECHO ===== */
.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 100px;
    transition: background 0.15s;
    white-space: nowrap;
}

.nav-link:hover { background: var(--bg); }

.nav-btn {
    font-size: 14px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 100px;
    background: var(--primary);
    transition: background 0.15s;
    white-space: nowrap;
}

.nav-btn:hover { background: var(--primary-dark); }

/* ===== HAMBURGER MÓVIL ===== */
.header-hamburger {
    display: none;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    cursor: pointer;
    color: var(--dark);
}

.header-hamburger svg { width: 18px; height: 18px; display: block; }

/* ===== MENÚ MÓVIL ===== */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--white);
    z-index: 300;
    flex-direction: column;
    padding: 24px;
    overflow-y: auto;
}

.mobile-menu.open { display: flex; }

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.mobile-close {
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--dark);
}

.mobile-close svg { width: 18px; height: 18px; }

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.mobile-nav a {
    font-size: 17px;
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.mobile-nav a svg { width: 16px; height: 16px; color: var(--gray-light); }

.mobile-nav-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

.mobile-nav-actions a {
    text-align: center;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
}

.mobile-btn-login {
    border: 1.5px solid var(--border);
    color: var(--dark);
}

.mobile-btn-register {
    background: var(--primary);
    color: white;
}

/* ===== CATEGORÍAS SCROLL (debajo del header) ===== */
.cats-nav {
    background: #fff;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    padding-bottom: 10px;   /* añade espacio debajo */
}

.cats-nav-inner {
    display: flex;
    gap: 12px;
    padding: 14px 24px 0;
    align-items: center;
    justify-content: center;
    min-width: max-content;
}

.cat-nav-item {
    min-width: 78px;
    height: 82px;
    text-decoration: none;
    color: #555;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
}

.cat-nav-item.active {
    color: #111;
    border-bottom-color: #FF385C;
}

.cat-nav-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--cat-bg);
    color: var(--cat-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-nav-icon svg {
    width: 23px;
    height: 23px;
    stroke-width: 2.3;
}

.cat-nav-label {
    white-space: nowrap;
}
/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .header-search { display: none; }
    .nav-link      { display: none; }
    .header-hamburger { display: flex; }
}



/* ===== HEADER MÓVIL UNIFICADO ===== */
@media (max-width: 768px) {

    .site-header {
        position: sticky;
        top: 0;
        z-index: 300;
    }

    .header-inner {
        height: 60px;
        padding: 0 18px;
        gap: 8px;
    }

    .header-logo {
        font-size: 25px;
        letter-spacing: -0.8px;
        flex: 0 0 auto;
    }

    .header-search {
        display: none;
    }

    .header-nav {
        display: flex;
        margin-left: auto;
    }

    .header-nav .nav-link {
        display: none;
    }

    .nav-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 40px;
        padding: 0 14px;
        font-size: 13px;
        font-weight: 800;
        border-radius: 999px;
        white-space: nowrap;
        line-height: 1;
        box-shadow: 0 4px 12px rgba(255,56,92,.25);
    }

    .header-hamburger {
        display: flex;
        width: 40px;
        height: 40px;
        min-width: 40px;
        padding: 0;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        background: #fff;
        margin-left: 4px;
    }

    .header-hamburger svg {
        width: 21px;
        height: 21px;
        stroke-width: 2.4;
    }

    .cats-nav {
        background: #fff;
        border-bottom: 1px solid #eee;
        overflow-x: auto;
        padding-bottom: 0;
        scrollbar-width: none;
    }

    .cats-nav::-webkit-scrollbar {
        display: none;
    }

    .cats-nav-inner {
        justify-content: flex-start;
        gap: 14px;
        padding: 12px 14px 0;
        min-width: max-content;
    }

    .cat-nav-item {
        min-width: 74px;
        height: 74px;
        padding: 0 4px 10px;
        font-size: 12px;
        gap: 6px;
        flex-shrink: 0;
    }

    .cat-nav-icon {
        width: 42px;
        height: 42px;
    }

    .cat-nav-icon svg {
        width: 21px;
        height: 21px;
    }

    .cat-nav-label {
        font-size: 12px;
        max-width: 78px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}


@media (max-width: 390px) {

    .header-inner {
        height: 64px;
        padding: 0 12px;
    }

    .header-logo {
        font-size: 24px;
    }

    .nav-btn {
        height: 44px;
        padding: 0 16px;
        font-size: 13px;
    }

    .header-hamburger {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }
}