/* Homepage-only presentation. Product cards intentionally use the exact same
 * category-filters.css component as category, sale and search surfaces. */
body.kkui-homepage-preview {
    --kkui-home-card: #fff;
    --kkui-home-text: #17242b;
    --kkui-home-line: #dfe6e9;
    --kkui-home-radius: 18px;
    --kkui-home-shadow: 0 12px 34px rgba(20,42,52,.10);
}

body.kkui-homepage-preview .kkui-home-main > * { box-sizing: border-box; }

/* Slider: framing only. Image content and slider behaviour remain untouched. */
body.kkui-homepage-preview .kkui-home-hero {
    overflow: hidden !important;
    border: 1px solid rgba(10,68,78,.18) !important;
    border-radius: 18px !important;
    background: #fff;
    box-shadow: 0 14px 34px rgba(0,31,38,.14) !important;
}
body.kkui-homepage-preview .kkui-home-hero,
body.kkui-homepage-preview .kkui-home-hero > *,
body.kkui-homepage-preview .kkui-home-hero .metaslider,
body.kkui-homepage-preview .kkui-home-hero .ml-slider,
body.kkui-homepage-preview .kkui-home-hero .slides,
body.kkui-homepage-preview .kkui-home-hero .slides > li {
    border-radius: inherit;
}
body.kkui-homepage-preview .kkui-home-hero img { display: block; }

/* Shared benefits component: wider and lower. */
body.kkui-homepage-preview .kkui-home-benefits {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 0;
    width: 100%;
    margin: 16px 0 42px;
    overflow: hidden;
    border: 1px solid var(--kkui-home-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20,42,52,.07);
}
body.kkui-homepage-preview .kkui-home-benefit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 58px;
    padding: 9px 14px;
    border-right: 1px solid var(--kkui-home-line);
    color: var(--kkui-home-text);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.3;
}
body.kkui-homepage-preview .kkui-home-benefit:last-child { border-right: 0; }
body.kkui-homepage-preview .kkui-home-benefit__icon {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #eef5f6;
}
body.kkui-homepage-preview .kkui-home-benefit__icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
body.kkui-homepage-preview .kkui-home-benefit--truck .kkui-home-benefit__icon { color:#287c70;background:#e9f6f2; }
body.kkui-homepage-preview .kkui-home-benefit--shipping .kkui-home-benefit__icon { color:#346ca4;background:#edf4fb; }
body.kkui-homepage-preview .kkui-home-benefit--return .kkui-home-benefit__icon { color:#9a6b1d;background:#fbf4e6; }
body.kkui-homepage-preview .kkui-home-benefit--support .kkui-home-benefit__icon { color:#6e579c;background:#f2eef9; }

/* One heading style for homepage content sections. */
body.kkui-homepage-preview .kkui-home-section-title {
    position: relative;
    width: fit-content;
    margin: 54px auto 30px !important;
    padding-bottom: 14px;
    color: #fff !important;
    font-size: clamp(27px,3vw,38px) !important;
    font-weight: 850 !important;
    line-height: 1.12 !important;
    letter-spacing: -.025em !important;
    text-align: center !important;
}
body.kkui-homepage-preview .kkui-home-section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 62px;
    height: 3px;
    border-radius: 999px;
    background: #d4af37;
    transform: translateX(-50%);
}

/* Categories only; reviews keep their plugin's own appearance. */
body.kkui-homepage-preview .kkui-home-categories a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid var(--kkui-home-line);
    border-radius: 12px;
    background: #fff;
    color: var(--kkui-home-text);
    font-weight: 700;
    text-decoration: none;
}

@media (max-width:900px) {
    body.kkui-homepage-preview .kkui-home-benefits { grid-template-columns:repeat(2,minmax(0,1fr)); }
    body.kkui-homepage-preview .kkui-home-benefit:nth-child(2) { border-right:0; }
    body.kkui-homepage-preview .kkui-home-benefit:nth-child(-n+2) { border-bottom:1px solid var(--kkui-home-line); }
}
@media (max-width:600px) {
    body.kkui-homepage-preview .kkui-home-hero { border-radius:13px !important; }
    body.kkui-homepage-preview .kkui-home-benefits {
        grid-template-columns:1fr;
        width:100%;
        margin:13px 0 32px;
    }
    body.kkui-homepage-preview .kkui-home-benefit {
        justify-content:flex-start;
        min-height:54px;
        border-right:0;
        border-bottom:1px solid var(--kkui-home-line);
    }
    body.kkui-homepage-preview .kkui-home-benefit:last-child { border-bottom:0; }
    body.kkui-homepage-preview .kkui-home-section-title { margin-top:40px !important; margin-bottom:23px !important; }
}

/* 0.10.0-test32.43: homepage trust banner + slider finishing. */

/* KKUI-owned trust banner aligns with the site's 1440px content grid.
 * The component remains responsive and centered regardless of page-template width. */
body.kkui-homepage-preview .kkui-home-benefits {
    width: min(calc(100% - 48px), 1440px);
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

/* Slider: the surrounding section is no longer a rounded card.
 * Only the actual slide images are rounded. */
body.kkui-homepage-preview .kkui-home-hero {
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
body.kkui-homepage-preview .kkui-home-hero > *,
body.kkui-homepage-preview .kkui-home-hero .metaslider,
body.kkui-homepage-preview .kkui-home-hero .ml-slider,
body.kkui-homepage-preview .kkui-home-hero .slides,
body.kkui-homepage-preview .kkui-home-hero .slides > li {
    border-radius: 0 !important;
}

/* Keep the slider's own slide widths intact: 5px inner padding on each
 * neighbouring slide creates a consistent 10px visual gap without changing
 * the slider library's calculated item width. */
body.kkui-homepage-preview .kkui-home-hero .slides > li {
    box-sizing: border-box !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
}

body.kkui-homepage-preview .kkui-home-hero .slides > li img,
body.kkui-homepage-preview .kkui-home-hero .metaslider img,
body.kkui-homepage-preview .kkui-home-hero .ml-slider img {
    display: block;
    border-radius: 20px !important;
}

@media (max-width: 600px) {
    body.kkui-homepage-preview .kkui-home-benefits {
        width: calc(100% - 32px);
    }
    body.kkui-homepage-preview .kkui-home-hero {
        border-radius: 0 !important;
    }
    body.kkui-homepage-preview .kkui-home-hero .slides > li img,
    body.kkui-homepage-preview .kkui-home-hero .metaslider img,
    body.kkui-homepage-preview .kkui-home-hero .ml-slider img {
        border-radius: 14px !important;
    }
}

/* 0.10.0-test32.44: restore the homepage KKUI background after slider framing was removed. */
body.kkui-homepage-preview .kkui-home-main {
    background: #062A33 !important;
}
