/**
 * PCStore Homepage Hero Slider
 */

.pcstore-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.pcstore-hero__slides {
    display: grid;
    width: 100%;
}

.pcstore-hero__slide {
    grid-area: 1 / 1;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 450ms ease, visibility 450ms ease;
}

.pcstore-hero__slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
}

.pcstore-hero__link,
.pcstore-hero picture {
    display: block;
    width: 100%;
}

.pcstore-hero__image {
    display: block;
    width: 100%;
    height: auto;
}

/* Navigation controls — added in the next step */
.pcstore-hero__arrow,
.pcstore-hero__dots {
    position: absolute;
    z-index: 2;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .pcstore-hero__slide {
        transition: none;
    }
}

/* Hero Slider Navigation Arrows */

.pcstore-hero__arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 200ms ease;
}

.pcstore-hero__arrow:hover {
    background: rgba(0, 0, 0, 0.65);
}

.pcstore-hero__arrow--prev {
    left: 20px;
}

.pcstore-hero__arrow--next {
    right: 20px;
}

/* Pagination Dots */

.pcstore-hero__dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transform: translateX(-50%);
}

.pcstore-hero__dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: background 200ms ease, transform 200ms ease;
}

.pcstore-hero__dot.is-active {
    background: #fff;
    transform: scale(1.25);
}

/* Keyboard Accessibility */

.pcstore-hero__arrow:focus-visible,
.pcstore-hero__dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* Mobile */

@media (max-width: 767px) {
    .pcstore-hero__arrow {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .pcstore-hero__arrow--prev {
        left: 10px;
    }

    .pcstore-hero__arrow--next {
        right: 10px;
    }

    .pcstore-hero__dots {
        bottom: 10px;
    }
}






/* =========================================
   Hero Slider — Responsive Navigation
========================================= */

/* Desktop: Hide arrows until hover */
@media (min-width: 1025px) {
    .pcstore-hero__arrow {
        opacity: 0;
        visibility: hidden;
        transition: opacity 200ms ease, visibility 200ms ease, background 200ms ease;
    }

    .pcstore-hero:hover .pcstore-hero__arrow,
    .pcstore-hero:focus-within .pcstore-hero__arrow {
        opacity: 1;
        visibility: visible;
    }
}

/* Tablet: Always show arrows */
@media (min-width: 768px) and (max-width: 1024px) {
    .pcstore-hero__arrow {
        opacity: 1;
        visibility: visible;
    }
}

/* Mobile: Hide arrows, use swipe navigation */
@media (max-width: 767px) {
    .pcstore-hero__arrow {
        display: none;
    }
}

/* Pagination dots */
.pcstore-hero__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: none;
    transition: width 250ms ease, background 250ms ease;
}

/* Active dot becomes a pill-shaped bar */
.pcstore-hero__dot.is-active {
    width: 30px;
    border-radius: 20px;
    transform: none;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .pcstore-hero__arrow,
    .pcstore-hero__dot {
        transition: none;
    }
}

/* Hero Slider — Active Dot Progress Animation */

.pcstore-hero__dot {
    position: relative;
    overflow: hidden;
}

.pcstore-hero__dot.is-active {
    background: rgba(255, 255, 255, 0.4);
}

.pcstore-hero__dot.is-active::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #fff;
    border-radius: inherit;
    transform: scaleX(0);
    transform-origin: left center;
    animation: pcstore-hero-progress 5s linear forwards;
}

@keyframes pcstore-hero-progress {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

/* Pause progress when autoplay is paused */
.pcstore-hero.is-paused .pcstore-hero__dot.is-active::after {
    animation-play-state: paused;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .pcstore-hero__dot.is-active::after {
        animation: none;
        transform: scaleX(1);
    }
}

/* Mobile — Smaller Slider Dots */
@media (max-width: 767px) {
    .pcstore-hero__dots {
        gap: 6px;
        bottom: 8px;
    }

    .pcstore-hero__dot {
        width: 6px;
        height: 6px;
    }

    .pcstore-hero__dot.is-active {
        width: 22px;
        height: 6px;
    }
}