/* ==========================================================
   Tema de MercOfertas (colores "Cosecha vibrante")
   Se carga despues de estilos.css: cabecera, portada, tarjetas,
   paginas internas y ajustes de color. Estilo sobrio: verde para
   las acciones, naranja solo para ofertas y casi sin movimiento.
   ========================================================== */

:root {
    --verde-degradado: linear-gradient(135deg, #2a9552 0%, #167a3e 55%, #0f4a30 100%);
    --naranja-degradado: linear-gradient(135deg, #f38a45 0%, #ef6c1a 50%, #dd5a10 100%);
    --oscuro: #0a2e1e;
    --alto-cabecera: 64px;
    --curva: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
    background-color: var(--arena);
    font-size: 0.95rem;
}
main {
    overflow-x: clip;
}

::selection {
    background-color: var(--amarillo);
    color: var(--texto);
}

:focus-visible {
    outline: 3px solid rgba(244, 185, 56, 0.9);
    outline-offset: 2px;
}

.saltar-contenido {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 2000;
    background: var(--texto);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
}
.saltar-contenido:focus {
    top: 12px;
}

/* ---------- Botones ---------- */

.btn {
    border-radius: 10px;
    font-weight: 600;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-sm {
    padding: 0.35rem 0.9rem;
}
.btn-success, .btn-primary {
    background: var(--verde-campo) !important;
    border-color: var(--verde-campo) !important;
}
.btn-success:hover, .btn-primary:hover {
    background: var(--verde-oscuro) !important;
    border-color: var(--verde-oscuro) !important;
}
.btn-warning {
    background-color: var(--amarillo) !important;
    border-color: var(--amarillo) !important;
    color: #3d2b05 !important;
}
.btn-warning:hover {
    background-color: #e0a526 !important;
    border-color: #e0a526 !important;
    color: #3d2b05 !important;
}
.btn-outline-secondary {
    border-color: var(--borde) !important;
    color: var(--texto) !important;
    background-color: #ffffff;
}
.btn-outline-secondary:hover {
    background-color: var(--verde-suave) !important;
    border-color: var(--verde-secundario) !important;
    color: var(--verde-oscuro) !important;
}

/* ---------- Cabecera ---------- */

.cabecera {
    position: sticky;
    top: 0;
    z-index: 1030;
    background-color: rgba(255, 255, 255, 0.86);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(231, 226, 216, 0.9);
    transition: box-shadow 0.3s ease, transform 0.35s var(--curva);
}
.cabecera.con-sombra {
    box-shadow: 0 10px 30px -18px rgba(28, 42, 33, 0.35);
}
.barra-superior {
    background-color: var(--oscuro);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.78rem;
    padding: 0.35rem 0;
}
.barra-superior a, .btn-enlace-superior {
    color: var(--amarillo);
    text-decoration: none;
    font-weight: 600;
    background: none;
    border: none;
    padding: 0;
}
.barra-superior a:hover, .btn-enlace-superior:hover {
    color: #ffffff;
}
.cabecera-principal {
    padding: 0.6rem 0;
}
.logo-marca .logo-icono {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--verde-degradado);
    box-shadow: 0 6px 14px -6px rgba(22, 122, 62, 0.7);
    color: #ffffff;
    font-size: 1.15rem;
}
.logo-texto {
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--texto);
    letter-spacing: -0.02em;
}
.logo-texto span {
    color: var(--verde-secundario);
}

.buscador {
    position: relative;
    align-items: center;
    max-width: 560px;
    background-color: #f4f1eb;
    border: 1.5px solid transparent;
    border-radius: 999px;
    padding: 0.2rem 0.25rem 0.2rem 2.6rem;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.25s ease;
}
.buscador:focus-within {
    background-color: #ffffff;
    border-color: var(--verde-secundario);
    box-shadow: 0 0 0 4px rgba(58, 168, 99, 0.15);
}
.buscador > .bi-search {
    position: absolute;
    left: 1rem;
    color: var(--texto-secundario);
}
.buscador input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    outline: none;
    padding: 0.45rem 0.5rem;
    font-size: 0.92rem;
    color: var(--texto);
}
.buscador .btn {
    padding: 0.4rem 1.1rem;
}
.buscador-movil {
    margin: 0.5rem 0.75rem 0;
    max-width: none;
}

.icono-cabecera {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    background-color: transparent;
    color: var(--texto);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s var(--curva);
}
.icono-cabecera:hover {
    background-color: var(--verde-suave);
    color: var(--verde-oscuro);
}
.contador-icono {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background-color: var(--ambar);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    font-style: normal;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}
.contador-icono.en-linea {
    position: static;
    margin-left: 0.3rem;
}
.contador-icono.rebote {
    animation: rebote 0.6s var(--curva);
}
@keyframes rebote {
    0% { transform: scale(1); }
    35% { transform: scale(1.5); }
    65% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.avatar-boton {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: none;
    background: none;
    padding: 2px;
    color: var(--texto-secundario);
}
.avatar-inicial {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--naranja-degradado);
    color: #ffffff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 4px var(--borde);
}
.menu-cuenta, .menu-categorias {
    border: 1px solid var(--borde);
    border-radius: 14px;
    box-shadow: 0 20px 40px -16px rgba(28, 42, 33, 0.3);
    padding: 0.4rem;
    min-width: 240px;
    animation: abrirMenu 0.22s var(--curva);
}
@keyframes abrirMenu {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to { opacity: 1; transform: none; }
}
.menu-cuenta .dropdown-item, .menu-categorias .dropdown-item {
    border-radius: 9px;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
}
.menu-cuenta .dropdown-item:hover, .menu-categorias .dropdown-item:hover {
    background-color: var(--verde-suave);
    color: var(--verde-oscuro);
}
.menu-categorias {
    columns: 2;
    min-width: 440px;
}
.enlace-ingresar {
    color: var(--texto) !important;
    text-decoration: none;
}

.cabecera-nav {
    border-top: 1px solid rgba(231, 226, 216, 0.9);
    transition: max-height 0.3s var(--curva), opacity 0.2s ease;
    max-height: 60px;
    overflow: visible;
}
.cabecera.compacta .cabecera-nav {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}
.enlace-nav {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.85rem;
    color: var(--texto);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    background: none;
    border: none;
}
.enlace-nav::after {
    content: "";
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.3rem;
    height: 2px;
    border-radius: 2px;
    background: var(--verde-secundario);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--curva);
}
.enlace-nav:hover, .enlace-nav.activo {
    color: var(--verde-oscuro);
}
.enlace-nav:hover::after, .enlace-nav.activo::after {
    transform: scaleX(1);
}

/* Menu lateral */
.menu-movil {
    background: linear-gradient(180deg, #0d3b26 0%, #0a2e1e 100%);
    color: #ffffff;
}
.menu-movil-enlaces a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.2s var(--curva);
}
.menu-movil-enlaces a:hover, .menu-movil-enlaces a.activo {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(4px);
}
.menu-movil-enlaces .bi {
    color: var(--amarillo);
    font-size: 1.1rem;
}

/* Barra inferior en el celular */
.barra-inferior {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--borde);
    padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px -16px rgba(28, 42, 33, 0.3);
}
.barra-inferior a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0.3rem 0;
    color: var(--texto-secundario);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 600;
}
.barra-inferior a .bi {
    font-size: 1.25rem;
    transition: transform 0.25s var(--curva);
}
.barra-inferior a.activo {
    color: var(--verde-campo);
}
.barra-inferior a.activo::before {
    content: "";
    position: absolute;
    top: -6px;
    width: 26px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background-color: var(--verde-secundario);
}
.barra-inferior .contador-icono {
    top: 0;
    right: calc(50% - 22px);
}
@media (max-width: 767.98px) {
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
    }
    .btn-subir {
        bottom: calc(76px + env(safe-area-inset-bottom));
    }
}

/* ---------- Tarjetas y contenedores ---------- */

.card, .caja-blanca, .bg-white.border {
    border-radius: var(--radio) !important;
}
.card {
    transition: transform 0.35s var(--curva), box-shadow 0.35s var(--curva), border-color 0.3s ease;
}
.card:hover {
    box-shadow: var(--sombra-hover);
    border-color: #bfe0c8 !important;
}
.img-referencia {
    border-radius: 12px;
    border: none;
}
.etiqueta-oferta, .badge.bg-danger {
    background: var(--rojo-descuento) !important;
    color: #ffffff !important;
    border: none !important;
    position: relative;
    overflow: hidden;
}
.carrusel-descuento {
    overflow: hidden;
    background: var(--rojo-descuento);
}
.bg-success-subtle {
    background-color: var(--verde-suave) !important;
    color: var(--verde-oscuro) !important;
    border: 1px solid #bfe0c8;
}
.form-control, .form-select {
    border-radius: 12px;
    border-color: #d9d4c8;
}
.form-control:focus, .form-select:focus {
    border-color: var(--verde-secundario);
    box-shadow: 0 0 0 4px rgba(58, 168, 99, 0.15);
}
.nav-tabs {
    border-bottom: none;
    gap: 0.4rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}
.nav-tabs .nav-link {
    border: 1px solid var(--borde) !important;
    border-radius: 999px !important;
    background-color: #ffffff;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-tabs .nav-link.active {
    background-color: var(--texto) !important;
    color: #ffffff !important;
    border-color: var(--texto) !important;
}
.tab-pane.fade {
    transition: opacity 0.25s ease, transform 0.25s var(--curva);
    transform: translateY(6px);
}
.tab-pane.fade.show {
    transform: none;
}

/* Carrusel de ofertas con los colores nuevos */
.carrusel-ofertas-cabecera {
    background: var(--verde-degradado);
}
.carrusel-ofertas-cabecera h2 .bi {
    color: var(--amarillo);
}
.carrusel-ahorro {
    background-color: #fbf0cc;
    color: #6b3f12;
}
.barra-tiempo-relleno {
    background: linear-gradient(90deg, #3aa863, #2a9552);
    transform-origin: left;
}
.barra-tiempo.nivel-medio .barra-tiempo-relleno {
    background: linear-gradient(90deg, #f38a45, #ef6c1a);
}
.barra-tiempo.nivel-medio .barra-tiempo-texto {
    color: #b8470d;
}
.barra-tiempo.nivel-poco .barra-tiempo-relleno {
    background: linear-gradient(90deg, #e0766c, #c93a2e);
}
.barra-tiempo.lista .barra-tiempo-relleno {
    animation: llenarBarra 1.1s var(--curva) both;
}
@keyframes llenarBarra {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* Esqueletos de carga */
.esqueleto {
    background: linear-gradient(90deg, #f1eee7 0%, #faf8f4 40%, #f1eee7 80%);
    background-size: 200% 100%;
    animation: esqueleto 1.3s ease-in-out infinite;
    border-radius: 12px;
}
@keyframes esqueleto {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

/* ---------- Titulos de seccion ---------- */

.encabezado-seccion {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
/* Antetitulo: texto chico y gris encima del titulo, sin icono ni mayusculas */
.antetitulo {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--texto-secundario);
    margin-bottom: 0.25rem;
}
.antetitulo .bi {
    display: none;
}
.encabezado-seccion h2 {
    font-size: clamp(1.4rem, 2.6vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
}
.enlace-ver-todo {
    color: var(--verde-campo);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.enlace-ver-todo .bi {
    display: inline-block;
    transition: transform 0.25s var(--curva);
}
.enlace-ver-todo:hover .bi {
    transform: translateX(4px);
}
.resaltado {
    color: inherit;
}

/* Categorias como fichas con foto redonda */
.categorias-swiper {
    padding: 0.5rem 0.25rem 1rem !important;
}
.ficha-categoria {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--texto);
    text-align: center;
}
.ficha-categoria .foto {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    padding: 4px;
    background: var(--borde);
    transition: transform 0.4s var(--curva);
}
.ficha-categoria img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
}
.foto-icono {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid #ffffff;
    background: var(--verde-suave);
    color: var(--verde-campo);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
}
.ficha-categoria:hover .foto {
    transform: translateY(-6px) rotate(-4deg) scale(1.05);
}
.ficha-categoria strong {
    font-size: 0.88rem;
    line-height: 1.25;
    max-width: 130px;
}

/* Tarjeta de producto moderna */
.tarjeta-producto {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #ffffff;
    border: 1px solid var(--borde);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.4s var(--curva), box-shadow 0.4s var(--curva), border-color 0.3s ease;
}
.tarjeta-producto:hover {
    box-shadow: var(--sombra-hover);
    border-color: #bfe0c8;
}
.tarjeta-producto .foto {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: var(--verde-suave);
}
.tarjeta-producto .foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--curva);
}
.tarjeta-producto .chip-foto {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 0.35rem;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background-color: rgba(255, 255, 255, 0.92);
    color: var(--texto);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
}
.chip-descuento {
    background-color: var(--rojo-descuento);
    color: #ffffff;
}
.tarjeta-producto .cuerpo {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1rem 1.1rem 1.1rem;
}
.tarjeta-producto .meta {
    font-size: 0.78rem;
    color: var(--texto-secundario);
    margin-bottom: 0.25rem;
}
.tarjeta-producto h3 {
    font-size: 1.02rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}
.tarjeta-producto h3 a {
    color: inherit;
    text-decoration: none;
}
.tarjeta-producto h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
}
.tarjeta-producto .precio {
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--verde-oscuro);
}
.tarjeta-producto .precio.en-oferta {
    color: var(--rojo-descuento);
}
.tarjeta-producto .pie {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.75rem;
}
.boton-circular {
    position: relative;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--verde-suave);
    color: var(--verde-oscuro);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.3s var(--curva);
}
.tarjeta-producto:hover .boton-circular {
    background-color: var(--verde-campo);
    color: #ffffff;
}

/* Beneficios */
.beneficio {
    height: 100%;
    background-color: #ffffff;
    border: 1px solid var(--borde);
    border-radius: 22px;
    padding: 1.6rem;
    transition: transform 0.35s var(--curva), box-shadow 0.35s var(--curva);
}
.beneficio:hover {
    box-shadow: var(--sombra-hover);
}
.beneficio .icono {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}
.beneficio h3 {
    font-size: 1.05rem;
    font-weight: 700;
}
.beneficio p {
    color: var(--texto-secundario);
    margin: 0;
    font-size: 0.9rem;
}
.tono-verde { background-color: #dcefe1; color: #167a3e; }
.tono-naranja { background-color: #fbe6d3; color: #b8470d; }
.tono-amarillo { background-color: #fbf0cc; color: #8f6410; }
.tono-rosa { background-color: #f9e3e0; color: #a52d23; }

/* Productores en la portada */
.tarjeta-productor {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: #ffffff;
    border: 1px solid var(--borde);
    border-radius: 20px;
    padding: 1rem;
    text-decoration: none;
    color: var(--texto);
    transition: transform 0.35s var(--curva), box-shadow 0.35s var(--curva);
}
.tarjeta-productor:hover {
    box-shadow: var(--sombra-hover);
    color: var(--texto);
}
.tarjeta-productor .avatar-inicial {
    width: 56px;
    height: 56px;
    font-size: 1.3rem;
    flex-shrink: 0;
    background: var(--verde-degradado);
}

/* ---------- Pie de pagina ---------- */

.pie-pagina {
    margin-top: clamp(3rem, 7vw, 5rem);
    padding: 3.5rem 0 1.5rem;
    background-color: var(--oscuro);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
}
.pie-pagina h6 {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 1rem;
}
.pie-pagina a {
    color: rgba(255, 255, 255, 0.72);
}
.pie-pagina a:hover {
    color: var(--amarillo);
}
.pie-pagina .logo-texto span {
    color: var(--verde-vivo);
}
.etiqueta-proyecto {
    display: inline-block;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
}
.pie-final {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    font-size: 0.8rem;
}

/* ---------- Pagina de informacion ---------- */

.info-bloque {
    scroll-margin-top: 140px;
}
.info-bloque .accordion-button:not(.collapsed) {
    background-color: var(--verde-suave);
    color: var(--verde-oscuro);
    box-shadow: none;
}
.info-bloque .accordion-item {
    border-color: var(--borde);
}

/* ---------- Catalogo: fichas, filtros y resultados ---------- */

.fichas-filtro {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    scrollbar-width: none;
}
.fichas-filtro::-webkit-scrollbar { display: none; }
.ficha-filtro {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background-color: #ffffff;
    border: 1px solid var(--borde);
    color: var(--texto);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--curva);
}
.ficha-filtro:hover {
    border-color: var(--verde-secundario);
    color: var(--verde-oscuro);
}
.ficha-filtro.activa {
    background-color: var(--verde-campo);
    border-color: var(--verde-campo);
    color: #ffffff;
}
@media (min-width: 992px) {
    .panel-filtros {
        position: sticky;
        top: 150px;
    }
    .filtros-lateral {
        background-color: #ffffff;
        border: 1px solid var(--borde);
        border-radius: 20px;
        padding: 1.25rem;
    }
}
@media (max-width: 991.98px) {
    .panel-filtros.offcanvas-lg {
        height: auto;
        max-height: 88vh;
        border-radius: 22px 22px 0 0;
    }
}
.resultados .rejilla-esqueleto,
.resultados .cargando-texto {
    display: none;
}
.resultados.htmx-request .rejilla-esqueleto {
    display: flex;
}
.resultados.htmx-request .cargando-texto {
    display: inline-flex;
    align-items: center;
}
.resultados.htmx-request .rejilla-productos,
.resultados.htmx-request nav {
    display: none;
}
.estado-vacio {
    text-align: center;
    background-color: #ffffff;
    border: 1px dashed #cbd5d0;
    border-radius: 22px;
    padding: 3rem 1.5rem;
}
.estado-vacio > .bi {
    display: inline-flex;
    width: 72px;
    height: 72px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--verde-suave);
    color: var(--verde-campo);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}
.boton-carrito {
    border: none;
    background-color: var(--verde-campo) !important;
    color: #ffffff !important;
    font-size: 1.05rem;
}
.boton-carrito:hover {
    background-color: var(--verde-oscuro) !important;
    transform: scale(1.1) !important;
}
.tarjeta-producto:hover .boton-carrito {
    transform: none;
}
.foto-volando {
    position: fixed;
    z-index: 3000;
    object-fit: cover;
    border-radius: 16px;
    pointer-events: none;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.ultimas-horas h2 { color: var(--rojo-descuento); }
.ficha-ultima {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.9rem 0.4rem 0.4rem;
    border-radius: 999px;
    background-color: #fcf0ee;
    border: 1px solid #f3cdc8;
    color: var(--texto);
    text-decoration: none;
    transition: transform 0.2s var(--curva);
}
.ficha-ultima:hover { transform: translateY(-2px); color: var(--texto); }
.ficha-ultima img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.ficha-ultima strong { display: block; font-size: 0.85rem; }
.ficha-ultima small { color: var(--rojo-descuento); font-weight: 600; }

.foto-detalle {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background-color: var(--verde-suave);
}
.foto-detalle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--curva);
}
.foto-detalle:hover img { transform: scale(1.05); }
.foto-detalle .chip {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 0.95rem;
    padding: 0.3rem 0.8rem;
}

/* ---------- Avisos tipo toast ---------- */

.zona-avisos {
    position: fixed;
    z-index: 2500;
    top: 120px;
    right: 16px;
    display: grid;
    gap: 0.6rem;
    width: min(380px, calc(100vw - 32px));
}
.aviso {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    background-color: #ffffff;
    border: 1px solid var(--borde);
    border-left: 4px solid var(--verde-secundario);
    border-radius: 14px;
    padding: 0.85rem 0.9rem;
    box-shadow: 0 20px 40px -18px rgba(28, 42, 33, 0.4);
    font-size: 0.88rem;
    animation: entrarAviso 0.4s var(--curva) both;
}
.aviso > .bi { font-size: 1.15rem; color: var(--verde-secundario); }
.aviso span { flex: 1; }
.aviso-error { border-left-color: var(--rojo-descuento); }
.aviso-error > .bi { color: var(--rojo-descuento); }
.aviso-warning { border-left-color: var(--ambar); }
.aviso-warning > .bi { color: var(--ambar); }
.aviso-info { border-left-color: #2b7a8c; }
.aviso-info > .bi { color: #2b7a8c; }
.aviso-cerrar {
    border: none;
    background: none;
    color: var(--texto-secundario);
    padding: 0;
    line-height: 1;
}
.aviso.saliendo {
    animation: salirAviso 0.3s ease both;
}
@keyframes entrarAviso {
    from { opacity: 0; transform: translateX(40px) scale(0.96); }
    to { opacity: 1; transform: none; }
}
@keyframes salirAviso {
    to { opacity: 0; transform: translateX(40px); }
}
@media (max-width: 767.98px) {
    .zona-avisos {
        top: auto;
        bottom: calc(80px + env(safe-area-inset-bottom));
        right: 16px;
    }
}

/* ---------- Transiciones entre paginas (Chrome y Edge) ---------- */

@view-transition {
    navigation: auto;
}
::view-transition-old(root) {
    animation: salirPagina 0.22s ease both;
}
::view-transition-new(root) {
    animation: entrarPagina 0.35s var(--curva) both;
}
::view-transition-group(*) {
    animation-duration: 0.4s;
    animation-timing-function: var(--curva);
}
@keyframes salirPagina {
    to { opacity: 0; transform: translateY(-8px); }
}
@keyframes entrarPagina {
    from { opacity: 0; transform: translateY(12px); }
}
.cabecera {
    view-transition-name: cabecera;
}
.barra-inferior {
    view-transition-name: barra-inferior;
}

/* ---------- Responsive ---------- */

@media (max-width: 1199.98px) {
    .menu-categorias {
        columns: 1;
        min-width: 240px;
    }
}
@media (max-width: 767.98px) {
    .ficha-categoria .foto {
        width: 88px;
        height: 88px;
    }
    .encabezado-seccion {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }
    .barra-superior {
        font-size: 0.72rem;
    }
}
@media (max-width: 575.98px) {
    .tarjeta-producto .cuerpo {
        padding: 0.75rem 0.8rem 0.85rem;
    }
    .tarjeta-producto h3 {
        font-size: 0.92rem;
    }
    .tarjeta-producto .vendedor,
    .tarjeta-producto .boton-circular,
    .tarjeta-producto .barra-tiempo time {
        display: none !important;
    }
    .tarjeta-producto .precio {
        font-size: 1.1rem;
    }
    .tarjeta-producto .barra-tiempo-texto span {
        font-size: 0.68rem;
    }
}

/* Favoritos: corazon sobre la foto */
.form-favorito {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 3;
    margin: 0;
}
.boton-favorito {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.92);
    color: var(--texto);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(28, 42, 33, 0.15);
    transition: transform 0.2s var(--curva), color 0.2s ease;
}
.boton-favorito:hover { transform: scale(1.08); }
.boton-favorito.activo { color: var(--rojo-descuento); }
.boton-favorito.latido { animation: latido 0.45s var(--curva); }
@keyframes latido {
    0% { transform: scale(1); }
    40% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Galeria del detalle */
.miniaturas {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
}
.miniatura {
    flex: 0 0 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    background: none;
    transition: border-color 0.2s ease;
}
.miniatura img { width: 100%; height: 100%; object-fit: cover; }
.miniatura.activa { border-color: var(--verde-campo); }
.foto-extra {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}
.foto-extra img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; }

/* Chat comprador - vendedor */
.chat {
    display: grid;
    grid-template-columns: 320px 1fr;
    grid-template-rows: minmax(0, 1fr);
    height: min(72vh, 720px);
    min-height: 460px;
    background-color: #ffffff;
    border: 1px solid var(--borde);
    border-radius: 20px;
    overflow: hidden;
}
.chat-lista {
    border-right: 1px solid var(--borde);
    overflow-y: auto;
    padding: 0.5rem;
}
.chat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem;
    border-radius: 14px;
    color: var(--texto);
    text-decoration: none;
    transition: background-color 0.2s ease;
}
.chat-item img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.chat-item:hover { background-color: var(--arena); color: var(--texto); }
.chat-item.activo { background-color: var(--verde-suave); }
.min-w-0 { min-width: 0; }
.chat-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background-color: var(--arena);
}
.chat-cabecera {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: #ffffff;
    border-bottom: 1px solid var(--borde);
}
.chat-producto {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 240px;
    padding: 0.35rem 0.6rem 0.35rem 0.35rem;
    border: 1px solid var(--borde);
    border-radius: 14px;
    color: var(--texto);
    text-decoration: none;
    min-width: 0;
}
.chat-producto img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.chat-producto span { min-width: 0; }
.chat-producto small.d-block { max-width: 170px; }
.chat-burbujas {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.burbuja {
    max-width: min(75%, 520px);
    padding: 0.55rem 0.8rem 0.35rem;
    border-radius: 16px;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(28, 42, 33, 0.08);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.burbuja.mia {
    align-self: flex-end;
    background-color: #dcefe1;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 4px;
}
.burbuja p { margin: 0; overflow-wrap: anywhere; }
.burbuja .hora {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: var(--texto-secundario);
}
.burbuja .leido { color: #2b7a8c; }
.burbuja.nueva { animation: entrarBurbuja 0.3s var(--curva); }
@keyframes entrarBurbuja {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
.chat-vacio {
    margin: auto;
    max-width: 340px;
    text-align: center;
    color: var(--texto-secundario);
}
.chat-solicitud {
    background-color: #fdf7e6;
    border-top: 1px solid #f6dd9a;
    padding: 0.6rem 1rem;
}
.chat-solicitud summary {
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.estado-solicitud { font-weight: 600; }
.estado-pendiente { color: #a8590f; }
.estado-aceptada, .estado-pagada { color: var(--verde-campo); }
.estado-rechazada, .estado-cancelada { color: var(--rojo-descuento); }
.chat-escribir {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    padding: 0.75rem;
    background-color: #ffffff;
    border-top: 1px solid var(--borde);
}
.chat-escribir textarea {
    flex: 1;
    resize: none;
    border: 1px solid var(--borde);
    border-radius: 20px;
    padding: 0.55rem 0.9rem;
    max-height: 140px;
}
.chat-escribir textarea:focus { outline: 2px solid var(--verde-vivo); outline-offset: 1px; }
.chat-escribir .btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.chat-sin-seleccion {
    margin: auto;
    text-align: center;
    color: var(--texto-secundario);
}
.chat-sin-seleccion .bi { font-size: 3rem; color: var(--verde-vivo); }
@media (max-width: 991.98px) {
    .chat { grid-template-columns: 1fr; height: calc(100vh - 300px); height: calc(100dvh - 300px); min-height: 380px; }
    .encabezado-chat.con-chat { display: none; }
    .chat.con-chat { height: calc(100vh - 240px); height: calc(100dvh - 240px); }
    .chat.con-chat .chat-lista { display: none; }
    .chat:not(.con-chat) .chat-panel { display: none; }
    .chat-lista { border-right: 0; }
    .burbuja { max-width: 85%; }
}

/* Notificaciones */
.lista-avisos {
    background-color: #ffffff;
    border: 1px solid var(--borde);
    border-radius: 20px;
    overflow: hidden;
}
.fila-aviso {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1.1rem;
    color: var(--texto);
    text-decoration: none;
    border-bottom: 1px solid var(--borde);
    transition: background-color 0.2s ease;
}
.fila-aviso:last-child { border-bottom: 0; }
.fila-aviso:hover { background-color: var(--arena); color: var(--texto); }
.fila-aviso.nueva { background-color: var(--verde-suave); }
.fila-aviso .icono {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background-color: #ffffff;
    border: 1px solid var(--borde);
    color: var(--verde-campo);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.punto-nuevo { width: 10px; height: 10px; border-radius: 50%; background-color: var(--ambar); flex-shrink: 0; }

/* Perfil publico del productor */
.portada-productor {
    background: var(--verde-degradado);
    color: #ffffff;
    border-radius: 24px;
    padding: 1.75rem;
}
.avatar-grande { width: 84px; height: 84px; font-size: 2rem; }
.cifras-productor {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.cifras-productor div {
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 0.75rem 1rem;
}
.cifras-productor strong { display: block; font-size: 1.4rem; }
.cifras-productor span { font-size: 0.85rem; opacity: 0.8; }
@media (max-width: 575.98px) {
    .cifras-productor { grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem; }
    .cifras-productor div { padding: 0.6rem; }
    .cifras-productor strong { font-size: 1.1rem; }
    .portada-productor { padding: 1.25rem; }
}

/* Ingreso y registro: foto del campo a la izquierda y formulario a la derecha */
.acceso {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 1080px;
    margin: 0 auto;
    background-color: #ffffff;
    border: 1px solid var(--borde);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 60px -40px rgba(10, 46, 30, 0.45);
}
@media (min-width: 992px) {
    .acceso { grid-template-columns: 5fr 6fr; min-height: 600px; }
}
.acceso-imagen {
    position: relative;
    align-items: flex-end;
    padding: 2.5rem;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.1) 0%, rgba(6, 78, 59, 0.92) 75%), url('/static/imagenes/finca_productor.jpg') center / cover;
}
.acceso-imagen h2 { font-size: 2rem; font-weight: 800; margin: 0.5rem 0 0.75rem; }
.acceso-imagen p { opacity: 0.85; }
.acceso-imagen ul { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 0.55rem; }
.acceso-imagen li { display: flex; align-items: center; gap: 0.55rem; font-weight: 500; }
.acceso-imagen li .bi { color: var(--amarillo); }
.acceso-formulario {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}
.tarjeta-acceso { width: 100%; max-width: 520px; }
@media (max-width: 575.98px) {
    .acceso { border-radius: 20px; }
    .acceso-formulario { padding: 1.5rem 1rem; }
}

/* Grafico de ventas del panel del vendedor: barras de un solo color */
.grafico-ventas {
    background-color: #ffffff;
    border: 1px solid var(--borde);
    border-radius: 20px;
    padding: 1.25rem 1.25rem 1rem;
}
.barras {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    height: 200px;
    align-items: end;
    border-bottom: 1px solid var(--borde);
}
.barra-columna {
    position: relative;
    height: 100%;
    padding-top: 1.6rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    outline: none;
}
.barra {
    width: min(70%, 44px);
    min-height: 2px;
    background-color: var(--verde-campo);
    border-radius: 4px 4px 0 0;
    transition: background-color 0.2s ease;
}
.barra-columna:hover .barra, .barra-columna:focus .barra { background-color: var(--verde-oscuro); }
.barra-valor {
    position: absolute;
    top: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--texto);
    background-color: #ffffff;
    border: 1px solid var(--borde);
    border-radius: 8px;
    padding: 0.1rem 0.4rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}
.barra-columna:hover .barra-valor, .barra-columna:focus .barra-valor { opacity: 1; }
.barra-fecha {
    position: absolute;
    bottom: -1.5rem;
    font-size: 0.72rem;
    color: var(--texto-secundario);
}
.grafico-ventas .barras { margin-bottom: 1.75rem; }

/* Etiqueta de cuentas de prueba (bots Demo) */
.etiqueta-demo {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background-color: #ede9fe;
    color: #5b21b6;
    font-size: 0.72rem;
    font-weight: 700;
    vertical-align: middle;
}
.chip.chip-demo {
    background-color: #ede9fe;
    color: #5b21b6;
}

/* Menos movimiento: sin cinta, sin flotar, sin brillos ni transiciones de pagina */
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    .burbuja.nueva, .boton-favorito.latido {
        animation: none !important;
    }
}

/* Pagina mas ancha en pantallas grandes (en celular y tablet no cambia nada) */
@media (min-width: 1200px) {
    .container, .container-xxl {
        max-width: min(1520px, calc(100vw - 64px));
    }
}

/* ---------- Verificacion de vendedores ---------- */
.verificacion { max-width: 860px; }
.pasos-verificacion {
    list-style: none; padding: 0; margin: 0 0 1.5rem;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem;
}
.pasos-verificacion li {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.6rem 0.75rem; border: 1px solid #e7e2d8; border-radius: 12px;
    background: #fff; font-size: 0.85rem; color: #647067;
}
.pasos-verificacion .numero,
.bloque-verificacion h2 .numero {
    flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
    display: inline-grid; place-items: center;
    background: #f3f0ea; color: #374151; font-weight: 700; font-size: 0.8rem;
}
.pasos-verificacion li.actual { border-color: #2a9552; color: #0f4a26; font-weight: 600; }
.pasos-verificacion li.actual .numero { background: #2a9552; color: #fff; }
.pasos-verificacion li.hecho { color: #167a3e; }
.pasos-verificacion li.hecho .numero { background: #dcefe1; color: #167a3e; }
@media (max-width: 575.98px) {
    .pasos-verificacion { grid-template-columns: 1fr; }
}
.bloque-verificacion {
    background: #fff; border: 1px solid #e7e2d8; border-radius: 16px;
    padding: 1.25rem; margin-bottom: 1rem;
}
.bloque-verificacion h2 {
    display: flex; align-items: center; gap: 0.6rem;
    font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem;
}
.bloque-verificacion .numero { background: #2a9552; color: #fff; }
.opciones-tipo { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.5rem; }
.opcion-tipo {
    display: flex; gap: 0.6rem; align-items: flex-start; cursor: pointer;
    border: 1px solid #e7e2d8; border-radius: 12px; padding: 0.75rem;
}
.opcion-tipo:has(input:checked) { border-color: #2a9552; background: #eef7f0; }
.opcion-tipo input { margin-top: 0.2rem; }
.form-verificacion[data-tipo="PERSONA"] .solo-organizacion,
.form-verificacion[data-tipo="ORGANIZACION"] .solo-persona { display: none !important; }
.estado-verificacion {
    display: flex; gap: 0.75rem; align-items: flex-start;
    padding: 1rem 1.25rem; border-radius: 14px; border: 1px solid;
}
.estado-verificacion > i { font-size: 1.4rem; line-height: 1; }
.estado-ok { background: #eef7f0; border-color: #bfe0c8; color: #0f4a26; }
.estado-espera { background: #fdf7e6; border-color: #f6dd9a; color: #6b3a12; }
.estado-error { background: #fcf0ee; border-color: #f3cdc8; color: #7f1d1d; }
.etiqueta-verificado {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.05rem 0.5rem; border-radius: 999px;
    background-color: #dcefe1; color: #167a3e;
    font-size: 0.72rem; font-weight: 700; vertical-align: middle;
}

/* ==========================================================
   Mercado presencial: puestos, stock en vivo, lista y panel
   ========================================================== */
@media (min-width: 992px) { .pasos.pasos-4 { grid-template-columns: repeat(4, 1fr); } }

/* Stock en vivo sobre la foto de la tarjeta */
.stock-vivo {
    position: absolute; left: 0.6rem; bottom: 0.6rem; z-index: 2;
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.2rem 0.6rem; border-radius: 999px;
    background: rgba(255, 255, 255, 0.94); color: #0f4a26;
    font-size: 0.74rem; font-weight: 700; box-shadow: 0 4px 12px rgba(10, 46, 30, 0.15);
    transition: background-color 0.3s, color 0.3s, transform 0.3s var(--curva);
}
.stock-vivo .punto, .stock-detalle .punto, .punto-vivo {
    width: 8px; height: 8px; border-radius: 50%; background: #3aa863; flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(58, 168, 99, 0.6); animation: latido-vivo 1.8s infinite;
}
.stock-vivo.poco { color: #8f3a10; }
.stock-vivo.poco .punto, .stock-detalle.poco .punto { background: #ef6c1a; }
.stock-vivo.agotado, .stock-vivo.insuficiente { color: #a52d23; }
.stock-vivo.agotado .punto, .stock-detalle.agotado .punto { background: #c93a2e; animation: none; }
.stock-vivo.en-linea { position: static; box-shadow: none; background: #eef7f0; margin-top: 0.3rem; }
.stock-vivo.en-linea.insuficiente { background: #fcf0ee; }
.cambio { animation: cambio-stock 0.9s var(--curva); }
.bajo [data-texto-stock], .bajo[data-existencias] strong { color: #dd5a10; }
@keyframes cambio-stock {
    0% { transform: scale(1); }
    30% { transform: scale(1.12); background-color: #f6e19a; }
    100% { transform: scale(1); }
}
@keyframes latido-vivo {
    0% { box-shadow: 0 0 0 0 rgba(58, 168, 99, 0.55); }
    70% { box-shadow: 0 0 0 7px rgba(58, 168, 99, 0); }
    100% { box-shadow: 0 0 0 0 rgba(58, 168, 99, 0); }
}
.tarjeta-producto.esta-agotado .foto img { filter: grayscale(0.85); opacity: 0.7; }
.estado-vivo { display: inline-flex; align-items: center; gap: 0.4rem; }
.estado-vivo.sin-conexion .punto-vivo { background: #c93a2e; animation: none; }

.pagos-mini { display: inline-flex; gap: 0.3rem; margin-bottom: 0.4rem; }
.pagos-mini > span {
    width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center;
    background: var(--verde-suave, #dcefe1); color: #167a3e; font-size: 0.85rem;
}
.chip-pago {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.35rem 0.75rem; border-radius: 999px; border: 1px solid #bfe0c8;
    background: #eef7f0; color: #0f4a26; font-weight: 600; font-size: 0.85rem;
}
.chip-pago.chico { padding: 0.1rem 0.5rem; font-size: 0.72rem; }
.chip.chico { padding: 0.05rem 0.45rem; font-size: 0.7rem; }

/* Filtros simples del catalogo */
.filtros-mercado {
    display: grid; grid-template-columns: 1fr 220px 180px; gap: 0.6rem; margin-bottom: 1rem;
}
.buscador-filtro {
    position: relative; display: flex; align-items: center;
    background: #fff; border: 1px solid var(--borde); border-radius: 14px; padding: 0 0.9rem;
}
.buscador-filtro i { color: #647067; }
.buscador-filtro input { border: 0; outline: 0; padding: 0.65rem 0.6rem; width: 100%; background: transparent; }
.buscador-filtro:focus-within { border-color: #2a9552; box-shadow: 0 0 0 3px rgba(42, 149, 82, 0.15); }
.filtros-mercado .form-select { border-radius: 14px; }
@media (max-width: 767.98px) {
    .filtros-mercado { grid-template-columns: 1fr 1fr; }
    .buscador-filtro { grid-column: 1 / -1; }
}

/* Detalle */
.ficha-compra, .tarjeta-donde, .resumen-lista, .grupo-lista, .cabecera-puesto, .bienvenida-vendedor, .tarjeta-cifra, .fila-panel {
    background: #fff; border: 1px solid var(--borde); border-radius: 20px;
}
.ficha-compra { padding: 1.5rem; }
.tarjeta-donde { padding: 1.25rem; }
.precio-grande { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 2.2rem; font-weight: 800; color: var(--texto); }
.precio-grande.en-oferta { color: #c93a2e; }
.stock-detalle {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.65rem 0.9rem;
    border-radius: 14px; background: #eef7f0; color: #0f4a26; font-weight: 700;
}
.stock-detalle.poco { background: #fdf3ea; color: #8f3a10; }
.stock-detalle.agotado { background: #fcf0ee; color: #a52d23; }
.foto-puesto { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; flex-shrink: 0; }
.foto-puesto.grande { width: 96px; height: 96px; border-radius: 20px; }
.mapa-mini { border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--verde-suave, #dcefe1); }
.mapa-mini iframe { width: 100%; height: 100%; border: 0; display: block; }
.min-w-0 { min-width: 0; }

.selector-cantidad {
    display: inline-flex; align-items: stretch; border: 1px solid var(--borde); border-radius: 14px; overflow: hidden; background: #fff;
}
.selector-cantidad button { border: 0; background: #f3f0ea; width: 44px; font-size: 1.1rem; color: #0f4a26; }
.selector-cantidad button:hover { background: #dcefe1; }
.selector-cantidad input { width: 64px; border: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.selector-cantidad input::-webkit-outer-spin-button, .selector-cantidad input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.selector-cantidad.chico button { width: 32px; font-size: 0.95rem; }
.selector-cantidad.chico input { width: 44px; padding: 0.25rem 0; }

/* Tarjeta de puesto */
.tarjeta-puesto {
    display: flex; gap: 0.9rem; align-items: center; padding: 0.8rem; height: 100%;
    background: #fff; border: 1px solid var(--borde); border-radius: 20px; color: var(--texto); text-decoration: none;
    transition: transform 0.35s var(--curva), box-shadow 0.35s var(--curva);
}
.tarjeta-puesto:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(10, 46, 30, 0.35); color: var(--texto); }
.tarjeta-puesto .foto { width: 84px; height: 84px; border-radius: 16px; overflow: hidden; flex-shrink: 0; }
.tarjeta-puesto .foto img { width: 100%; height: 100%; object-fit: cover; }
.tarjeta-puesto .cuerpo { flex: 1; min-width: 0; }
.tarjeta-puesto .pagos-mini { margin-bottom: 0; }
.mapa-puestos { height: 420px; border-radius: 20px; overflow: hidden; border: 1px solid var(--borde); z-index: 0; }
@media (max-width: 575.98px) { .mapa-puestos { height: 300px; } }

/* Mi lista */
.grupo-lista { margin-bottom: 1rem; overflow: hidden; }
.grupo-lista-cabecera { display: flex; gap: 0.8rem; align-items: center; padding: 1rem; background: #eef7f0; border-bottom: 1px solid #dcefe1; }
.item-lista { display: flex; gap: 0.8rem; align-items: center; padding: 0.8rem 1rem; border-bottom: 1px solid #f4f1eb; }
.item-lista .foto-item, .fila-panel .foto-item { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; }
.item-lista.esta-agotado { opacity: 0.6; }
.grupo-lista-pie { padding: 0.7rem 1rem; text-align: right; font-size: 0.9rem; color: #4b5563; }
.resumen-lista { padding: 1.25rem; position: sticky; top: calc(var(--alto-cabecera) + 1rem); }
@media (max-width: 575.98px) {
    .grupo-lista-cabecera { flex-wrap: wrap; }
    .item-lista { flex-wrap: wrap; }
    .item-lista > .flex-grow-1 { flex-basis: calc(100% - 80px); }
    .item-lista .cantidad-lista { margin-left: 76px; }
}

/* Panel del vendedor */
.cabecera-puesto { display: flex; gap: 1.25rem; align-items: center; padding: 1.25rem; flex-wrap: wrap; }
.bienvenida-vendedor { padding: 2rem; }
.pasos-inicio { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; max-width: 520px; }
.pasos-inicio li { display: flex; gap: 0.8rem; align-items: center; padding: 0.8rem 1rem; border: 1px solid var(--borde); border-radius: 14px; }
.pasos-inicio li div { display: flex; flex-direction: column; }
.pasos-inicio li span:not(.numero) { font-size: 0.85rem; color: #647067; }
.pasos-inicio .numero { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #f3f0ea; font-weight: 700; flex-shrink: 0; }
.pasos-inicio li.actual { border-color: #2a9552; background: #eef7f0; }
.pasos-inicio li.actual .numero { background: #2a9552; color: #fff; }
.tarjeta-cifra { padding: 1rem 1.1rem; height: 100%; display: flex; flex-direction: column; gap: 0.15rem; }
.tarjeta-cifra span { font-size: 0.82rem; color: #647067; }
.tarjeta-cifra strong { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.6rem; font-weight: 800; }
.lista-panel { display: grid; gap: 0.7rem; }
.fila-panel { display: flex; gap: 1rem; align-items: center; padding: 0.8rem 1rem; scroll-margin-top: 120px; transition: opacity 0.3s; }
.fila-panel.esta-agotado { background: #faf8f4; }
.fila-panel.esta-agotado .foto-item { filter: grayscale(0.9); }
.stock-panel { text-align: center; min-width: 84px; padding: 0.35rem 0.5rem; border-radius: 14px; }
.stock-panel strong { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.7rem; font-weight: 800; line-height: 1.1; color: #167a3e; }
.fila-panel.esta-agotado .stock-panel strong { color: #c93a2e; }
.acciones-stock { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; max-width: 380px; }
@media (max-width: 767.98px) {
    .fila-panel { flex-wrap: wrap; }
    .fila-panel .info { flex-basis: calc(100% - 180px); }
    .acciones-stock { max-width: none; width: 100%; justify-content: flex-start; }
    .acciones-stock .btn { flex: 1; }
}
.ventas-hoy li { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 0.8rem; padding: 0.55rem 0.9rem; border-bottom: 1px solid #f4f1eb; background: #fff; }
.ventas-hoy li:first-child { border-top-left-radius: 14px; border-top-right-radius: 14px; }
.ventas-hoy li.nueva { animation: entrar-venta 0.6s var(--curva); }
@keyframes entrar-venta { from { opacity: 0; transform: translateY(-8px); background: #fbf0cc; } to { opacity: 1; transform: none; } }
@media (max-width: 575.98px) { .ventas-hoy li { grid-template-columns: 44px 1fr auto; } .ventas-hoy li span:nth-child(3) { display: none; } }

/* Formularios del vendedor */
.formulario-simple { max-width: 860px; }
.mapa-puesto { height: 360px; border-radius: 16px; overflow: hidden; border: 1px solid var(--borde); background: #e3f0e7; z-index: 0; }
@media (max-width: 575.98px) { .mapa-puesto { height: 300px; } }
.buscador-mapa { display: flex; gap: 0.5rem; }
gmp-place-autocomplete { width: 100%; }
.opciones-pago { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.opcion-pago {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.1rem; cursor: pointer;
    border: 2px solid var(--borde); border-radius: 14px; font-weight: 600; background: #fff; transition: all 0.2s;
}
.opcion-pago i { font-size: 1.2rem; }
.btn-check:checked + .opcion-pago { border-color: #2a9552; background: #eef7f0; color: #0f4a26; }
.btn-check:focus-visible + .opcion-pago { outline: 3px solid rgba(42, 149, 82, 0.35); }
@media (prefers-reduced-motion: reduce) {
    .stock-vivo .punto, .stock-detalle .punto, .punto-vivo, .cambio, .ventas-hoy li.nueva { animation: none !important; }
}
.ventas-hoy li[data-sin-ventas] { display: block; border-radius: 14px; }

/* ---------- Pago demo de la oferta y verificacion del puesto ---------- */
.pago-oferta { max-width: 980px; }
.aviso-demo { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.8rem 1rem; border-radius: 14px; background: #fdf7e6; border: 1px solid #f6dd9a; color: #6b3a12; font-size: 0.9rem; }
.aviso-demo i { font-size: 1.2rem; }
.metodos-pago { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 1rem; }
.opcion-pago.grande { width: 100%; padding: 0.9rem 1rem; }
.opcion-pago.grande i { font-size: 1.6rem; }
.opcion-pago.grande span { display: flex; flex-direction: column; line-height: 1.2; }
.opcion-pago.grande small { font-weight: 400; color: var(--texto-suave, #647067); }
.panel-pago { padding: 1rem; border-radius: 14px; background: #faf8f4; border: 1px solid var(--borde); }
.qr-pago { width: 150px; height: 150px; padding: 8px; border-radius: 12px; background: #fff; border: 1px solid var(--borde); }
.chip-pendiente {
    display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.55rem; border-radius: 999px;
    font-size: 0.75rem; font-weight: 600; background: #fdf3ea; color: #8f3a10; border: 1px solid #f6d3b0; text-decoration: none;
}
.chip-pendiente:hover { background: #fbe6d3; color: #73300f; }
.insignia-verificado { display: inline-flex; align-items: center; gap: 0.25rem; color: #167a3e; font-weight: 600; font-size: 0.8rem; }
.insignia-verificado i { color: #2a9552; }
.resumen-puesto-verificar { display: flex; gap: 0.8rem; align-items: center; padding: 0.8rem; border-radius: 14px; border: 1px solid var(--borde); background: #fff; }
@media (max-width: 575.98px) { .metodos-pago { grid-template-columns: 1fr 1fr; } .opcion-pago.grande { padding: 0.75rem; } }
.insignia-verificado.chica { font-size: 0.72rem; }
.pago-oferta .foto-item { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; flex-shrink: 0; }

/* Boton Comprar de la tarjeta: lleva a la ficha para elegir la cantidad */
.boton-comprar {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    background-color: var(--verde-campo);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.25s ease, transform 0.3s var(--curva);
}
.boton-comprar:hover,
.boton-comprar:focus-visible {
    background-color: var(--verde-oscuro);
    color: #ffffff;
}
#comprar {
    scroll-margin-top: calc(var(--alto-cabecera) + 1.5rem);
}
.tarjeta-producto .pie .precio,
.tarjeta-producto .pie .precio-anterior {
    white-space: nowrap;
}
@media (max-width: 575.98px) {
    .tarjeta-producto .pie {
        flex-direction: column;
        align-items: stretch;
    }
    .boton-comprar {
        justify-content: center;
        padding: 0.45rem 0.7rem;
        font-size: 0.85rem;
    }
}

/* Donde comprar ocupa todo el ancho: datos del puesto a un lado y mapa al otro */
@media (min-width: 992px) {
    .mapa-donde { aspect-ratio: auto; height: 100%; min-height: 280px; }
}

/* Ventas de hoy: boton para quitar una venta marcada por error */
.ventas-hoy li { grid-template-columns: 56px 1fr auto auto auto; align-items: center; }
@media (max-width: 575.98px) { .ventas-hoy li { grid-template-columns: 44px 1fr auto auto; } }

/* Opiniones del producto */
.resumen-estrellas { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; color: var(--texto-suave, #475569); text-decoration: none; }
.resumen-estrellas:hover { color: var(--texto, #0f172a); }
.estrellas { color: #e39a1e; display: inline-flex; gap: 0.1rem; }
.opinion { padding: 0.75rem 0; border-bottom: 1px solid #f4f1eb; }
.opinion:last-child { border-bottom: 0; }
.opinion-invitar { background: #faf8f4; border: 1px solid #e7e2d8; border-radius: 14px; padding: 1rem; }
.elegir-estrellas { display: inline-flex; flex-direction: row-reverse; gap: 0.1rem; }
.elegir-estrellas input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.elegir-estrellas label { font-size: 1.7rem; line-height: 1; color: #cbd5e1; cursor: pointer; padding: 0.15rem; border-radius: 6px; transition: color 0.15s ease; }
.elegir-estrellas input:checked ~ label,
.elegir-estrellas label:hover,
.elegir-estrellas label:hover ~ label { color: #e39a1e; }
.elegir-estrellas input:focus-visible + label { outline: 2px solid #2a9552; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .elegir-estrellas label { transition: none; } }

/* Publicar: elegir en qué ubicación se vende */
.opciones-ubicacion { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.6rem; }
.opcion-ubicacion { position: relative; display: flex; align-items: center; gap: 0.7rem; padding: 0.75rem 0.9rem; border: 1.5px solid #e7e2d8; border-radius: 14px; background: #fff; cursor: pointer; transition: border-color 0.15s ease, background-color 0.15s ease; margin: 0; }
.opcion-ubicacion input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.opcion-ubicacion > i { font-size: 1.3rem; color: #2a9552; flex-shrink: 0; }
.opcion-ubicacion small { display: block; line-height: 1.3; }
.opcion-ubicacion:hover { border-color: #9fd1ae; }
.opcion-ubicacion:has(input:checked) { border-color: #2a9552; background: #eef7f0; box-shadow: 0 0 0 1px #2a9552 inset; }
.opcion-ubicacion:has(input:focus-visible) { outline: 2px solid #2a9552; outline-offset: 2px; }
.nueva-ubicacion { padding: 1rem; border: 1px dashed #9fd1ae; border-radius: 14px; background: #fdfcfa; }
.lista-ubicaciones li { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid #f4f1eb; }
.lista-ubicaciones li:last-child { border-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .opcion-ubicacion { transition: none; } }

/* Mapa cerrado cuando ya se encontró el lugar */
.resumen-ubicacion { display: flex; align-items: center; gap: 0.75rem; padding: 0.8rem 1rem; border: 1.5px solid #2a9552; border-radius: 14px; background: #eef7f0; }
.resumen-ubicacion > i { font-size: 1.4rem; color: #2a9552; flex-shrink: 0; }

/* ==========================================================
   Estilo sobrio de MercOfertas (2026-11)
   Antes estaba en includes/estilos_ofertas.html (en linea).
   ========================================================== */

/* Bootstrap con los colores de la marca: nada de azul */
:root {
    --bs-primary: #167a3e;
    --bs-primary-rgb: 22, 122, 62;
    --bs-link-color: #167a3e;
    --bs-link-color-rgb: 22, 122, 62;
    --bs-link-hover-color: #11602f;
    --bs-link-hover-color-rgb: 22, 101, 52;
    --bs-focus-ring-color: rgba(22, 122, 62, 0.25);
}
a { color: var(--verde-campo); }
a:hover { color: var(--verde-oscuro); }
.form-check-input:checked { background-color: var(--verde-campo); border-color: var(--verde-campo); }
.form-check-input:focus { border-color: var(--verde-secundario); box-shadow: 0 0 0 0.2rem rgba(22, 122, 62, 0.2); }
.form-control, .form-select { border-radius: 10px; }
.card, .caja-blanca, .bg-white.border { border-radius: 12px !important; }
.card:hover { box-shadow: none; }

/* Iconos con su texto: siempre un poco de aire */
.antetitulo .bi, h2 > .bi:first-child, .chip .bi, .insignia-verificado .bi { margin-right: 0.25rem; }

/* Titulos de seccion: un solo color, sin palabras resaltadas */
.encabezado-seccion { align-items: baseline; margin-bottom: 1rem; }
.encabezado-seccion h2 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); font-weight: 700; letter-spacing: -0.02em; }
.seccion { padding: clamp(1.75rem, 4vw, 2.75rem) 0 0; }
.seccion:last-of-type { padding-bottom: clamp(2rem, 5vw, 3.5rem); }

/* Enlace Ofertas de la cabecera: destacado por color, sin boton con brillo */
.enlace-ofertas {
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    color: #b8470d;
    font-weight: 600;
    text-decoration: none;
}
.enlace-ofertas:hover { background: #fdf3ea; color: #8f3a10; }

/* ---------- Carrusel de portada ---------- */
.hero { position: relative; max-width: min(1520px, calc(100vw - 64px)); margin: 0 auto; padding: 1rem 0.75rem 0; }
.hero-swiper { border-radius: 18px; overflow: hidden; background: var(--verde-bosque); }
.hero-slide {
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(380px, 46vw, 500px);
    color: #ffffff;
}
.hero-fondo { position: absolute; inset: 0; background-size: cover; background-position: center; }
/* Velo verde oscuro: da contraste al texto y deja ver la foto a la derecha */
.hero-fondo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 46, 30, 0.9) 0%, rgba(10, 46, 30, 0.72) 42%, rgba(10, 46, 30, 0.15) 100%);
}
.hero-contenido { position: relative; z-index: 1; max-width: 640px; padding: clamp(1.5rem, 4vw, 3.5rem); padding-bottom: 4.5rem; }
.hero-etiqueta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.hero-etiqueta .bi { color: var(--amarillo); }
.hero-titulo {
    font-size: clamp(1.7rem, 3.6vw, 2.9rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.12;
    color: #ffffff;
    margin-bottom: 0.9rem;
}
.hero-titulo em { font-style: normal; color: #f8d57e; }
.hero-texto { font-size: 1.05rem; color: rgba(255, 255, 255, 0.88); max-width: 46ch; margin-bottom: 1.4rem; }
.hero-acciones { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.hero-acciones .btn { padding: 0.65rem 1.25rem; }
.btn-vidrio { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.55); color: #ffffff; }
.btn-vidrio:hover { background: #ffffff; border-color: #ffffff; color: var(--verde-oscuro); }
/* Puntos y flechas dentro de la foto, abajo */
.hero-pie {
    position: absolute;
    z-index: 2;
    left: clamp(1.5rem, 4vw, 3.5rem);
    right: clamp(1rem, 2vw, 1.5rem);
    bottom: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.hero-paginacion { position: static !important; width: auto !important; display: flex; gap: 0.4rem; }
.hero-paginacion .swiper-pagination-bullet {
    width: 26px; height: 4px; border-radius: 2px; margin: 0 !important;
    background: rgba(255, 255, 255, 0.45); opacity: 1; transition: background-color 0.2s, width 0.2s;
}
.hero-paginacion .swiper-pagination-bullet-active { background: #ffffff; width: 40px; }
.hero-controles { display: flex; gap: 0.5rem; }
.hero-controles button {
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.55); background: rgba(10, 46, 30, 0.35); color: #ffffff;
    display: inline-flex; align-items: center; justify-content: center;
}
.hero-controles button:hover { background: #ffffff; color: var(--verde-oscuro); }
/* Mejor oferta del dia: tarjeta fija a la derecha, solo en pantallas grandes */
.hero-oferta-flotante { display: none; }
@media (min-width: 1200px) {
    .hero-oferta-flotante {
        display: block;
        position: absolute;
        z-index: 3;
        right: clamp(2.5rem, 5vw, 5rem);
        top: 50%;
        transform: translateY(-50%);
        width: 270px;
        padding: 0.8rem 0.8rem 0.6rem;
        background: #ffffff;
        border-radius: 14px;
        color: var(--texto);
        text-decoration: none;
        box-shadow: 0 14px 34px -18px rgba(10, 46, 30, 0.6);
    }
    .hero-oferta-flotante:hover { color: var(--texto); }
    .hero-oferta-flotante img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; margin-bottom: 0.7rem; display: block; }
    .hero-oferta-flotante .precio-oferta { font-family: "Plus Jakarta Sans", "Inter", sans-serif; font-weight: 800; font-size: 1.4rem; color: var(--rojo-descuento); }
    .hero-oferta-flotante .precio-anterior { font-size: 0.85rem; }
}
@media (max-width: 767.98px) {
    .hero { max-width: none; padding: 0.75rem 0.75rem 0; }
    .hero-swiper { border-radius: 14px; }
    .hero-slide { min-height: 400px; align-items: flex-end; }
    .hero-fondo::after { background: linear-gradient(180deg, rgba(10, 46, 30, 0.35) 0%, rgba(10, 46, 30, 0.9) 60%); }
    .hero-contenido { padding: 1.25rem 1.1rem 4.2rem; }
    .hero-texto { font-size: 0.95rem; margin-bottom: 1rem; }
    .hero-acciones .btn { flex: 1 1 auto; padding: 0.55rem 0.8rem; }
    .hero-pie { left: 1.1rem; right: 0.8rem; bottom: 0.9rem; }
    .hero-controles button { width: 36px; height: 36px; }
}

/* Categorias: foto redonda simple */
.ficha-categoria-slide { width: auto; }
.ficha-categoria .foto { width: 96px; height: 96px; padding: 0; background: none; }
.ficha-categoria img, .foto-icono { border: 1px solid var(--borde); }
.ficha-categoria:hover strong { color: var(--verde-campo); }
@media (max-width: 767.98px) { .ficha-categoria .foto { width: 76px; height: 76px; } .ficha-categoria strong { font-size: 0.8rem; } }

/* Como funciona: cuatro pasos en texto, fondo claro */
.pasos-simples {
    list-style: none;
    counter-reset: paso;
    display: grid;
    gap: 1rem;
    padding: 0;
    margin: 0 0 1.5rem;
}
@media (min-width: 576px) { .pasos-simples { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .pasos-simples { grid-template-columns: repeat(4, 1fr); } }
.pasos-simples li { counter-increment: paso; display: grid; gap: 0.2rem; padding-top: 0.9rem; border-top: 2px solid var(--borde); }
.pasos-simples li::before { content: counter(paso); font-weight: 700; color: var(--verde-campo); font-size: 0.9rem; }
.pasos-simples strong { font-size: 1.02rem; }
.pasos-simples span { color: var(--texto-secundario); font-size: 0.92rem; }
.aviso-vender {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.3rem;
    background: #ffffff;
    border: 1px solid var(--borde);
    border-radius: 12px;
}
.aviso-vender strong { display: block; }
.aviso-vender span { color: var(--texto-secundario); font-size: 0.92rem; }

/* ---------- Tarjeta de producto ---------- */
.tarjeta-producto { border-radius: 12px; border: 1px solid var(--borde); }
.tarjeta-producto:hover { border-color: #c4bfb1; box-shadow: var(--sombra-hover); }
.tarjeta-producto .chip-foto { top: 10px; left: 10px; }
.tarjeta-producto .cuerpo { padding: 0.85rem 1rem 1rem; }
.tarjeta-producto h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.1rem; }
.tarjeta-producto .meta { font-size: 0.82rem; margin-bottom: 0.35rem; }
.datos-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.7rem; font-size: 0.78rem; color: var(--texto-secundario); }
.tarjeta-producto .chip-frescura { font-size: 0.78rem; font-weight: 700; padding: 0.2rem 0.6rem; }
.frescura-llegada { white-space: nowrap; }
.texto-demo { color: #8b877c; }
.pagos-texto { font-size: 0.78rem; color: var(--texto-secundario); margin-top: 0.2rem; }
.tarjeta-producto .precios { line-height: 1.2; }
.tarjeta-producto .precio { font-size: 1.2rem; }
.tarjeta-producto .unidad { font-size: 0.8rem; color: var(--texto-secundario); }
.tarjeta-producto .precio-anterior { font-size: 0.8rem; text-decoration: line-through; }
.boton-comprar { border-radius: 10px; padding: 0.45rem 0.9rem; }
.boton-comprar.secundario { background: #ffffff; color: var(--verde-campo); border: 1px solid #c4bfb1; }
.boton-comprar.secundario:hover { background: var(--verde-suave); color: var(--verde-oscuro); }

/* Etiqueta de oferta: naranja; la destacada (premium) lleva estrella */
.chip { border-radius: 6px; }
.chip.chip-oferta, .chip.chip-descuento { background: #dd5a10; color: #ffffff; }
.chip.chip-oferta.premium { background: #b8470d; }
.carrusel-descuento { background: #dd5a10; border-radius: 6px; }

/* Frescura: punto de color (verde = fresco, amarillo = normal, gris = con mas dias) */
.chip-frescura {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.15rem 0.55rem; border-radius: 6px;
    font-size: 0.75rem; font-weight: 600; line-height: 1.4; vertical-align: middle;
}
/* Cada nivel lleva su icono y su nombre escrito: no depende solo del color */
.chip-frescura.fresco { background: #dcefe1; color: #0f4a26; border: 1px solid #a9d6b6; }
.chip-frescura.normal { background: #fbf0cc; color: #6b3f12; border: 1px solid #edd58d; }
.chip-frescura.antiguo { background: #ece8df; color: #4b463e; border: 1px solid #cfc9bb; }
.punto-frescura { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; margin-right: 0.35rem; vertical-align: middle; }
.punto-frescura.fresco { background: #2a9552; }
.punto-frescura.normal { background: #e0a526; }
.punto-frescura.antiguo { background: #a39c90; }
.leyenda-frescura { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.leyenda-frescura .titulo { margin-right: 0.2rem; }
.tarjeta-producto.frescura-antiguo .foto img { filter: saturate(0.75); }

/* Stock en vivo sobre la foto: sin sombra */
.stock-vivo { box-shadow: none; border-radius: 6px; }

/* Carrusel de ofertas: barra superior lisa */
.carrusel-ofertas-cabecera { background: var(--verde-campo); }
.carrusel-ofertas-cabecera h2 .bi { color: #ffffff; }
.carrusel-ofertas { border-radius: 14px; }
.carrusel-ofertas + .enlace-ver-todo { display: inline-block; margin-top: 0.75rem; }

/* Elegir oferta normal o premium al pagar */
.planes-oferta { display: grid; gap: 0.6rem; }
@media (min-width: 576px) { .planes-oferta { grid-template-columns: 1fr 1fr; } }
.plan-oferta {
    display: flex; flex-direction: column; gap: 0.3rem; cursor: pointer;
    padding: 0.9rem 1rem; border: 2px solid #e7e2d8; border-radius: 12px; background: #ffffff;
    transition: border-color 0.2s;
}
.plan-oferta small { color: #5c574e; }
.plan-oferta .precio-plan { font-weight: 800; font-size: 1.15rem; color: #167a3e; }
.plan-oferta.premium strong { color: #a8590f; }
.btn-check:checked + .plan-oferta { border-color: #2a9552; box-shadow: 0 0 0 3px rgba(42, 149, 82, 0.15); }
.btn-check:checked + .plan-oferta.premium { border-color: #e39a1e; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2); }
.btn-check:focus-visible + .plan-oferta { outline: 2px solid #167a3e; outline-offset: 2px; }

/* Logo MercOfertas */
.logo-icono.logo-imagen { background: #ffffff; padding: 2px; overflow: hidden; box-shadow: none; border: 1px solid var(--borde); }
.logo-icono.logo-imagen img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo-texto span { color: #ef6c1a; }

/* Panel del vendedor: numero de stock mas sobrio */
.stock-panel strong { font-size: 1.4rem; color: var(--texto); }
.cabecera-puesto .btn, .bienvenida-vendedor .btn { border-radius: 10px; }

/* ---------- Celular ---------- */
@media (max-width: 575.98px) {
    .tarjeta-producto .cuerpo { padding: 0.7rem 0.75rem 0.8rem; }
    .tarjeta-producto h3 { font-size: 0.95rem; }
    .tarjeta-producto .precio { font-size: 1.05rem; }
    .tarjeta-producto .chip-foto { top: 8px; left: 8px; }
    .pagos-texto, .tarjeta-producto .texto-demo { display: none; }
    .leyenda-frescura { gap: 0.4rem 0.8rem; }
    .boton-comprar { justify-content: center; }

    /* Panel: botones en una grilla que nunca se sale de la tarjeta */
    .acciones-stock { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
    .acciones-stock .selector-cantidad { grid-column: 1 / -1; justify-self: start; }
    .acciones-stock .btn { width: 100%; white-space: nowrap; padding-left: 0.4rem; padding-right: 0.4rem; }
    .acciones-stock .btn .bi { display: none; }
    .fila-panel .info { flex: 1 1 0; min-width: 0; }
    .stock-panel { min-width: 56px; padding: 0; }

    .aviso-vender .btn { width: 100%; }

    /* Titulo de seccion y su enlace en la misma linea */
    .encabezado-seccion { flex-direction: row; align-items: baseline; }
    .enlace-ver-todo { font-size: 0.9rem; }
}

/* Cuentas de prueba: "Demo" como texto gris chico, sin color propio */
.etiqueta-demo, .chip.chip-demo {
    background: transparent;
    color: #8b877c;
    padding: 0;
    font-weight: 500;
}
.etiqueta-demo .bi, .chip.chip-demo .bi { display: none; }
.tarjeta-puesto { border-radius: 12px; }

/* Logo en el pie: "Ofertas" en naranja tambien sobre fondo oscuro */
.pie-pagina .logo-texto span { color: #f38a45; }

/* Pago por Yape/Plin y compras terminadas */
.numero-pago { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border-radius: 14px; background: var(--verde-suave); border: 1px solid #bfe0c8; }
.numero-pago .telefono { display: block; font-size: 1.7rem; line-height: 1.15; letter-spacing: 0.04em; color: var(--verde-bosque); font-variant-numeric: tabular-nums; }
.numero-pago .monto { font-size: 1.35rem; color: var(--verde-campo); white-space: nowrap; }
.datos-pago { display: grid; gap: 0.35rem; margin: 0; }
.datos-pago > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--borde); font-size: 0.92rem; }
.datos-pago dt { font-weight: 400; color: var(--texto-secundario); }
.datos-pago dd { margin: 0; font-weight: 600; text-align: right; }
.compra-terminada { background: #fff; border: 1px solid var(--borde); border-radius: 14px; margin-bottom: 0.6rem; }
.compra-terminada summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.4rem 1rem; padding: 0.8rem 1rem; cursor: pointer; }
.compra-terminada-grupo { padding: 0.6rem 1rem; border-top: 1px solid var(--borde); }
@media (max-width: 420px) { .numero-pago .telefono { font-size: 1.4rem; } }


/* Buscador del mapa con lupa y lugares recomendados */
.buscador-lugares { position: relative; }
.buscador-lugares .lupa { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--texto-secundario); pointer-events: none; z-index: 2; }
.buscador-lugares .spinner-border.lupa { top: calc(50% - 0.5rem); transform: none; }
.buscador-lugares input { padding-left: 2.4rem; }
.sugerencias-lugar { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 1100; margin: 0; padding: 0.3rem; list-style: none; background: #fff; border: 1px solid var(--borde); border-radius: 12px; box-shadow: 0 10px 24px rgba(28, 42, 33, 0.14); max-height: 300px; overflow-y: auto; }
.sugerencias-lugar li { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.55rem 0.65rem; border-radius: 8px; cursor: pointer; }
.sugerencias-lugar li > i { color: var(--verde-campo); margin-top: 0.15rem; }
.sugerencias-lugar li span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sugerencias-lugar li small { color: var(--texto-secundario); }
.sugerencias-lugar li.activo { background: var(--verde-suave); }
.sugerencias-lugar li.sin-resultados { cursor: default; color: var(--texto-secundario); font-size: 0.9rem; }
#btnMiUbicacion.activo { background: var(--verde-campo); border-color: var(--verde-campo); color: #fff; }

/* Frescura que elige el vendedor al publicar */
.opciones-frescura { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.opcion-frescura { display: flex; gap: 0.6rem; align-items: center; padding: 0.7rem 0.85rem; border: 1.5px solid var(--borde); border-radius: 12px; background: #fff; cursor: pointer; }
.opcion-frescura > i { font-size: 1.3rem; color: var(--texto-secundario); }
.opcion-frescura span { display: flex; flex-direction: column; line-height: 1.25; }
.opcion-frescura small { color: var(--texto-secundario); }
.btn-check:checked + .opcion-frescura { border-color: var(--verde-campo); background: var(--verde-suave); }
.btn-check:checked + .opcion-frescura.fresco > i { color: var(--verde-campo); }
.btn-check:checked + .opcion-frescura.normal { border-color: #d99a12; background: #fdf7e6; }
.btn-check:checked + .opcion-frescura.normal > i { color: #a8700a; }
.btn-check:checked + .opcion-frescura.antiguo { border-color: #8a8f88; background: #f1f0ec; }
.btn-check:focus-visible + .opcion-frescura { outline: 3px solid rgba(22, 122, 62, 0.35); outline-offset: 2px; }
