/* =========================================================
   eSmoking Spain – HOME v5
   Hoja exclusiva de la home. Todo va bajo .esh-home para no
   chocar con style.css / shop-cards.css (que siguen sirviendo
   a categorías y producto).
   ========================================================= */

.esh-home {
    --esh-red: #d71920;
    --esh-red-dark: #a8000a;
    --esh-red-soft: #fff1f1;
    --esh-ink: #111318;
    --esh-ink-2: #2a2f3a;
    --esh-muted: #6b7280;
    --esh-line: #ececf0;
    --esh-bg: #f6f6f8;
    --esh-radius: 18px;
    --esh-shadow: 0 1px 2px rgba(17,19,24,.04), 0 8px 24px rgba(17,19,24,.06);
    --esh-shadow-hover: 0 2px 4px rgba(17,19,24,.05), 0 18px 40px rgba(17,19,24,.12);
    --esh-font: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;

    display: block;
    margin-top: -1.5rem;              /* anula el my-4 del contenedor del header: banner pegado al menú */
    font-family: var(--esh-font);
    color: var(--esh-ink);
    background: #fff;
}

/* Neutraliza el fondo con manchas de colores de style.css en la home */
body:has(.esh-home) { background: #fff !important; }

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

.esh-wrap {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

.esh-home h1, .esh-home h2, .esh-home h3 { font-family: var(--esh-font); }

/* ---------- HERO / BANNER: nunca recorta ---------- */
.esh-hero {
    position: relative;
    background: #0b0d14;            /* color de relleno si el banner no llega al ancho */
    line-height: 0;
}

.esh-banner-link { display: block; }

.esh-banner-img {
    display: block;
    width: 100%;
    max-width: 1920px;
    height: auto !important;          /* proporción natural de la imagen */
    max-height: none !important;
    object-fit: contain !important;
    margin: 0 auto;
    border-radius: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
}

.esh-banner-rounded {
    border-radius: var(--esh-radius) !important;
    box-shadow: var(--esh-shadow) !important;
}

.esh-hero .carousel-item { transition-duration: .6s; }

.esh-hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: var(--esh-ink);
    background: rgba(255,255,255,.92);
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
    font-size: 15px;
    line-height: 1;
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity .2s ease, background .2s ease, color .2s ease;
}
.esh-hero-prev { left: 18px; }
.esh-hero-next { right: 18px; }
.esh-hero:hover .esh-hero-arrow,
.esh-hero-arrow:focus-visible { opacity: 1; }
.esh-hero-arrow:hover { background: var(--esh-red); color: #fff; }

.esh-hero .esh-hero-dots {
    bottom: 10px;
    margin-bottom: 0;
    gap: 6px;
}
.esh-hero .esh-hero-dots [data-bs-target] {
    width: 22px;
    height: 4px;
    margin: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(255,255,255,.5);
    opacity: 1;
    transition: width .25s ease, background .25s ease;
}
.esh-hero .esh-hero-dots .active { width: 36px; background: #fff; }

/* ---------- BARRA DE CONFIANZA ---------- */
.esh-trust {
    background: #fff;
    border-bottom: 1px solid var(--esh-line);
}
.esh-trust-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding-top: 14px;
    padding-bottom: 14px;
}
.esh-trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 0;
}
.esh-trust-item + .esh-trust-item { border-left: 1px solid var(--esh-line); }
.esh-trust-item > i {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--esh-red);
    background: var(--esh-red-soft);
    font-size: 17px;
}
.esh-trust-item strong {
    display: block;
    font-size: .92rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--esh-ink);
}
.esh-trust-item span {
    display: block;
    font-size: .78rem;
    font-weight: 500;
    color: var(--esh-muted);
    white-space: nowrap;
}
.esh-trust-item .esh-stars {
    display: inline;
    color: #f5b301;
    font-size: .8rem;
    letter-spacing: 1px;
}

/* ---------- SECCIONES ---------- */
.esh-section { padding: 44px 0; }
.esh-section + .esh-section { padding-top: 8px; }

.esh-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}
.esh-h1 {
    margin: 0 0 6px;
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: var(--esh-ink);
}
.esh-h2 {
    margin: 0;
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.15;
    color: var(--esh-ink);
}
.esh-section-sub {
    margin: 4px 0 0;
    font-size: .92rem;
    color: var(--esh-muted);
}
.esh-more {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 99px;
    border: 1px solid var(--esh-line);
    background: #fff;
    color: var(--esh-ink) !important;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .2s, color .2s, gap .2s;
}
.esh-more i { font-size: .75rem; color: var(--esh-red); }
.esh-more:hover { border-color: var(--esh-red); color: var(--esh-red) !important; gap: 12px; }

.esh-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--esh-red);
}

/* ---------- INTRO + CATEGORÍAS ---------- */
.esh-intro { padding-top: 36px; padding-bottom: 12px; }
.esh-intro-head { max-width: 760px; margin-bottom: 22px; }
.esh-intro-head p { margin: 0; color: var(--esh-muted); font-size: 1rem; }

.esh-cats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.esh-cat {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: var(--esh-radius);
    border: 1px solid var(--esh-line);
    background: #fff;
    color: var(--esh-ink);
    text-decoration: none;
    box-shadow: var(--esh-shadow);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.esh-cat-icon {
    display: grid;
    place-items: center;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--esh-red), var(--esh-red-dark));
    font-size: 21px;
    box-shadow: 0 8px 18px rgba(215,25,32,.25);
}
.esh-cat-text { display: grid; gap: 2px; min-width: 0; }
.esh-cat-text small {
    font-size: .74rem;
    font-weight: 600;
    color: var(--esh-muted);
}
.esh-cat-text strong {
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.15;
}
.esh-cat-go {
    margin-left: auto;
    font-size: .85rem;
    color: #c4c7cf;
    transition: transform .2s ease, color .2s ease;
}
.esh-cat:hover {
    transform: translateY(-3px);
    border-color: rgba(215,25,32,.35);
    box-shadow: var(--esh-shadow-hover);
    color: var(--esh-ink);
}
.esh-cat:hover .esh-cat-go { color: var(--esh-red); transform: translateX(4px); }

/* ---------- REJILLA DE PRODUCTO ---------- */
.esh-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}
.esh-grid-item { display: flex; min-width: 0; }

/* Tarjeta: se sobreescribe la .shop-product-card genérica solo en la home */
.esh-home .esh-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--esh-line) !important;
    border-radius: var(--esh-radius) !important;
    background: #fff !important;
    box-shadow: none !important;
    transform: none;
    transition: box-shadow .22s ease, border-color .22s ease, transform .22s ease;
}
.esh-home .esh-card:hover {
    transform: translateY(-4px);
    border-color: transparent !important;
    box-shadow: var(--esh-shadow-hover) !important;
}

.esh-card-media {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    margin: 8px 8px 0;
    border-radius: 14px;
    background: var(--esh-bg);
    overflow: hidden;
}
.esh-card-media img {
    width: 82%;
    height: 82%;
    object-fit: contain;
    mix-blend-mode: multiply;        /* las fotos con fondo blanco se integran en el gris */
    transition: transform .35s ease;
}
.esh-card:hover .esh-card-media img { transform: scale(1.06); }
.esh-card-placeholder { color: #c9ccd4; font-size: 2.2rem; }
.esh-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 99px;
    background: var(--esh-ink);
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.esh-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px 14px 14px;
}
.esh-card-cat {
    margin-bottom: 4px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--esh-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.esh-card-title {
    margin: 0 0 10px;
    font-size: .9rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    letter-spacing: -.005em;
    text-transform: none !important;
    min-height: calc(1.3em * 2);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.esh-card-title a { color: var(--esh-ink); text-decoration: none; }
.esh-card-title a::after {           /* toda la tarjeta clicable */
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}
.esh-card-title a:hover { color: var(--esh-red); }

.esh-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 12px;
}
.esh-card-price {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--esh-ink);
    white-space: nowrap;
}
.esh-card-price small {
    margin-right: 3px;
    font-size: .7rem;
    font-weight: 600;
    color: var(--esh-muted);
}
.esh-card-stock {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}
.esh-card-stock::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}
.esh-card-stock.is-in { color: #138a4b; }
.esh-card-stock.is-out { color: #9ca3af; }

.esh-card-actions {
    position: relative;
    z-index: 2;                       /* por encima del enlace que cubre la tarjeta */
    display: grid;
    gap: 8px;
}

/* ---------- BOTONES ---------- */
.esh-home .esh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    font-family: var(--esh-font);
    font-size: .84rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    box-shadow: none !important;
    transform: none;
    transition: background .2s ease, color .2s ease, transform .15s ease;
}
.esh-home .esh-btn:active { transform: scale(.97); }

.esh-home .esh-btn-cart,
.esh-home .esh-btn-cart:focus {
    background: var(--esh-red) !important;
    color: #fff !important;
}
.esh-home .esh-btn-cart:hover { background: var(--esh-red-dark) !important; color: #fff !important; }
.esh-home .esh-btn-cart.add-to-cart-added { background: #138a4b !important; }

.esh-home .esh-btn-ghost {
    background: var(--esh-bg) !important;
    color: var(--esh-ink) !important;
}
.esh-home .esh-btn-ghost:hover { background: var(--esh-ink) !important; color: #fff !important; }

.esh-home .esh-btn.store-stock-btn {
    background: var(--esh-ink) !important;
    color: #fff !important;
}

.esh-home .esh-btn-light {
    width: auto;
    padding: 0 22px;
    min-height: 48px;
    background: #fff !important;
    color: var(--esh-ink) !important;
}
.esh-home .esh-btn-light:hover { background: var(--esh-red) !important; color: #fff !important; }

/* ---------- BANNER INFERIOR ---------- */
.esh-mid-banner { padding-top: 8px; padding-bottom: 8px; }
.esh-mid-banner .esh-banner-img { max-width: 100%; }

/* ---------- RESEÑAS (bloque externo resenas.php) ---------- */
.esh-reviews-slot { padding: 24px 0; }

/* ---------- POR QUÉ ESMOKING ---------- */
.esh-about { padding-bottom: 56px; }
.esh-about-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    padding: 48px;
    border-radius: 28px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(215,25,32,.45), transparent 70%),
        radial-gradient(400px 260px at 0% 100%, rgba(215,25,32,.18), transparent 70%),
        var(--esh-ink);
}
.esh-about-copy .esh-h2 { color: #fff; margin-bottom: 14px; }
.esh-about-copy p {
    margin: 0 0 24px;
    max-width: 560px;
    color: rgba(255,255,255,.72);
    font-size: 1rem;
    line-height: 1.6;
}
.esh-about-copy .esh-eyebrow { color: #ff5a62; }
.esh-about-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.esh-about-stats li {
    padding: 20px;
    border-radius: 16px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    backdrop-filter: blur(6px);
}
.esh-about-stats strong {
    display: block;
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1;
    color: #fff;
}
.esh-about-stats span {
    display: block;
    margin-top: 6px;
    font-size: .82rem;
    color: rgba(255,255,255,.65);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1199.98px) {
    .esh-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .esh-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .esh-trust-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
    .esh-trust-item:nth-child(3) { border-left: 0; }
}

@media (max-width: 991.98px) {
    .esh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .esh-about-panel { grid-template-columns: 1fr; padding: 36px 28px; gap: 28px; }
}

@media (max-width: 767.98px) {
    .esh-wrap { padding: 0 14px; }
    .esh-section { padding: 28px 0; }
    .esh-intro { padding-top: 22px; }
    .esh-hero-arrow { display: none; }
    .esh-hero .esh-hero-dots { bottom: 4px; }
    .esh-hero .esh-hero-dots [data-bs-target] { width: 14px; height: 3px; }
    .esh-hero .esh-hero-dots .active { width: 24px; }

    /* Confianza: carrusel horizontal compacto */
    .esh-trust-row {
        display: flex;
        gap: 18px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 14px;
        scrollbar-width: none;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .esh-trust-row::-webkit-scrollbar { display: none; }
    .esh-trust-item { flex: 0 0 auto; justify-content: flex-start; scroll-snap-align: start; }
    .esh-trust-item + .esh-trust-item { border-left: 0; }
    .esh-trust-item > i { flex-basis: 34px; width: 34px; height: 34px; font-size: 15px; border-radius: 10px; }
    .esh-trust-item strong { font-size: .84rem; }
    .esh-trust-item span { font-size: .72rem; }

    .esh-intro-head p { font-size: .92rem; }
    .esh-cats { gap: 10px; }
    .esh-cat { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
    .esh-cat-icon { flex-basis: 42px; width: 42px; height: 42px; font-size: 17px; border-radius: 12px; }
    .esh-cat-text strong { font-size: .92rem; }
    .esh-cat-go { position: absolute; top: 16px; right: 14px; }

    .esh-section-head { margin-bottom: 14px; }
    .esh-section-sub { display: none; }
    .esh-more { padding: 7px 12px; font-size: .78rem; }

    /* Productos: fila deslizable con "asomo" de la siguiente tarjeta */
    .esh-grid {
        display: grid;
        grid-auto-flow: column;
        grid-template-columns: none;
        grid-auto-columns: 44%;
        gap: 10px;
        margin: 0 -14px;
        padding: 4px 14px 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 14px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .esh-grid::-webkit-scrollbar { display: none; }
    .esh-grid-item { scroll-snap-align: start; }
    .esh-home .esh-card:hover { transform: none; }
    .esh-card-body { padding: 10px 10px 12px; }
    .esh-card-title { font-size: .8rem !important; }
    .esh-card-price { font-size: 1rem; }
    .esh-card-meta { flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: 10px; }
    .esh-home .esh-btn { min-height: 38px; font-size: .78rem; border-radius: 10px; }

    .esh-about-panel { padding: 28px 20px; border-radius: 22px; }
    .esh-about-stats li { padding: 16px; }
}

@media (max-width: 400px) {
    .esh-grid { grid-auto-columns: 58%; }
}

@media (prefers-reduced-motion: reduce) {
    .esh-home *, .esh-home *::before, .esh-home *::after {
        transition: none !important;
        animation: none !important;
    }
}
