/* =========================================================
   TIENDA.CSS
   Alcance actual:
   - Header de tienda
   - Carrito flotante mobile/tablet
   - Ajuste share/carrito en desktop
   - Menú móvil + categorías
   - Productos
   ========================================================= */

:root {
    --header-bg: #ffffff;
    --header-text: #0f172a;
    --header-text-soft: #667085;
    --header-border: #e5e7eb;
    --header-black: #0b1220;
    --header-success-bg: #ecfdf3;
    --header-success-text: #12a150;
    --header-success-border: #ccebd8;
    --floating-cart-size: 72px;
    --floating-cart-offset-right: 16px;
    --floating-cart-offset-bottom: 18px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: #ffffff;
    color: var(--header-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    display: block;
    max-width: 100%;
}

button {
    font: inherit;
}

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

.tienda-header {
    background: var(--header-bg);
    border-bottom: 0;
}

.tienda-header-inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 16px 12px;
}

.tienda-header-card {
    width: 100%;
    background: #ffffff;
}

.tienda-header-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

/* =========================================================
   FILA SUPERIOR MOBILE / TABLET
   ========================================================= */

.header-logo-row {
    width: 100%;
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: start;
    gap: 10px;
}

.mobile-menu-btn,
.btn-share-header {
    width: 42px;
    height: 42px;
    border: 1px solid var(--header-border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--header-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.mobile-menu-btn:hover,
.btn-share-header:hover {
    background: #f8fafc;
}

.mobile-menu-btn {
    font-size: 24px;
    line-height: 1;
}

.btn-share-header svg {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
}

.btn-share-header-text {
    display: none;
}

/* =========================================================
   LOGO
   ========================================================= */

.tienda-logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tienda-logo {
    width: 82px;
    height: 82px;
    object-fit: cover;
    border-radius: 8px;
}

.tienda-logo-placeholder {
    background: #f3f4f6;
    color: var(--header-text);
    font-weight: 700;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.tienda-datos {
    width: 100%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tienda-nombre-row {
    width: 100%;
}

.tienda-nombre {
    margin: 0;
    color: var(--header-text);
    font-size: 1.78rem;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.tienda-descripcion {
    margin: 0;
    color: var(--header-text-soft);
    font-size: 0.9rem;
    line-height: 1.34;
    max-width: 680px;
    text-wrap: balance;
}

.tienda-meta {
    display: flex;
    justify-content: center;
    width: 100%;
}

.badge-estado {
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-abierta {
    background: var(--header-success-bg);
    color: var(--header-success-text);
    border: 1px solid var(--header-success-border);
}

.badge-cerrada {
    background: #fef2f2;
    color: #b42318;
    border: 1px solid #fecdca;
}

.badge-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: currentColor;
    flex: 0 0 10px;
}

/* =========================================================
   ACCIONES HEADER
   ========================================================= */

.tienda-acciones {
    width: 100%;
    display: none;
    justify-content: center;
}

.tienda-acciones-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.btn-carrito {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--tienda-color, #0b1220);
    border-radius: 10px;
    background: var(--tienda-color, #0b1220);
    color: var(--tienda-color-texto, #ffffff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn-carrito:hover,
.btn-share-header:hover,
.mobile-menu-btn:hover {
    transform: translateY(-1px);
}

.btn-carrito-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-carrito-icono svg {
    width: 18px;
    height: 18px;
}

.btn-carrito-texto {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.btn-carrito-badge {
    min-width: 18px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
}

/* =========================================================
   CARRITO FLOTANTE MOBILE / TABLET
   ========================================================= */

.floating-cart {
    position: fixed;
    right: var(--floating-cart-offset-right);
    bottom: var(--floating-cart-offset-bottom);
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 999px;
    background: rgba(11, 18, 32, 0.96);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    z-index: 1200;
    transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.22s ease;
}

.floating-cart:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.2);
}

.floating-cart:active {
    transform: scale(0.97);
}

.floating-cart-icon {
    font-size: 1.55rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.floating-cart-count {
    position: absolute;
    top: -4px;
    right: -2px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--header-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.floating-cart.is-hidden-on-footer,
.floating-cart.is-hidden-when-empty,
.floating-cart.is-hidden-while-drawer-open,
.floating-cart.is-scroll-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) scale(0.96);
}

/* =========================================================
   MENU MOVIL + CATEGORIAS
   ========================================================= */

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1400;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.mobile-menu.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(2px);
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: min(88vw, 360px);
    max-width: 360px;
    height: 100%;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
    transform: translateX(-100%);
    transition: transform 0.24s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mobile-menu.is-open .mobile-menu-panel {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 72px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.mobile-menu-title {
    font-size: 1.12rem;
    font-weight: 800;
    color: #0f172a;
}

.mobile-menu-close {
    width: 42px;
    height: 42px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
    padding: 0;
}

.mobile-menu-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 14px 20px;
    background: #ffffff;
}

.mobile-menu-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-menu-link {
    min-height: 52px;
    padding: 0 16px;
    border-radius: 4px;
    text-decoration: none;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #eef2f6;
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.mobile-menu-link:active {
    transform: scale(0.99);
}

.mobile-menu-link.is-active {
    background: #f8fafc;
    border-color: #eef2f6;
    color: #0f172a;
}

/* =========================================================
   BARRA DE CATEGORIAS
   ========================================================= */

.tienda-categorias-nav {
    background: #ffffff;
    border-top: 0;
    border-bottom: 0;
}

.tienda-categorias-nav .contenedor {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

.tienda-categorias-barra {
    display: none;
}

.tienda-categoria-link {
    text-decoration: none;
}

/* =========================================================
   PRODUCTOS
   - Mobile: 2 por fila
   - Tablet: 3 por fila
   - Desktop: 4 por fila
   ========================================================= */

.tienda-main {
    background: #ffffff;
}

.tienda-main > .contenedor {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px 28px;
}

.categoria-bloque {
    padding: 18px 0 6px;
}

.categoria-bloque + .categoria-bloque {
    padding-top: 26px;
}

/*
 * Sin nombre visible en cada sección -a pedido del usuario: la
 * categoría se marca solo en la barra de categorías-. Al tocar una,
 * las fotos quedan justo debajo de la barra superior
 * (catalogo/index.js:irACategoria).
 */
.categoria-bloque-header {
    display: none;
}

.categoria-titulo {
    display: none;
}

/* Espacio para que la última categoría también llegue arriba. */
.categoria-espacio-final {
    display: block;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.producto-card {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    box-shadow: none;
}

.producto-imagen-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8fafc;
    border-radius: 4px 4px 0 0;
}


.producto-imagen {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/*
 * A pedido del usuario, después de probar con usuarios reales que no
 * percibían que la imagen del producto se podía tocar para ver el
 * detalle ("no tuvieron la percepción de darle clic a la imagen"):
 * combina las dos señales de movimiento que se le propusieron -la
 * imagen "respira" (zoom sutil en loop) y un ícono de "tocar aquí"
 * pulsando en la esquina libre (top-right; los otros tres rincones
 * ya los usan los badges de oferta/sin-stock/más-vendido/vendido-hoy,
 * ver más abajo)-.
 */
@media (prefers-reduced-motion: no-preference) {
    .producto-imagen {
        animation: productoImagenRespira 3.2s ease-in-out infinite;
    }
}

@keyframes productoImagenRespira {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.045);
    }
}

.producto-tap-hint {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(11, 18, 32, 0.72);
    color: #ffffff;
    pointer-events: none;
}

.producto-tap-hint__icono {
    width: 14px;
    height: 14px;
}

/*
 * A pedido del usuario ("en pc la flecha y en mobil el dedito"): el
 * cursor tiene sentido en desktop (donde de verdad se hace clic con
 * mouse), pero en mobile -la prioridad real de la tienda- confunde,
 * porque ahí no existe cursor, se toca con el dedo. Los dos íconos
 * viven siempre en el HTML, CSS decide cuál mostrar según el ancho
 * -mismo corte de 767px que ya usa el resto del catálogo para
 * mobile, ver .producto-imagen-wrap más abajo-.
 */
.producto-tap-hint__icono--dedo {
    display: none;
}

@media (max-width: 767px) {
    .producto-tap-hint__icono--cursor {
        display: none;
    }

    .producto-tap-hint__icono--dedo {
        display: block;
        /* Ícono con más detalle que la flecha -le hace falta un
           poco más de tamaño para que se lea bien de chico. */
        width: 16px;
        height: 16px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .producto-tap-hint::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50%;
        border: 2px solid rgba(11, 18, 32, 0.55);
        animation: productoTapHintPing 1.8s ease-out infinite;
    }
}

@keyframes productoTapHintPing {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.9);
        opacity: 0;
    }
}


.producto-media-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.producto-media-link:hover {
    text-decoration: none;
}

.producto-nombre-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.producto-nombre-link:hover {
    text-decoration: none;
}

.producto-media-link:focus-visible,
.producto-nombre-link:focus-visible {
    outline: none;
}

.producto-media-link:focus-visible .producto-imagen-wrap {
    outline: 2px solid #0b1220;
    outline-offset: -2px;
}

.producto-nombre-link:focus-visible .producto-nombre {
    color: #0b1220;
}

.producto-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 10px 10px 11px;
}

.producto-top {
    display: flex;
    flex-direction: column;
    min-height: 46px;
    margin-bottom: 5px;
}

.producto-footer {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.producto-nombre {
    margin: 0;
    color: #344054;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.26;
    min-height: calc(1.26em * 2);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-wrap: balance;
}

.producto-precio-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-height: 0;
}

.producto-precio-original {
    margin: 0;
    color: #98a2b3;
    text-align: right;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(152, 162, 179, 0.75);
    opacity: 1;
    white-space: nowrap;
    position: relative;
    top: -1px;
}

.producto-precio {
    margin: 0;
    color: #101828;
    text-align: right;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.02;
    white-space: nowrap;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.producto-precio.oferta {
    color: #1d6b43;
    font-weight: 600;
}

.producto-acciones {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.btn-detalle-producto,
.btn-agregar-carrito {
    width: 100%;
    min-height: 40px;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.btn-detalle-producto {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #d7dde6;
    text-decoration: none;
}

.btn-agregar-carrito {
    background: var(--tienda-color, #0b1220);
    color: var(--tienda-color-texto, #ffffff);
    border: 1px solid var(--tienda-color, #0b1220);
}

.btn-detalle-producto:hover,
.btn-agregar-carrito:hover {
    transform: translateY(-1px);
}

.btn-detalle-producto:hover {
    background: #f8fafc;
    text-decoration: none;
}

.btn-agregar-carrito:hover {
    background: var(--tienda-color-hover, #111827);
    border-color: var(--tienda-color-hover, #111827);
}

.is-hidden-by-search {
    display: none !important;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (min-width: 768px) {
    .mobile-menu-panel {
        width: min(72vw, 380px);
        max-width: 380px;
    }

    .mobile-menu-header {
        padding: 20px 20px 16px;
    }

    .mobile-menu-body {
        padding: 12px 16px 24px;
    }

    .mobile-menu-link {
        min-height: 54px;
        font-size: 1rem;
    }

    .tienda-header-inner {
        padding: 22px 20px 18px;
    }

    .header-logo-row {
        grid-template-columns: 52px 1fr 52px;
    }

    .mobile-menu-btn,
    .btn-share-header {
        width: 38px;
        height: 38px;
        border-radius: 4px;
    }

    .tienda-logo {
        width: 104px;
        height: 104px;
    }

    .tienda-nombre {
        font-size: 2.8rem;
    }

    .tienda-descripcion {
        font-size: 1.06rem;
    }

    .floating-cart {
        width: 62px;
        height: 62px;
        right: 18px;
        bottom: 20px;
    }

    .floating-cart-count {
        min-width: 26px;
        height: 26px;
        font-size: 0.84rem;
    }

    .tienda-main > .contenedor {
        padding: 0 24px 32px;
    }

    .categoria-bloque {
        padding: 20px 0 8px;
    }

    .categoria-bloque + .categoria-bloque {
        padding-top: 28px;
    }


    .productos-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .producto-body {
        padding: 12px 12px 14px;
    }

    .producto-top {
        min-height: 52px;
    }

    .producto-nombre {
        font-size: 0.94rem;
    }

    .producto-precio-wrap {
        min-height: 0;
        gap: 6px;
    }

    .producto-precio-original {
        font-size: 0.8rem;
        line-height: 1;
        margin: 0;
        position: relative;
        top: -1px;
    }

    .producto-precio {
        font-size: 1rem;
        line-height: 1.02;
    }

    .btn-detalle-producto,
    .btn-agregar-carrito {
        min-height: 42px;
        font-size: 0.86rem;
        font-weight: 600;
    }
}

/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 1024px) {
    .mobile-menu {
        display: none;
    }

    .tienda-categorias-nav .contenedor {
        padding: 0 24px;
    }

    .tienda-categorias-barra {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .tienda-categoria-link {
        position: relative;
        min-height: 42px;
        padding: 0 18px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #334155;
        font-size: 0.96rem;
        font-weight: 700;
        line-height: 1;
        transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    }

    .tienda-categoria-link:hover {
        
        color: #0f172a;
        transform: translateY(-1px);
    }

    .tienda-categoria-link::after {
        content: "";
        position: absolute;
        left: 16px;
        right: 16px;
        bottom: 7px;
        height: 2px;
        border-radius: 999px;
        background: var(--tienda-color, #0b1220);
        transform: scaleX(0);
        transform-origin: center;
        transition: transform 0.2s ease;
    }

    .tienda-categoria-link:hover::after,
    .tienda-categoria-link:focus-visible::after,
    .tienda-categoria-link.is-active:hover::after,
    .tienda-categoria-link.is-active:focus-visible::after,
    .tienda-categoria-link:first-child:hover::after,
    .tienda-categoria-link:first-child:focus-visible::after {
        transform: scaleX(1);
    }

    .tienda-categoria-link.is-active {
        background: transparent;
        color: #334155;
    }

    .tienda-categoria-link.is-active::after {
        transform: scaleX(0);
    }

    .tienda-header-inner {
        padding: 22px 24px 18px;
    }

    .tienda-header-info {
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr) 220px;
        align-items: start;
        gap: 16px;
        text-align: left;
    }

    .header-logo-row {
        display: contents;
    }

    .mobile-menu-btn {
        display: none;
    }

    .tienda-logo-wrap {
        grid-column: 1;
        justify-content: flex-start;
        align-self: start;
    }

    .tienda-logo {
        width: 96px;
        height: 96px;
        border-radius: 4px;
    }

    .btn-share-header {
        grid-column: 3;
        grid-row: 1;
        justify-self: stretch;
        align-self: start;
        width: 100%;
        min-width: 220px;
        height: 32px;
        min-height: 32px;
        border-radius: 4px;
        background: #ffffff;
        border: 1px solid #d7dde6;
        color: #475467;
        padding: 0 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        margin-bottom: 0;
        box-shadow: none;
    }

    .btn-share-header:hover {
        background: #f8fafc;
        border-color: #cfd8e3;
        color: #0f172a;
    }

    .btn-share-header svg {
        width: 14px;
        height: 14px;
    }

    .btn-share-header-text {
        display: inline;
        font-size: 0.72rem;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
    }

    .tienda-datos {
        grid-column: 2;
        align-items: flex-start;
        gap: 8px;
        max-width: none;
    }

    .tienda-nombre {
        font-size: 1.15rem;
        line-height: 1.15;
        text-align: left;
    }

    .tienda-descripcion {
        max-width: none;
        font-size: 0.78rem;
        line-height: 1.35;
        text-align: left;
    }

    .tienda-meta {
        justify-content: flex-start;
    }

    .badge-estado {
        min-height: 32px;
        padding: 7px 12px;
        border-radius: 4px;
        font-size: 0.74rem;
        gap: 7px;
    }

    .badge-dot {
        width: 8px;
        height: 8px;
        flex-basis: 8px;
    }

    .tienda-acciones {
        grid-column: 3;
        grid-row: 1;
        align-self: start;
        justify-content: stretch;
        display: flex;
        margin-top: 38px;
    }

    .tienda-acciones-grid {
        width: 100%;
        max-width: none;
        gap: 2px;
    }

    .btn-carrito {
        width: 100%;
        min-width: 220px;
        min-height: 32px;
        height: 32px;
        border-radius: 4px;
        justify-content: center;
        gap: 7px;
        padding: 0 12px;
    }

    .btn-carrito-icono svg {
        width: 14px;
        height: 14px;
    }

    .btn-carrito-texto,
    .btn-carrito-badge {
        font-size: 0.72rem;
        line-height: 1;
    }

    .floating-cart {
        display: none;
    }

    .tienda-main > .contenedor {
        padding: 0 32px 36px;
    }

    


    .categoria-bloque + .categoria-bloque {
        padding-top: 30px;
    }


    .productos-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
    }

    .producto-card {
        border-radius: 4px;
    }

    .producto-body {
        padding: 12px 14px 14px;
    }

    .producto-top {
        min-height: 56px;
        margin-bottom: 5px;
    }

    .producto-nombre {
        font-size: 1rem;
        min-height: calc(1.22em * 2);
    }

    .producto-precio-wrap {
        min-height: 0;
        gap: 7px;
    }

    .producto-precio-original {
        font-size: 0.86rem;
        line-height: 1;
        margin: 0;
        position: relative;
        top: -1px;
    }

    .producto-precio {
        font-size: 1rem;
        line-height: 1.02;
    }

    .producto-acciones {
        gap: 9px;
    }

    .btn-detalle-producto,
    .btn-agregar-carrito {
        min-height: 42px;
        font-size: 0.88rem;
        font-weight: 600;
    }
}

@media (max-width: 767px) {
    .productos-grid {
        gap: 8px;
    }

    .tienda-main > .contenedor {
        padding: 2px 10px 22px;
    }

    .producto-card {
        box-shadow: none;
    }

    .producto-imagen-wrap {
        aspect-ratio: 1 / 1.02;
    }

    .producto-body {
        padding: 8px 8px 9px;
    }

    .producto-top {
        min-height: 38px;
        margin-bottom: 1px;
    }

    .producto-footer {
        gap: 5px;
    }

    .producto-nombre {
        text-align: left;
        font-size: 0.82rem;
        font-weight: 500;
        line-height: 1.26;
        letter-spacing: -0.008em;
        min-height: calc(1.26em * 2);
        overflow-wrap: anywhere;
        word-break: break-word;
        text-wrap: pretty;
        color: #344054;
    }

    .producto-precio-wrap {
        justify-content: flex-start;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 2px 5px;
    }

    .producto-precio-original {
        text-align: left;
        font-size: 0.68rem;
        font-weight: 400;
        color: #98a2b3;
    }

    .producto-precio {
        text-align: left;
        font-size: 0.98rem;
        font-weight: 600;
        letter-spacing: -0.01em;
        font-variant-numeric: tabular-nums;
    }

    .producto-footer > .producto-precio {
        font-size: 0.98rem;
        font-weight: 600;
        letter-spacing: -0.01em;
        font-variant-numeric: tabular-nums;
    }

    .producto-acciones {
        gap: 0;
    }

    .btn-detalle-producto {
        display: none;
    }

    .btn-agregar-carrito {
        /*
         * 44px: mínimo recomendado de tap target táctil (Apple/
         * Google), no 36px como antes -es el botón más usado de
         * todo el sitio, achicarlo por debajo de eso cuesta más de
         * lo que ahorra en espacio-.
         */
        min-height: 44px;
        padding: 0 10px;
        font-size: 0.76rem;
        font-weight: 600;
        letter-spacing: -0.008em;
    }
}

/* =========================================================
   MOBILE PEQUEÑO
   ========================================================= */

@media (max-width: 480px) {
    .mobile-menu-panel {
        width: min(90vw, 340px);
    }

    .mobile-menu-header {
        min-height: 68px;
        padding: 16px 16px 14px;
    }

    .mobile-menu-title {
        font-size: 1.05rem;
    }

    .mobile-menu-close {
        width: 40px;
        height: 40px;
    }

    .mobile-menu-body {
        padding: 10px 12px 18px;
    }

    .mobile-menu-link {
        min-height: 50px;
        padding: 0 14px;
        border-radius: 4px;
        font-size: 0.98rem;
    }

    .tienda-header-inner {
        padding: 8px 12px 6px;
    }

    .header-logo-row {
        grid-template-columns: 38px 1fr 38px;
        gap: 8px;
    }

    .mobile-menu-btn {
        font-size: 22px;
    }

    .tienda-logo {
        width: 56px;
        height: 56px;
    }

    .tienda-nombre {
        font-size: 1.18rem;
        line-height: 1.05;
        margin-bottom: 2px;
    }

    .tienda-descripcion {
        font-size: 0.76rem;
        line-height: 1.2;
    }

    .badge-estado {
        min-height: 32px;
        padding: 6px 10px;
        font-size: 0.76rem;
        gap: 6px;
    }

    .floating-cart {
        width: 54px;
        height: 54px;
        right: 12px;
        bottom: 14px;
    }

    .floating-cart-icon {
        font-size: 1.42rem;
    }

    .floating-cart-count {
        min-width: 22px;
        height: 22px;
        top: -4px;
        right: -1px;
        font-size: 0.76rem;
    }

    .tienda-main > .contenedor {
        padding: 0 10px 22px;
    }

    .categoria-bloque {
        padding: 16px 0 4px;
    }


    .productos-grid {
        gap: 8px;
    }

    .producto-card {
        border-radius: 4px;
    }

    .producto-imagen-wrap {
        aspect-ratio: 1 / 1.03;
    }

    .producto-body {
        padding: 9px 9px 10px;
    }

    .producto-top {
        min-height: 36px;
        margin-bottom: 1px;
    }

    .producto-footer {
        gap: 4px;
    }

    .producto-nombre {
        font-size: 0.76rem;
        font-weight: 500;
        line-height: 1.24;
        letter-spacing: -0.006em;
        min-height: calc(1.24em * 2);
        overflow-wrap: anywhere;
        word-break: break-word;
        text-wrap: pretty;
        color: #344054;
    }

    .producto-precio-wrap {
        display: flex;
        align-items: baseline;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 2px 5px;
        min-height: 0;
    }

    .producto-precio-original {
        font-size: 0.64rem;
        font-weight: 400;
        color: #98a2b3;
    }

    .producto-precio {
        font-size: 0.92rem;
        font-weight: 600;
        letter-spacing: -0.01em;
        font-variant-numeric: tabular-nums;
    }

    .producto-footer > .producto-precio {
        font-size: 0.92rem;
        font-weight: 600;
        letter-spacing: -0.01em;
        font-variant-numeric: tabular-nums;
    }

    .producto-acciones {
        gap: 0;
    }

    .btn-agregar-carrito {
        min-height: 44px;
        padding: 0 8px;
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: -0.008em;
        border-radius: 4px;
    }

}

/* =========================================================
   CARRITO
   ========================================================= */

.cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.cart-drawer.is-open {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(2px);
}

.cart-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(92vw, 430px);
    max-width: 430px;
    height: 100%;
    background: #ffffff;
    box-shadow: -18px 0 40px rgba(15, 23, 42, 0.18);
    transform: translateX(100%);
    transition: transform 0.24s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-drawer.is-open .cart-drawer-panel {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 72px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}


.cart-title {
    margin: 0;
    color: #0f172a;
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.1;
}

.cart-close {
    width: 40px;
    height: 40px;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    background: #ffffff;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    background: #ffffff;
}

.cart-empty {
    margin: 0;
    color: #667085;
    font-size: 0.96rem;
    line-height: 1.5;
}

.cart-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 14px 0;
    border-bottom: 1px solid #edf0f3;
}

.cart-item-image {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 4px;
    background: #f3f4f6;
}

.cart-item-name {
    margin: 0 0 8px;
    color: #111827;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.25;
}

.cart-item-price {
    margin: 0 0 12px;
    color: #667085;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
}

.cart-item-subtotal {
    margin: 0;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-align: right;
}

.cart-item-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.cart-qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    background: #ffffff;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    padding: 0;
}

/*
 * Se llegó al stock disponible: sigue siendo clickeable a propósito
 * (ver carrito.ui.js:buildCartItemHtml) para poder avisar por qué no
 * sube, así que esto es solo apariencia -no pointer-events:none-.
 */
.cart-qty-btn--limite {
    opacity: 0.5;
    cursor: not-allowed;
}

.cart-qty-value {
    min-width: 20px;
    text-align: center;
    color: #0f172a;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1;
}

.cart-footer {
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 20px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-delivery-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 2px;
}

.cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #0f172a;
    font-size: 1rem;
    line-height: 1.2;
}

.cart-total-row span {
    color: #111827;
    font-weight: 500;
}

.cart-total-row strong {
    font-size: 1.00rem;
    font-weight: 600;
    color: #0f172a;
}


/* =========================================
   DELIVERY / DIRECCION
   ========================================= */

.cart-direccion-row {
    align-items: flex-start;
    gap: 12px;
}

.cart-direccion-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.cart-direccion-label,
.cart-direccion-help,
.cart-payment-label,
.cart-payment-help {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.3;
    color: #0f172a;
}

.cart-direccion-label,
.cart-payment-label {
    font-weight: 600;
}

.cart-direccion-help,
.cart-payment-help {
    font-weight: 500;
}

/*
 * A pedido del usuario: cuando falta dirección o tipo de pago, la
 * etiqueta se agranda y parpadea -"coloca la letra un poco mas
 * grande y que esta parpadee para que el usuario detalle bien"-.
 * Las clases --alerta las agrega/quita JS (carrito.ui.js/
 * pagos.ui.js) solo en el estado "Falta ...", nunca cuando ya hay
 * dirección/tipo de pago definidos.
 */
.cart-direccion-label--alerta,
.cart-payment-label--alerta {
    font-size: 1.05rem;
    animation: cartAlertaParpadeo 1.3s ease-in-out infinite;
}

@keyframes cartAlertaParpadeo {
    0%, 100% {
        color: #0f172a;
        opacity: 1;
    }
    50% {
        color: #dc2626;
        opacity: 0.55;
    }
}

.cart-direccion-action {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.cart-direccion-monto {
    flex: 0 0 auto;
    min-width: 96px;
    text-align: right;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.1;
    color: #0f172a;
    white-space: nowrap;
    align-self: flex-start;
    padding-top: 2px;
}

/* =========================================
   BOTON DIRECCION
   ========================================= */

.js-cart-direccion-trigger,
.js-cart-payment-trigger {
    width: auto;
    min-width: 88px;
    height: 28px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 4px;
    border: 1px solid var(--tienda-color, #0b1220);
    background: var(--tienda-color, #0b1220);
    color: var(--tienda-color-texto, #ffffff);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.js-cart-direccion-trigger:hover,
.js-cart-payment-trigger:hover {
    background: var(--tienda-color-hover, #111827);
    border-color: var(--tienda-color-hover, #111827);
}

/* =========================================
   ANIMACION SUAVE
   ========================================= */

@keyframes direccionPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(11, 18, 32, 0.4);
    }

    50% {
        transform: scale(1.04);
        box-shadow: 0 0 0 6px rgba(11, 18, 32, 0.08);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(11, 18, 32, 0);
    }
}

.js-cart-direccion-trigger.is-pulse {
    animation: direccionPulse 1.2s ease-in-out infinite;
}

.js-cart-grand-total {
    text-align: right;
}

.cart-checkout,
.btn-whatsapp {
    width: 100%;
    min-height: 46px;
    border-radius: 4px;
    background: var(--tienda-color, #0b1220);
    color: var(--tienda-color-texto, #ffffff);
    border: 1px solid var(--tienda-color, #0b1220);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 14px;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.cart-checkout:hover,
.btn-whatsapp:hover {
    background: var(--tienda-color-hover, #111827);
    border-color: var(--tienda-color-hover, #111827);
}

.cart-checkout.is-disabled,
.cart-checkout[aria-disabled="true"] {
    background: #cbd5e1;
    border-color: #cbd5e1;
    color: #ffffff;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 1;
}

.cart-checkout.is-disabled:hover,
.cart-checkout[aria-disabled="true"]:hover {
    background: #cbd5e1;
    border-color: #cbd5e1;
}

.js-cart-total-row {
    padding-top: 2px;
}

/* =========================================================
   QR MODAL
   ========================================================= */

.qr-modal {
    position: fixed;
    inset: 0;
    z-index: 1600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.qr-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.qr-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

.qr-modal-panel {
    position: relative;
    width: min(92vw, 420px);
    margin: 48px auto 0;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.2);
    overflow: hidden;
}

.qr-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.qr-modal-title {
    margin: 0;
    color: #0f172a;
    font-size: 1.08rem;
    font-weight: 800;
}

.qr-modal-close {
    width: 38px;
    height: 38px;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    background: #ffffff;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    padding: 0;
}

.qr-modal-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.qr-modal-text,
.qr-link {
    margin: 0;
    color: #667085;
    font-size: 0.92rem;
    line-height: 1.45;
    word-break: break-word;
}

.qr-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: 1px solid #edf0f3;
    border-radius: 4px;
    background: #ffffff;
}

.qr-image {
    width: 100%;
    max-width: 260px;
    height: auto;
}

.qr-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.btn-secundario {
    width: 100%;
    min-height: 42px;
    border-radius: 4px;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #d0d5dd;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 12px;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.btn-secundario:hover {
    background: #f8fafc;
}

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

@media (max-width: 480px) {
    .cart-drawer-panel {
        width: 100vw;
        max-width: 100vw;
    }

    .cart-header {
        min-height: 68px;
        padding: 16px 14px 12px;
    }

    .cart-body {
        padding: 12px;
    }

    .cart-footer {
        padding: 18px 14px 14px;
        gap: 14px;
    }

    .cart-delivery-block {
        gap: 10px;
    }

    .cart-item {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 10px;
        padding: 12px 0;
    }

    .cart-item-image {
        width: 64px;
        height: 64px;
    }

    .cart-item-subtotal {
        grid-column: 2;
        text-align: left;
        margin-top: 8px;
    }

    .cart-total-row {
        align-items: center;
        gap: 10px;
        font-size: 0.96rem;
    }

    .cart-total-row {
        align-items: center;
        gap: 10px;
        font-size: 0.96rem;
    }

    .cart-total-row strong {
        font-size: 0.92rem;
        font-weight: 500;
    }

    .cart-direccion-row {
        align-items: flex-start;
        gap: 10px;
    }

    .cart-direccion-label,
    .cart-direccion-help,
    .cart-payment-label,
    .cart-payment-help {
        font-size: 0.82rem;
        line-height: 1.28;
    }

    /*
     * Sin esto, a los 480px o menos esta regla pisaba el 1.05rem de
     * .cart-direccion-label--alerta (mismo selector, definido antes
     * en el archivo, así que perdía por orden de cascada) y "Falta
     * dirección" quedaba más chico que "Falta tipo de pago" -bug
     * real, reportado por el usuario-.
     */
    .cart-direccion-label--alerta,
    .cart-payment-label--alerta {
        font-size: 1rem;
    }

    .cart-direccion-monto {
        min-width: 84px;
        font-size: 0.92rem;
        font-weight: 500;
    }

    .js-cart-direccion-trigger,
    .js-cart-payment-trigger {
        min-width: 80px;
        min-height: 26px;
        height: 26px;
        padding: 0 8px;
        font-size: 0.7rem;
    }

    .cart-checkout,
    .btn-whatsapp {
        min-height: 44px;
        font-size: 0.9rem;
    }

    .qr-modal-panel {
        width: min(94vw, 380px);
        margin-top: 28px;
    }
}

/* =========================================================
   FOOTER
   ========================================================= */

.tienda-footer {
    background: #0b1220;
    color: #ffffff;
    border-top: 1px solid #0b1220;
}

.tienda-footer .contenedor {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.tienda-footer-inner {
    padding: 24px 0 18px;
}

.tienda-footer-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.tienda-footer-brand-block {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tienda-footer-brand-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: left;
}

.tienda-footer-brand-badge {
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: visible;
    padding: 0;
}

.tienda-footer-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}

.tienda-footer-brand-textos {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
}

.tienda-footer-brand {
    margin: 0;
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 400;
    line-height: 1.1;
}

/*
 * Marca las letras que van a formar el dominio corto (Som-os
 * Em-prende) — mismo criterio que panel/static/css/panel.css. Sin
 * Google Fonts cargado acá (solo la pila de fuentes del sistema), así
 * que se usa 700 (bold real, siempre disponible) contra 400 en vez
 * de un salto mayor que el navegador podría no poder distinguir.
 */
.brand-highlight {
    font-weight: 700;
}

.tienda-footer-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.88rem;
    line-height: 1.35;
}

.tienda-footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.tienda-footer-link {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.3;
    text-align: center;
}

.tienda-footer-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.tienda-footer-bottom {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

.tienda-footer-copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.84rem;
    line-height: 1.4;
    text-align: center;
}

/* =========================================================
   TABLET FOOTER
   ========================================================= */

@media (min-width: 768px) {
    .tienda-footer .contenedor {
        padding: 0 24px;
    }

    .tienda-footer-inner {
        padding: 26px 0 20px;
    }

    .tienda-footer-top {
        gap: 20px;
    }

    .tienda-footer-logo {
        width: 44px;
        height: 44px;
    }

    .tienda-footer-brand {
        font-size: 1rem;
    }

    .tienda-footer-subtitle,
    .tienda-footer-link {
        font-size: 0.9rem;
    }

    .tienda-footer-copy {
        text-align: center;
    }
}

/* =========================================================
   DESKTOP FOOTER
   ========================================================= */

@media (min-width: 1024px) {
    .tienda-footer .contenedor {
        padding: 0 32px;
    }

    .tienda-footer-inner {
        padding: 28px 0 20px;
    }

    .tienda-footer-top {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
    }

    .tienda-footer-logo {
        width: 46px;
        height: 46px;
    }

    .tienda-footer-links {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        justify-content: flex-end;
    }

    .tienda-footer-bottom {
        margin-top: 20px;
        padding-top: 14px;
    }

    .tienda-footer-copy {
        text-align: center;
    }
}

/* =========================================================
   MOBILE PEQUEÑO FOOTER
   ========================================================= */

@media (max-width: 480px) {
    .tienda-footer .contenedor {
        padding: 0 14px;
    }

    .tienda-footer-inner {
        padding: 22px 0 18px;
    }

    .tienda-footer-brand-wrap {
        gap: 12px;
    }

    .tienda-footer-logo {
        width: 36px;
        height: 36px;
    }

    .tienda-footer-brand {
        font-size: 0.94rem;
    }

    .tienda-footer-subtitle,
    .tienda-footer-link,
    .tienda-footer-copy {
        font-size: 0.84rem;
    }

    .tienda-footer-copy {
        text-align: center;
    }
}

/* =========================================================
   MENSAJE BOTON COMPARTIR
   ========================================================= */
.tienda-share-toast {
    position: fixed;
    left: 50%;
    top: 24px;
    right: auto;
    bottom: auto;
    transform: translateX(-50%) translateY(-12px);
    z-index: 1200;
    width: auto;
    min-width: 280px;
    max-width: min(92vw, 420px);
    padding: 14px 16px;
    border-radius: 10px;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.tienda-share-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.tienda-share-toast[data-tone="warning"] {
    background: #92400e;
}

.tienda-share-toast[data-tone="neutral"] {
    background: #334155;
    font-weight: 500;
    word-break: break-word;
}

@media (max-width: 480px) {
    .tienda-share-toast {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        width: calc(100vw - 32px);
        min-width: 0;
        max-width: calc(100vw - 32px);
        padding: 12px 14px;
        font-size: 0.84rem;
        transform: translate(-50%, -50%);
    }

    .tienda-share-toast.is-visible {
        transform: translate(-50%, -50%);
    }
}

/* =========================================================
   DETALLE PRODUCTO
   ========================================================= */

.detalle-producto-page {
    background: #ffffff;
}

.detalle-producto-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 16px 28px;
}

.detalle-producto-header-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 14px;
}

.detalle-producto-volver {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #334155;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
}

.detalle-producto-volver:hover {
    color: #0f172a;
    text-decoration: underline;
}

.detalle-producto-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e9edf3;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.detalle-producto-media {
    min-width: 0;
}

.detalle-producto-imagen-wrap {
    position: relative;
    background: #f8fafc;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.detalle-producto-imagen-wrap .producto-badge-oferta {
    top: 10px;
    left: 10px;
}

.detalle-producto-imagen {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detalle-producto-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
}

.detalle-producto-categoria {
    margin: 0;
    color: #667085;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detalle-producto-nombre {
    margin: 0;
    color: #111827;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    text-wrap: balance;
}

.detalle-producto-descripcion {
    color: #475467;
}

.detalle-producto-descripcion p {
    margin: 0;
    font-size: 0.96rem;
    line-height: 1.6;
}

.detalle-producto-precio-box {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-top: 2px;
}

.detalle-producto-precio-box .producto-precio-wrap {
    justify-content: flex-start;
    gap: 8px;
}

.detalle-producto-precio-box .producto-precio-original {
    text-align: left;
    font-size: 0.95rem;
    top: 0;
}

.detalle-producto-precio-box .producto-precio {
    text-align: left;
    font-size: 1.35rem;
}

.detalle-producto-acciones {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
}

.detalle-producto-acciones .btn-detalle-producto,
.detalle-producto-acciones .btn-agregar-carrito {
    width: 100%;
    min-height: 44px;
}

@media (min-width: 768px) {
    .detalle-producto-container {
        padding: 22px 20px 32px;
    }

    .detalle-producto-header-nav {
        margin-bottom: 16px;
    }

    .detalle-producto-volver {
        font-size: 0.92rem;
    }

    .detalle-producto-card {
        gap: 0;
    }

    .detalle-producto-info {
        padding: 20px;
        gap: 16px;
    }

    .detalle-producto-categoria {
        font-size: 0.84rem;
    }

    .detalle-producto-nombre {
        font-size: 1.85rem;
    }

    .detalle-producto-descripcion p {
        font-size: 1rem;
    }

    .detalle-producto-precio-box .producto-precio-original {
        font-size: 1rem;
    }

    .detalle-producto-precio-box .producto-precio {
        font-size: 1.52rem;
    }

    .detalle-producto-acciones .btn-detalle-producto,
    .detalle-producto-acciones .btn-agregar-carrito {
        min-height: 46px;
        font-size: 0.92rem;
    }
}

@media (min-width: 1024px) {
    .detalle-producto-container {
        padding: 26px 24px 36px;
    }

    .detalle-producto-card {
        grid-template-columns: minmax(0, 540px) minmax(0, 1fr);
        align-items: stretch;
    }

    .detalle-producto-info {
        padding: 28px;
        gap: 10px;
    }

    .detalle-producto-nombre {
        font-size: 2.1rem;
    }

    .detalle-producto-descripcion p {
        font-size: 1rem;
        line-height: 1.7;
        max-width: 760px;
    }

    .detalle-producto-precio-box .producto-precio-wrap {
        gap: 10px;
    }

    .detalle-producto-precio-box .producto-precio-original {
        font-size: 1rem;
    }

    .detalle-producto-precio-box .producto-precio {
        font-size: 1.72rem;
    }

    .detalle-producto-acciones {
        max-width: 340px;
    }

}

@media (max-width: 480px) {
    .detalle-producto-container {
        padding: 16px 14px 24px;
    }

    .detalle-producto-header-nav {
        margin-bottom: 12px;
    }

    .detalle-producto-volver {
        font-size: 0.84rem;
    }

    .detalle-producto-card {
        gap: 14px;
    }

    .detalle-producto-info {
        padding: 14px;
        gap: 12px;
    }

    .detalle-producto-categoria {
        font-size: 0.76rem;
    }

    .detalle-producto-nombre {
        font-size: 1.24rem;
    }

    .detalle-producto-descripcion p {
        font-size: 0.92rem;
    }

    .detalle-producto-precio-box .producto-precio-wrap {
        gap: 6px;
    }

    .detalle-producto-precio-box .producto-precio-original {
        font-size: 0.82rem;
    }

    .detalle-producto-precio-box .producto-precio {
        font-size: 1.12rem;
    }

    .detalle-producto-acciones .btn-detalle-producto,
    .detalle-producto-acciones .btn-agregar-carrito {
        min-height: 42px;
        font-size: 0.88rem;
    }

}

/* =========================================================
   FIX FINAL HEADER PRINCIPAL
   ========================================================= */

@media (min-width: 1024px) {
    .tienda-datos {
        align-items: flex-start;
    }

    .tienda-meta {
        width: auto;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
    }
}

@media (max-width: 1023px) {
    .tienda-acciones {
        display: none;
    }
}

@media (max-width: 1023px) {
    .tienda-meta {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap;
        width: 100%;
    }

    .badge-estado {
        min-height: 36px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .tienda-meta {
        gap: 6px;
    }

    .badge-estado {
        min-height: 34px;
        font-size: 0.74rem;
    }
}

/* =========================================
   MODAL DIRECCION - FINAL MOBILE FIRST
   ========================================= */

.direccion-modal {
    position: fixed;
    inset: 0;
    z-index: 6000;
    display: none;
}

.direccion-modal.is-open {
    display: block;
}

.direccion-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.64);
}

.direccion-modal-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;

    width: 100%;
    max-width: 100%;
    min-height: 82vh;
    max-height: 92vh;
    overflow-y: auto;

    background: #ffffff;
    border-radius: 4px 4px 0 0;
    padding: 16px 14px 18px;
    box-shadow: 0 -16px 40px rgba(15, 23, 42, 0.24);
}

.direccion-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.direccion-modal-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.15;
}

.direccion-modal-header button {
    width: 36px;
    height: 36px;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    background: #ffffff;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    flex: 0 0 36px;
}

.direccion-texto {
    margin: 0 0 14px;
    color: #667085;
    font-size: 0.88rem;
    line-height: 1.45;
}

.js-direccion-modal-copy {
    text-align: justify;
}

.js-tipo-pago-modal-copy {
    text-align: justify;
}

.direccion-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.direccion-form input,
.direccion-form select {
    width: 100%;
    height: 44px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.92rem;
    line-height: 1.2;
    box-shadow: none;
}

.direccion-form input::placeholder {
    color: #98a2b3;
}

.direccion-form input:focus,
.direccion-form select:focus {
    outline: none;
    border-color: #0b1220;
}

.direccion-form .btn-whatsapp {
    height: 46px;
    min-height: 46px;
    margin-top: 4px;
    border-radius: 4px;
    font-size: 0.92rem;
    font-weight: 700;
}

.identificacion-whatsapp-field {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.identificacion-whatsapp-prefijo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    min-height: 44px;
    border: 1px solid #d0d5dd;
    border-right: 0;
    border-radius: 4px 0 0 4px;
    background: #f1f5f9;
    color: #475467;
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
}

.identificacion-whatsapp-field .js-identificacion-whatsapp-input {
    border-radius: 0 4px 4px 0;
}

.identificacion-whatsapp-ejemplo {
    margin: -2px 0 0;
    color: #98a2b3;
    font-size: 0.78rem;
    line-height: 1.3;
}

.identificacion-whatsapp-ejemplo:empty {
    display: none;
}

/* TABLET */
@media (min-width: 768px) {
    .direccion-modal-panel {
        left: 50%;
        right: auto;
        top: 50%;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: min(92vw, 440px);
        max-width: 440px;
        min-height: auto;
        max-height: 85vh;
        border-radius: 4px;
        padding: 18px 18px 20px;
    }

    .direccion-modal-header h2 {
        font-size: 1.08rem;
    }

    .direccion-form input,
    .direccion-form select {
        height: 46px;
        min-height: 46px;
        font-size: 0.95rem;
    }

    .direccion-form .btn-whatsapp {
        height: 48px;
        min-height: 48px;
        font-size: 0.95rem;
    }
}

/* DESKTOP */
@media (min-width: 1024px) {
    .direccion-modal-panel {
        width: min(90vw, 460px);
        max-width: 460px;
    }
}

/* MOBILE PRIORIDAD REAL */
@media (max-width: 767px) {
    .cart-drawer.has-direccion-modal-open .cart-drawer-panel {
        transform: translateX(100%);
    }

    .cart-drawer.has-direccion-modal-open .cart-drawer-overlay {
        background: rgba(15, 23, 42, 0.64);
    }

    .direccion-modal-panel {
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;

        width: 100%;
        max-width: 100%;
        min-height: 100dvh;
        max-height: 100dvh;

        border-radius: 0;
        padding: 16px 14px 18px;
    }

    .direccion-modal-header {
        margin-bottom: 16px;
    }

    .direccion-modal-header h2 {
        font-size: 1.02rem;
    }

    .direccion-texto {
        font-size: 0.9rem;
        margin-bottom: 14px;
    }

    .direccion-form {
        gap: 12px;
    }

    .direccion-form input,
    .direccion-form select {
        height: 46px;
        min-height: 46px;
        font-size: 0.94rem;
    }

    .direccion-form .btn-whatsapp {
        height: 48px;
        min-height: 48px;
        font-size: 0.94rem;
        margin-top: 6px;
    }
}


/* =========================================================
   AJUSTES CONSOLIDADOS CATALOGO
   - Base única para Oferta y Más vendido
   - Corrección de sintaxis sin romper lo demás
   ========================================================= */

.tienda-nombre {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.producto-badge-oferta,
.producto-badge-mas-vendido,
.producto-badge-vendido-hoy,
.producto-badge-sin-stock {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    box-shadow: none;
    border: 0;
}

.producto-badge-oferta {
    top: 10px;
    left: 10px;
    background: #53D189;
    color: #ffffff;
}

.producto-badge-sin-stock {
    top: 10px;
    left: 10px;
    background: #475467;
    color: #ffffff;
}

.producto-badge-mas-vendido,
.producto-badge-vendido-hoy {
    right: 10px;
    bottom: 10px;
    color: #ffffff;
}

.producto-badge-mas-vendido {
    background: #3C88F9;
}

.producto-badge-vendido-hoy {
    background: #FABD23;
}

.producto-nombre {
    color: #344054;
    font-weight: 400;
}

.producto-precio-original {
    color: #98a2b3;
    font-weight: 400;
}

.producto-precio {
    color: #101828;
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.producto-precio.oferta {
    color: #2c8f5a;
    font-weight: 600;
}

.tienda-main > .contenedor {
    padding-left: 12px;
    padding-right: 12px;
}

.producto-acciones {
    margin-left: -10px;
    margin-right: -10px;
    margin-bottom: -11px;
}

.detalle-producto-imagen-wrap .producto-badge-oferta {
    top: 10px;
    left: 10px;
}

@media (max-width: 767px) {
    .tienda-main > .contenedor {
        padding: 2px 4px 22px;
    }

    .producto-badge-oferta,
    .producto-badge-mas-vendido,
    .producto-badge-vendido-hoy {
        height: 24px;
        padding: 0 8px;
        font-size: 10px;
    }

    .producto-badge-oferta {
        top: 8px;
        left: 8px;
    }

    .producto-badge-mas-vendido,
    .producto-badge-vendido-hoy {
        right: 8px;
        bottom: 8px;
    }

    .producto-nombre {
        font-size: 0.78rem;
        font-weight: 400;
        line-height: 1.22;
        letter-spacing: -0.006em;
    }

    .producto-precio-wrap {
        justify-content: flex-end;
        gap: 3px 5px;
    }

    .producto-precio-original {
        text-align: right;
        font-size: 0.68rem;
    }

    .producto-precio,
    .producto-footer > .producto-precio {
        text-align: right;
        font-size: 0.94rem;
        font-weight: 400;
    }

    .btn-agregar-carrito {
        font-weight: 600;
    }

    .producto-acciones {
        margin-left: -8px;
        margin-right: -8px;
        margin-bottom: -9px;
    }

    .detalle-producto-imagen-wrap .producto-badge-oferta {
        top: 8px;
        left: 8px;
    }
}

@media (max-width: 480px) {
    .tienda-nombre {
        font-size: 1.38rem;
        font-weight: 700;
        line-height: 1.08;
    }

    .tienda-main > .contenedor {
        padding: 0 4px 22px;
    }

    .producto-badge-oferta,
    .producto-badge-mas-vendido,
    .producto-badge-vendido-hoy {
        height: 22px;
        padding: 0 7px;
        font-size: 9.5px;
    }

    .producto-badge-oferta {
        top: 6px;
        left: 6px;
    }

    .producto-badge-mas-vendido,
    .producto-badge-vendido-hoy {
        right: 6px;
        bottom: 6px;
    }
}


/* =========================================================
   DIRECCIONES GUARDADAS
   - efecto línea lateral en mobile
   ========================================================= */

.direccion-card {
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
    background: #ffffff;
    overflow: hidden;
}

.direccion-card-badge {
    font-size: 0.78rem;
    color: #12a150;
    font-weight: 700;
    margin-bottom: 6px;
}

.direccion-card-titulo {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
    line-height: 1.3;
}

.direccion-card-direccion {
    font-size: 0.88rem;
    color: #0f172a;
    line-height: 1.35;
}

.direccion-card-referencia {
    font-size: 0.82rem;
    color: #667085;
    margin-top: 4px;
    line-height: 1.35;
}

@media (max-width: 767px) {
    .direccion-card-mobile-line {
        padding-left: 14px;
        border-radius: 4px;
        box-shadow: none;
    }

    .direccion-card-mobile-line::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 4px;
        border-radius: 0;
        background: linear-gradient(180deg, #3C88F9 0%, #53D189 100%);
    }

    .direccion-card-mobile-line.is-principal::before {
        background: linear-gradient(180deg, #3C88F9 0%, #53D189 100%);
    }

    .direccion-card {
        margin-bottom: 12px;
    }
}

/* =========================================
   SERVICIOS ACTIVOS HEADER TIENDA
   ========================================= */
.tienda-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.tienda-meta::-webkit-scrollbar {
    display: none;
}

.tienda-servicios {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    flex: 0 0 auto;
}

.tienda-servicios:empty {
    display: none;
}

.tienda-servicio-chip {
    width: 34px;
    min-width: 34px;
    height: 34px;
    border: 1px solid var(--tienda-color, #0b1220);
    border-radius: 4px;
    background: var(--tienda-color, #0b1220);
    color: var(--tienda-color-texto, #ffffff);

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

    cursor: default;
    pointer-events: none;

    transform: none !important;
    box-shadow: none !important;
}

.tienda-servicio-chip:hover,
.tienda-servicio-chip:focus,
.tienda-servicio-chip:active,
.tienda-servicio-chip:focus-visible {
    background: var(--tienda-color-hover, #111827) !important;
    color: var(--tienda-color-texto, #ffffff) !important;
    border-color: var(--tienda-color-hover, #111827) !important;
    transform: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.tienda-servicio-chip svg {
    width: 18px;
    height: 18px;
    display: block;
    flex: 0 0 auto;
}

.tienda-servicio-chip svg * {
    stroke-width: 2.2;
}

@media (min-width: 1024px) {
    .tienda-meta {
        justify-content: flex-start;
        gap: 8px;
        width: auto;
        overflow: visible;
    }

    .tienda-servicios {
        gap: 6px;
    }

    .tienda-servicio-chip {
        width: 32px;
        min-width: 32px;
        height: 32px;
    }

    .tienda-servicio-chip svg {
        width: 17px;
        height: 17px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .tienda-meta {
        justify-content: center;
        gap: 6px;
    }

    .tienda-servicio-chip {
        width: 34px;
        min-width: 34px;
        height: 34px;
    }

    .tienda-servicio-chip svg {
        width: 17px;
        height: 17px;
    }
}

@media (max-width: 767px) {
    .tienda-meta {
        justify-content: center;
        gap: 6px;
        padding-bottom: 2px;
    }

    .tienda-servicios {
        gap: 5px;
    }

    .tienda-servicio-chip {
        width: 32px;
        min-width: 32px;
        height: 32px;
    }

    .tienda-servicio-chip svg {
        width: 17px;
        height: 17px;
    }
}

@media (max-width: 480px) {
    .tienda-meta {
        gap: 5px;
        padding-inline: 2px;
    }

    .badge-estado {
        min-height: 32px;
        padding: 6px 10px;
        border-radius: 4px;
        font-size: 0.76rem;
    }

    .tienda-servicio-chip {
        width: 30px;
        min-width: 30px;
        height: 30px;
    }

    .tienda-servicio-chip svg {
        width: 16px;
        height: 16px;
    }
}

/* =========================================
   AJUSTE FINAL BADGE ABIERTO
   - más limpio
   - más premium
   - alineado con chips negros
   ========================================= */

.badge-estado {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: -0.01em;
    box-shadow: none;
}

.badge-abierta {
    background: #eaf8ef;
    color: #0f9f4a;
    border: 1px solid #c7e8d3;
}

.badge-cerrada {
    background: #fef2f2;
    color: #b42318;
    border: 1px solid #fecdca;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #12a150;
    flex: 0 0 8px;
}

/*
 * Chip "★ 4.8" de calificación de la tienda — mismo criterio que
 * .badge-estado (chip con ícono + texto, 34px, radio 4px, ver
 * memoria de diseño: todas las esquinas de Somos Emprende son 4px,
 * nunca píldora/círculo completo). Solo se muestra si la tienda ya
 * tiene al menos una calificación (ver total_calificaciones en
 * tienda/servicios_publicos_tienda.py:_contexto_base_tienda) — antes
 * de eso mostrar "0.0 ★" se ve peor que no mostrar nada. Es un link
 * a la página pública de reseñas (tienda/views.py:resenas_tienda).
 * Fondo blanco, ícono amarillo/dorado (el color "de estrella"
 * clásico, a pedido del usuario -se probó celeste primero y no
 * convenció-), texto en gris oscuro neutro (nunca amarillo, eso sí
 * se pidió explícitamente que no fuera amarillo). Ícono más grande
 * que el resto de los chips (22px vs. 14-17px) porque es el elemento
 * que más se quiere destacar de esa fila.
 */
.badge-calificacion {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: -0.01em;

    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;

    text-decoration: none;
    cursor: pointer;
}

.badge-calificacion:hover {
    background: #f8fafc;
    color: #0f172a;
    text-decoration: none;
}

.badge-calificacion svg {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    color: #f5b100;
}

@media (min-width: 1024px) {
    .badge-calificacion {
        min-height: 32px;
        padding: 0 11px;
        font-size: 0.74rem;
        gap: 5px;
    }

    .badge-calificacion svg {
        width: 20px;
        height: 20px;
        flex: 0 0 20px;
    }
}

/* desktop */
@media (min-width: 1024px) {
    .badge-estado {
        min-height: 32px;
        padding: 0 11px;
        border-radius: 4px;
        font-size: 0.74rem;
        gap: 6px;
    }

    .badge-dot {
        width: 7px;
        height: 7px;
        flex: 0 0 7px;
    }
}

/* tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .badge-estado {
        min-height: 34px;
        padding: 0 12px;
        font-size: 0.78rem;
        gap: 7px;
    }

    .badge-dot {
        width: 8px;
        height: 8px;
        flex: 0 0 8px;
    }
}

/* mobile */
@media (max-width: 767px) {
    .badge-estado {
        min-height: 34px;
        padding: 0 11px;
        font-size: 0.76rem;
        gap: 6px;
    }

    .badge-dot {
        width: 8px;
        height: 8px;
        flex: 0 0 8px;
    }
}

/* mobile pequeño */
@media (max-width: 480px) {
    .badge-estado {
        min-height: 32px;
        padding: 0 10px;
        font-size: 0.74rem;
        gap: 6px;
    }

    .badge-dot {
        width: 7px;
        height: 7px;
        flex: 0 0 7px;
    }
}

@media (max-width: 767px) {
    .detalle-producto-acciones {
        margin-left: -16px;
        margin-right: -16px;
        margin-bottom: -16px;
    }
}

@media (max-width: 480px) {
    .detalle-producto-acciones {
        margin-left: -14px;
        margin-right: -14px;
        margin-bottom: -14px;
    }
}
.tienda-logo-link {
    text-decoration: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
  
    user-select: none;
    -webkit-user-select: none;
}

.tienda-logo-link:focus,
.tienda-logo-link:active,
.tienda-logo-link:focus-visible {
    outline: none;
    box-shadow: none;
    background: transparent;
}

.tienda-logo-link .tienda-logo,
.tienda-logo-link .tienda-logo-placeholder {
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.mobile-menu-link,
.tienda-categoria-link {
    font-weight: 600;
}

.mobile-menu-link-vuelve-a-pedir,
.tienda-categoria-link-vuelve-a-pedir {
    opacity: 0.92;
}

.vuelve-pedir-menu-desktop {
    display: none;
}

@media (min-width: 768px) {
    .vuelve-pedir-menu-desktop {
        display: block;
    }
}
.vuelve-pedir-menu-desktop {
    display: none;
}

@media (min-width: 768px) {
    .vuelve-pedir-menu-desktop {
        display: block;
    }
}

.vuelve-pedir-mensaje-title {
    margin: 4px 0 0;
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 600;
    color: #0f172a;
}

.vuelve-pedir-mensaje-title strong {
    font-weight: 700;
}

@media (max-width: 767px) {
    .vuelve-pedir-mensaje-title {
        font-size: 0.98rem;
        line-height: 1.35;
    }
}


@media (min-width: 1024px) {
    .tienda-categorias-barra {
        min-height: 44px;
        padding: 4px 0 6px;
    }

    .categoria-bloque {
        padding: 8px 0 10px;
    }

    .categoria-bloque + .categoria-bloque {
        padding-top: 22px;
    }
}


/* =========================================================
   BARRA INFERIOR DE CATEGORÍAS
   Primera etapa: solo mobile y tablet
   No elimina todavía el menú hamburguesa
   ========================================================= */

@media (max-width: 1023px) {
    :root {
        --categorias-bottom-height: 72px;
    }

    .tienda-categorias-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1100;

        width: 100%;
        min-height: var(--categorias-bottom-height);

        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid #dfe5ec;
        border-bottom: 0;

        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);

        padding-bottom: env(safe-area-inset-bottom);

        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .tienda-categorias-nav .contenedor {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 8px 10px;
    }

    .tienda-categorias-barra {
        display: flex;
        align-items: center;
        justify-content: flex-start;

        gap: 8px;

        width: 100%;
        min-height: 54px;

        overflow-x: auto;
        overflow-y: hidden;

        scroll-behavior: smooth;
        scroll-snap-type: x proximity;

        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tienda-categorias-barra::-webkit-scrollbar {
        display: none;
    }

    .tienda-categoria-link {
        flex: 0 0 auto;

        min-height: 46px;
        max-width: 170px;

        padding: 0 16px;

        border: 1px solid #d7dde6;
        border-radius: 4px;

        background: #ffffff;
        color: #475467;

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

        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;

        font-size: 0.78rem;
        font-weight: 700;
        line-height: 1;

        scroll-snap-align: start;

        transition:
            background-color 0.18s ease,
            border-color 0.18s ease,
            color 0.18s ease,
            transform 0.18s ease;
    }

    .tienda-categoria-link:active {
        transform: scale(0.98);
    }

    .tienda-categoria-link.is-active {
        background: var(--tienda-color, #0b1220);
        border-color: var(--tienda-color, #0b1220);
        color: var(--tienda-color-texto, #ffffff);
    }

    .tienda-categoria-link-vuelve-a-pedir {
        border-color: #3c88f9;
        color: #2569c8;
    }

    .tienda-categoria-link-vuelve-a-pedir.is-active {
        background: var(--tienda-color, #0b1220);
        border-color: var(--tienda-color, #0b1220);
        color: var(--tienda-color-texto, #ffffff);
    }

    /*
       El carrito queda por encima de la nueva barra.
       Todavía no modificamos su funcionamiento.
    */
    .floating-cart {
        bottom: calc(
            var(--categorias-bottom-height) +
            env(safe-area-inset-bottom) +
            12px
        );
    }

    /*
       Espacio inferior para que el footer no quede oculto detrás de
       la barra fija -solo en las páginas que en verdad la tienen
       (selector de hermano: la barra siempre viene antes que el
       footer en el HTML). Es PADDING (no margin) para que quede
       DENTRO de la caja del footer, pintado con su mismo fondo
       oscuro (#0b1220) -con margin se veía como un hueco en blanco
       separado del footer-. Se probó sacar este espacio del todo y
       dejar que la barra flote directo sobre el footer, pero se veía
       peor -decisión del usuario: volver a este comportamiento-.
    */
    .tienda-categorias-nav ~ .tienda-footer {
        padding-bottom: calc(
            var(--categorias-bottom-height) +
            env(safe-area-inset-bottom)
        );
    }
}

/* =========================================================
   BOTÓN FLOTANTE: VUELVE A PEDIR
   - Tratamiento "secundario/ghost" a propósito: el carrito
     (.floating-cart) es la acción principal -sólida, oscura-;
     este es un recordatorio, no una segunda alarma compitiendo
     por atención. Fondo claro, borde fino, ícono en el celeste
     de marca -mismo criterio de jerarquía que ya usa el resto
     del sitio (botón primario vs. secundario)-.
   ========================================================= */

.vuelve-pedir-floating {
    position: fixed;
    left: 16px;
    bottom: 18px;
    z-index: 1190;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    height: 46px;
    max-width: calc(100vw - 32px);
    padding: 0 16px 0 12px;

    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #ffffff;
    color: #334155;

    text-decoration: none;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);

    cursor: pointer;
    -webkit-tap-highlight-color: transparent;

    animation: vuelvePedirEntrada 0.4s ease-out;

    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.vuelve-pedir-floating:hover {
    color: #334155;
    text-decoration: none;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

.vuelve-pedir-floating:active {
    transform: scale(0.98);
}

.vuelve-pedir-floating:focus-visible {
    outline: 3px solid rgba(60, 136, 249, 0.35);
    outline-offset: 3px;
}

.vuelve-pedir-floating-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #3C88F9;
}

.vuelve-pedir-floating-icono svg {
    width: 18px;
    height: 18px;
}

.vuelve-pedir-floating-texto {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.vuelve-pedir-floating-preview {
    cursor: default;
    opacity: 0.7;
    pointer-events: none;
}

/*
 * Se oculta mientras el visitante scrollea hacia abajo (navegando
 * el catálogo) y reaparece al scrollear hacia arriba o cerca del
 * tope -mismo criterio que .floating-cart ya usa (ver el script
 * al final de tienda.html)-. Reduce
 * la cantidad de elementos flotantes compitiendo abajo en mobile
 * mientras el usuario está activamente mirando productos.
 */
.vuelve-pedir-floating.is-scroll-hidden {
    opacity: 0;
    transform: translateY(12px) scale(0.94);
    pointer-events: none;
}

@keyframes vuelvePedirEntrada {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.94);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .vuelve-pedir-floating {
        animation: none;
    }

    .cart-direccion-label--alerta,
    .cart-payment-label--alerta {
        animation: none;
        color: #dc2626;
    }
}

@media (max-width: 1023px) {
    .vuelve-pedir-floating {
        left: 12px;
        bottom: calc(
            var(--categorias-bottom-height) +
            env(safe-area-inset-bottom) +
            12px
        );

        height: 44px;
        max-width: calc(100vw - 88px);
        padding: 0 14px 0 10px;
    }

    .vuelve-pedir-floating-texto {
        font-size: 0.78rem;
    }
}

@media (max-width: 480px) {
    .vuelve-pedir-floating {
        left: 10px;
        height: 42px;
        max-width: calc(100vw - 78px);
        padding: 0 12px 0 9px;
    }

    .vuelve-pedir-floating-texto {
        font-size: 0.74rem;
    }
}

/* =========================================================
   ESTADO VACÍO: "SIN PRODUCTOS"
   - Usado en tienda.html (catálogo sin productos publicados)
     y vuelve_pedir.html (sin compras anteriores). No tenía
     ninguna regla propia -el h2/p quedaban con el tamaño por
     defecto del navegador, mucho más grande que el resto del
     sitio, sobre todo notorio en vuelve_pedir.html donde es
     casi el único texto de la página-.
   ========================================================= */

.sin-productos {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 48px 20px;
}

.sin-productos-icono {
    font-size: 2.4rem;
    line-height: 1;
    margin-bottom: 4px;
}

.sin-productos-titulo {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

.sin-productos-texto {
    margin: 0;
    max-width: 420px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #64748b;
}

@media (max-width: 480px) {
    .sin-productos {
        padding: 36px 16px;
    }

    .sin-productos-icono {
        font-size: 2rem;
    }

    .sin-productos-titulo {
        font-size: 1rem;
    }

    .sin-productos-texto {
        font-size: 0.85rem;
    }
}

/* =========================================================
   MENSAJE DE RECOMENDACIONES ("También te puede interesar" /
   "Vuelve a pedir")
   - Antes solo tenía un style="font-size: 16px" inline en
     detalle_producto.html y vuelve_pedir.html, fijo en los dos
     -no se achicaba en mobile como el resto del texto del
     sitio, así que se notaba desproporcionado, sobre todo en
     vuelve_pedir.html (ahí es el texto principal de la página,
     no uno más entre muchos otros elementos).
   ========================================================= */

.detalle-recomendaciones-mensaje {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: #0f172a;
}

@media (max-width: 480px) {
    .detalle-recomendaciones-mensaje {
        font-size: 0.88rem;
    }
}

/* =========================================================
   RECOMENDACIONES DEL DETALLE (detalle_producto.html)
   Carrusel horizontal tipo app en el celular: tarjetas que se
   ajustan al deslizar y un pedazo de la siguiente a la vista para
   invitar a deslizar. En escritorio, grilla de 4. El mensaje de
   arriba es la burbuja compartida .mensaje-tienda
   (tienda_compra.css), igual que en los modales.
   ========================================================= */

/* Misma tarjeta que el producto de arriba (.detalle-producto-card):
   la sección se ve contenida y no suelta sobre el fondo. */
.detalle-recomendaciones--carrusel {
    --carrusel-borde: 16px;
    margin-top: 14px;
    padding: 16px var(--carrusel-borde) 4px;
    background: #ffffff;
    border: 1px solid #e9edf3;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.detalle-recomendaciones-carrusel {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 34%;
    gap: 10px;
    margin-inline: calc(-1 * var(--carrusel-borde));
    margin-bottom: 0;
    padding: 2px var(--carrusel-borde) 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--carrusel-borde);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.detalle-recomendaciones-carrusel::-webkit-scrollbar {
    display: none;
}

/* Tarjeta estilo app de delivery: sin marco, foto con esquinas,
   texto a la izquierda y un botón suave en vez del bloque negro. */
.detalle-recomendaciones-carrusel .producto-card {
    scroll-snap-align: start;
    border: 0;
    background: transparent;
    overflow: visible;
}

.detalle-recomendaciones-carrusel .producto-imagen-wrap {
    border-radius: 4px;
}

.detalle-recomendaciones-carrusel .producto-body {
    padding: 8px 0 0;
}

.detalle-recomendaciones-carrusel .producto-top {
    min-height: 0;
    margin-bottom: 4px;
}

.detalle-recomendaciones-carrusel .producto-nombre {
    text-align: left;
    font-size: 0.8rem;
    font-weight: 500;
    color: #344054;
    text-wrap: pretty;
}

.detalle-recomendaciones-carrusel .producto-footer {
    gap: 8px;
}

.detalle-recomendaciones-carrusel .producto-footer > .producto-precio,
.detalle-recomendaciones-carrusel .producto-precio-wrap {
    justify-content: flex-start;
}

.detalle-recomendaciones-carrusel .producto-precio {
    text-align: left;
    font-size: 0.88rem;
    font-weight: 600;
}

.detalle-recomendaciones-carrusel .producto-acciones {
    margin: 0;
}

.detalle-recomendaciones-carrusel .btn-agregar-carrito {
    min-height: 32px;
    padding: 0 8px;
    font-size: 0.76rem;
    font-weight: 600;
    background: #f1f5f9;
    background: color-mix(in srgb, var(--tienda-color, #0b1220) 8%, #ffffff);
    color: var(--tienda-color, #0b1220);
    border: 0;
}

.detalle-recomendaciones-carrusel .btn-agregar-carrito:hover {
    background: color-mix(in srgb, var(--tienda-color, #0b1220) 14%, #ffffff);
    transform: none;
}

@media (max-width: 480px) {
    .detalle-recomendaciones--carrusel {
        --carrusel-borde: 14px;
    }
}

@media (min-width: 768px) {
    .detalle-recomendaciones--carrusel {
        --carrusel-borde: 20px;
        padding-bottom: 20px;
    }

    .detalle-recomendaciones-carrusel {
        grid-auto-flow: row;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
        margin-inline: 0;
        padding: 0;
        overflow: visible;
    }

    .detalle-recomendaciones-carrusel .producto-nombre {
        font-size: inherit;
    }
}

/* =========================================================
   PÁGINA PÚBLICA DE RESEÑAS (tienda/views.py:resenas_tienda)
   Tarjeta de reseña (estrellas + comentario + autor). Radio 4px
   en todo -ver memoria de diseño de esquinas-.
   ========================================================= */

.resenas-page {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 22px 16px 36px;
}

.resenas-resumen {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    margin-bottom: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.resenas-resumen-estrella {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    color: #f5b100;
}

.resenas-resumen-estrella svg {
    width: 100%;
    height: 100%;
}

.resenas-resumen-numero {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
}

.resenas-resumen-texto {
    margin: 2px 0 0;
    font-size: 0.88rem;
    color: #64748b;
}

.resenas-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.resena-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resena-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.resenas-estrellas {
    display: inline-flex;
    gap: 2px;
}

.resenas-estrellas svg {
    width: 16px;
    height: 16px;
}

.resena-card-fecha {
    font-size: 0.78rem;
    color: #94a3b8;
    white-space: nowrap;
}

.resena-card-comentario {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #334155;
}

.resena-card-autor {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
}

.resenas-paginacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 20px;
    font-size: 0.86rem;
}

.resenas-paginacion-link {
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
}

.resenas-paginacion-link:hover {
    text-decoration: underline;
}

.resenas-paginacion-actual {
    color: #64748b;
}

@media (min-width: 768px) {
    .resenas-page {
        padding: 26px 20px 42px;
    }
}

@media (max-width: 480px) {
    .resenas-page {
        padding: 18px 14px 30px;
    }

    .resenas-resumen {
        padding: 14px;
        gap: 10px;
    }

    .resenas-resumen-estrella {
        width: 34px;
        height: 34px;
    }

    .resenas-resumen-numero {
        font-size: 1.06rem;
    }

    .resena-card {
        padding: 14px;
    }
}


/* =========================================================
   AJUSTE FINAL — ALINEACIÓN DE PRECIO Y BOTONES
   - Mantiene todos los botones a la misma altura
   - Iguala el espacio de "Precio a cotizar" con el precio normal
   - Funciona en PC, tablet y móvil
   ========================================================= */

.producto-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.producto-footer {
    margin-top: auto;
}

.producto-footer > .producto-precio,
.producto-footer > .producto-precio-wrap {
    min-height: 20px;
}

.producto-footer > .producto-precio {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

@media (max-width: 767px) {
    .producto-footer > .producto-precio,
    .producto-footer > .producto-precio-wrap {
        min-height: 18px;
    }
}

/*
 * Calificación como último botón de la fila de servicios
 * (tienda/_calificacion_servicios.html) -a pedido del usuario: "que todo
 * quede en una sola línea"-. Mismo alto y estilo oscuro que los botones
 * de servicios; se distingue por la estrella amarilla y la flecha.
 */
.tienda-servicio-calificacion {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    height: 34px;
    padding: 0 8px 0 7px;
    border: 1px solid var(--tienda-color, #0b1220);
    border-radius: 4px;
    background: var(--tienda-color, #0b1220);
    color: var(--tienda-color-texto, #ffffff);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: transform 0.1s ease;
}

/* Área táctil más grande que el botón, sin ocupar espacio. */
.tienda-servicio-calificacion::before {
    content: "";
    position: absolute;
    inset: -6px -3px;
}

.tienda-servicio-calificacion:hover {
    color: #ffffff;
    text-decoration: none;
}

.tienda-servicio-calificacion:active {
    transform: scale(0.94);
}

.tienda-servicio-calificacion__estrella {
    width: 14px;
    height: 14px;
    color: #fbbf24;
}

.tienda-servicio-calificacion__flecha {
    width: 10px;
    height: 10px;
    margin-left: 1px;
    opacity: 0.7;
}

@media (min-width: 1024px) {
    .tienda-servicio-calificacion {
        height: 32px;
    }
}

@media (max-width: 767px) {
    .tienda-servicio-calificacion {
        height: 32px;
    }
}

/* Celular: mismo alto que los servicios (30px, ver tienda-app.css). */
@media (max-width: 480px) {
    .tienda-servicio-calificacion {
        height: 30px;
        padding: 0 6px 0 5px;
        gap: 3px;
        font-size: 0.7rem;
    }
}

/*
 * Movimiento que invita a tocar -a pedido del usuario: "no se sabe si
 * hay que darle clic"-: cada 4 s cruza un brillo por la etiqueta y la
 * estrella da un pequeño giro. Suave para no distraer; se apaga con
 * "reducir movimiento" del teléfono (la flecha queda como señal).
 */
@media (prefers-reduced-motion: no-preference) {
    /* El brillo se mueve dentro de la etiqueta (background-position):
       sin overflow: hidden, que recortaría el área táctil ampliada. */
    .tienda-servicio-calificacion::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: linear-gradient(
            100deg,
            rgba(255, 255, 255, 0) 35%,
            rgba(255, 255, 255, 0.38) 50%,
            rgba(255, 255, 255, 0) 65%
        );
        background-size: 300% 100%;
        background-position: 150% 0;
        animation: calificacionBrillo 4s ease-in-out infinite;
        pointer-events: none;
    }

    .tienda-servicio-calificacion__estrella {
        animation: calificacionEstrella 4s ease-in-out infinite;
    }
}

@keyframes calificacionBrillo {
    0%, 62% {
        background-position: 150% 0;
    }
    84%, 100% {
        background-position: -50% 0;
    }
}

@keyframes calificacionEstrella {
    0%, 60%, 100% {
        transform: rotate(0) scale(1);
    }
    68% {
        transform: rotate(-18deg) scale(1.2);
    }
    76% {
        transform: rotate(12deg) scale(1.1);
    }
    84% {
        transform: rotate(0) scale(1);
    }
}

@media (min-width: 1024px) {
    .tienda-nombre-row:has(.tienda-servicio-calificacion) {
        justify-content: flex-start;
    }
}

/*
 * Nombre y descripción de la tienda un poco más juntos -a pedido del
 * usuario, "disminuye más el espacio"-: la cabecera separa sus partes
 * con 8px; entre el nombre y la descripción casi no queda espacio. Aplica en todas las páginas con
 * cabecera (catálogo, detalle, Vuelve a pedir, Reseñas).
 */
.tienda-nombre-row + .tienda-descripcion {
    margin-top: -8px;
}

