/* =====================================================================
   Bloques de la tienda (editor visual /edit-store/)
   Se carga en templates_store/mi_pagina.html (plantilla Classic).
   Los bloques que ya existían (carrusel, Most Popular, productos...) usan
   tus CSS de siempre; aquí solo hay estilos de los bloques nuevos y de los
   layouts añadidos (slider, ocultar en móvil/PC, animaciones).
   ===================================================================== */
.store-section { position: relative; }
.se-anchor { position: absolute; top: -90px; left: 0; width: 1px; height: 1px; }

/* ---------- Contenedores y textos comunes ---------- */
.se-container { width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
.se-container--wide { max-width: none; }
.se-subtitle { margin: -.25rem 0 1rem; opacity: .7; font-size: .95rem; }
.se-heading { font-weight: 700; letter-spacing: -.01em; line-height: 1.2; margin: 0 0 .5rem; }
.se-align-left { text-align: left; }
.se-align-center { text-align: center; }
.se-align-right { text-align: right; }

/* ---------- Text ---------- */
.se-text .se-body { line-height: 1.65; opacity: .9; }
.se-text .se-body p:last-child { margin-bottom: 0; }

/* ---------- Image ---------- */
.se-image { margin-top: 0; margin-bottom: 0; }
.se-image img { display: block; width: var(--se-img-w, 100%); max-width: 100%; height: auto; }
.se-image.se-align-center img { margin-left: auto; margin-right: auto; }
.se-image.se-align-right img { margin-left: auto; }
.se-image figcaption { margin-top: .5rem; font-size: .875rem; opacity: .7; }

/* ---------- Button ---------- */
.se-btn-wrap .btn.se-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.se-btn-wrap .btn.se-btn-sm { font-size: .85rem; padding-top: .4rem; padding-bottom: .4rem; }
.se-btn-wrap .btn.se-btn-md { font-size: 1rem; padding-top: .62rem; padding-bottom: .62rem; }
.se-btn-wrap .btn.se-btn-lg { font-size: 1.15rem; padding-top: .85rem; padding-bottom: .85rem; }

/* ---------- Divider ---------- */
.se-divider { opacity: 1; border: 0; margin: 0 auto; color: inherit; }
.se-divider.se-align-left { margin-left: 0; }
.se-divider.se-align-right { margin-right: 0; margin-left: auto; }

/* ---------- Spacer ---------- */
.se-spacer { position: relative; width: 100%; }
.se-spacer > span { display: none; }

/* ---------- Video ---------- */
.se-video { overflow: hidden; background: #000; }
.se-video iframe, .se-video video { border: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Gallery ---------- */
.se-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--se-gap, 12px); }
@media (min-width: 768px) { .se-gallery { grid-template-columns: repeat(var(--se-cols-md, 3), minmax(0, 1fr)); } }
@media (min-width: 1024px) { .se-gallery { grid-template-columns: repeat(var(--se-cols, 4), minmax(0, 1fr)); } }
.se-gallery-item { margin: 0; }
.se-gallery-item a { display: block; }
.se-gallery-item img { display: block; width: 100%; aspect-ratio: var(--se-ratio, 1/1); object-fit: cover; border-radius: var(--se-radius, 12px); transition: transform .35s ease, box-shadow .35s ease; }
.se-gallery.se-zoom .se-gallery-item img:hover { transform: scale(1.025); box-shadow: 0 12px 28px rgba(15, 23, 42, .16); }
.se-gallery-item figcaption { margin-top: .4rem; font-size: .85rem; opacity: .75; }

/* ---------- Promo Banners ---------- */
.se-banners { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 768px) { .se-banners { grid-template-columns: repeat(var(--se-cols-md, 2), minmax(0, 1fr)); } }
@media (min-width: 1024px) { .se-banners { grid-template-columns: repeat(var(--se-cols, 3), minmax(0, 1fr)); } }
.se-banner {
    position: relative; display: flex; align-items: center; overflow: hidden;
    min-height: var(--se-h, 220px); border-radius: var(--se-radius, 16px);
    background: var(--se-banner-bg, #f3f4f6); text-align: left;
    transition: transform .2s ease, box-shadow .2s ease;
}
.se-banner:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15, 23, 42, .1); }
.se-banner-img {
    position: absolute; top: 0; right: 0; width: 60%; height: 100%; object-fit: cover;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 40%);
            mask-image: linear-gradient(to right, transparent 0, #000 40%);
}
.se-banner--background .se-banner-img { width: 100%; -webkit-mask-image: none; mask-image: none; }
.se-banner--background::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--se-banner-bg) 20%, transparent 85%); }
.se-banner-body { position: relative; z-index: 1; max-width: 62%; padding: 22px 24px; }
.se-banner-body h3 { margin: 0 0 .35rem; font-size: 1.45rem; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
.se-banner-body p { margin: 0 0 .9rem; font-size: .9rem; line-height: 1.4; opacity: .85; }
.se-banner .se-banner-btn.rounded-pill { font-size: .85rem; padding-top: .45rem; padding-bottom: .45rem; }
@media (max-width: 575px) { .se-banner-body { max-width: 72%; } .se-banner-body h3 { font-size: 1.25rem; } }

/* ---------- Categories ---------- */
.se-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 768px) { .se-cats { grid-template-columns: repeat(var(--se-cols-md, 3), minmax(0, 1fr)); } }
@media (min-width: 1024px) { .se-cats { grid-template-columns: repeat(var(--se-cols, 4), minmax(0, 1fr)); } }
.se-cat-card {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 10px 14px;
    border-radius: 16px; background: #fff; border: 1px solid rgba(15, 23, 42, .07); color: #111827;
    text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.se-cat-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 23, 42, .08); color: #111827; }
.se-cat-img { display: grid; place-items: center; width: 100%; aspect-ratio: 1; margin-bottom: 6px; border-radius: 12px; overflow: hidden; background: #f3f4f6; color: #9ca3af; font-size: 2rem; }
.se-cat-img img { width: 100%; height: 100%; object-fit: cover; }
.se-cat-name { font-weight: 600; text-align: center; line-height: 1.25; }
.se-cat-card small { font-size: .78rem; color: #6b7280; }
.se-cat-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.se-container.se-align-center .se-cat-pills, .se-cat-pills.se-align-center { justify-content: center; }
.se-cat-pill {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, .12); background: #fff; color: #111827; font-weight: 500; text-decoration: none;
}
.se-cat-pill span { padding: 1px 8px; border-radius: 999px; background: #f3f4f6; color: #6b7280; font-size: .75rem; }
.se-cat-pill:hover, .se-cat-pill.is-active { border-color: #111827; color: #111827; }

/* ---------- Countdown ---------- */
.se-cd-text { margin: 0 0 .75rem; opacity: .8; }
.se-cd-boxes { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.se-cd-box { min-width: 78px; padding: 12px 10px 9px; border-radius: 14px; background: var(--se-box-bg, #111827); color: var(--se-box-color, #fff); text-align: center; }
.se-cd-box span { display: block; font-size: 2rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.se-cd-box small { display: block; margin-top: 6px; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.se-countdown.is-expired .se-cd-boxes { display: none; }
.se-cd-expired { margin: .5rem 0 0; font-weight: 600; }
@media (max-width: 575px) { .se-cd-box { min-width: 64px; } .se-cd-box span { font-size: 1.5rem; } }

/* ---------- Icon Features ---------- */
.se-features { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 576px) { .se-features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .se-features { grid-template-columns: repeat(var(--se-cols, 3), minmax(0, 1fr)); } }
.se-feature { padding: 18px; }
.se-features.is-boxed .se-feature { background: #fff; color: #111827; border: 1px solid rgba(15, 23, 42, .07); border-radius: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.se-features.se-align-center .se-feature { text-align: center; }
.se-feature i { display: inline-block; margin-bottom: 8px; color: var(--se-icon-color, #111827); font-size: var(--se-icon-size, 28px); line-height: 1; }
.se-feature h3 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 700; }
.se-feature p { margin: 0; font-size: .92rem; opacity: .7; }

/* ---------- Social Media ---------- */
.se-social-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: .5rem; }
.se-social.se-align-center .se-social-list { justify-content: center; }
.se-social.se-align-right .se-social-list { justify-content: flex-end; }
.se-social-link {
    display: grid; place-items: center; width: var(--se-size, 44px); height: var(--se-size, 44px); border-radius: 50%;
    font-size: calc(var(--se-size, 44px) * .45); text-decoration: none; transition: transform .15s ease, opacity .15s ease;
}
.se-social-link:hover { transform: translateY(-2px); }
.se-social--color .se-social-link { background: var(--se-brand); color: #fff; }
.se-social--dark .se-social-link { background: #111827; color: #fff; }
.se-social--outline .se-social-link { border: 1.5px solid currentColor; color: inherit; }
.se-social-link.is-empty { opacity: .35; }

/* ---------- Map ---------- */
.se-map { overflow: hidden; background: #e5e7eb; }
.se-map iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- Layout "Slider" de los bloques de productos ---------- */
.masonry-container.is-slider,
.products-scroll.is-slider,
.web-products-scroll.is-slider {
    display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 10px; scrollbar-width: thin;
}
.masonry-container.is-slider > *,
.products-scroll.is-slider > *,
.web-products-scroll.is-slider > * {
    flex: 0 0 calc((100% - (var(--se-cols, 5) - 1) * 16px) / var(--se-cols, 5));
    min-width: 0; margin: 0; scroll-snap-align: start;
}
@media (max-width: 1023px) {
    .masonry-container.is-slider > *, .products-scroll.is-slider > *, .web-products-scroll.is-slider > * { flex-basis: calc((100% - 32px) / 3.2); }
}
@media (max-width: 767px) {
    .masonry-container.is-slider > *, .products-scroll.is-slider > *, .web-products-scroll.is-slider > * { flex-basis: calc((100% - 16px) / 2.2); }
}
.se-slider-host { position: relative; }
.se-slider-btn {
    position: absolute; z-index: 5; width: 40px; height: 40px; margin-top: -20px; border: 0; border-radius: 50%;
    display: grid; place-items: center; background: #fff; color: #111827; box-shadow: 0 6px 18px rgba(15, 23, 42, .18);
    cursor: pointer; transition: opacity .2s ease;
}
.se-slider-prev { left: 4px; }
.se-slider-next { right: 4px; }
.se-slider-btn[hidden] { display: none; }
@media (hover: none) { .se-slider-btn { display: none; } }

/* ---------- Visibilidad por dispositivo ---------- */
@media (max-width: 767px) { .se-hide-mobile { display: none !important; } }
@media (min-width: 768px) { .se-hide-desktop { display: none !important; } }

/* ---------- Animación de entrada (solo si el JS está activo) ---------- */
.se-js .se-anim { transition: opacity .7s ease, transform .7s ease; }
.se-js .se-anim:not(.se-in) { opacity: 0; }
.se-js .se-anim-fade-up:not(.se-in) { transform: translateY(28px); }
.se-js .se-anim-zoom-in:not(.se-in) { transform: scale(.96); }
@media (prefers-reduced-motion: reduce) {
    .se-js .se-anim, .se-js .se-anim:not(.se-in) { opacity: 1; transform: none; transition: none; }
}
