/* GolfShop category update — scoped only to homepage categories and category icons.
   Other cards, ad grids, header and footer remain untouched. */

/* New provided homepage banner. Query string deliberately busts the cached background. */
.home-hero-section {
    background-image: url('../img/home-banner-bg.webp?v=20261106');
}

/* Infinite, even-speed row of category cards. */
.home-category-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 2%, #000 98%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 2%, #000 98%, transparent 100%);
}
.home-category-track {
    width: max-content;
    display: flex;
    align-items: stretch;
    animation: golf-category-loop 38s linear infinite;
    will-change: transform;
}
.home-category-set {
    display: flex;
    flex: 0 0 auto;
    align-items: stretch;
    gap: 14px;
    padding-right: 14px; /* Makes each repeated set the same width. */
}
.home-category-carousel .home-category-tile {
    flex: 0 0 clamp(150px, 11.5vw, 190px);
    width: clamp(150px, 11.5vw, 190px);
    min-height: 132px;
}
.home-category-carousel .home-category-icon {
    width: 54px;
    height: 54px;
    margin-bottom: 9px;
}
.home-category-carousel .home-category-icon img {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
}
.home-category-carousel .home-category-tile:focus-visible {
    outline: 3px solid #5b9215;
    outline-offset: -3px;
}
.home-category-carousel:hover .home-category-track,
.home-category-carousel:focus-within .home-category-track {
    animation-play-state: paused;
}
@keyframes golf-category-loop {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* SVGs for the public categories page: preserve existing cards and layout. */
.category-card .category-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #f4f8e9;
}
.category-card .category-icon img {
    display: block;
    width: 46px;
    height: 46px;
    object-fit: contain;
}

@media (max-width: 575.98px) {
    .home-category-carousel .home-category-tile {
        flex-basis: 145px;
        width: 145px;
        min-height: 126px;
    }
    .home-category-set { gap: 10px; padding-right: 10px; }
    .home-category-track { animation-duration: 32s; }
}

/* Do not animate for visitors who request reduced motion.
   Let them swipe/scroll real categories instead (no duplicate links). */
@media (prefers-reduced-motion: reduce) {
    .home-category-carousel {
        overflow-x: auto;
        -webkit-mask-image: none;
        mask-image: none;
    }
    .home-category-track { animation: none; transform: none; will-change: auto; }
    .home-category-set[aria-hidden="true"] { display: none; }
}
