/* =========================================================
   HOME — dirección "Kiosco"
   ========================================================= */

/* ---------------------------------------------------------
   HERO / CARRUSEL  (a sangre, sin márgenes laterales)
   --------------------------------------------------------- */
.hero-wrap {
    width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    padding: 0;
    box-sizing: border-box;
    /* El carrusel va a sangre y pegado al header: le devolvemos el
       aire que main.container le puso arriba a todas las páginas. */
    margin-top: calc(var(--aire-arriba) * -1);
    margin-bottom: 0;
}

.hero-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
}

/* La altura la marca el banner: así nunca se recorta el arte que sube el dueño */
.hero-carousel .carousel-slide,
.hero-carousel .carousel-slide a { width: 100%; }

.hero-carousel .carousel-slide a { display: block; }

.hero-carousel .carousel-slide img {
    width: 100%;
    height: auto;
    /* Nunca se recorta: si el banner fuera altísimo se ajusta al alto
       máximo y se ve entero, centrado sobre el fondo negro. */
    max-height: 78vh;
    object-fit: contain;
    display: block;
}

/* Flechas y puntos sobre fondo semitransparente: así se ven tanto sobre
   un banner claro como sobre uno oscuro. */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.hero-arrow:hover { background: #000; color: #fff; }

.hero-arrow--prev { left: 0; }
.hero-arrow--next { right: 0; }

.hero-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.55);
    padding: 9px 13px;
}

.hero-dot {
    width: 26px;
    height: 3px;
    border-radius: 0;
    border: none;
    background: rgba(255, 255, 255, 0.45);
    padding: 0;
    cursor: pointer;
    transition: var(--transition);
}

.hero-dot:hover { background: rgba(255, 255, 255, 0.75); }
.hero-dot.active { background: #fff; }

/* ---------------------------------------------------------
   HERO ALTERNATIVO — cuando todavía no hay promos cargadas
   --------------------------------------------------------- */
.hero-statement {
    background: #000;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-statement-inner {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 40px;
    align-items: end;
    padding: 70px 0 62px;
    position: relative;
    z-index: 2;
}

.hero-statement h1 {
    font-size: clamp(42px, 6.4vw, 82px);
    font-weight: 900;
    line-height: 0.93;
    letter-spacing: -0.045em;
    text-transform: uppercase;
    margin: 0;
}

.hero-statement .kicker { color: rgba(255,255,255,0.6); display: block; margin-bottom: 20px; }

.hero-statement p {
    font-size: 0.92rem;
    line-height: 1.65;
    color: #b8b8b8;
    margin: 0 0 24px;
    max-width: 38ch;
}

.hero-statement .hero-paw {
    position: absolute;
    right: -30px;
    top: -40px;
    width: 320px;
    opacity: 0.07;
    z-index: 1;
    fill: #fff;
}

/* ---------------------------------------------------------
   ENCABEZADO DE SECCIÓN
   --------------------------------------------------------- */
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 0 0 22px;
    border-bottom: 1px solid var(--black);
    margin: 66px 0 32px;
}

.section-head--tight { margin-top: 48px; }

.section-head h2 {
    margin: 0;
    font-size: clamp(20px, 2.6vw, 28px);
    font-weight: 800;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    line-height: 1.05;
}

.section-head h2 small {
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 7px;
}

.section-head-link {
    flex-shrink: 0;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--black);
    padding-bottom: 3px;
    white-space: nowrap;
}

.section-head-link:hover { color: var(--text-gray); border-bottom-color: var(--text-gray); }

/* ---------------------------------------------------------
   VER MÁS
   --------------------------------------------------------- */
.product-card.is-hidden { display: none; }

.load-more {
    display: flex;
    justify-content: center;
    padding: 44px 0 0;
}

.load-more .btn { min-width: 260px; }

/* ---------------------------------------------------------
   PÁGINA DE LISTADO (categoría o búsqueda)
   --------------------------------------------------------- */
.listing-header {
    /* El aire de arriba ya lo pone main.container.
       Sin raya abajo: junto con la de la barra de filtros quedaban dos
       líneas pegadas debajo del título y ensuciaban la entrada al
       catálogo. Ahora del título se pasa directo a los productos. */
    margin-top: 0;
    margin-bottom: 26px;
    padding-bottom: 0;
}

.listing-title {
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.035em;
    text-transform: uppercase;
    line-height: 1.03;
    color: var(--text-dark);
    margin: 0;
}

/* ---------------------------------------------------------
   GRILLA DE PRODUCTOS
   --------------------------------------------------------- */
.products-section { padding-bottom: var(--space-2xl); }

.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 44px 26px;
}

.products-container + .section-head { margin-top: 70px; }

.product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: none;
}

.product-card > a:first-child {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* La foto y nada más: sin recuadro, sin fondo y sin alto fijo. Cada
   imagen se ve con la forma que tiene. Antes había un cuadrado gris que
   dejaba franjas a los costados de las fotos verticales. */
.img-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.img-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.45s ease;
}

.product-card:hover .img-container img { transform: scale(1.04); }

/* Badge de oferta / destacado */
.badge-offer {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #000;
    color: #fff;
    padding: 6px 11px;
    font-weight: 700;
    font-size: 0.6rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    z-index: 2;
}

.badge-offer--featured { background-color: #000; }

/* Barra "Agregar" que sube sobre la foto */
.card-add {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    color: #fff;
    text-align: center;
    padding: 13px 8px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transform: translateY(100%);
    transition: transform 0.24s ease;
    z-index: 3;
}

.product-card:hover .card-add,
.product-card:focus-within .card-add { transform: translateY(0); }

.product-info { padding: 15px 0 0; }

.product-cat {
    display: block;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 6px;
}

.product-title {
    display: block;
    font-weight: 500;
    font-size: 0.86rem;
    letter-spacing: -0.005em;
    text-transform: none;
    line-height: 1.35;
    color: #111;
    margin-bottom: 8px;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 9px;
}

.price-normal,
.price-new {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    color: #000;
}

.price-old {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 400;
}

/* Botón inferior (se mantiene por compatibilidad, oculto en el home) */
.btn-ver {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0 0;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: #000;
}

.btn-ver::after { content: '→'; transition: transform 0.25s ease; }
.product-card:hover .btn-ver::after { transform: translateX(4px); }

.no-results {
    grid-column: 1 / -1;
    padding: var(--space-2xl) 0;
    text-align: center;
    color: var(--text-gray);
    font-size: 0.92rem;
}
.no-results p { margin: 0 auto; max-width: 46ch; }
.no-results-titulo,
.catalog-empty-titulo {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--text-dark, #000);
    margin-bottom: 8px !important;
}
.no-results .btn,
.catalog-empty .btn { margin-top: 20px; }

/* Aviso de catálogo vacío */
.catalog-empty {
    border: 1px solid var(--border);
    background: var(--surface-soft);
    padding: 52px 30px;
    text-align: center;
    color: var(--text-gray);
    font-size: 0.92rem;
}
.catalog-empty p { margin: 0 auto; max-width: 46ch; }

/* ---------------------------------------------------------
   RESPONSIVO
   --------------------------------------------------------- */
@media (max-width: 1024px) {
    .hero-carousel .carousel-slide img { max-height: 70vh; }
    .products-container { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 36px 20px; }
    .hero-statement-inner { grid-template-columns: 1fr; gap: 26px; align-items: start; padding: 54px 0 50px; }
}

@media (max-width: 768px) {
    .load-more { padding-top: 32px; }
    .load-more .btn { min-width: 0; width: 100%; }
    .hero-carousel .carousel-slide img { max-height: 62vh; }
    .hero-arrow { width: 34px; height: 34px; font-size: 12px; }
    .hero-dots { bottom: 14px; }
    .hero-dot { width: 20px; }

    .section-head { margin: 46px 0 24px; padding-bottom: 16px; }
    .section-head-link { font-size: 0.6rem; }


    .listing-header { margin-bottom: 22px; }

    .products-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 14px;
        padding-bottom: var(--space-xl);
    }

    .product-info { padding: 12px 0 0; }
    .product-title { font-size: 0.8rem; }
    .price-normal, .price-new { font-size: 0.88rem; }

    /* En touch no hay hover: la barra queda siempre visible */
    .card-add { transform: translateY(0); padding: 10px 8px; font-size: 0.55rem; letter-spacing: 0.12em; }
}

@media (max-width: 380px) {
    .products-container { grid-template-columns: 1fr 1fr; gap: 24px 10px; }
}

/* ── Filtros y orden del listado ─────────────────────────────────────────
   Antes eran 53 tarjetas iguales y ninguna forma de acotarlas. */
.filtros {
    max-width: 1280px; margin: 0 auto; padding: 0 20px;
}
.filtros-form {
    display: flex; justify-content: space-between; align-items: center;
    gap: 14px; flex-wrap: wrap;
    padding: 14px 0; border-top: 1px solid #000; border-bottom: 1px solid #e3e3e1;
}
.filtros-izq { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filtros-cuenta {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: #8a8a8a; white-space: nowrap;
}
.filtros-cuenta b {
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 0.85rem; color: #000; font-variant-numeric: tabular-nums;
}

.filtro-chip { position: relative; display: inline-flex; cursor: pointer; }
.filtro-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.filtro-chip span {
    display: inline-flex; align-items: center;
    min-height: 40px; padding: 0 14px;
    border: 1px solid #d8d8d6; background: #fff;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
    white-space: nowrap; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.filtro-chip:hover span { border-color: #000; }
.filtro-chip input:checked + span { background: #000; color: #fff; border-color: #000; }
.filtro-chip input:focus-visible + span { outline: 2px solid #000; outline-offset: 2px; }

.filtro-precio { position: relative; }
.filtro-precio summary {
    display: inline-flex; align-items: center;
    min-height: 40px; padding: 0 14px;
    border: 1px solid #d8d8d6; background: #fff;
    font-size: 0.72rem; font-weight: 600; cursor: pointer; list-style: none;
    white-space: nowrap;
}
.filtro-precio summary::-webkit-details-marker { display: none; }
.filtro-precio summary::after { content: '▾'; margin-left: 7px; font-size: 0.6rem; }
.filtro-precio[open] summary { border-color: #000; }
.filtro-precio-caja {
    position: absolute; z-index: 30; top: calc(100% + 6px); left: 0;
    display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; align-items: center;
    min-width: 240px; padding: 16px;
    border: 1px solid #000; background: #fff;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12);
}
.filtro-precio-caja label {
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.11em;
    text-transform: uppercase; color: #8a8a8a;
}
.filtro-precio-caja input {
    min-height: 42px; padding: 0 10px; width: 100%;
    border: 1px solid #d8d8d6; border-radius: 0;
    font-family: 'DM Mono', ui-monospace, monospace; font-size: 0.9rem;
}
.filtro-precio-caja button {
    grid-column: 1 / -1; min-height: 44px;
    border: 1px solid #000; background: #000; color: #fff;
    font-family: inherit; font-size: 0.66rem; font-weight: 700;
    letter-spacing: 0.13em; text-transform: uppercase; cursor: pointer;
}
.filtro-limpiar {
    font-size: 0.68rem; font-weight: 600; color: #8a8a8a;
    text-decoration: underline; white-space: nowrap;
}
.filtro-limpiar:hover { color: #000; }

.filtros-der { display: flex; align-items: center; gap: 9px; }
.filtros-der label {
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.13em;
    text-transform: uppercase; color: #8a8a8a;
}
.filtros-der select {
    min-height: 40px; padding: 0 32px 0 12px;
    border: 1px solid #d8d8d6; border-radius: 0; background: #fff;
    font-family: inherit; font-size: 0.78rem; cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'><path d='M1 1l4 4 4-4' stroke='%23000' stroke-width='1.6' fill='none'/></svg>");
    background-repeat: no-repeat; background-position: right 11px center;
}

/* ── Paginación ─────────────────────────────────────────────────────── */
.paginacion {
    display: flex; justify-content: center; align-items: center;
    gap: 6px; flex-wrap: wrap; padding: 46px 20px 10px;
}
.paginacion a, .paginacion .pag-actual {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; min-height: 44px; padding: 0 13px;
    border: 1px solid #e3e3e1;
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 0.85rem; font-variant-numeric: tabular-nums;
    text-decoration: none; color: #000;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.paginacion a:hover { border-color: #000; }
.paginacion .pag-actual { background: #000; color: #fff; border-color: #000; }
.paginacion .pag-sep { color: #b5b5b5; padding: 0 2px; }

/* ── Estado del stock en la tarjeta ─────────────────────────────────── */
.badge-agotado, .badge-quedan {
    position: absolute; z-index: 2;
    padding: 5px 10px;
    font-size: 0.56rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase;
}
.badge-agotado { top: 10px; left: 10px; background: #000; color: #fff; }
.badge-quedan  { bottom: 10px; left: 10px; background: #a8620b; color: #fff; }
.product-card--agotado .img-container img { opacity: 0.55; filter: grayscale(0.4); }
.product-card--agotado .price-normal,
.product-card--agotado .price-new { color: #8a8a8a; }

.section-link {
    margin-left: auto; align-self: flex-end;
    font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: #000;
}

@media (max-width: 700px) {
    .filtros-form { gap: 10px; }
    .filtros-izq { width: 100%; }
    .filtros-der { width: 100%; }
    .filtros-der select { flex: 1; }
    .filtro-precio-caja { left: auto; right: 0; }
}
