[id] { scroll-margin-top: 96px; }

.nav-wrap {
    position: fixed;
    top: 12px;
    left: 50%;
    z-index: 100;
    width: calc(100% - 24px);
    max-width: 1312px;
    transform: translateX(-50%);
    border: 1px solid transparent;
    border-radius: 28px;
    color: #fff;
    transition: max-width .25s ease, background .35s ease, color .35s ease,
                box-shadow .25s ease, border-color .35s ease, backdrop-filter .25s ease;
}

.nav-wrap.scrolled {
    max-width: 1024px;
    background: rgba(250, 250, 252, 0.86);
    border-color: rgba(0, 0, 0, 0.06);
    color: #111827;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* Páginas claras (ej. tiendas): pill sólido desde el inicio, sin hero oscuro. */
.nav-wrap.nav-solid {
    background: rgba(250, 250, 252, 0.86);
    border-color: rgba(0, 0, 0, 0.06);
    color: #111827;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.nav-wrap.nav-solid .logo-lw { display: none; }
.nav-wrap.nav-solid .logo-l  { display: block; }

.nav-wrap.dark-mode,
.nav-wrap.dark-mode .nav-item,
.nav-wrap.dark-mode .menu-button {
    color: #fff;
}

.nav-wrap.dark-mode:not(.scrolled) {
    background: rgba(20, 20, 28, 0.48);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-wrap.dark-mode:not(.scrolled) .nav-item {
    opacity: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.nav-wrap.dark-mode:not(.scrolled) .logo-lw,
.nav-wrap.dark-mode:not(.scrolled) .menu-button {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.nav-wrap.dark-mode.scrolled {
    background: rgba(20, 20, 28, 0.68);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    padding: 14px 24px;
    transition: padding .25s ease, min-height .25s ease;
}

.nav-wrap.scrolled .site-header {
    min-height: 48px;
    padding: 8px 24px;
}

.nav-wrap.scrolled .nav-contact {
    min-height: 36px;
    padding: 0 22px;
    font-size: 14px;
}

.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.logo-lw,
.logo-l  { height: 40px; width: auto; transition: height .25s ease; }

.nav-wrap.scrolled .logo-lw,
.nav-wrap.scrolled .logo-l { height: 32px; }

.logo-lw { display: block; }
.logo-l  { display: none; }

.nav-wrap.scrolled:not(.dark-mode) .logo-lw { display: none; }
.nav-wrap.scrolled:not(.dark-mode) .logo-l  { display: block; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: clamp(28px, 5vw, 80px);
}

.nav-item {
    position: relative;
    color: inherit;
    font-size: 15px;
    font-weight: 600;
    opacity: .82;
    text-decoration: none;
    transition: color .2s ease, opacity .2s ease;
}

.nav-item:hover,
.nav-item.is-active {
    opacity: 1;
}

.nav-item.is-active::after {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    border-radius: 999px;
    background: #dc2626;
    content: "";
}

.nav-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 28px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.25);
    transition: background .2s ease, transform .2s ease,
                min-height .25s ease, padding .25s ease, font-size .25s ease;
}

.nav-contact:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    color: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.mobile-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.nav-wrap.dark-mode .mobile-menu-panel {
    background: rgba(20, 20, 28, 0.92);
    border-color: rgba(255, 255, 255, 0.12);
}

.mobile-menu-panel nav {
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.mobile-link {
    display: block;
    padding: 13px 16px;
    border-radius: 14px;
    color: #111827;
    font-weight: 650;
    text-decoration: none;
}

.nav-wrap.dark-mode .mobile-link { color: #fff; }

.mobile-link:hover,
.mobile-link.is-active {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}

.nav-wrap.dark-mode .mobile-link:hover,
.nav-wrap.dark-mode .mobile-link.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-link.mobile-contact {
    margin-top: 8px;
    background: #dc2626;
    color: #fff;
    text-align: center;
}

@media (max-width: 767px) {
    .nav-menu,
    .nav-contact {
        display: none;
    }

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        /* El icono mide 28px; el area tactil debe llegar a 44px sin moverlo de sitio */
        min-width: 44px;
        min-height: 44px;
        margin-right: -8px;
    }

    /* El logo mide 34px de alto; el enlace necesita 44 para el toque */
    .brand { min-height: 44px; }

    .brand-title {
        font-size: 1.1rem;
    }

    .site-header {
        min-height: 62px;
        padding: 12px 18px;
    }
}

@media (max-width: 399px) {
    .nav-wrap {
        top: 8px;
        width: calc(100% - 16px);
    }

    .site-header { padding: 10px 14px; }
    .logo-lw,
    .logo-l { height: 34px; }
}

/* ===== Popup de Contacto ===== */
.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.contact-modal.open { display: flex; }

.contact-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.contact-modal__panel {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 24px;
    padding: 32px 26px 26px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    animation: contactModalIn .25s ease;
    color: #111827;
}

@keyframes contactModalIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

.contact-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    cursor: pointer;
    transition: background .2s ease;
}

.contact-modal__close:hover { background: #e5e7eb; }
.contact-modal__close svg { width: 18px; height: 18px; }

.contact-modal__title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 4px;
}

.contact-modal__subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 22px;
}

.contact-modal__options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.contact-row:hover {
    border-color: #dc2626;
    background: #fef2f2;
    transform: translateY(-1px);
}

.contact-row__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    color: #fff;
}

.contact-row__icon svg { width: 22px; height: 22px; }
.contact-row__icon--wa   { background: #25D366; }
.contact-row__icon--mail { background: #dc2626; }

.contact-row__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: left;
}

.contact-row__label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-row__value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-row__arrow {
    width: 18px;
    height: 18px;
    margin-left: auto;
    flex-shrink: 0;
    color: #9ca3af;
}
