/* ================================
   NF Product Slider Merch – SCOPED (no heart, same arrows as Offer)
   ================================ */

.nf-product-slider-merch {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: visible;
}

.nf-product-slider-merch .mmpw-swiper-container.nf-merch-swiper-container,
.nf-product-slider-merch .mmpw-swiper-container {
    width: 100%;
    padding: 0;
    margin: 0 auto;
    overflow: hidden;
}
.nf-product-slider-merch .swiper-wrapper {
    overflow: visible !important;
}

.nf-product-slider-merch .swiper-slide,
.nf-product-slider-merch .nf-merch-slide {
    flex-shrink: 0;
    width: auto;
    flex: 0 0 auto;
    box-sizing: border-box;
}
.nf-product-slider-merch .swiper-slide.mmpw-product-item,
.nf-product-slider-merch .nf-merch-product-item {
    margin: 0;
    padding: 0 2%;
    box-sizing: border-box;
}

/* Slides per view – desktop only; mobile uses 100% in @media below */
@media (min-width: 768px) {
.nf-product-slider-merch .mmpw-swiper-container[data-slides="1"] .swiper-slide { width: 100% !important;     max-width: 100%;      flex-basis: 100%; }
.nf-product-slider-merch .mmpw-swiper-container[data-slides="2"] .swiper-slide { width: 50% !important;      max-width: 50%;       flex-basis: 50%; }
.nf-product-slider-merch .mmpw-swiper-container[data-slides="3"] .swiper-slide { width: 33.3333% !important; max-width: 33.3333%;  flex-basis: 33.3333%; }
.nf-product-slider-merch .mmpw-swiper-container[data-slides="4"] .swiper-slide { width: 25% !important;      max-width: 25%;       flex-basis: 25%; }
.nf-product-slider-merch .mmpw-swiper-container[data-slides="5"] .swiper-slide { width: 20% !important;      max-width: 20%;       flex-basis: 20%; }
.nf-product-slider-merch .mmpw-swiper-container[data-slides="6"] .swiper-slide { width: 16.6667% !important; max-width: 16.6667%;  flex-basis: 16.6667%; }
.nf-product-slider-merch .mmpw-swiper-container[data-slides="7"] .swiper-slide { width: 14.2857% !important; max-width: 14.2857%;  flex-basis: 14.2857%; }
.nf-product-slider-merch .mmpw-swiper-container[data-slides="8"] .swiper-slide { width: 12.5% !important;    max-width: 12.5%;     flex-basis: 12.5%; }
}

/* Section title */
.nf-product-slider-merch .nf-merch-title {
    color: #282828;
    font-size: 18px;
    font-family: "Fira Sans", Sans-serif;
    font-weight: 700;
    margin: 0 0 16px 0;
    text-align: left;
}

/* Product image – 350×480 portrait so uploaded white images fill the space */
.nf-product-slider-merch .nf-merch-product-image,
.nf-product-slider-merch .mmpw-product-image,
.nf-product-slider-merch .hps-myswiper-product-image.hps-product-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 350 / 480;
    margin: 0 auto;
    overflow: hidden;
    background: transparent;
}
.nf-product-slider-merch .nf-merch-product-image img,
.nf-product-slider-merch .mmpw-product-image img,
.nf-product-slider-merch .hps-myswiper-product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

/* Hover overlay (black with opacity) + Show more button – visible for whole hover */
.nf-product-slider-merch .nf-merch-image-overlay {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
.nf-product-slider-merch .nf-merch-show-more-btn {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-block;
    padding: 8px 18px;
    border: 1px solid #fff;
    border-radius: 100px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    font-family: "Fira Sans", Sans-serif;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
/* Hover on image container so overlay stays visible the whole time cursor is over image */
.nf-product-slider-merch .nf-merch-product-image:hover .nf-merch-image-overlay,
.nf-product-slider-merch .nf-merch-product-image:hover .nf-merch-show-more-btn {
    opacity: 1;
}

/* Product title (left side) */
.nf-product-slider-merch .nf-merch-product-title,
.nf-product-slider-merch .mmpw-product-title,
.nf-product-slider-merch .hps-swiper-product-title {
    color: #282828;
    font-size: 16px;
    font-family: "Fira Sans", Sans-serif;
    font-weight: 600;
    margin: 0 0 2px 0;
    text-align: left;
    line-height: 1.35;
    text-decoration: none;
}
.nf-product-slider-merch .nf-merch-details-row .nf-merch-product-title {
    margin: 0 0 2px 0;
}
.nf-product-slider-merch .nf-merch-title-link {
    text-decoration: none;
}
.nf-product-slider-merch .nf-merch-title-link:hover .nf-merch-product-title {
    text-decoration: underline;
}

/* Title on its own row */
.nf-product-slider-merch .nf-merch-product-info .nf-merch-product-title {
    margin: 10px 0 4px 0;
}

/* Same row: color variations (left) + price (right) */
.nf-product-slider-merch .nf-merch-variants-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0;
    min-height: 1.5em;
}

/* Color attributes – left side, same row as price */
.nf-product-slider-merch .nf-merch-color-variants {
    color: #000;
    font-size: 14px;
    font-family: "Fira Sans", Sans-serif;
    font-weight: 400;
    margin: 0;
    text-align: left;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

/* Price – right side */
.nf-product-slider-merch .nf-merch-price-wrapper,
.nf-product-slider-merch .hps-swiper-price-wrapper,
.nf-product-slider-merch .mmpw-price-wrapper {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    text-align: right;
    padding-left: 0;
}
.nf-product-slider-merch .nf-merch-price-wrapper > .woocommerce-Price-amount,
.nf-product-slider-merch .mmpw-price-wrapper > .woocommerce-Price-amount {
    font-size: 16px !important;
    color: #000;
}
.nf-product-slider-merch .nf-merch-price-wrapper ins,
.nf-product-slider-merch .nf-merch-price-wrapper ins *,
.nf-product-slider-merch .mmpw-price-wrapper ins,
.nf-product-slider-merch .mmpw-price-wrapper ins * {
    font-size: 16px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-bottom: 0 !important;
    color: #000;
}
.nf-product-slider-merch .nf-merch-price-wrapper del,
.nf-product-slider-merch .mmpw-price-wrapper del,
.nf-product-slider-merch .nf-merch-price-wrapper del *,
.nf-product-slider-merch .mmpw-price-wrapper del * {
    font-size: 14px !important;
    font-weight: 300 !important;
    text-decoration: line-through !important;
    color: #000;
}
.nf-product-slider-merch ins,
.nf-product-slider-merch ins * {
    text-decoration: none !important;
    border-bottom: 0 !important;
}

/* ===== Arrows – unique merch classes only ===== */
/* When fewer than 5 products: hide arrows on desktop; show on mobile (below) */
.nf-product-slider-merch--few-products .nf-merch-arrow-left,
.nf-product-slider-merch--few-products .nf-merch-arrow-right,
.nf-product-slider-merch--few-products .nf-merch-arrow-prev,
.nf-product-slider-merch--few-products .nf-merch-arrow-next {
    display: none;
}
@media (max-width: 768px) {
    .nf-product-slider-merch--few-products .nf-merch-arrow-left,
    .nf-product-slider-merch--few-products .nf-merch-arrow-right,
    .nf-product-slider-merch--few-products .nf-merch-arrow-prev,
    .nf-product-slider-merch--few-products .nf-merch-arrow-next {
        display: flex;
    }
}

.nf-product-slider-merch .nf-merch-arrow-left img,
.nf-product-slider-merch .nf-merch-arrow-right img,
.nf-product-slider-merch .nf-merch-arrow-prev img,
.nf-product-slider-merch .nf-merch-arrow-next img {
    width: 45px !important;
    height: 45px !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain;
    display: block;
}
/* Arrows: default position (small screens / fallback) */
.nf-product-slider-merch .nf-merch-arrow-left,
.nf-product-slider-merch .nf-merch-arrow-prev { left: 8px; }
.nf-product-slider-merch .nf-merch-arrow-right,
.nf-product-slider-merch .nf-merch-arrow-next { right: 8px; }
.nf-product-slider-merch .nf-merch-arrow-left::after,
.nf-product-slider-merch .nf-merch-arrow-right::after,
.nf-product-slider-merch .nf-merch-arrow-prev::after,
.nf-product-slider-merch .nf-merch-arrow-next::after,
.nf-product-slider-merch .swiper-button-prev::after,
.nf-product-slider-merch .swiper-button-next::after {
    display: none !important;
    content: none !important;
}

/* Desktop 1300px–2550px: padding so arrows sit on background, not on images */
@media (min-width: 1300px) and (max-width: 2550px) {
    .nf-product-slider-merch {
        padding-left: 56px;
        padding-right: 56px;
        box-sizing: border-box;
    }
    .nf-product-slider-merch .nf-merch-arrow-left,
    .nf-product-slider-merch .nf-merch-arrow-prev {
        left: 12px;
    }
    .nf-product-slider-merch .nf-merch-arrow-right,
    .nf-product-slider-merch .nf-merch-arrow-next {
        right: 12px;
    }
}

/* Over 2550px: same – arrows on background, not on images */
@media (min-width: 2551px) {
    .nf-product-slider-merch {
        padding-left: 56px;
        padding-right: 56px;
        box-sizing: border-box;
    }
    .nf-product-slider-merch .nf-merch-arrow-left,
    .nf-product-slider-merch .nf-merch-arrow-prev {
        left: 12px;
    }
    .nf-product-slider-merch .nf-merch-arrow-right,
    .nf-product-slider-merch .nf-merch-arrow-next {
        right: 12px;
    }
}

/* Tablet: same idea so arrows stay on background */
@media (min-width: 769px) and (max-width: 1299px) {
    .nf-product-slider-merch {
        padding-left: 48px;
        padding-right: 48px;
        box-sizing: border-box;
    }
    .nf-product-slider-merch .nf-merch-arrow-left,
    .nf-product-slider-merch .nf-merch-arrow-prev {
        left: 10px;
    }
    .nf-product-slider-merch .nf-merch-arrow-right,
    .nf-product-slider-merch .nf-merch-arrow-next {
        right: 10px;
    }
}

/* Responsive – keep same portrait ratio as desktop on tablet/mobile (no square) */
@media (max-width: 992px) {
    .nf-product-slider-merch .nf-merch-product-image,
    .nf-product-slider-merch .mmpw-product-image,
    .nf-product-slider-merch .hps-myswiper-product-image.hps-product-image {
        width: 100% !important;
        max-width: 100% !important;
        height: auto;
        aspect-ratio: 350 / 480;
    }
    .nf-product-slider-merch .nf-merch-arrow-left img,
    .nf-product-slider-merch .nf-merch-arrow-right img,
    .nf-product-slider-merch .nf-merch-arrow-prev img,
    .nf-product-slider-merch .nf-merch-arrow-next img {
        width: 30px !important;
        height: 30px !important;
    }
}

/* Mobile: one full slide – let Swiper set width; only reduce padding so one product fits */
@media (max-width: 767px) {
    .nf-product-slider-merch .mmpw-swiper-container .nf-merch-product-item,
    .nf-product-slider-merch .nf-merch-swiper-container .nf-merch-product-item,
    .nf-product-slider-merch .mmpw-swiper-container .swiper-slide.mmpw-product-item,
    .nf-product-slider-merch .nf-merch-swiper-container .swiper-slide.mmpw-product-item {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Mobile: padding creates background strip; arrows sit on background (outside image) */
@media (max-width: 768px) {
    .nf-product-slider-merch {
        padding-left: 48px;
        padding-right: 48px;
        box-sizing: border-box;
    }
    .nf-product-slider-merch .mmpw-swiper-container.nf-merch-swiper-container,
    .nf-product-slider-merch .mmpw-swiper-container {
        padding-left: 0;
        padding-right: 0;
        box-sizing: border-box;
    }
    /* Arrows are outside container – position on background (in the padding zone) */
    .nf-product-slider-merch .nf-merch-arrow-left,
    .nf-product-slider-merch .nf-merch-arrow-prev {
        left: 8px;
    }
    .nf-product-slider-merch .nf-merch-arrow-right,
    .nf-product-slider-merch .nf-merch-arrow-next {
        right: 8px;
    }
}


/* ===== Grid layout ===== */
.nf-product-slider-merch--grid .nf-merch-grid,
.nf-product-slider-merch--grid .nf-product-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns, 4), 1fr);
    gap: 20px;
    width: 100%;
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
}
.nf-product-slider-merch--grid .nf-merch-grid[data-columns="1"],
.nf-product-slider-merch--grid .nf-product-grid[data-columns="1"] { --grid-columns: 1; grid-template-columns: repeat(1, 1fr); }
.nf-product-slider-merch--grid .nf-merch-grid[data-columns="2"],
.nf-product-slider-merch--grid .nf-product-grid[data-columns="2"] { --grid-columns: 2; grid-template-columns: repeat(2, 1fr); }
.nf-product-slider-merch--grid .nf-merch-grid[data-columns="3"],
.nf-product-slider-merch--grid .nf-product-grid[data-columns="3"] { --grid-columns: 3; grid-template-columns: repeat(3, 1fr); }
.nf-product-slider-merch--grid .nf-merch-grid[data-columns="4"],
.nf-product-slider-merch--grid .nf-product-grid[data-columns="4"] { --grid-columns: 4; grid-template-columns: repeat(4, 1fr); }
.nf-product-slider-merch--grid .nf-merch-grid-item,
.nf-product-slider-merch--grid .nf-product-grid-item {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}
.nf-product-slider-merch--grid .nf-merch-grid-item .nf-merch-product-image,
.nf-product-slider-merch--grid .nf-merch-grid-item .mmpw-product-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .nf-product-slider-merch--grid .nf-merch-grid[data-columns],
    .nf-product-slider-merch--grid .nf-product-grid[data-columns] {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 992px) {
    .nf-product-slider-merch--grid .nf-merch-grid[data-columns],
    .nf-product-slider-merch--grid .nf-product-grid[data-columns] {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .nf-product-slider-merch--grid .nf-merch-grid[data-columns],
    .nf-product-slider-merch--grid .nf-product-grid[data-columns] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
}
@media (max-width: 520px) {
    .nf-product-slider-merch--grid .nf-merch-grid[data-columns],
    .nf-product-slider-merch--grid .nf-product-grid[data-columns] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }
    .nf-product-slider-merch--grid .nf-merch-grid-item,
    .nf-product-slider-merch--grid .nf-product-grid-item {
        min-width: 0;
    }
}

/* Pagination */
.nf-product-slider-merch .nf-merch-pagination,
.nf-product-slider-merch .nf-product-slider-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}
.nf-product-slider-merch .nf-product-pagination-link {
    display: inline-block;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}
.nf-product-slider-merch .nf-product-pagination-link:hover {
    background-color: #f5f5f5;
    border-color: #999;
    color: #000;
}
.nf-product-slider-merch .nf-product-pagination-current {
    background-color: #34ab57;
    color: #fff;
    border-color: #34ab57;
    font-weight: bold;
    cursor: default;
}
