/* ================================================================
   Natu Inspiration Gallery — CSS
   ================================================================ */

.nig-section { background-color:#f0ebe4; padding:60px 40px; }

/* ── Header row ──────────────────────────────────────────────── */
.nig-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}
.nig-heading { color:#1a0a02; font-size:28px; font-weight:700; line-height:1.2; margin:0; }

.nig-btn {
    display: inline-flex;
    align-items: center;
    background-color: #B8763A;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .25s ease, transform .2s ease;
    flex-shrink: 0;
}
.nig-btn:hover { background-color:#8f5520; color:#fff; transform:translateY(-1px); }

/* ── Carousel ────────────────────────────────────────────────── */
.nig-carousel-wrap { position:relative; }
.nig-track-outer   { overflow:hidden; width:100%; }
.nig-track {
    display:flex;
    align-items:stretch;
    transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
    will-change:transform;
}
.nig-slide { flex:0 0 auto; box-sizing:border-box; }

/* ── Card ────────────────────────────────────────────────────── */
.nig-card { display:block; }

.nig-card__img {
    position: relative !important;
    height: 500px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-color: #d4c4b4;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s ease;
    display: block;
}
.nig-card__img::after {
    content:'';
    position:absolute;
    inset:0;
    background-color:rgba(0,0,0,0.15);
    opacity:0;
    transition:opacity .3s ease;
    border-radius:inherit;
    pointer-events:none;
}
.nig-card__img:hover { transform:translateY(-2px); }
.nig-card__img:hover::after { opacity:1; }

/* ── Tag Badge ───────────────────────────────────────────────── */
.nig-card__img .nig-badge {
    position: absolute !important;
    bottom: 16px !important;
    right: 16px !important;
    top: auto !important;
    left: auto !important;
    /* Pill shape */
    height: 40px !important;
    min-width: 40px;
    padding: 0 12px;
    border-radius: 50px !important;
    background-color: rgba(255,255,255,0.92);
    color: #1a0a02;
    border: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: background-color .22s ease, transform .22s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    z-index: 10;
    float: none !important;
    margin: 0 !important;
    transform: none;
}
.nig-card__img .nig-badge:hover { background-color:#fff; transform:scale(1.05); }

.nig-card__img .nig-badge svg {
    display: block;
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    pointer-events: none;
}

.nig-card__img .nig-badge .nig-badge__count {
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    color: inherit;
}

/* ── Controls row ────────────────────────────────────────────── */
.nig-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    gap: 16px;
}
.nig-progress-wrap { flex:1 1 auto; }
.nig-progress-track { width:100%; height:2px; background-color:#d4c4b4; border-radius:2px; overflow:hidden; }
.nig-progress-fill  { height:2px; background-color:#1a0a02; border-radius:2px; width:0%; transition:width .4s ease; }

.nig-arrows { display:flex; gap:8px; flex-shrink:0; }
.nig-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #d4c4b4;
    background: #fff;
    color: #1a0a02;
    cursor: pointer;
    padding: 0;
    transition: background-color .25s, color .25s, border-color .25s, transform .2s;
    flex-shrink: 0;
}
.nig-arrow svg {
    display: block;
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    flex-shrink: 0;
}
.nig-arrow:hover { background-color:#B8763A; border-color:#B8763A; color:#fff; }

/* ── MODAL ───────────────────────────────────────────────────── */
.nig-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s ease;
}
.nig-modal.is-open {
    pointer-events: all;
    opacity: 1;
}
.nig-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
    cursor: pointer;
}
.nig-modal__box {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,0.22);
    transform: translateY(20px) scale(0.97);
    transition: transform .3s cubic-bezier(0.4,0,0.2,1);
    margin: 16px;
    overflow: hidden;
}
.nig-modal.is-open .nig-modal__box {
    transform: translateY(0) scale(1);
}

.nig-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #f0ebe4;
    flex-shrink: 0;
}
.nig-modal__title {
    font-size: 16px;
    font-weight: 700;
    color: #1a0a02;
    margin: 0;
}
.nig-modal__close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e0d8cd;
    background: #fff;
    color: #1a0a02;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background .2s, color .2s;
    flex-shrink: 0;
}
.nig-modal__close:hover { background: #1a0a02; color: #fff; }

/* Fix SVG X icon — explicit stroke so it always renders */
.nig-modal__close svg {
    display: block;
    pointer-events: none;
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    fill: none;
    flex-shrink: 0;
}
.nig-modal__close svg line {
    stroke: currentColor;
}

.nig-modal__body {
    overflow-y: auto;
    flex: 1 1 auto;
    padding: 8px 0;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #d4c4b4 transparent;
}
.nig-modal__body::-webkit-scrollbar { width: 4px; }
.nig-modal__body::-webkit-scrollbar-track { background: transparent; }
.nig-modal__body::-webkit-scrollbar-thumb { background: #d4c4b4; border-radius: 4px; }

/* Product row */
.nig-modal__product {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    text-decoration: none;
    border-bottom: 1px solid #f7f2ec;
    transition: background .2s ease;
}
.nig-modal__product:last-child { border-bottom: none; }
.nig-modal__product:hover { background: #f7f2ec; }

.nig-modal__product-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e8ddd4;
    display: block;
}

.nig-modal__product-info {
    flex: 1 1 auto;
    min-width: 0;
}
.nig-modal__product-name {
    display: block;
    color: #1a0a02;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nig-modal__prices {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.nig-modal__sale { color:#1a0a02; font-size:14px; font-weight:700; }
.nig-modal__original { color:#9a8070; font-size:12px; text-decoration:line-through; }

.nig-modal__product-arrow {
    flex-shrink: 0;
    color: #B8763A;
    display: flex;
    align-items: center;
}
.nig-modal__product-arrow svg {
    display: block;
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nig-modal__empty {
    padding: 32px 20px;
    text-align: center;
    color: #9a8070;
    font-size: 14px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width:900px) { .nig-section { padding:48px 24px; } .nig-card__img { height:360px; } }
@media (max-width:600px) {
    .nig-section { padding:40px 16px; }
    .nig-heading { font-size:20px; }
    .nig-card__img { height:280px; }
    .nig-modal__box { max-width:100%; margin:0; border-radius:16px 16px 0 0; max-height:90vh; }
    .nig-modal { align-items:flex-end; }
}
