/* Bloques de portada que no existían en la versión de secciones fijas. */

.st-home-text,
.st-home-image-text,
.st-home-gallery,
.st-home-testimonials,
.st-home-video {
    padding: clamp(30px, 5vw, 64px) 0;
}

/* Encabezado del catálogo con acciones (Ver todos, flechas) */
.st-home-catalog-heading--actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 16px;
}

.st-home-catalog-heading--actions .st-home-catalog-title {
    margin: 0;
}

.st-home-block-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.st-home-block-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
}

.st-home-block-view-all i {
    font-size: 13px;
    transition: transform 0.15s ease;
}

.st-home-block-view-all:hover i {
    transform: translateX(3px);
}

.st-home-catalog-block--offers .st-home-block-view-all {
    color: var(--st-accent-fg);
}

/* Productos en carrusel. Sin min-width: 0 la columna de la grilla toma el
   ancho de toda la fila de productos y desborda la página. */
.st-home-catalog-block.st-home-products--carousel {
    min-width: 0;
}

.st-home-products-carousel__slide {
    width: clamp(200px, 23vw, 260px);
}

.st-home-catalog-layout:not(.st-home-catalog-layout--no-aside) .st-home-products-carousel__slide {
    width: clamp(190px, 19vw, 240px);
}

.st-home-products-carousel__slide > .st-product-card {
    height: 100%;
}

/* Uno grande y el resto chicos */
.st-home-spotlight {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.st-home-spotlight--solo {
    grid-template-columns: minmax(0, 520px);
}

.st-home-spotlight__rest {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

/* Banner con texto encima */
.st-home-image-banner__media--overlay {
    position: relative;
    color: #fff;
    text-decoration: none;
}

.st-home-image-banner__media--overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(0 0 0 / 0.05) 0%, rgb(0 0 0 / 0.45) 100%);
    pointer-events: none;
}

.st-home-image-banner__media--center::after {
    background: rgb(0 0 0 / 0.32);
}

.st-home-image-banner__media--left::after {
    background: linear-gradient(90deg, rgb(0 0 0 / 0.55) 0%, rgb(0 0 0 / 0.05) 70%);
}

.st-home-image-banner__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: clamp(18px, 4vw, 48px);
}

.st-home-image-banner__media--center .st-home-image-banner__overlay {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.st-home-image-banner__media--left .st-home-image-banner__overlay {
    align-items: flex-start;
    justify-content: center;
    max-width: 60%;
}

.st-home-image-banner__media--bottom .st-home-image-banner__overlay {
    align-items: flex-start;
    justify-content: flex-end;
}

.st-home-image-banner__overlay-title {
    font-size: clamp(22px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 14px rgb(0 0 0 / 0.25);
}

.st-home-image-banner__overlay-text {
    max-width: 560px;
    font-size: clamp(14px, 1.6vw, 18px);
    line-height: 1.45;
    text-shadow: 0 1px 10px rgb(0 0 0 / 0.3);
}

body.theme-store .st-home-image-banner__overlay-button {
    margin-top: 6px;
    pointer-events: none;
}

/* Texto */
.st-home-text__card {
    display: grid;
    gap: 14px;
    max-width: 820px;
}

.st-home-text--center .st-home-text__card {
    margin: 0 auto;
    justify-items: center;
    text-align: center;
}

.st-home-text--soft .st-home-text__card,
.st-home-text--accent .st-home-text__card {
    max-width: none;
    padding: clamp(26px, 5vw, 56px);
    border-radius: calc(var(--st-radius) + 12px);
}

.st-home-text--soft .st-home-text__card {
    background: var(--st-bg-alt);
    border: 1px solid var(--st-border);
}

.st-home-text--accent .st-home-text__card {
    background: var(--st-accent-bg);
    color: var(--st-accent-fg);
}

.st-home-text--accent .st-section-kicker {
    color: color-mix(in srgb, var(--st-accent-fg) 78%, transparent);
}

.st-home-text .st-section-kicker,
.st-home-image-text .st-section-kicker,
.st-home-video .st-section-kicker {
    margin: 0;
}

.st-home-text__body,
.st-home-image-text__body,
.st-home-video__body {
    color: var(--st-fg-soft, var(--st-fg));
    font-size: 16px;
    line-height: 1.65;
}

.st-home-text--center .st-home-text__body {
    max-width: 680px;
}

.st-home-text--accent .st-home-text__body {
    color: inherit;
}

.st-home-text__button,
.st-home-image-text__button,
.st-home-video__button {
    justify-self: start;
    margin-top: 4px;
}

.st-home-text--center .st-home-text__button {
    justify-self: center;
}

/* Imagen y texto */
.st-home-image-text__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(24px, 5vw, 64px);
    align-items: center;
}

.st-home-image-text--right .st-home-image-text__media {
    order: 2;
}

.st-home-image-text--no-image .st-home-image-text__layout {
    grid-template-columns: minmax(0, 820px);
}

.st-home-image-text__media {
    overflow: hidden;
    border-radius: calc(var(--st-radius) + 8px);
    background: var(--st-bg-alt);
}

.st-home-image-text__media img {
    display: block;
    width: 100%;
    height: auto;
}

.st-home-image-text__content {
    display: grid;
    gap: 14px;
}

/* Galería */
.st-home-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(10px, 1.6vw, 18px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.st-home-gallery--cols-2 .st-home-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.st-home-gallery--cols-4 .st-home-gallery__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.st-home-gallery--natural .st-home-gallery__grid {
    align-items: start;
}

.st-home-gallery__link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--st-radius-lg);
    background: var(--st-bg-alt);
    color: #fff;
    text-decoration: none;
}

.st-home-gallery__link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.st-home-gallery--square .st-home-gallery__link { aspect-ratio: 1 / 1; }
.st-home-gallery--portrait .st-home-gallery__link { aspect-ratio: 4 / 5; }
.st-home-gallery--landscape .st-home-gallery__link { aspect-ratio: 4 / 3; }

.st-home-gallery--natural .st-home-gallery__link img {
    height: auto;
}

a.st-home-gallery__link:hover img {
    transform: scale(1.04);
}

.st-home-gallery__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 14px 12px;
    background: linear-gradient(180deg, transparent 0%, rgb(0 0 0 / 0.6) 100%);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

/* Testimonios */
.st-home-testimonials__viewport {
    position: relative;
}

.st-home-testimonial {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: clamp(260px, 30vw, 360px);
    margin: 0;
    padding: 22px;
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-lg);
    background: var(--st-bg);
    color: var(--st-fg);
}

.st-home-testimonial__stars {
    display: inline-flex;
    gap: 2px;
    color: #f5a623;
    font-size: 15px;
}

.st-home-testimonial__text {
    flex: 1 1 auto;
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}

.st-home-testimonial__author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.st-home-testimonial__author img,
.st-home-testimonial__initial {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.st-home-testimonial__initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--st-accent-bg);
    color: var(--st-accent-fg);
    font-weight: 800;
}

.st-home-testimonial__author > span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.st-home-testimonial__author strong {
    font-size: 15px;
}

.st-home-testimonial__author small {
    color: var(--st-fg-muted);
    font-size: 13px;
}

/* Video */
.st-home-video__layout {
    display: grid;
    gap: clamp(24px, 5vw, 56px);
    align-items: center;
}

.st-home-video:not(.st-home-video--with-text) .st-home-video__layout {
    max-width: 960px;
    margin: 0 auto;
}

.st-home-video--with-text .st-home-video__layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

.st-home-video__content {
    display: grid;
    gap: 14px;
}

.st-home-video__frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: calc(var(--st-radius) + 8px);
    background: #111;
}

.st-home-video__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

body.theme-store .st-home-video__poster {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #111;
    cursor: pointer;
}

.st-home-video__poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.92;
    transition: opacity 0.2s ease;
}

.st-home-video__poster:hover img {
    opacity: 1;
}

.st-home-video__play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: rgb(255 255 255 / 0.94);
    color: #111;
    font-size: 38px;
    transform: translate(-50%, -50%);
    box-shadow: 0 8px 28px rgb(0 0 0 / 0.3);
    transition: transform 0.18s ease;
}

.st-home-video__play i {
    margin-left: 4px;
}

.st-home-video__poster:hover .st-home-video__play {
    transform: translate(-50%, -50%) scale(1.06);
}

@media (max-width: 1023px) {
    .st-home-gallery--cols-4 .st-home-gallery__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .st-home-spotlight {
        grid-template-columns: minmax(0, 1fr);
    }

    .st-home-products-carousel__slide,
    .st-home-catalog-layout:not(.st-home-catalog-layout--no-aside) .st-home-products-carousel__slide {
        width: 172px;
    }

    .st-home-image-text__layout,
    .st-home-video--with-text .st-home-video__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .st-home-image-text--right .st-home-image-text__media {
        order: 0;
    }

    .st-home-gallery__grid,
    .st-home-gallery--cols-3 .st-home-gallery__grid,
    .st-home-gallery--cols-4 .st-home-gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .st-home-image-banner__media--left .st-home-image-banner__overlay {
        max-width: none;
    }

    .st-home-image-banner__overlay {
        gap: 6px;
    }

    .st-home-image-banner__overlay-text {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .st-home-testimonial {
        width: 270px;
        padding: 18px;
    }

    .st-home-video__play {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }
}
