/* ── Navbar search ── */
.navbar-busqueda {
    display: flex;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 340px;
    margin: 0 0.5rem;
}

.navbar-busqueda-icono {
    position: absolute;
    left: 0.8rem;
    font-size: 0.85rem;
    pointer-events: none;
    line-height: 1;
}

.navbar-busqueda-input {
    width: 100%;
    height: 38px;
    padding: 0 0.9rem 0 2.4rem;
    border: 1.5px solid #e0ebe3;
    border-radius: 999px;
    font-size: 0.85rem;
    color: #1b2d24;
    background: #f6fbf4;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.navbar-busqueda-input:focus {
    border-color: #40916c;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.1);
}

.navbar-busqueda-input::placeholder { color: #9cb8a8; }

@media (max-width: 900px) {
    .navbar-busqueda { display: none; }
}

/* ── Login Drawer ── */

.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(27, 67, 50, 0.35);
    backdrop-filter: blur(3px);
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.login-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.login-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 380px;
    max-width: 95vw;
    background: #ffffff;
    z-index: 301;
    box-shadow: -8px 0 40px rgba(27, 67, 50, 0.18);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.login-drawer.abierto {
    transform: translateX(0);
}

/* ── Cabecera del drawer ── */
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e0ebe3;
    flex-shrink: 0;
}

.drawer-marca {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1b2d24;
}

.drawer-marca span { color: #40916c; }

.drawer-cerrar {
    width: 34px;
    height: 34px;
    background: #f6fbf4;
    border: 1.5px solid #e0ebe3;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #3d5a47;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.drawer-cerrar:hover { background: #e0ebe3; color: #1b4332; }

/* ── Cuerpo del drawer ── */
.drawer-body {
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    flex: 1;
}

.drawer-titulo {
    font-size: 1.45rem;
    font-weight: 800;
    color: #1b2d24;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.drawer-subtitulo {
    font-size: 0.88rem;
    color: #3d5a47;
    margin-top: -0.75rem;
}

/* ── Formulario ── */
.drawer-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.drawer-campo {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.drawer-campo label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #3d5a47;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.drawer-campo input {
    height: 44px;
    padding: 0 0.9rem;
    border: 1.5px solid #e0ebe3;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #1b2d24;
    background: #f6fbf4;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
}

.drawer-campo input:focus {
    border-color: #40916c;
    background: #ffffff;
}

.drawer-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #3d5a47;
    cursor: pointer;
    user-select: none;
}

.drawer-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2d6a4f;
    cursor: pointer;
}

.drawer-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    font-size: 0.85rem;
    color: #b91c1c;
    font-weight: 600;
}

.drawer-btn-submit {
    height: 46px;
    background: #2d6a4f;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(27, 67, 50, 0.25);
    transition: background 0.2s, transform 0.15s;
    margin-top: 0.25rem;
}

.drawer-btn-submit:hover {
    background: #1b4332;
    transform: translateY(-1px);
}

/* ── Separador ── */
.drawer-separador {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #9cb8a8;
    font-size: 0.82rem;
}

.drawer-separador::before,
.drawer-separador::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0ebe3;
}

/* ── Botón Google ── */
.drawer-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    height: 46px;
    background: #ffffff;
    border: 1.5px solid #e0ebe3;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #1b2d24;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.drawer-btn-google:hover {
    border-color: #40916c;
    box-shadow: 0 2px 8px rgba(27, 67, 50, 0.12);
}

.drawer-btn-google svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ── Tabs login/registro ── */
.drawer-tabs {
    display: flex;
    border-bottom: 1.5px solid #e0ebe3;
    flex-shrink: 0;
}

.drawer-tab {
    flex: 1;
    padding: 0.85rem 1rem;
    background: none;
    border: none;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -1.5px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #9cb8a8;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s, border-color 0.15s;
}

.drawer-tab:hover { color: #3d5a47; }

.drawer-tab.activo {
    color: #1b4332;
    border-bottom-color: #2d6a4f;
}

/* ── Mensaje de éxito ── */
.drawer-exito {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    font-size: 0.85rem;
    color: #065f46;
    font-weight: 600;
}

/* ── Pie del drawer ── */
.drawer-pie {
    padding: 1rem 1.75rem 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #9cb8a8;
    border-top: 1px solid #e0ebe3;
    flex-shrink: 0;
}

.drawer-pie a {
    color: #2d6a4f;
    font-weight: 600;
    text-decoration: none;
}

.drawer-pie a:hover { text-decoration: underline; }
