/* ============================================================
   NPC Carousel — BEM namespaced styles
   Prefix: .npc-carousel (avoids .ocarousel conflict)
   Design tokens: SimplexTheme (--red, --grey-black, Garamond, border-radius: 0)
   ============================================================ */

/* --- Container --- */
.npc-carousel {
    margin: 30px 0;
    overflow: hidden;
}

/* --- Body: banner (left) + slider-wrap (right) --- */
.npc-carousel__body {
    display: flex;
    gap: 20px;
}

/* --- Banner (left column) --- */
.npc-carousel--with-banner .npc-carousel__banner {
    flex: 1; /* same weight as one product card */
    position: relative;
    overflow: hidden;
    align-self: stretch;
}

.npc-carousel__banner a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Banner image: fill column, preserve ratio via object-fit, crop excess */
.npc-carousel__banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* --- Slider wrap (right column) — contains header + owl slider --- */
.npc-carousel__slider-wrap {
    flex: 3; /* 3 items = 3× banner width → banner ≈ 1 item width */
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Without banner — full width */
.npc-carousel:not(.npc-carousel--with-banner) .npc-carousel__slider-wrap {
    width: 100%;
}

/* --- Header: title (left) + nav buttons (right) — inside slider-wrap --- */
.npc-carousel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 0 30px 0 30px;
}

.npc-carousel__title {
    font-family: inherit; /* Garamond from SimplexTheme */
    font-size: 24px;
    font-weight: 700;
    color: var(--grey-black, #333333);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    padding: 0;
    line-height: 1.3;
}

.npc-carousel__nav {
    display: flex;
    gap: 14px;
    flex-shrink: 0;
}

.npc-carousel__nav-prev,
.npc-carousel__nav-next {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.npc-carousel__nav-prev svg,
.npc-carousel__nav-next svg {
    display: block;
    width: 16px;
    height: 16px;
    stroke: currentColor;
    flex-shrink: 0;
}

.npc-carousel__nav-prev:hover,
.npc-carousel__nav-next:hover {
    border-color: rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.05);
}

.npc-carousel__nav-prev:active,
.npc-carousel__nav-next:active {
    transform: scale(0.95);
}

/* --- Owl Carousel integration --- */
.npc-carousel__slider.owl-carousel .owl-stage-outer {
    overflow: hidden;
}

.npc-carousel__slider.owl-carousel .owl-stage {
    display: flex;
}

.npc-carousel__slider.owl-carousel .owl-item {
    flex-shrink: 0;
}

/* --- Product item inside carousel --- */
.npc-carousel__item {
    padding: 0 8px;
}

/* Reset item-box col widths inside owl items (owl handles sizing) */
.npc-carousel .owl-item .npc-carousel__item.item-box {
    width: 100%;
    float: none;
    padding: 0 8px;
}

.npc-carousel__item .product-item {
    border: none;
    border-radius: 0;
    margin-bottom: 0;
}

/* Let theme CSS (product-box-aspect-ratio.css) handle picture sizing
   via .product-grid .item-box .picture selectors — do NOT override here */

/* --- Fallback: display items horizontally when Owl Carousel has NOT initialized --- */
.npc-carousel__slider:not(.owl-loaded) {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.npc-carousel__slider:not(.owl-loaded) > .npc-carousel__item {
    flex: 0 0 25%;
    min-width: 220px;
    scroll-snap-align: start;
}

/* Hide scrollbar for non-owl fallback */
.npc-carousel__slider:not(.owl-loaded)::-webkit-scrollbar {
    display: none;
}
.npc-carousel__slider:not(.owl-loaded) {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- Responsive --- */
@media (max-width: 991px) {
    .npc-carousel--with-banner .npc-carousel__banner {
        flex: 1;
    }

    .npc-carousel__slider-wrap {
        flex: 3; /* 3 items on tablet → banner ≈ 1 item width */
    }

    /* Fallback: 3 items on tablet */
    .npc-carousel__slider:not(.owl-loaded) > .npc-carousel__item {
        flex: 0 0 33.333%;
        min-width: 200px;
    }
}

@media (max-width: 767px) {
    .npc-carousel__body {
        flex-direction: column;
    }

    /* Banner stacks full-width on top — use 16:9-ish banner crop */
    .npc-carousel--with-banner .npc-carousel__banner {
        flex: none;
        width: 100%;
       /* aspect-ratio: 5/2;*/
        align-self: auto;
    }

    .npc-carousel__slider-wrap {
        flex: none;
        width: 100%;
    }

    .npc-carousel__banner img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }

    .npc-carousel__banner a {
        height: 100%;
    }

    .npc-carousel__title {
        font-size: 18px;
    }

    .npc-carousel__nav-prev,
    .npc-carousel__nav-next {
        width: 28px;
        height: 28px;
    }

    .npc-carousel__nav-prev svg,
    .npc-carousel__nav-next svg {
        width: 14px;
        height: 14px;
    }

    /* Fallback: 2 items on mobile */
    .npc-carousel__slider:not(.owl-loaded) > .npc-carousel__item {
        flex: 0 0 50%;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .npc-carousel__header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .npc-carousel__title {
        font-size: 16px;
        flex: 1;
    }

    /* Fallback: 1 item on small mobile */
    .npc-carousel__slider:not(.owl-loaded) > .npc-carousel__item {
        flex: 0 0 100%;
        min-width: 0;
    }
}

/* ============================================================
   Swiper hover arrows inside NPC Carousel — Lucide icon overrides
   Override theme's product-image-hover-arrows.css (FontAwesome ::after)
   with inline Lucide SVGs injected by npc-carousel.js
   ============================================================ */

/* Hide FontAwesome ::after content — Lucide SVG is injected as child element */
.npc-carousel .product-grid .item-box .picture .swiper-button-prev::after,
.npc-carousel .product-grid .item-box .picture .swiper-button-next::after,
.npc-carousel .owl-item .item-box .picture .swiper-button-prev::after,
.npc-carousel .owl-item .item-box .picture .swiper-button-next::after {
    content: '' !important;
    display: none !important;
}

/* Lucide SVG icon inside Swiper arrows */
.npc-carousel .swiper-button-prev .npc-lucide-arrow,
.npc-carousel .swiper-button-next .npc-lucide-arrow {
    display: block;
    width: 24px;
    height: 24px;
    stroke: var(--grey-black, #333333);
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

/* Hover: full opacity on Lucide arrow */
.npc-carousel .item-box .picture:hover .swiper-button-prev:not(.swiper-button-disabled):hover .npc-lucide-arrow,
.npc-carousel .item-box .picture:hover .swiper-button-next:not(.swiper-button-disabled):hover .npc-lucide-arrow {
    opacity: 1;
}

/* Disabled state: very faint Lucide arrow */
.npc-carousel .swiper-button-disabled .npc-lucide-arrow {
    opacity: 0.1;
}

/* ============================================================
   Caption overrides — Price 20px + improved text readability
   Scoped to .npc-carousel to avoid affecting OCarousels
   ============================================================ */

/* Actual price — prominent, 20px */
.npc-carousel .product-item .caption .details .prices-inline .actual-price,
.npc-carousel .product-item .caption .details .prices .actual-price,
.npc-carousel .product-item .details .prices .actual-price {
    font-size: 18px !important;
    color: var(--grey-black, #333333) !important;
    font-weight: 600 !important;
}

/* Old price — proportional to 20px actual, subdued */
.npc-carousel .product-item .caption .details .prices-inline .old-price,
.npc-carousel .product-item .caption .details .prices .old-price,
.npc-carousel .product-item .details .prices .old-price {
    font-size: 18px !important;
    color: #999999 !important;
    font-weight: 400 !important;
    text-decoration: line-through !important;
}

/* Product title link — darker for readability (was #999999 → #555555) */
.npc-carousel .product-item .caption .details .product-title-inline a,
.npc-carousel .product-item .caption .details .product-title a,
.npc-carousel .product-item .details .product-title a {
    color: #555555 !important;
}

/* Product title hover — accent color */
.npc-carousel .product-item .caption .details .product-title-inline a:hover,
.npc-carousel .product-item .caption .details .product-title a:hover,
.npc-carousel .product-item .details .product-title a:hover {
    color: var(--grey-black, #333333) !important;
}

/* SKU / meta text — slightly darker for readability */
.npc-carousel .product-item .caption .details .sku,
.npc-carousel .product-item .details .sku {
    color: #888888 !important;
}

/* Description text — subtle but readable */
.npc-carousel .product-item .caption .details .description,
.npc-carousel .product-item .details .description {
    color: #888888 !important;
}

/* Responsive caption — slightly smaller on mobile */
@media (max-width: 767px) {
    .npc-carousel .product-item .caption .details .prices-inline .actual-price,
    .npc-carousel .product-item .caption .details .prices .actual-price,
    .npc-carousel .product-item .details .prices .actual-price {
        font-size: 16px !important;
    }

    .npc-carousel .product-item .caption .details .prices-inline .old-price,
    .npc-carousel .product-item .caption .details .prices .old-price,
    .npc-carousel .product-item .details .prices .old-price {
        font-size: 16px !important;
    }
}

@media (max-width: 480px) {
    .npc-carousel .product-item .caption .details .prices-inline .actual-price,
    .npc-carousel .product-item .caption .details .prices .actual-price,
    .npc-carousel .product-item .details .prices .actual-price {
        font-size: 15px !important;
    }

    .npc-carousel .product-item .caption .details .prices-inline .old-price,
    .npc-carousel .product-item .caption .details .prices .old-price,
    .npc-carousel .product-item .details .prices .old-price {
        font-size: 15px !important;
    }
}


/* ============================================================
   Per-carousel aspect ratio overrides
   Default 3/4 is applied globally by product-box-aspect-ratio.css.
   Overrides here use a more specific selector to win.
   ============================================================ */

.npc-carousel[data-aspect-ratio="1/1"] .product-grid .item-box .picture,
.npc-carousel[data-aspect-ratio="1/1"] .owl-item .item-box .picture {
    aspect-ratio: 1/1 !important;
}

.npc-carousel[data-aspect-ratio="4/3"] .product-grid .item-box .picture,
.npc-carousel[data-aspect-ratio="4/3"] .owl-item .item-box .picture {
    aspect-ratio: 4/3 !important;
}

.npc-carousel[data-aspect-ratio="2/3"] .product-grid .item-box .picture,
.npc-carousel[data-aspect-ratio="2/3"] .owl-item .item-box .picture {
    aspect-ratio: 2/3 !important;
}

/* 3/4 is already the global default — no override needed */
/* mobile: 28px arrow buttons are under the 44px touch minimum. Keep the visual
   size but extend the HIT AREA with padding + background-clip so the arrows do
   not visually bloat over slide content. (GOL002 mobile audit 2026-06-04) */
@media (max-width: 767px) {
    .npc-carousel__nav-prev,
    .npc-carousel__nav-next {
        min-width: 44px; min-height: 44px;
        padding: 8px;
        background-clip: content-box;
        box-sizing: border-box;
    }
}

/* ============================================================
   NPC Banner — page-targeted banners (Top/Bottom/Left zones)
   ============================================================ */
.npc-banner {
    margin: 0 0 20px;
    /* center horizontally regardless of page container alignment; never upscale the image */
    display: flex;
    justify-content: center;
}

.npc-banner--bottom {
    margin: 20px 0 0;
}

.npc-banner-link {
    display: block;
    max-width: 100%;
}

.npc-banner picture,
.npc-banner img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* Left sidebar zone: constrained column width */
.npc-banner--left {
    margin: 0 0 15px;
}
