/* =========================================================
   TIENDA
   ========================================================= */

.tienda-header {

    border-radius: 16px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #1e3c72 0%,
            #2a5298 100%
        );
}


.tienda-logo {

    width: 130px;

    height: 130px;

    object-fit: cover;

    border-radius: 50%;

    border: 4px solid white;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.20);
}


.tienda-logo-sin-imagen {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    background: #f8f9fa;

    color: #0d6efd;
}


.tienda-verificada {

    font-size: 0.75rem;

    border-radius: 20px;
}


/* Visitas: par de "Tienda verificada" (mismo tamaño), en vidrio semitransparente */
.tienda-visitas {

    font-size: 0.75rem;

    border: 1px solid rgba(255, 255, 255, 0.35);

    border-radius: 20px;

    background: rgba(255, 255, 255, 0.14);

    color: #ffffff;

    letter-spacing: 0.02em;
}

/* Ojo dorado, como los íconos de ubicación y teléfono del cuadro */
.tienda-visitas-ojo {

    color: #ffc107;
}


/* Solo el espacio necesario: los saltos los arma el filtro linebreaks (párrafos) */
.tienda-descripcion {

    font-size: 1.05rem;

    line-height: 1.45;
}

.tienda-descripcion p {

    margin: 0 0 0.35rem;
}

.tienda-descripcion p:last-child {

    margin-bottom: 0;
}


/* =========================================================
   CALIFICACIÓN
   ========================================================= */

.tienda-calificacion {

    margin-top: 10px;

    margin-bottom: 12px;
}


.tienda-estrellas {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 3px;

    margin-top: 4px;
}


.estrella-btn {

    border: none;

    background: transparent;

    padding: 2px;

    color:
        rgba(255, 255, 255, 0.40);

    font-size: 1.25rem;

    line-height: 1;

    cursor: pointer;

    transition:
        color 0.15s ease,
        transform 0.15s ease;
}


.estrella-btn:hover {

    color: #ffd54a;

    transform:
        scale(1.12);
}


.estrella-btn.activa {

    color: #ffd54a;
}


#texto-calificacion {

    display: block;

    margin-top: 4px;

    font-size: 0.74rem;

    color:
        rgba(255, 255, 255, 0.78);
}


/* =========================================================
   RESUMEN
   ========================================================= */

.resumen-calificacion {

    margin-top: 4px;

    font-size: 0.76rem;

    font-weight: 600;

    color:
        rgba(255, 255, 255, 0.92);
}


.separador-calificacion {

    margin-left: 5px;

    margin-right: 5px;

    opacity: 0.65;
}


/* =========================================================
   DISTRIBUCIÓN
   ========================================================= */

.distribucion-calificacion {

    width: 100%;

    max-width: 320px;

    margin:
        9px auto 0;
}


.fila-estrella {

    display: flex;

    align-items: center;

    gap: 7px;

    height: 18px;

    font-size: 0.67rem;
}


.fila-estrella > span:first-child {

    width: 50px;

    color: #ffd54a;

    letter-spacing: -1px;

    text-align: left;
}


.fila-estrella > span:last-child {

    width: 30px;

    color:
        rgba(255, 255, 255, 0.78);

    text-align: right;
}


/* =========================================================
   BARRAS
   ========================================================= */

.barra-calificacion {

    flex: 1;

    height: 5px;

    overflow: hidden;

    border-radius: 10px;

    background:
        rgba(255, 255, 255, 0.18);
}


.barra-calificacion-relleno {

    width: 0;

    height: 100%;

    border-radius: 10px;

    background: #ffd54a;

    transition:
        width 0.30s ease;
}


/* =========================================================
   CATÁLOGO
   ========================================================= */

.catalogo-filtros {

    width: 100%;
}


.catalogo-titulo {

    display: flex;

    align-items: baseline;

    justify-content: space-between;

    gap: 10px;
}


.filtro-label {

    font-size: 0.88rem;

    font-weight: 600;

    color: #333;
}


.filtro-control {

    min-height: 44px;

    border-radius: 10px;

    border: 1px solid #dee2e6;

    box-shadow: none;
}


.filtro-control:focus {

    border-color: #86b7fe;

    box-shadow:
        0 0 0 0.15rem
        rgba(13, 110, 253, 0.10);
}


/* Lupa a la izquierda dentro del campo: la X del navegador queda sola a la derecha */
.buscador-catalogo {

    padding-left: 38px;
}

.buscador-icono {

    position: absolute;

    top: 50%;

    left: 14px;

    transform:
        translateY(-50%);

    color: #6c757d;

    pointer-events: none;
}


.mensaje-filtro {

    margin-top: 10px;

    font-size: 0.80rem;

    color: #6c757d;
}


/* =========================================================
   PRODUCTOS
   ========================================================= */

.tarjeta-producto-animada {

    transition:
        transform 0.20s ease,
        box-shadow 0.20s ease;
}


.tarjeta-producto-animada:hover {

    transform:
        translateY(-3px);

    box-shadow:
        0 6px 18px
        rgba(0, 0, 0, 0.12)
        !important;
}


.producto-item.producto-oculto {

    display: none !important;
}


/* =========================================================
   IMAGEN
   ========================================================= */

.contenedor-imagen-producto {

    height: 220px;

    background: #f8f9fa;
}


.imagen-recortada {

    width: 100%;

    height: 100%;

    object-fit: cover;

    display: block;
}


/* =========================================================
   DESCUENTO
   ========================================================= */

/* =========================================================
   DESCUENTO DEL PRODUCTO
   ========================================================= */

.badge-promo-producto {
    position: absolute;
    top: 10px;
    right: 10px;

    background: #f44336;
    color: #ffffff;

    padding: 4px 10px;

    border-radius: 20px;

    font-size: 0.78rem;
    font-weight: 700;

    line-height: 1.2;

    z-index: 5;

    white-space: nowrap;

    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}


/* =========================================================
   SEGUNDA FOTO
   ========================================================= */

.badge-fotos-extra {

    position: absolute;

    bottom: 8px;

    right: 8px;

    padding:
        5px 8px;

    border-radius: 7px;

    font-size: 0.68rem;
}


/* =========================================================
   CATEGORÍA DEL PRODUCTO
   ========================================================= */

.producto-categoria {

    display: inline-block;

    margin-bottom: 6px;

    color: #6c757d;

    font-size: 0.70rem;

    font-weight: 600;
}


/* =========================================================
   DESCRIPCIÓN
   ========================================================= */

.descripcion-producto {

    min-height: 18px;
}


/* =========================================================
   PRECIO
   ========================================================= */

.etiqueta-precio,
.etiqueta-precio-desde {

    color: #777;

    font-size: 0.70rem;

    margin-bottom: 1px;
}


.precio-moneda {

    color: #dc3545;

    font-size: 0.78rem;

    font-weight: 600;
}


.precio-destacado {

    color: #dc3545;

    font-size: 1.05rem;

    font-weight: 600;
}


/* =========================================================
   SIN RESULTADOS
   ========================================================= */

.sin-resultados-icono {

    width: 60px;

    height: 60px;

    margin:
        0 auto 15px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background: #f1f3f5;

    color: #6c757d;

    font-size: 1.5rem;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 767.98px) {

    .tienda-logo {

        width: 92px;

        height: 92px;
    }

    /* Cuadro azul compacto en celular */
    .tienda-header h1.display-5 {

        margin-bottom: 0.35rem !important;

        font-size: 1.85rem;
    }

    .tienda-verificada,
    .tienda-visitas {

        margin-bottom: 0.35rem !important;
    }

    .tienda-descripcion {

        font-size: 0.95rem;
    }


    .tienda-estrellas {

        gap: 2px;
    }


    .estrella-btn {

        font-size: 1.18rem;
    }


    .distribucion-calificacion {

        max-width: 280px;
    }


    .catalogo-titulo {

        display: block;
    }


    .catalogo-titulo h3 {

        margin-bottom: 3px !important;
    }


    .contenedor-imagen-producto {

        height: 180px;
    }


    .precio-destacado {

        font-size: 0.98rem;
    }

}


@media (max-width: 420px) {

    .contenedor-imagen-producto {

        height: 160px;
    }


    .distribucion-calificacion {

        max-width: 260px;
    }


    .fila-estrella {

        gap: 5px;
    }

}

/* =========================================================
   CALIFICACIÓN DE LA TIENDA
   ========================================================= */

.tienda-calificacion {
    margin-top: 10px;
    margin-bottom: 12px;
}

.tienda-estrellas {
    display: inline-flex;
    gap: 3px;
}

.estrella-btn {
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: transform 0.15s ease, color 0.15s ease;
}

.estrella-btn:hover,
.estrella-btn.activa {
    color: #ffc107;
    transform: scale(1.08);
}

#texto-calificacion {
    margin-left: 8px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.75);
}


/* =========================================================
   RESUMEN
   ========================================================= */

.resumen-calificacion-tienda {
    margin-top: 8px;
    max-width: 330px;
}

.calificacion-principal {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
}

.calificacion-principal strong {
    font-size: 1rem;
}

.calificacion-principal > span {
    color: #ffc107;
}

.calificacion-principal small {
    color: rgba(255, 255, 255, 0.7);
}


/* =========================================================
   NIVEL
   ========================================================= */

.nivel-tienda {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
    font-weight: 700;
}


/* =========================================================
   DISTRIBUCIÓN DE ESTRELLAS
   ========================================================= */

.distribucion-estrellas {
    margin-top: 8px;
}

.fila-estrella {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 17px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.75);
}

.fila-estrella > span:first-child {
    width: 10px;
    text-align: right;
}

.fila-estrella i {
    color: #ffc107;
    font-size: 0.65rem;
}

.fila-estrella > span:last-child {
    width: 35px;
    text-align: right;
}


.barra {
    width: 140px;
    height: 5px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    overflow: hidden;
}

.barra div {
    height: 100%;
    width: 0;
    background: #ffc107;
    border-radius: 10px;
    transition: width 0.3s ease;
}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 576px) {

    .resumen-calificacion-tienda {
        margin-left: auto;
        margin-right: auto;
    }

    .distribucion-estrellas {
        width: 100%;
    }

    .barra {
        flex: 1;
        max-width: 180px;
    }

}

/* =========================================================
   BOTÓN SUBIR
   ========================================================= */

.btn-subir {
    position: fixed;

    right: 24px;
    bottom: 24px;

    width: 46px;
    height: 46px;

    border: none;
    border-radius: 50%;

    background: #9b5de5;
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1.25rem;

    cursor: pointer;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.20);

    opacity: 0;
    visibility: hidden;

    transform: translateY(10px);

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        transform 0.25s ease;

    z-index: 9999;
}


/* MOSTRAR */

.btn-subir.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* EFECTO AL PASAR EL MOUSE */

.btn-subir:hover {
    background: #8746d0;
    transform: translateY(-2px);
}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 576px) {

    .btn-subir {

        right: 16px;
        bottom: 18px;

        width: 44px;
        height: 44px;

        font-size: 1.15rem;

    }

}


/* =========================================================
   CUADRO AZUL ANIMADO
   Mismos colores (#1e3c72 / #2a5298). Solo se anima transform
   y opacity: el celular no redibuja la página en cada cuadro.
   ========================================================= */

.tienda-animada {

    position: relative;

    isolation: isolate;
}

/* Degradado que se mueve lento: una capa más grande que se desplaza */
.tienda-animada::before {

    content: "";

    position: absolute;

    inset: -40%;

    z-index: -2;

    background:
        linear-gradient(
            120deg,
            #1e3c72 0%,
            #2a5298 30%,
            #1e3c72 55%,
            #2a5298 80%,
            #1e3c72 100%
        );
}

/* Burbujas: degradados radiales (bordes suaves sin usar blur, que es pesado) */
.tienda-burbuja {

    position: absolute;

    z-index: -1;

    border-radius: 50%;

    pointer-events: none;

    background:
        radial-gradient(
            circle,
            rgba(255, 255, 255, 0.22) 0%,
            rgba(255, 255, 255, 0) 70%
        );
}

.tienda-burbuja-1 { width: 220px; height: 220px; top: -60px; left: -50px; }
.tienda-burbuja-2 { width: 160px; height: 160px; bottom: -50px; right: 12%; }
.tienda-burbuja-3 { width: 110px; height: 110px; top: 18%; right: -30px; }
.tienda-burbuja-4 { width: 90px; height: 90px; bottom: 10%; left: 35%; }

/* Contenedor del logo: el anillo y la respiración son pseudo-elementos */
.tienda-logo-anillo {

    position: relative;

    display: inline-block;

    border-radius: 50%;
}

.tienda-logo-anillo::before,
.tienda-logo-anillo::after {

    content: "";

    position: absolute;

    inset: -6px;

    border-radius: 50%;

    pointer-events: none;

    opacity: 0;
}

/* Anillo de brillo */
.tienda-logo-anillo::before {

    border: 3px solid rgba(255, 255, 255, 0.85);
}

/* Brillo que "respira" */
.tienda-logo-anillo::after {

    inset: -10px;

    background:
        radial-gradient(
            circle,
            rgba(255, 255, 255, 0) 55%,
            rgba(255, 255, 255, 0.35) 70%,
            rgba(255, 255, 255, 0) 80%
        );
}

/* Destello que recorre "Tienda verificada" */
.tienda-verificada {

    position: relative;

    overflow: hidden;
}

.tienda-verificada::after {

    content: "";

    position: absolute;

    top: 0;
    bottom: 0;
    left: 0;

    width: 45%;

    background:
        linear-gradient(
            100deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.75) 50%,
            rgba(255, 255, 255, 0) 100%
        );

    transform: translateX(-120%) skewX(-15deg);
}


/* =========================================================
   PRODUCTOS EN PROMOCIÓN dentro del cuadro azul
   El carrusel es compartido (core/css/carrusel_promos.css, colores para fondo
   claro). Aquí solo lo propio del perfil: blanco sobre el azul y más chico.
   ========================================================= */

.tienda-header .promo-seccion {

    margin: 6px 0 10px;
}

.tienda-header .promo-titulo {

    margin: 0 0 2px;

    color: #ffffff;

    font-size: 1rem;
}

.tienda-header .promo-escenario {

    height: 236px;
}

.tienda-header .promo-tarjeta {

    width: 156px;

    margin-left: -78px;

    border: 0;

    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.tienda-header .promo-progreso {

    background: rgba(255, 255, 255, 0.25);
}

.tienda-header .promo-progreso span {

    background: #ffffff;
}

.tienda-header .promo-puntos button {

    background: rgba(255, 255, 255, 0.35);
}

.tienda-header .promo-puntos button.activo {

    background: #ffffff;
}

@media (min-width: 768px) {

    .tienda-header .promo-titulo {

        font-size: 1.1rem;
    }

    .tienda-header .promo-escenario {

        height: 262px;
    }

    .tienda-header .promo-tarjeta {

        width: 176px;

        margin-left: -88px;
    }
}


/* =========================================================
   ANIMACIONES: solo si el usuario no pidió reducir movimiento.
   Con "reducir movimiento" todo se ve quieto y completo.
   ========================================================= */

@media (prefers-reduced-motion: no-preference) {

    /* Degradado y burbujas */
    .tienda-animada::before {

        animation: tiendaFondo 18s ease-in-out infinite alternate;
    }

    .tienda-burbuja-1 { animation: tiendaFlotar 11s ease-in-out infinite alternate; }
    .tienda-burbuja-2 { animation: tiendaFlotar 14s ease-in-out -4s infinite alternate-reverse; }
    .tienda-burbuja-3 { animation: tiendaFlotar 9s ease-in-out -2s infinite alternate; }
    .tienda-burbuja-4 { animation: tiendaFlotar 12s ease-in-out -6s infinite alternate-reverse; }

    /* Secuencia de entrada: logo, nombre, verificada, visitas, el resto */
    .tienda-logo-anillo {

        animation: tiendaRebote 0.8s cubic-bezier(.34, 1.56, .64, 1) both;
    }

    .tienda-logo-anillo::before {

        animation: tiendaAnillo 0.9s ease-out 0.35s both;
    }

    .tienda-logo-anillo::after {

        animation: tiendaRespira 3.2s ease-in-out 1.6s infinite;
    }

    .tienda-paso-2 {

        animation: tiendaSubir 0.6s ease-out 0.5s both;
    }

    .tienda-paso-3 {

        animation: tiendaAparecer 0.5s ease-out 0.9s both;
    }

    .tienda-paso-3::after {

        animation: tiendaDestello 0.9s ease-in-out 1.3s both;
    }

    .tienda-paso-4 {

        animation: tiendaAparecer 0.5s ease-out 1.2s both;
    }

    .tienda-paso-5 {

        animation: tiendaAparecer 0.6s ease-out 1.6s both;
    }

    /* Promociones: entran justo después de las visitas (el resto, en el carrusel compartido) */
    .tienda-header .promo-titulo {

        animation: promoEntrar 0.7s ease-out 1.45s both;
    }

    .tienda-header .promo-escenario {

        animation: tiendaAparecer 0.6s ease-out 1.6s both;
    }
}

@keyframes tiendaFondo {
    from { transform: translate3d(-12%, -6%, 0); }
    to   { transform: translate3d(12%, 6%, 0); }
}

@keyframes tiendaFlotar {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(28px, -22px, 0) scale(1.15); }
}

@keyframes tiendaRebote {
    0%   { opacity: 0; transform: scale(0.3); }
    60%  { opacity: 1; transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes tiendaAnillo {
    0%   { opacity: 0.9; transform: scale(0.9); }
    100% { opacity: 0; transform: scale(1.35); }
}

@keyframes tiendaRespira {
    0%, 100% { opacity: 0.25; transform: scale(0.97); }
    50%      { opacity: 0.85; transform: scale(1.05); }
}

@keyframes tiendaSubir {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes tiendaAparecer {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes tiendaDestello {
    from { transform: translateX(-120%) skewX(-15deg); }
    to   { transform: translateX(260%) skewX(-15deg); }
}


/* =========================================================
   CARGA INFINITA DEL CATÁLOGO
   El marcador está siempre (lo mira el JS); el texto solo se ve al cargar.
   ========================================================= */

.carga-infinita {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    min-height: 44px;

    color: #7a58b1;

    font-size: 0.85rem;
}

.carga-infinita > * {

    visibility: hidden;
}

.carga-infinita.cargando > * {

    visibility: visible;
}

@media (prefers-reduced-motion: reduce) {

    .carga-infinita .spinner-border {

        animation: none;
    }
}

/* Flecha del botón flotante: antes era de Font Awesome (sólida). Con el trazo
   se ve igual de gruesa con Bootstrap Icons. */
.tienda-flecha-arriba {
    -webkit-text-stroke: 1.2px currentColor;
    line-height: 1;
}


/* =========================================================
   BOTÓN "AÑADIR", PRECIO DE LAS TARJETAS Y HOJA PARA ELEGIR OPCIÓN
   Están en products/static/products/css/precio_anadir.css, compartido
   con los resultados de búsqueda.
   ========================================================= */
}


/* =========================================================
   BOTÓN FLOTANTE "PANEL PRINCIPAL"
   Su posición, color y tamaño siguen en el style del HTML; aquí solo
   se oculta al entrar y aparece (clase .visible, la pone el JS) cuando
   el cliente llega casi al final de los productos.
   ========================================================= */
.btn-panel-principal {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition:
        opacity .3s ease,
        visibility .3s ease,
        transform .3s ease;
}

.btn-panel-principal.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}


/* =========================================================
   COMPARTIR TIENDA (esquina superior derecha del cuadro azul)
   Vidrio blanco semitransparente; el ícono va en un círculo con el
   degradado de la marca (azul → lila → amarillo).
   ========================================================= */
.btn-compartir-tienda {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;                         /* encima de las burbujas y del contenido */
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 13px 4px 4px;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(10, 20, 60, .22);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .2px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.btn-compartir-tienda i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #9333ea 55%, #fbbf24 100%);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
    font-size: .78rem;
}

.btn-compartir-tienda:hover,
.btn-compartir-tienda:focus-visible {
    background: rgba(255, 255, 255, .26);
    box-shadow: 0 6px 18px rgba(10, 20, 60, .3);
    transform: translateY(-1px);
}

.btn-compartir-tienda:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.btn-compartir-tienda:active {
    transform: scale(.96);
}

/* Aviso "Enlace copiado ✅" justo debajo del botón */
.compartir-aviso {
    position: absolute;
    top: 52px;
    right: 12px;
    z-index: 3;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(10, 20, 60, .25);
    color: #4c1d95;
    font-size: .76rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.compartir-aviso.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Celular: un poco más chico para no acercarse al logo */
@media (max-width: 576px) {
    .btn-compartir-tienda {
        top: 10px;
        right: 10px;
        padding-right: 11px;
        font-size: .72rem;
    }

    .btn-compartir-tienda i {
        width: 24px;
        height: 24px;
    }

    .compartir-aviso {
        top: 46px;
        right: 10px;
    }
}


/* =========================================================
   MENSAJE DE BIENVENIDA (toast chiquito)
   - PC: abajo y al centro.
   - Celular: sale deslizándose desde la esquina de abajo a la izquierda
     (al entrar, el botón "Panel principal" de esa esquina aún está oculto)
     y deja libre la derecha para la flecha de "volver arriba".
   Degradado de la marca: azul → lila fuerte → amarillo, texto blanco.
   ========================================================= */
.toast-bienvenida {
    position: fixed;
    left: 50%;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 10000;                     /* encima de los botones flotantes */
    display: flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    max-width: min(360px, calc(100% - 32px));
    padding: 8px 8px 8px 14px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 14px;
    background: linear-gradient(110deg, #1d4ed8 0%, #6d28d9 45%, #9333ea 72%, #f59e0b 100%);
    box-shadow:
        0 10px 24px rgba(76, 29, 149, .32),
        0 2px 5px rgba(0, 0, 0, .12);
    color: #fff;
    opacity: 0;
    transform: translate(-50%, 18px) scale(.96);
    transition: opacity .35s ease, transform .4s cubic-bezier(.34, 1.4, .64, 1);
}

.toast-bienvenida[hidden] {
    display: none;
}

.toast-bienvenida.visible {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.toast-bienvenida-texto {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

.toast-bienvenida-cerrar {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .2);
    color: #fff;
    font-size: .68rem;
    cursor: pointer;
    transition: background-color .2s ease;
}

.toast-bienvenida-cerrar:hover,
.toast-bienvenida-cerrar:focus-visible {
    background: rgba(0, 0, 0, .34);
}

/* Celular: esquina de abajo a la izquierda, entra desde el costado */
@media (max-width: 576px) {
    .toast-bienvenida {
        left: 12px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        max-width: calc(100% - 80px);   /* no llega a la flecha lila de la derecha */
        padding: 7px 7px 7px 11px;
        border-radius: 12px;
        transform: translateX(calc(-100% - 16px));
    }

    .toast-bienvenida.visible {
        transform: translateX(0);
    }

    .toast-bienvenida-texto {
        font-size: .74rem;
    }

    .toast-bienvenida-cerrar {
        width: 22px;
        height: 22px;
    }
}

/* Con "reducir movimiento": aparecen y se van sin desplazarse */
@media (prefers-reduced-motion: reduce) {
    .btn-panel-principal,
    .btn-panel-principal.visible {
        transform: none;
    }

    .toast-bienvenida,
    .toast-bienvenida.visible {
        transform: translate(-50%, 0);
    }
}

@media (prefers-reduced-motion: reduce) and (max-width: 576px) {
    .toast-bienvenida,
    .toast-bienvenida.visible {
        transform: none;
    }
}

/* PC: aire arriba del cuadro azul para que un nombre largo nunca quede
   debajo del botón Compartir (en celular el logo va centrado y no choca).
   !important porque p-md-4 de Bootstrap también lo usa. */
@media (min-width: 768px) {
    .tienda-header > .tienda-contenido {
        padding-top: 2.6rem !important;
    }
}


/* =========================================================
   📍 MAPA DE LA TIENDA (Etapa 6B) y NOTA IMPORTANTE (Etapa 6F)
   ========================================================= */

.tienda-mapa-fila {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 12px;
    margin-top: 8px;
    font-size: 0.85rem;
}

@media (min-width: 768px) {
    .tienda-mapa-fila { justify-content: flex-start; }
}

.tienda-mapa-btn {
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.tienda-mapa-btn:hover,
.tienda-mapa-btn:focus-visible { background: rgba(255, 255, 255, 0.25); }

.tienda-distancia { opacity: 0.95; font-weight: 600; }

.tienda-mapa-caja {
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    z-index: 0;
    background: #f1f5f9;
}

.tienda-mapa-caja.mapa-no-disponible {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    color: #475569;
    font-size: 0.9rem;
    height: auto;
    min-height: 90px;
}

.tienda-nota {
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-left: 5px solid #f97316;
    color: #7c2d12;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 10px;
    font-size: 0.92rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.tienda-nota-titulo { font-weight: 700; }

/* ===== Anuncio flotante BLACK FRIDAY (Store.black_friday_activo) ===== */
.bf-anuncio {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, .55);
    animation: bf-fondo .25s ease-out;
}
.bf-anuncio[hidden] { display: none; }
.bf-caja {
    position: relative;
    width: min(100%, 440px);
    padding: 34px 24px 24px;
    border-radius: 22px;
    text-align: center;
    color: #fff;
    background: linear-gradient(145deg, #ef4444 0%, #b91c1c 55%, #7f1d1d 100%);
    box-shadow: 0 24px 60px rgba(127, 29, 29, .55);
    animation: bf-entrar .35s cubic-bezier(.2, .9, .3, 1.2);
}
.bf-titulo {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(2.2rem, 11vw, 3.4rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: .04em;
    text-shadow: 0 3px 0 rgba(0, 0, 0, .25);
}
.bf-tienda {
    margin-top: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    opacity: .95;
    word-break: break-word;
}
.bf-ver {
    margin-top: 18px;
    padding: 10px 26px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #b91c1c;
    font-weight: 800;
}
.bf-ver:hover { background: #fee2e2; }
.bf-cerrar {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
}
.bf-cerrar:hover { background: rgba(255, 255, 255, .35); }
@keyframes bf-fondo { from { opacity: 0; } to { opacity: 1; } }
@keyframes bf-entrar { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
    .bf-anuncio, .bf-caja { animation: none; }
}

/* ===== Black Friday animado: letras que caen, chispas que llueven, brillo de la caja ===== */
.bf-caja { overflow: hidden; z-index: 1; animation: bf-entrar .35s cubic-bezier(.2, .9, .3, 1.2), bf-latido 2.4s ease-in-out 1.6s infinite; }
/* Destello que cruza la caja una vez, después de las letras */
.bf-caja::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
    transform: translateX(-120%);
    animation: bf-destello 1.1s ease-out 1.3s forwards;
    pointer-events: none;
}
.bf-titulo { display: flex; flex-wrap: wrap; justify-content: center; column-gap: .3em; }
.bf-palabra { display: inline-flex; white-space: nowrap; }        /* una palabra nunca se corta */
/* Cada letra: 1) entra cayendo, una tras otra; 2) cuando entraron todas, sigue en una ola que
   no para; 3) siempre cambia de color (blanco, amarillo, dorado, naranja), corrido por letra */
.bf-letra {
    display: inline-block;
    opacity: 0;
    animation:
        bf-letra .55s cubic-bezier(.2, .9, .3, 1.3) calc(var(--i) * 70ms + .15s) forwards,
        bf-ola 1.8s ease-in-out calc(var(--letras, 12) * 70ms + .8s + var(--i) * 90ms) infinite,
        bf-color 3s linear calc(var(--i) * 120ms) infinite;
}
/* Mensaje corto debajo del título; "Estamos rematando" late */
.bf-sub {
    margin-top: 10px;
    font-size: clamp(.95rem, 4vw, 1.1rem);
    font-weight: 800;
    line-height: 1.25;
    opacity: 0;
    animation: bf-aparecer .5s ease-out forwards;
    animation-delay: calc(var(--letras, 12) * 70ms + .3s);
}
.bf-sub span {
    display: block;
    margin-top: 4px;
    color: #fde047;
    text-shadow: 0 0 10px rgba(253, 224, 71, .6);
    animation: bf-pulso 1.4s ease-in-out calc(var(--letras, 12) * 70ms + .9s) infinite;
}
/* El nombre y el botón aparecen cuando terminaron las letras */
.bf-tienda, .bf-ver { opacity: 0; animation: bf-aparecer .5s ease-out forwards; animation-delay: calc(var(--letras, 12) * 70ms + .5s); }
.bf-ver { animation-delay: calc(var(--letras, 12) * 70ms + .7s); }

/* Chispas: detrás de la caja y sin recibir toques (la X y tocar fuera siguen funcionando) */
.bf-chispas { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.bf-chispa {
    position: absolute;
    top: -12px;
    width: var(--tam);
    height: var(--tam);
    border-radius: 50%;
    background: var(--color);
    box-shadow: 0 0 6px 1px var(--color);
    opacity: 0;
    animation: bf-lluvia var(--dur) linear var(--retraso) infinite;
}

@keyframes bf-letra {
    0%   { opacity: 0; transform: translateY(-38px) scale(1.6) rotate(-8deg); filter: blur(3px); }
    60%  { opacity: 1; transform: translateY(4px) scale(.95); filter: blur(0); text-shadow: 0 0 18px #fde047; }
    100% { opacity: 1; transform: none; text-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
}
@keyframes bf-ola {
    0%, 60%, 100% { transform: translateY(0) rotate(0); }
    20%           { transform: translateY(-7px) rotate(-3deg); }
    40%           { transform: translateY(2px) rotate(2deg); }
}
@keyframes bf-color {
    0%, 100% { color: #ffffff; text-shadow: 0 3px 0 rgba(0, 0, 0, .25), 0 0 8px rgba(255, 255, 255, .5); }
    25%      { color: #fde047; text-shadow: 0 3px 0 rgba(0, 0, 0, .25), 0 0 14px rgba(253, 224, 71, .8); }
    50%      { color: #fbbf24; text-shadow: 0 3px 0 rgba(0, 0, 0, .25), 0 0 14px rgba(251, 191, 36, .8); }
    75%      { color: #fb923c; text-shadow: 0 3px 0 rgba(0, 0, 0, .25), 0 0 14px rgba(251, 146, 60, .8); }
}
@keyframes bf-pulso { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes bf-aparecer { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes bf-destello { to { transform: translateX(120%); } }
@keyframes bf-latido {
    0%, 100% { box-shadow: 0 24px 60px rgba(127, 29, 29, .55), 0 0 0 0 rgba(250, 204, 21, 0); }
    50%      { box-shadow: 0 24px 60px rgba(127, 29, 29, .55), 0 0 32px 6px rgba(250, 204, 21, .45); }
}
@keyframes bf-lluvia {
    0%   { opacity: 0; transform: translate(0, 0) scale(1); }
    10%  { opacity: 1; }
    50%  { opacity: .9; transform: translate(calc(var(--deriva) * .5), 55vh) scale(.9); }
    85%  { opacity: .7; }
    100% { opacity: 0; transform: translate(var(--deriva), 105vh) scale(.6); }
}
@media (prefers-reduced-motion: reduce) {
    /* Sin movimiento: todo aparece quieto; solo las letras siguen cambiando de color */
    .bf-caja, .bf-caja::before, .bf-tienda, .bf-ver, .bf-sub, .bf-sub span, .bf-chispa { animation: none; opacity: 1; }
    .bf-letra { opacity: 1; animation: bf-color 3s linear calc(var(--i) * 120ms) infinite; }
    .bf-caja::before { display: none; }
    .bf-chispas { display: none; }
}

/* =========================================================
   📲 REDES SOCIALES y 🔴 EN VIVO (stores/partials/_redes_en_vivo.html)
   Dentro del cuadro azul de la tienda, debajo de las visitas. Centrado en celular y
   alineado a la izquierda en PC, como el nombre.
   ========================================================= */
.tienda-redes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 6px 0 10px;
}
@media (min-width: 768px) { .tienda-redes { justify-content: flex-start; } }
.tienda-red {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #fbbf24;                  /* acento dorado de la marca */
    box-shadow: 0 3px 10px rgba(30, 27, 75, .25);
    transition: transform .15s ease, box-shadow .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.tienda-red svg { width: 21px; height: 21px; }
.tienda-red:hover, .tienda-red:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(30, 27, 75, .35); }
.tienda-red:active { transform: scale(.93); }
.tienda-red-tiktok { color: #111; }
.tienda-red-facebook { color: #1877f2; }
.tienda-red-instagram { color: #d62976; }
.tienda-red-whatsapp { color: #1fa855; }

/* ---------- Aviso "EN VIVO AHORA" ---------- */
.tienda-vivo {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 6px 0 8px;
    padding: 6px 6px 6px 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    box-shadow: 0 4px 14px rgba(220, 38, 38, .45);
    max-width: 100%;
}
.tienda-vivo-etiqueta { font-weight: 800; font-size: .85rem; letter-spacing: .04em; color: #fff; }
.tienda-vivo-etiqueta small { font-weight: 600; letter-spacing: 0; opacity: .9; }
.tienda-vivo-punto {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 4px;
    border-radius: 50%;
    background: #fff;
    vertical-align: 1px;
    animation: tienda-vivo-titila 1s ease-in-out infinite;
}
@keyframes tienda-vivo-titila { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
.tienda-vivo-ver {
    padding: 5px 14px;
    border-radius: 999px;
    background: #fff;
    color: #dc2626;
    font-weight: 800;
    font-size: .85rem;
    text-decoration: none;
}
.tienda-vivo-ver:hover { color: #b91c1c; background: #fef2f2; }
@media (prefers-reduced-motion: reduce) { .tienda-vivo-punto { animation: none; } }
