/* ============================================
   Nuts Image Slider — nuts-slider.css
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

.nis-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    /* Extra top/bottom padding so zoomed image has breathing room */
    padding: 50px 0 50px;
    box-sizing: border-box;
    font-family: var(--nis-font, 'Poppins'), sans-serif;
    user-select: none;
    overflow: visible;
}

/* ---- Track ---- */
.nis-track-wrapper {
    /* overflow visible — so zoomed images pop OUT of the container */
    overflow: visible;
    width: 100%;
    flex: 1;
    /* Clip only horizontally to prevent layout shift, allow vertical overflow */
    clip-path: inset(0 0 0 0);
}

.nis-track {
    display: flex;
    gap: var(--nis-gap, 16px);
    transition: transform 0.55s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}

/* ---- Card ---- */
.nis-card {
    flex: 0 0 calc((100% - (var(--nis-visible, 5) - 1) * var(--nis-gap, 16px)) / var(--nis-visible, 5));
    border-radius: var(--nis-radius, 18px);
    overflow: visible;           /* CRITICAL: allow image to overflow card */
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 14px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    /* Ensure hover card is on top */
    z-index: 1;
}

.nis-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.22);
    transform: translateY(-4px);
    z-index: 100;               /* Pop above sibling cards */
}

/* ---- Image Wrap ---- */
.nis-img-wrap {
    width: 100%;
    height: var(--nis-img-h, 220px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;           /* NO hidden — let zoom go outside */
    border-radius: var(--nis-radius, 18px) var(--nis-radius, 18px) 0 0;
    position: relative;
    z-index: 2;
}

/* Colored background fill stays clipped inside the card shape */
.nis-img-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    z-index: 0;
}

.nis-img-wrap img {
    position: relative;
    z-index: 2;                  /* Above the ::before bg layer */
    max-width: 75%;
    max-height: 80%;
    object-fit: contain;
    transition: transform 0.45s cubic-bezier(.34,1.56,.64,1), filter 0.3s ease;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.25));
    will-change: transform;
    transform-origin: center center;
}

.nis-card:hover .nis-img-wrap img {
    /* Scale UP — goes OUTSIDE the card boundaries freely */
    transform: scale(var(--nis-zoom, 1.25)) translateY(-6%);
    filter: drop-shadow(0 18px 32px rgba(0,0,0,0.4));
}

/* ---- Label ---- */
.nis-label {
    display: block;
    margin-top: 10px;
    font-size: var(--nis-fsize, 16px);
    color: var(--nis-fcolor, #ffffff);
    font-weight: var(--nis-fweight, 600);
    letter-spacing: 0.03em;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* ---- Arrows ---- */
.nis-arrow {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #333;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    transition: background 0.25s, color 0.25s, transform 0.2s, box-shadow 0.2s;
    z-index: 10;
    margin: 0 8px;
    outline: none;
}

.nis-arrow:hover {
    background: #2a8fa3;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(42,143,163,0.4);
}

.nis-arrow:active {
    transform: scale(0.96);
}

/* ---- Dots ---- */
.nis-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    align-items: center;
}

.nis-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cccccc;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s, width 0.3s;
}

.nis-dot.active {
    background: #2a8fa3;
    width: 22px;
    border-radius: 4px;
    transform: scaleY(1.1);
}

/* ---- Responsive Wrapper ---- */
.nis-responsive-wrap {
    width: 100%;
    overflow: visible !important;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .nis-wrapper {
        --nis-visible: attr(data-visible-tablet number, 3);
    }
    .nis-card {
        flex: 0 0 calc((100% - 2 * var(--nis-gap, 16px)) / 3);
    }
}

@media (max-width: 768px) {
    .nis-card {
        flex: 0 0 calc((100% - var(--nis-gap, 16px)) / 2);
    }

    .nis-arrow {
        width: 36px;
        height: 36px;
        font-size: 22px;
        margin: 0 4px;
    }

    .nis-img-wrap {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .nis-card {
        flex: 0 0 calc(100% - var(--nis-gap, 16px));
    }

    .nis-wrapper {
        padding: 16px 0 36px;
    }

    .nis-arrow {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
}
