/* Homepage Showcase Sections */
.homepage-showcase {
    width: 100%;
    max-width: 100%;
    margin-top: 20px;
    overflow: hidden;
}

/* Section container */
.homepage-section {
    margin-bottom: 36px;
    padding: 16px 16px 24px;
    background: #fbedc0;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 4px;
}
.homepage-section:last-child {
    border-bottom: none;
}

/* Section header: centered, styled card */
.homepage-section .section-header {
    text-align: center;
    margin-bottom: 16px;
    padding: 16px;
    background: #f0f4fa;
    border: 1px solid rgba(0, 0, 96, 0.1);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 96, 0.06);
}

/* Category hero image */
.homepage-section .section-image-wrap {
    margin-bottom: 10px;
    overflow: hidden;
}
.homepage-section .section-hero-image {
    display: inline-block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    border-radius: 4px;
}

/* Title */
.homepage-section .section-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #000060;
}
.homepage-section .section-header h2 a {
    color: inherit;
    text-decoration: none;
}
.homepage-section .section-header h2 a:hover {
    text-decoration: underline;
}

/* Description */
.homepage-section .section-description {
    margin: 0 auto 8px;
    max-width: 100%;
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}

/* FOUC prevention: hide until Swiper initializes */
.homepage-section .homepage-carousel-products:not(.swiper) {
    max-height: 0;
    overflow: hidden;
}

/* Product carousel wrapper */
.homepage-section .section-products {
    position: relative;
}

/* Swiper container */
.homepage-section .swiper {
    position: relative;
    overflow: hidden;
}

/* Equal-height slides */
.homepage-section .swiper-slide {
    height: auto;
}

/* Swiper arrows — match equality (_theme.less:2475-2494) */
.homepage-section .swiper-button-prev,
.homepage-section .swiper-button-next {
    width: 40px;
    height: 80px;
    background: rgba(255,255,255,0.92);
    border: 1px solid #ddd;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    border-radius: 4px;
    top: 35%;
    color: #333;
}
.homepage-section .swiper-button-prev::after,
.homepage-section .swiper-button-next::after {
    font-size: 18px;
}
.homepage-section .swiper-button-prev { left: 0; }
.homepage-section .swiper-button-next { right: 0; }
.homepage-section .swiper-button-disabled {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* ── Product cards — equality blueprint with grid alignment ── */

/* Full-card link — propagate slide height through <a> to card */
.homepage-section .swiper-slide > a.product-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: #000060;
    text-decoration: none;
}

/* Card container — grid: auto name row, fixed image, flex price */
.homepage-section .product-card {
    display: grid;
    grid-template-rows: auto auto 1fr;
    flex-grow: 1;
    width: 100%;
    padding: 6px;
    background: #f0f4fa;
    border: 1px solid rgba(0,0,96,0.1);
    border-radius: 4px;
}

/* Product name — full display, no truncation */
.homepage-section .product-card-name {
    color: #000060;
}
.homepage-section .product-item-name {
    font-size: 1.4rem;
    line-height: 1.35;
}

/* Product photo — centered, 170px square, scales in narrow slides.
   Override global .product-item-photo { overflow:hidden } from _theme.less:212
   which collapses the auto grid row (overflow:hidden → min-height:0 in grid). */
.homepage-section .product-item-photo {
    text-align: center;
    position: relative;
    overflow: visible;
}
.homepage-section .product-item-photo img.product-image-photo {
    position: static;
    display: block;
    width: 170px;
    height: 170px;
    max-width: 100%;
    margin: 0 auto;
    object-fit: contain;
}

/* Price box — bottom of card via grid 1fr row + align-self */
.homepage-section .price-box {
    align-self: end;
}
.homepage-section .price-box .old-price {
    display: inline;
    text-decoration: line-through;
    font-size: 1.2rem;
    margin-right: 4px;
}
.homepage-section .price-box .special-price {
    display: inline;
}
.homepage-section .price-box .special-price .price {
    color: #800000;
    font-weight: 700;
}
.homepage-section .price-box .price {
    font-weight: 700;
}

/* "NEU" image badge — uses global .ephra-badge-neu from _theme.less:213 */
/* Discount badge — uses global .ephra-badge-discount from _theme.less:229 */
/* Discount text — matches product grid (.ephra-discount-badge in _theme.less) */
.homepage-section .ephra-discount-badge {
    text-align: center;
    margin-top: 2px;
    font-size: 1.1rem;
}
.homepage-section .ephra-discount-percent {
    font-weight: 600;
}

/* "Show all" teaser card at end of carousel */
.homepage-section .product-card-all {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    padding: 16px;
    background: #000060;
    border-radius: 4px;
    color: #fff;
}
.homepage-section .product-card-link-all {
    color: #fff;
    text-decoration: none;
}
.homepage-section .product-card-all-text {
    font-size: 1.4rem;
    line-height: 1.5;
}
.homepage-section .product-card-all:hover {
    background: #000080;
}

/* Custom promotion */
.homepage-section-custom-promotion .promotion-content {
    margin-bottom: 14px;
    text-align: center;
}

/* Responsive — section headers only; Swiper handles card count, cards stay fixed */
@media (max-width: 767px) {
    .homepage-section .section-hero-image {
        max-height: 200px;
    }
    .homepage-section .section-header h2 {
        font-size: 17px;
    }
}
@media (max-width: 480px) {
    .homepage-section .section-hero-image {
        max-height: 150px;
    }
    .homepage-section .section-header h2 {
        font-size: 15px;
    }
}
