/* Tienda pública — pantallas de acceso (login, registro, recuperar) */

body.tienda-auth-page {
    background: #0c0e12;
    min-height: 100vh;
}

body.tienda-auth-page .site-footer {
    margin-top: 0;
    border-top-color: rgba(255, 255, 255, 0.06);
}

.tienda-auth-scene {
    position: relative;
    padding: clamp(1.25rem, 4vw, 2.5rem) 1rem clamp(2rem, 5vw, 3rem);
    min-height: calc(100vh - var(--header-h, 56px) - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    box-sizing: border-box;
}

.tienda-auth-scene::before,
.tienda-auth-scene::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
}

.tienda-auth-scene::before {
    width: min(420px, 70vw);
    height: min(420px, 70vw);
    top: -12%;
    right: -8%;
    background: radial-gradient(circle, rgba(255, 91, 0, 0.22) 0%, transparent 68%);
}

.tienda-auth-scene::after {
    width: min(360px, 60vw);
    height: min(360px, 60vw);
    bottom: -18%;
    left: -10%;
    background: radial-gradient(circle, rgba(255, 91, 0, 0.1) 0%, transparent 70%);
}

.tienda-auth {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 880px;
    min-width: 0;
    margin: 0 auto;
    box-sizing: border-box;
}

.tienda-auth__shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.04),
        0 24px 64px rgba(0, 0, 0, 0.35);
}

@media (min-width: 768px) {
    .tienda-auth__shell {
        grid-template-columns: minmax(0, 34%) minmax(0, 1fr);
        min-height: 480px;
    }
}

/* Panel marca (izquierda) */
.tienda-auth__brand {
    position: relative;
    padding: clamp(1.35rem, 3vw, 2rem) clamp(1.25rem, 3vw, 1.75rem);
    background:
        linear-gradient(155deg, #14161c 0%, #0a0a0a 48%, #12141a 100%);
    color: #e8ecf4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.1rem;
}

.tienda-auth__brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 60% at 20% 0%, rgba(255, 91, 0, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 100%, rgba(255, 91, 0, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.tienda-auth__brand-inner {
    position: relative;
    z-index: 1;
}

.tienda-auth__brand-logo-wrap {
    display: inline-block;
    max-width: 100%;
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tienda-auth__brand-logo {
    display: block;
    width: auto;
    height: 44px;
    max-width: min(100%, 280px);
    object-fit: contain;
    margin: 0 auto;
    filter: drop-shadow(0 0 8px rgba(255, 91, 0, 0.15));
}

.tienda-auth__brand-tag {
    margin: 0 0 1rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 140, 60, 0.95);
}

.tienda-auth__brand-lead {
    margin: 0 0 1.15rem;
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(232, 236, 244, 0.72);
    max-width: 22rem;
}

.tienda-auth__perks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.tienda-auth__perks li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.84rem;
    line-height: 1.4;
    color: rgba(232, 236, 244, 0.88);
}

.tienda-auth__perks i {
    flex-shrink: 0;
    width: 1.65rem;
    height: 1.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.75rem;
    color: #ff8c3a;
    background: rgba(255, 91, 0, 0.12);
    border: 1px solid rgba(255, 91, 0, 0.2);
}

/* ——— Móvil: formulario limpio (logo ya está en el menú) ——— */
@media (max-width: 767px) {
    body.tienda-auth-page {
        background: #eef1f6;
    }

    body.tienda-auth-page .site-footer {
        font-size: 0.82rem;
    }

    .tienda-auth-scene {
        padding: 0.65rem max(0.85rem, env(safe-area-inset-right))
            max(1.25rem, env(safe-area-inset-bottom))
            max(0.85rem, env(safe-area-inset-left));
        min-height: 0;
        align-items: flex-start;
    }

    .tienda-auth-scene::before,
    .tienda-auth-scene::after {
        display: none;
    }

    .tienda-auth {
        max-width: 100%;
        width: 100%;
    }

    .tienda-auth__shell {
        border-radius: 16px;
        border: none;
        box-shadow: 0 2px 12px rgba(15, 23, 42, 0.07), 0 8px 28px rgba(15, 23, 42, 0.06);
    }

    body.tienda-auth-page {
        overflow-x: hidden;
    }

    /* Panel marca oculto: evita franja oscura + logo duplicado */
    .tienda-auth__brand {
        display: none;
    }

    .tienda-auth__panel {
        padding: 1.35rem 1.15rem 1.2rem;
    }

    .tienda-auth__head {
        margin-bottom: 1.15rem;
        text-align: center;
    }

    .tienda-auth__icon {
        display: none;
    }

    .tienda-auth__head h1 {
        font-size: 1.42rem;
        margin-bottom: 0.35rem;
    }

    .tienda-auth__sub {
        font-size: 0.875rem;
        line-height: 1.45;
        margin-left: auto;
        margin-right: auto;
    }

    .tienda-auth__field {
        margin-bottom: 0.9rem;
    }

    .tienda-auth__field label {
        font-size: 0.78rem;
        margin-bottom: 0.32rem;
    }

    .tienda-auth__input-wrap {
        border-radius: 14px;
        background: #fff;
    }

    .tienda-auth__field input[type="text"],
    .tienda-auth__field input[type="password"] {
        font-size: 16px;
        padding: 0.82rem 0.85rem;
    }

    .tienda-auth__remember {
        font-size: 0.84rem;
        margin-top: 0.1rem;
    }

    .tienda-auth__submit {
        margin-top: 0.95rem;
        padding: 0.9rem 1rem;
        border-radius: 14px;
        font-size: 1rem;
    }

    .tienda-auth__secondary {
        padding: 0.78rem 1rem;
        border-radius: 14px;
    }

    .tienda-auth__links {
        margin-top: 1.1rem;
        padding-top: 1rem;
    }

    .tienda-auth__links-intro {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.55rem;
        margin: 0 0 0.65rem;
        text-align: center;
    }

    .tienda-auth__links-hint {
        display: block;
        font-size: 0.84rem;
    }

    .tienda-auth__links-note {
        display: block;
        font-size: 0.8rem;
        color: #94a3b8;
    }

    .tienda-auth__links-note::before {
        content: none;
    }

    .tienda-auth__outline-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0.78rem 0.75rem;
        border-radius: 14px;
        border: 1.5px solid #ff5b00;
        background: #fff;
        color: #e85500;
        font-weight: 600;
        font-size: 0.92rem;
        text-decoration: none;
        white-space: normal;
        text-align: center;
        line-height: 1.3;
        overflow-wrap: break-word;
    }

    .tienda-auth__outline-btn i {
        display: inline;
    }

    .tienda-auth__outline-btn:hover {
        background: #fff7f2;
        text-decoration: none;
    }

    .tienda-auth__forgot {
        justify-content: center;
        width: 100%;
        padding: 0.5rem;
        font-size: 0.86rem;
    }

    .tienda-auth__links--center {
        align-items: center;
    }
}

/* Panel formulario */
.tienda-auth__panel {
    padding: clamp(1.35rem, 3.5vw, 2rem) clamp(1.25rem, 3.5vw, 2.25rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.tienda-auth__head {
    margin-bottom: 1.35rem;
}

.tienda-auth__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0.85rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #ff5b00;
    background: linear-gradient(145deg, rgba(255, 91, 0, 0.12) 0%, rgba(255, 91, 0, 0.04) 100%);
    border: 1px solid rgba(255, 91, 0, 0.18);
}

.tienda-auth__head h1 {
    margin: 0 0 0.4rem;
    font-size: clamp(1.35rem, 3vw, 1.55rem);
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.tienda-auth__sub {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #64748b;
    max-width: 36rem;
    overflow-wrap: break-word;
}

.tienda-auth__field {
    margin-bottom: 1rem;
    min-width: 0;
    max-width: 100%;
}

.tienda-auth__field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.38rem;
}

.tienda-auth__input-wrap {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    overflow: hidden;
}

.tienda-auth__input-wrap:focus-within {
    border-color: rgba(255, 91, 0, 0.55);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 91, 0, 0.1);
}

.tienda-auth__input-ic {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    flex-shrink: 0;
    color: #94a3b8;
    font-size: 0.9rem;
    background: transparent;
    border-right: 1px solid #e8edf3;
}

.tienda-auth__field input[type="text"],
.tienda-auth__field input[type="password"] {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    max-width: 100%;
    border: none;
    padding: 0.75rem 0.9rem;
    font: inherit;
    font-size: 0.95rem;
    background: transparent;
    color: #0f172a;
    box-sizing: border-box;
}

.tienda-auth__field input::placeholder {
    color: #94a3b8;
}

.tienda-auth__field input:focus {
    outline: none;
}

.tienda-auth__remember {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.86rem;
    line-height: 1.4;
    color: #64748b;
    margin: 0.15rem 0 0;
    cursor: pointer;
    user-select: none;
    max-width: 100%;
    overflow-wrap: break-word;
}

.tienda-auth__remember input {
    flex-shrink: 0;
    margin-top: 0.15rem;
    width: 1rem;
    height: 1rem;
    accent-color: #ff5b00;
}

.tienda-auth__err {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: #fef2f2;
    color: #b91c1c;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    line-height: 1.45;
    border: 1px solid #fecaca;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

.tienda-auth__err::before {
    content: "\f071";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    flex-shrink: 0;
    margin-top: 0.1rem;
    opacity: 0.85;
}

.tienda-auth__submit {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 1.1rem;
    padding: 0.82rem 1rem;
    border: none;
    border-radius: 12px;
    font-size: 0.98rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(180deg, #ff6a1a 0%, #e85500 100%);
    box-shadow: 0 2px 8px rgba(255, 91, 0, 0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.tienda-auth__submit:hover {
    filter: brightness(1.04);
    box-shadow: 0 4px 14px rgba(255, 91, 0, 0.28);
    transform: translateY(-1px);
}

.tienda-auth__submit:active {
    transform: translateY(0);
}

.tienda-auth__secondary {
    display: block;
    width: 100%;
    margin-top: 0.6rem;
    text-align: center;
    padding: 0.72rem 1rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.15s, border-color 0.15s;
}

.tienda-auth__secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.tienda-auth__links {
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid #f1f5f9;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
}

.tienda-auth__links p {
    margin: 0 0 0.6rem;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.5;
}

.tienda-auth__links p:last-child {
    margin-bottom: 0;
}

.tienda-auth__links a {
    color: #e85500;
    font-weight: 600;
    text-decoration: none;
}

.tienda-auth__links a:hover {
    text-decoration: underline;
}

.tienda-auth__links--center {
    text-align: center;
}

.tienda-auth__forgot {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: #64748b !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

.tienda-auth__forgot:hover {
    color: #e85500 !important;
}

.tienda-auth__back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #e85500;
    text-decoration: none;
}

.tienda-auth__back:hover {
    text-decoration: underline;
}

.tienda-auth__links-intro {
    margin: 0 0 0.65rem;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.5;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
}

.tienda-auth__links-hint {
    font-weight: 500;
}

.tienda-auth__links-note {
    color: #64748b;
}

.tienda-auth__links-note::before {
    content: " — ";
}

.tienda-auth__outline-btn {
    display: inline;
    width: auto;
    padding: 0;
    border: none;
    background: none;
    color: #e85500;
    font-weight: 600;
    font-size: inherit;
    text-decoration: none;
    box-sizing: border-box;
}

.tienda-auth__outline-btn i {
    display: none;
}

.tienda-auth__outline-btn:hover {
    text-decoration: underline;
    background: none;
}

@media (prefers-reduced-motion: reduce) {
    .tienda-auth__submit:hover {
        transform: none;
    }
}
