/* #index8 simple responsive polish, close to the original layout. */

#index8 {
    padding-bottom: 0;
    background-image: url(/assets/pages/index/img/index8_bg.webp);
    background-image: -webkit-image-set(url("/assets/pages/index/img/index8_bg.webp") 1x, url("/assets/pages/index/img/index8_bg@2x.webp") 2x);
    background-repeat: no-repeat;
    background-size: contain;
    background-position-x: right;
}

#index8 ul {
    flex-wrap: wrap;
    padding-bottom: 30px;
    margin-right: auto;
    margin-left: auto;
}

@media (max-width: 768px) {


    #index8 ul li {
        min-width: 0;
        padding: 0;
    }

    #index8 p {
        padding: 0;
    }



}

@media (min-width: 769px) {
    #index8 {
        padding-bottom: 50px;
    }





}

@media (min-width: 1025px) {
    #index8 ul {
        flex-wrap: nowrap;
    }

}

#index8 {
    --i8-ink: #201b18;
    --i8-text: #5f5650;
    --i8-line: rgba(232, 51, 10, .13);
    margin: 0;
    padding: clamp(24px, 4.8svh, 36px) 16px clamp(18px, 3.8svh, 30px);
    overflow: hidden;
    background: linear-gradient(180deg, #fffaf7 0%, #fff 100%);
    text-align: center;
}

#index8 *,
#index8 *::before,
#index8 *::after {
    box-sizing: border-box;
}

#index8 p,
#index8 ul {
    margin: 0;
    text-align: center;
}

#index8 .i8-shell {
    width: 100%;
    max-width: 1600px;
    height: 100%;
    margin: 0 auto;
    padding-right: 0;
    padding-left: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    align-content: stretch;
    min-height: 0;
}

#index8 ul {
    --i8-card-w: clamp(118px, 65vw, 300px);
    display: grid;
    grid-template-columns: none;
    grid-template-rows: repeat(1, minmax(0, 1fr));
    grid-auto-flow: column;
    grid-auto-columns: var(--i8-card-w);
    gap: 10px;
    width: 100%;
    max-width: none;
    min-height: 0;
    justify-content: start;
    justify-items: stretch;
    margin: 16px auto 0;
    padding: 2px calc((100% - var(--i8-card-w)) / 2) 14px;
    overflow-x: auto;
    overflow-y: hidden;
    list-style: none;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: calc((100% - var(--i8-card-w)) / 2);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

#index8 ul::-webkit-scrollbar {
    display: none;
}

#index8 li {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    scroll-snap-align: center;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(67, 37, 24, .08);
}

#index8 ul li {
    width: auto;
}

#index8 .i8-hit {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 30px;
    padding: 5px 7px;
    border-bottom: 1px solid var(--i8-line);
    background: rgba(var(--clr-primary-rgb), .07);
    color: var(--clr-primary);
    font-size: var(--font-size-14);
    font-weight: 900;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
}

#index8 li img {
    display: block;
    min-height: 0;
    flex: 0 0 auto;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    transition: transform .35s ease, opacity .25s ease;
}

#index8 ul li img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center top;
}

#index8 li:hover img {
    transform: scale(1.07);
    opacity: .82;
}

#index8 p {
    margin-top: 6px;
    color: var(--i8-text);
    font-size: var(--font-size-14);
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
}

#index8 .i8-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 0;
    color: #9a6a54;
    font-size: var(--font-size-14);
    font-weight: 800;
    line-height: 1.3;
}

#index8 .i8-scroll-hint::before,
#index8 .i8-scroll-hint::after {
    display: block;
    width: 18px;
    height: 1px;
    background: rgba(var(--clr-primary-rgb), .26);
    content: "";
}

@media (max-width: 360px) {
    #index8 {
        min-height: min(520px, 100vh);
        padding-right: 12px;
        padding-left: 12px;
    }

    #index8 ul {
        --i8-card-w: clamp(108px, 31vw, 132px);
        gap: 8px;
    }
}

@media (min-width: 720px) {
    #index8 {
        height: auto;
        min-height: 0;
        padding: 54px clamp(22px, 3.5vw, 54px) 62px;
    }

    #index8 .i8-shell {
        display: block;
        height: auto;
    }

    #index8 ul {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: none;
        grid-auto-flow: row;
        grid-auto-columns: auto;
        gap: 14px;
        max-width: none;
        justify-content: initial;
        justify-items: initial;
        margin-top: 26px;
        padding: 0;
        overflow: visible;
        scroll-snap-type: none;
        scroll-padding-inline: 0;
    }

    #index8 li {
        border-radius: 14px;
        box-shadow: 0 14px 32px rgba(67, 37, 24, .1);
        scroll-snap-align: unset;
    }

    #index8 li img {
        flex: none;
    }

    #index8 ul li img {
        height: auto;
        object-fit: initial;
    }

    #index8 p {
        max-width: none;
        margin-top: 18px;
        text-align: center;
        font-size: var(--font-size-14);
    }

    #index8 .i8-scroll-hint {
        display: none;
    }
}

@media (min-width: 1180px) {
    #index8 ul {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        max-width: none;
        gap: 14px;
    }

    #index8 .i8-hit {
        min-height: 42px;
        padding: 7px 8px;
        font-size: var(--font-size-14);
    }

    #index8 li {
        transition: transform .2s ease, box-shadow .2s ease;
    }

    #index8 li:hover {
        transform: translateY(-4px);
        box-shadow: 0 18px 38px rgba(67, 37, 24, .14);
    }
}
