/* Nordic Product Carousel Styles */
/* Version: 1.0.0 */
/* Note: Product card styling comes from your theme's product-card.php template */

/* ============================================
   BASE SWIPER STYLES FOR .npc-swiper
   ============================================ */
.npc-swiper {
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
    list-style: none;
    padding: 0;
    z-index: 1;
    display: block;
}

.npc-swiper .swiper-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    transition-property: transform;
    transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
    box-sizing: content-box;
}

.npc-swiper .swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    transition-property: transform;
    display: block;
}

/* ============================================
   CAROUSEL WRAPPER
   ============================================ */
.nordic-product-carousel-wrapper {
    margin: 2rem 0;
    position: relative;
    padding: 0 50px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Carousel Title */
.npc-carousel-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 2rem;
    font-family: inherit;
}

/* Screen reader only text */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ============================================
   CAROUSEL CONTAINER
   ============================================ */
.nordic-product-carousel {
    position: relative;
    width: 100%;
    height: auto;
    overflow: visible;
}

.nordic-product-carousel .swiper-slide {
    height: auto;
    display: flex;
    align-items: stretch;
}

/* Ensure product cards fill the slide */
.nordic-product-carousel .swiper-slide > * {
    width: 100%;
}

/* ============================================
   NAVIGATION BUTTONS
   ============================================ */
.nordic-product-carousel-wrapper .swiper-button-prev:after,
.nordic-product-carousel-wrapper .swiper-button-next:after {
    font-size: 24px;
}

.nordic-product-carousel-wrapper .swiper-button-prev,
.nordic-product-carousel-wrapper .swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: #cc171e;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 0;
}

.nordic-product-carousel-wrapper .swiper-button-prev:hover,
.nordic-product-carousel-wrapper .swiper-button-next:hover {
    background-color: #a81216;
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.nordic-product-carousel-wrapper .swiper-button-prev:focus,
.nordic-product-carousel-wrapper .swiper-button-next:focus {
    background-color: #a81216;
    color: #fff;
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.nordic-product-carousel-wrapper .swiper-button-prev {
    left: 0;
}

.nordic-product-carousel-wrapper .swiper-button-next {
    right: 0;
}

.nordic-product-carousel .swiper-button-prev:after,
.nordic-product-carousel .swiper-button-next:after {
    content: none;
}

/* ============================================
   PAGINATION
   ============================================ */
.npc-pagination-nav {
    margin-top: 2rem;
    text-align: center;
    display: block !important;
    visibility: visible !important;
}

.npc-pagination-list,
.nordic-product-carousel-wrapper .swiper-pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 8px !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.npc-pagination-list li {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    visibility: visible !important;
}

/* Pagination bullets */
.nordic-product-carousel-wrapper .swiper-pagination-bullet,
.npc-pagination-list .swiper-pagination-bullet,
.npc-pagination-list button {
    width: 12px !important;
    height: 12px !important;
    background: #ddd !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border: none !important;
    padding: 0 !important;
    display: block !important;
    margin: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
}

.nordic-product-carousel-wrapper .swiper-pagination-bullet:hover,
.npc-pagination-list .swiper-pagination-bullet:hover,
.npc-pagination-list button:hover {
    background: #666 !important;
    transform: scale(1.2) !important;
}

.nordic-product-carousel-wrapper .swiper-pagination-bullet:focus,
.npc-pagination-list .swiper-pagination-bullet:focus,
.npc-pagination-list button:focus {
    background: #666 !important;
    outline: 2px solid #007cba !important;
    outline-offset: 2px !important;
}

.nordic-product-carousel-wrapper .swiper-pagination-bullet-active,
.npc-pagination-list .swiper-pagination-bullet-active,
.npc-pagination-list button.swiper-pagination-bullet-active {
    background: #333 !important;
    transform: scale(1.3) !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .nordic-product-carousel-wrapper {
        padding: 0 40px;
    }
    
    .npc-carousel-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .nordic-product-carousel-wrapper {
        padding: 0 50px;
    }
    
    .nordic-product-carousel-wrapper .swiper-button-prev,
    .nordic-product-carousel-wrapper .swiper-button-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .npc-carousel-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    /* Larger pagination bullets on mobile */
    .nordic-product-carousel-wrapper .swiper-pagination-bullet,
    .npc-pagination-list .swiper-pagination-bullet,
    .npc-pagination-list button {
        width: 14px !important;
        height: 14px !important;
    }
}

@media (max-width: 480px) {
    .nordic-product-carousel-wrapper {
        padding: 0 45px;
    }
    
    .nordic-product-carousel-wrapper .swiper-button-prev {
        left: 0;
    }
    
    .nordic-product-carousel-wrapper .swiper-button-next {
        right: 0;
    }
    
    .npc-carousel-title {
        font-size: 1.5rem;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */
@media (prefers-contrast: high) {
    .nordic-product-carousel-wrapper .swiper-button-prev,
    .nordic-product-carousel-wrapper .swiper-button-next {
        border: 3px solid;
    }
    
    .nordic-product-carousel-wrapper .swiper-pagination-bullet,
    .npc-pagination-list .swiper-pagination-bullet,
    .npc-pagination-list button {
        border: 2px solid !important;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .nordic-product-carousel-wrapper .swiper-button-prev,
    .nordic-product-carousel-wrapper .swiper-button-next,
    .nordic-product-carousel-wrapper .swiper-pagination-bullet {
        transition: none !important;
    }
}
