/* v2 horizontal scroll primitive — shared between home, category, etc. */

.v2-hscroll {
    position: relative;
    /* Clip horizontal overflow so off-screen tiles don't trigger body scroll,
       but keep nav buttons (positioned at left/right -22px) visible. */
    overflow-x: clip;
    overflow-y: visible;
}
.v2-hscroll__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 320px;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 4px 0 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.v2-hscroll__track::-webkit-scrollbar { display: none; }
.v2-hscroll__track > * { scroll-snap-align: start; }

.v2-hscroll__nav {
    position: absolute;
    top: calc(50% - 24px);
    transform: translateY(-50%);
    width: 44px; height: 44px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--ink);
    font-size: 24px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    display: grid;
    place-items: center;
    padding-bottom: 3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.15s, color 0.15s;
}
.v2-hscroll__nav:hover { background: var(--brand-teal); color: #fff; border-color: var(--brand-teal); }
.v2-hscroll__nav--prev { left: -22px; }
.v2-hscroll__nav--next { right: -22px; }
.v2-hscroll__nav[disabled] { opacity: 0.3; cursor: default; }

@media (hover: none) {
    .v2-hscroll::after {
        content: "";
        position: absolute;
        top: 0; bottom: 12px;
        right: 0;
        width: 32px;
        pointer-events: none;
        background: linear-gradient(to right, rgba(250,250,247,0), var(--bg-page));
    }
}

@media (max-width: 720px) {
    .v2-hscroll__nav { display: none; }
}

/* ---------- TILE (square image + caption below — used in any hscroll) ---------- */
.v2-tile {
    display: block;
    width: 320px;
    text-decoration: none;
    color: inherit;
    position: relative;
}
.v2-tile__img {
    width: 320px;
    height: 320px;
    background: var(--bg-section);
    overflow: hidden;
    position: relative;
    border-radius: var(--radius);
}
.v2-tile__img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.v2-tile:hover .v2-tile__img img {
    transform: scale(1.03);
}
.v2-tile__caption {
    padding: 14px 4px 0;
}
.v2-tile__name {
    font-family: var(--ff-head);
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.2px;
}

@media (max-width: 720px) {
    .v2-tile,
    .v2-tile__img { width: 200px; }
    .v2-tile__img { height: 200px; }
    .v2-tile__name { font-size: 16px; }
    .v2-tile__caption { padding-top: 10px; }
}
