﻿/* ============================================================================
   lap-layout.css - lo que vive en la Master: header, buscador, menu, migas de
   pan, footer, barra inferior de celular y boton de WhatsApp.
   ============================================================================ */

/* ---------- Header ---------- */
.lap-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--lap-blue);
    color: #fff;
    box-shadow: 0 2px 12px rgba(6, 42, 94, .25);
}
.lap-header .navbar { min-height: var(--lap-header-h); padding: 0; }
.lap-header .container { gap: 12px; flex-wrap: nowrap; }

.lap-header__toggler {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-left: -8px;
    font-size: 1.25rem;
    color: #fff;
    background: none;
    border: 0;
    border-radius: 10px;
}
.lap-header__toggler:hover { background: rgba(255, 255, 255, .14); }

.lap-brand { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; color: #fff; }
.lap-brand img { display: block; height: 30px; width: auto; }
.lap-brand__tag {
    padding: 3px 8px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1.15;
    text-transform: uppercase;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, .85);
    border-radius: 4px;
    white-space: nowrap;
}
.lap-brand:hover, .lap-brand:focus { color: #fff; }

/* Menu: en celular es un panel lateral; desde lg, una fila */
.lap-menu { --bs-offcanvas-bg: var(--lap-blue-deep); --bs-offcanvas-color: #fff; --bs-offcanvas-width: min(86vw, 340px); }
.lap-menu .offcanvas-title { color: #fff; }
.lap-nav { gap: 2px; }
.lap-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 12px;
    font-weight: 500;
    color: #fff;
    border-radius: 10px;
}
.lap-nav .nav-link:hover,
.lap-nav .nav-link:focus-visible,
.lap-nav .nav-link.show { color: #fff; background: rgba(255, 255, 255, .14); }
.lap-nav .nav-link[aria-current="page"] { background: #fff; color: var(--lap-blue-dark); font-weight: 700; }
.lap-menu__province { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .2); }
.lap-menu__province .form-label { color: #fff; }

.lap-dropdown {
    --bs-dropdown-border-color: var(--lap-line);
    --bs-dropdown-border-radius: 14px;
    --bs-dropdown-padding-y: 8px;
    --bs-dropdown-link-hover-bg: var(--lap-blue-soft);
    --bs-dropdown-link-hover-color: var(--lap-blue-dark);
    --bs-dropdown-link-active-bg: var(--lap-blue);
    --bs-dropdown-item-padding-y: .5rem;
    box-shadow: var(--lap-shadow-hover);
    max-height: 70vh;
    overflow-y: auto;
}
.lap-dropdown .dropdown-item { display: flex; align-items: center; gap: 10px; }
.lap-dropdown .dropdown-item i { width: 1.25em; color: var(--lap-blue); text-align: center; }
.lap-dropdown .dropdown-item[aria-current="page"] { font-weight: 700; color: var(--lap-blue-dark); }

@media (min-width: 992px) {
    .lap-menu { flex: 0 0 auto; }
    .lap-nav .nav-link { padding: 8px 12px; font-size: .95rem; }
    .lap-nav .nav-link[aria-current="page"] {
        background: none;
        color: #fff;
        box-shadow: inset 0 -3px 0 #fff;
        border-radius: 0;
    }
}

.lap-header__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lap-province {
    height: 40px;
    max-width: 196px;
    padding: 0 30px 0 12px;
    font-size: .9rem;
    font-weight: 500;
    color: #fff;
    background: rgba(255, 255, 255, .12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 10px center / 12px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    appearance: none;
    cursor: pointer;
}
.lap-province option { color: var(--lap-ink); background: #fff; }
.lap-header__profile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    justify-content: center;
    font-weight: 600;
    font-size: .9rem;
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .35);
    white-space: nowrap;
}
.lap-header__profile:hover { color: #fff; background: rgba(255, 255, 255, .14); }
.lap-header__profile[aria-current="page"] { background: #fff; color: var(--lap-blue-dark); }
.lap-header .lap-btn-accent { min-height: 40px; --bs-btn-padding-y: .3rem; --bs-btn-border-width: 3px; --bs-btn-border-color: rgba(255, 255, 255, .3); --bs-btn-hover-border-color: rgba(255, 255, 255, .5); }
/* en la banda azul el foco se ve en blanco */
.lap-header :focus-visible { outline-color: #fff; }

/* ---------- Buscador ---------- */
.lap-search {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
}
.lap-search--header { max-width: 260px; min-width: 180px; }
.lap-search__input {
    width: 100%;
    height: 44px;
    padding: 0 52px 0 18px;
    font-size: 1rem;
    color: var(--lap-ink);
    background: #fff;
    border: 2px solid transparent;
    border-radius: 999px;
}
.lap-search__input::placeholder { color: #5f6f86; }
.lap-search__input:focus { border-color: var(--lap-focus); outline: 0; box-shadow: 0 0 0 3px rgba(24, 144, 255, .45); }
.lap-search__btn {
    position: absolute;
    right: 4px;
    top: 4px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: #fff;
    background: var(--lap-blue);
    border: 0;
    border-radius: 50%;
}
.lap-search__btn:hover { background: var(--lap-blue-dark); }
/* Buscador de tablet y celular: panel que flota debajo del header y se abre con la lupa */
.lap-header__search-toggle { background: none; font-size: 1rem; }
.lap-header__search-toggle[aria-expanded="true"] { color: var(--lap-blue-dark); background: #fff; }
.lap-search-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--lap-blue);
    box-shadow: 0 10px 18px rgba(6, 42, 94, .28);
}
.lap-search-panel .container { padding-top: 4px; padding-bottom: 14px; }

/* Sugerencias del buscador (se arman en lap-layout.js) */
.lap-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1040;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--lap-line);
    border-radius: 16px;
    box-shadow: var(--lap-shadow-hover);
    max-height: min(60vh, 420px);
    overflow-y: auto;
}
.lap-suggest[hidden] { display: none; }
.lap-suggest__item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 12px;
    align-items: center;
    padding: 6px 8px;
    color: var(--lap-ink);
    text-decoration: none;
    border-radius: 10px;
}
.lap-suggest__item img { width: 56px; height: 38px; object-fit: cover; border-radius: 6px; background: #eef2f8; }
.lap-suggest__item strong { display: block; font-size: .92rem; line-height: 1.2; }
.lap-suggest__item span { display: block; font-size: .8rem; color: var(--lap-blue-dark); }
.lap-suggest__item:hover,
.lap-suggest__item[aria-selected="true"] { background: var(--lap-blue-soft); }
.lap-suggest__all { display: block; padding: 10px 8px 6px; font-size: .88rem; font-weight: 600; text-align: center; }

/* ---------- Migas de pan ---------- */
.lap-breadcrumb { background: var(--lap-surface); border-bottom: 1px solid var(--lap-line); }
.lap-breadcrumb .breadcrumb {
    position: relative;
    --bs-breadcrumb-divider: "\203A";
    --bs-breadcrumb-divider-color: #7b8aa0;
    --bs-breadcrumb-item-active-color: var(--lap-ink);
    padding: 10px 0;
    font-size: .875rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}
.lap-breadcrumb .breadcrumb::-webkit-scrollbar { display: none; }
.lap-breadcrumb .breadcrumb-item.active { font-weight: 600; }

/* ---------- Footer ---------- */
.lap-footer {
    margin-top: 48px;
    padding: 40px 0 24px;
    background: var(--lap-blue-deep);
    color: #dbe6f7;
    font-size: .95rem;
}
.lap-footer a { color: #fff; text-decoration: none; }
.lap-footer a:hover { text-decoration: underline; }
.lap-footer ul { margin: 0; }
.lap-footer li { padding: 5px 0; }
.lap-footer__logo {
    display: block;
    width: 108px;
    height: 40px;
    background: url("../img/brand/logo-pass.webp") no-repeat left center / contain;
}
.lap-footer__tag { margin: 12px 0; max-width: 26ch; }
.lap-footer__social { display: flex; gap: 16px; }
.lap-footer__title {
    margin: 0 0 10px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #cfe3f7;
}
.lap-footer__contact i { margin-right: 6px; color: #cfe3f7; }
.lap-footer__badges { display: flex; flex-wrap: wrap; gap: 10px; }
.lap-footer__badges img { display: block; height: 36px; width: auto; }
.lap-footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    margin-top: 32px;
    padding-top: 20px;
    font-size: .85rem;
    border-top: 1px solid rgba(255, 255, 255, .18);
}
.lap-footer__legal p { margin: 0; }
.lap-footer__legal a { text-decoration: underline; }

/* ---------- Barra inferior (celulares) ---------- */
.lap-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1025;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff;
    border-top: 1px solid var(--lap-line);
    box-shadow: 0 -4px 16px rgba(18, 35, 61, .08);
}
.lap-tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 60px;
    font-size: .72rem;
    font-weight: 600;
    color: var(--lap-ink-soft);
    text-decoration: none;
}
.lap-tabbar a i { font-size: 1.15rem; }
.lap-tabbar a[aria-current="page"] { color: var(--lap-blue); box-shadow: inset 0 3px 0 var(--lap-blue); }

/* ---------- WhatsApp ---------- */
.lap-whatsapp {
    position: fixed;
    right: 16px;
    bottom: 76px;
    z-index: 1020;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    font-size: 1.7rem;
    color: #fff;
    background: #128c4a;
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(18, 35, 61, .3);
    text-decoration: none;
    transition: transform .15s ease;
}
.lap-whatsapp:hover { color: #fff; transform: scale(1.06); }
@media (min-width: 768px) {
    .lap-whatsapp { right: 24px; bottom: 24px; width: 56px; height: 56px; }
}
