/*
 * Airek Sports home page — exactly four live sections:
 * image-only hero slides, categories, featured products, and core services.
 */

.home .home-hero-slider {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding-top: var(--header-height, 82px);
    background: #080b10;
}

.home .hero-slider-stage {
    position: relative;
    width: 100%;
    min-height: clamp(300px, 48vw, 820px);
    height: clamp(300px, 48vw, 820px);
    overflow: hidden;
    isolation: isolate;
    background: #090d13;
    touch-action: pan-y;
}

.home .hero-slide {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.72s var(--ease);
}

.home .hero-slide.is-active {
    z-index: 1;
    opacity: 1;
    pointer-events: auto;
}

.home .hero-slide picture,
.home .hero-slide img {
    display: block;
    width: 100%;
    height: 100%;
}

.home .hero-slide img {
    object-fit: contain;
    object-position: center;
    background: #090d13;
}

.home .home-categories,
.home .featured-products-section,
.home .home-services-section {
    border-top: 1px solid rgba(247, 243, 236, 0.075);
}

.home .home-categories {
    background: linear-gradient(180deg, rgba(24, 30, 39, 0.5), rgba(14, 18, 24, 0.3));
}

/* When every hero slide is intentionally inactive, content still clears the fixed header. */
.home .home-categories--first {
    padding-top: calc(var(--header-height) + clamp(68px, 7.5vw, 112px));
}

.home .featured-products-section {
    background: linear-gradient(180deg, rgba(11, 14, 18, 0), rgba(19, 24, 32, 0.26));
}

.home .home-services-section {
    background: linear-gradient(180deg, rgba(27, 34, 45, 0.68), rgba(11, 14, 18, 0));
}

.home .section-heading {
    margin-bottom: clamp(27px, 3.3vw, 42px);
}

.home .section-heading-row > p {
    max-width: 475px;
    color: var(--muted);
    line-height: 1.68;
}

/* One horizontal category row. The scrollable viewport is contained within its section. */
.home .category-slider {
    position: relative;
    min-width: 0;
}

.home .category-slider-controls {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 13px;
}

.home .category-slider-control {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line-gold);
    border-radius: 50%;
    background: rgba(20, 25, 34, 0.88);
    color: var(--gold-soft);
    transition: color 0.24s var(--ease), background 0.24s var(--ease), border-color 0.24s var(--ease), transform 0.24s var(--ease);
}

.home .category-slider-control:hover:not(:disabled) {
    border-color: var(--gold-soft);
    background: var(--gold-soft);
    color: #11151b;
    transform: translateY(-2px);
}

.home .category-slider-control:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.home .category-slider-viewport {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    scroll-behavior: smooth;
    scroll-snap-type: inline mandatory;
}

.home .category-slider-viewport::-webkit-scrollbar {
    display: none;
}

.home .category-slider-track {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
    gap: clamp(12px, 1.15vw, 18px);
    padding: 1px;
}

.home .category-slider-card {
    flex: 0 0 clamp(230px, 22vw, 370px);
    min-width: 0;
    min-height: clamp(280px, 26vw, 390px);
    scroll-snap-align: start;
}

.home .premium-category-card,
.home .premium-product-card,
.home .premium-service-card {
    min-width: 0;
    border-color: rgba(247, 243, 236, 0.12);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(247, 243, 236, 0.05);
}

.home .premium-category-card {
    border-radius: 14px;
}

.home .premium-category-card::before {
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 1px solid transparent;
    border-radius: inherit;
    content: "";
    pointer-events: none;
    transition: border-color 0.3s var(--ease);
}

.home .premium-category-card img {
    filter: saturate(0.76) contrast(1.04);
}

.home .premium-category-card .category-card-overlay {
    background: linear-gradient(180deg, rgba(6, 8, 11, 0.02) 13%, rgba(6, 8, 11, 0.93) 93%);
}

.home .premium-category-card .category-card-content {
    right: clamp(16px, 1.5vw, 22px);
    bottom: clamp(16px, 1.5vw, 22px);
    left: clamp(16px, 1.5vw, 22px);
}

.home .premium-category-card .category-index {
    margin-bottom: 16px;
}

.home .premium-category-card .category-card-content strong {
    font-size: clamp(1.65rem, 2.05vw, 2.18rem);
}

.home .premium-category-card .category-card-content small {
    max-width: 100%;
    font-size: 0.7rem;
}

/* Six products per page: 3 × 2 on desktop, then 2 and 1 responsive columns. */
.home .premium-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 1.35vw, 22px);
}

.home .premium-product-card {
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(26, 32, 42, 0.92), rgba(13, 17, 23, 0.96));
    backdrop-filter: blur(14px) saturate(1.06);
}

.home .premium-product-card .product-image-wrap {
    aspect-ratio: 1.06 / 1;
}

.home .premium-product-card .product-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: clamp(17px, 1.5vw, 22px);
}

.home .premium-product-card .product-card-body > p {
    min-height: 0;
    margin-bottom: 16px;
}

.home .premium-product-card .product-card-footer {
    margin-top: auto;
}

.home .homepage-pagination {
    display: grid;
    grid-template-columns: minmax(104px, 1fr) auto minmax(104px, 1fr);
    align-items: center;
    gap: 14px;
    margin-top: clamp(28px, 4vw, 48px);
}

.home .homepage-pagination > a,
.home .homepage-pagination > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    color: var(--gold-soft);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home .pagination-previous {
    justify-self: start;
}

.home .pagination-next {
    justify-self: end;
}

.home .homepage-pagination .is-disabled {
    color: var(--muted);
    opacity: 0.42;
}

.home .pagination-pages {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
}

.home .pagination-pages a,
.home .pagination-pages span {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted-strong);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: normal;
    text-transform: none;
    transition: border-color 0.22s var(--ease), background 0.22s var(--ease), color 0.22s var(--ease);
}

.home .pagination-pages a:hover,
.home .pagination-pages .is-current {
    border-color: var(--gold-soft);
    background: var(--gold-soft);
    color: #11151b;
}

.home .premium-service-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(14px, 1.2vw, 20px);
}

.home .premium-service-card {
    min-height: clamp(275px, 22vw, 332px);
    border-radius: 14px;
}

.home .premium-service-card .service-card-content {
    right: 19px;
    bottom: 19px;
    left: 19px;
}

.home .premium-service-card .service-card-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 30px;
}

.home .premium-service-card .service-card-content strong {
    font-size: clamp(1.56rem, 1.95vw, 2rem);
}

.home .premium-service-card .service-card-content small {
    min-height: 0;
    font-size: 0.7rem;
}

@media (hover: hover) and (pointer: fine) {
    .home .premium-category-card:hover::before {
        border-color: rgba(201, 168, 106, 0.58);
    }

    .home .premium-category-card:hover img {
        filter: saturate(1) contrast(1.07);
        transform: scale(1.075);
    }

    .home .premium-category-card:hover .category-card-link {
        max-height: 28px;
        margin-top: 14px;
        opacity: 1;
    }

    .home .premium-product-card:hover,
    .home .premium-service-card:hover {
        border-color: var(--line-gold);
        box-shadow: 0 26px 56px rgba(0, 0, 0, 0.31), inset 0 1px 0 rgba(247, 243, 236, 0.08);
        transform: translateY(-6px);
    }
}

@media (max-width: 1100px) {
    .home .premium-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home .premium-service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home .category-slider-card {
        flex-basis: clamp(245px, 31vw, 360px);
    }
}

@media (max-width: 700px) {
    .home .hero-slider-stage {
        min-height: clamp(320px, 90vw, 560px);
        height: clamp(320px, 90vw, 560px);
    }

    .home .category-slider-card {
        flex-basis: min(82vw, 330px);
        min-height: clamp(275px, 81vw, 350px);
    }

    .home .premium-product-grid,
    .home .premium-service-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .home .homepage-pagination {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .home .pagination-pages {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .home .pagination-previous,
    .home .pagination-next {
        grid-row: 2;
    }

    .home .pagination-next {
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .home .category-slider-controls {
        margin-bottom: 10px;
    }

    .home .category-slider-control {
        width: 40px;
        height: 40px;
    }

    .home .premium-category-card .category-card-content small {
        display: none;
    }

    .home .premium-category-card .category-card-link {
        max-height: 28px;
        margin-top: 12px;
        color: var(--gold-soft);
        font-size: 0.55rem;
        letter-spacing: 0.065em;
        opacity: 1;
    }
}


/* Keep mobile homepage product cards vertically composed and readable. */
@media (max-width: 700px) {
    .home .premium-product-card {
        display: flex;
        flex-direction: column;
    }

    .home .premium-product-card .product-image-wrap {
        height: auto;
        min-height: 0;
        aspect-ratio: 1.06 / 1;
    }
}

.home .pagination-ellipsis {
    width: 38px;
    height: 38px;
    border-color: transparent;
    color: var(--muted);
    font-size: 1.05rem;
}

@media (prefers-reduced-motion: reduce) {
    .home .hero-slide,
    .home .category-slider-viewport,
    .home .premium-category-card img,
    .home .premium-product-card,
    .home .premium-service-card {
        scroll-behavior: auto;
        transition: none;
    }
}
