/* ═══════════════════════════════════════════════════════
   Nexus Bundle Deals — Public CSS
   Mobile-first, premium dark design
═══════════════════════════════════════════════════════ */

/* ── Popup Overlay ──────────────────────────────────── */
.nbd-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
@media (min-width: 768px) {
    .nbd-popup-overlay { align-items: center; }
}
.nbd-popup-overlay.nbd-visible {
    opacity: 1;
    pointer-events: all;
}

/* ── Popup Panel ────────────────────────────────────── */
.nbd-popup {
    background: #fff;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 32px;
    position: relative;
    transform: translateY(40px);
    transition: transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
    scrollbar-width: none;
}
.nbd-popup::-webkit-scrollbar { display: none; }
.nbd-popup-overlay.nbd-visible .nbd-popup { transform: translateY(0); }

@media (min-width: 768px) {
    .nbd-popup {
        border-radius: 20px;
        max-height: 88vh;
        transform: scale(0.94) translateY(10px);
    }
    .nbd-popup-overlay.nbd-visible .nbd-popup { transform: scale(1) translateY(0); }
}

/* Drag handle */
.nbd-popup::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 4px;
    margin: 14px auto 0;
}
@media (min-width: 768px) {
    .nbd-popup::before { display: none; }
}

/* ── Close button ───────────────────────────────────── */
.nbd-popup-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: background 0.2s;
    z-index: 2;
}
.nbd-popup-close:hover { background: #111; color: #fff; }

/* ── Popup Header ───────────────────────────────────── */
.nbd-popup-header {
    text-align: center;
    padding: 28px 24px 18px;
    border-bottom: 1px solid #f0f0f0;
}
.nbd-popup-tag {
    display: inline-block;
    background: #111;
    color: #C9A66A;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.nbd-popup-title {
    font-size: clamp(20px, 5vw, 26px);
    font-weight: 700;
    color: #111;
    margin: 0 0 6px;
    line-height: 1.2;
}
.nbd-popup-subtitle {
    font-size: 14px;
    color: #888;
    margin: 0;
}

/* ── Deal Cards ─────────────────────────────────────── */
.nbd-popup-deals {
    padding: 20px 20px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nbd-deal-card {
    border: 1.5px solid #f0f0f0;
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.nbd-deal-card.nbd-deal-active {
    border-color: #C9A66A;
    box-shadow: 0 0 0 3px rgba(201,166,106,0.15);
}

/* Deal image */
.nbd-deal-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/7;
    overflow: hidden;
    background: #111;
}
.nbd-deal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}
.nbd-deal-image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    min-height: 90px;
}

.nbd-deal-badge {
    position: absolute;
    bottom: 12px;
    left: 14px;
    background: #C9A66A;
    color: #111;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
    letter-spacing: -0.2px;
}
.nbd-deal-badge--center {
    position: relative;
    bottom: auto;
    left: auto;
    font-size: 15px;
    padding: 10px 20px;
}

/* Deal body */
.nbd-deal-body { padding: 16px 16px 18px; }

.nbd-deal-name {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin: 0 0 8px;
}

.nbd-deal-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
}
.nbd-deal-price {
    font-size: 22px;
    font-weight: 700;
    color: #C9A66A;
}
.nbd-deal-qty {
    font-size: 13px;
    color: #888;
}

/* Progress bar */
.nbd-deal-progress { margin-bottom: 14px; }
.nbd-progress-bar {
    height: 6px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 6px;
}
.nbd-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #C9A66A, #e8c47a);
    border-radius: 6px;
    transition: width 0.5s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.nbd-progress-label {
    font-size: 12px;
    color: #888;
}

/* ── Countdown Timer ────────────────────────────────── */
.nbd-deal-timer {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.nbd-timer-label {
    display: block;
    font-size: 11px;
    color: #888;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.nbd-timer-blocks {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nbd-timer-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #111;
    color: #fff;
    border-radius: 6px;
    padding: 6px 10px;
    min-width: 46px;
}
.nbd-timer-block span {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.nbd-timer-block small {
    font-size: 9px;
    color: #888;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.nbd-timer-sep {
    font-size: 18px;
    font-weight: 700;
    color: #C9A66A;
    padding: 0 2px;
    margin-bottom: 12px;
}

/* ── CTA Button ─────────────────────────────────────── */
.nbd-deal-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px;
    background: #111;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background 0.2s;
}
.nbd-deal-cta:hover { background: #C9A66A; color: #111; }

/* ── Footer note ────────────────────────────────────── */
.nbd-popup-footer-note {
    text-align: center;
    font-size: 12px;
    color: #aaa;
    padding: 18px 24px 0;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════
   Cart Notification — sticky bottom bar
═══════════════════════════════════════════════════════ */
.nbd-cart-notification {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    pointer-events: none;
}

.nbd-cart-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    margin: 0 12px 12px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    pointer-events: all;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    transform: translateY(80px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.3s ease;
}
.nbd-cart-bar.nbd-bar-visible {
    transform: translateY(0);
    opacity: 1;
}
.nbd-cart-bar--progress {
    background: #111;
    color: #fff;
}
.nbd-cart-bar--success {
    background: linear-gradient(135deg, #C9A66A, #e8c47a);
    color: #111;
}
.nbd-cart-bar-text { flex: 1; line-height: 1.3; }
.nbd-cart-bar-text small { display: block; font-size: 12px; font-weight: 400; opacity: 0.75; margin-top: 2px; }
.nbd-cart-bar-icon { font-size: 20px; flex-shrink: 0; }
.nbd-cart-bar-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}
.nbd-cart-bar-close:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════
   FIXES v1.2.2
═══════════════════════════════════════════════════════ */

/* Popup overlay boven alles */
.nbd-popup-overlay {
    z-index: 1000000 !important;
}

/* Close button — volledig opnieuw, conflictvrij */
.nbd-popup-close {
    position: absolute !important;
    top: 14px !important;
    right: 16px !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: rgba(0,0,0,0.07) !important;
    border: 1.5px solid rgba(0,0,0,0.12) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #333 !important;
    font-size: 20px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
    z-index: 1000002 !important;
    padding: 0 !important;
    transition: background 0.2s, color 0.2s !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    font-family: Arial, sans-serif !important;
}
.nbd-popup-close:hover,
.nbd-popup-close:focus {
    background: #111 !important;
    color: #fff !important;
    border-color: #111 !important;
    outline: none !important;
}

/* Emoji in deal label tag */
.nbd-label-emoji {
    font-size: 13px;
    line-height: 1;
    display: inline-block;
    margin-right: 1px;
}

/* Loop badge — rechtsboven */
.nbd-loop-badge {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
}

/* Korting regel in cart panel */
.nbd-panel-discount-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    margin: 0;
    font-size: 13px;
    background: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
}
.nbd-panel-discount-row strong {
    color: #166534;
    font-weight: 600;
}
.nbd-panel-discount-amount {
    color: #16a34a;
    font-weight: 700;
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════
   Cart Panel TOP STRIP — boven de producten
   Compact, blokkeert nooit de afrekenknoppen
═══════════════════════════════════════════════════════ */
.nbd-panel-top-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
    line-height: 1.4;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
.nbd-panel-top-strip--active {
    background: linear-gradient(135deg, #C9A66A, #e8c47a);
    color: #111;
}
.nbd-panel-top-strip--progress {
    background: #f9f5ef;
    color: #444;
    border-bottom: 1px solid #e8d9c0;
}
.nbd-strip-icon {
    font-size: 18px;
    flex-shrink: 0;
}
.nbd-strip-text {
    flex: 1;
    font-size: 12px;
    line-height: 1.4;
}
.nbd-strip-text strong {
    font-weight: 700;
    display: block;
    font-size: 13px;
}
.nbd-strip-discount {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    color: #111;
    flex-shrink: 0;
}
.nbd-strip-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.nbd-strip-bar {
    height: 3px;
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
    overflow: hidden;
}
.nbd-strip-bar-fill {
    height: 100%;
    background: #C9A66A;
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* ── Top strip full width fix ────────────────────────────────────────────────
   Panel__content heeft padding — strip moet die negeren via negatieve margins
*/
.nbd-panel-top-strip {
    margin-left: -20px !important;
    margin-right: -20px !important;
    margin-top: -10px !important;
    padding: 12px 20px !important;
    width: calc(100% + 40px) !important;
}

/* ── Sticky bar verbergen als cart panel open is ─────────────────────────────
   Glozin's offscreen cart panel heeft z-index 9999.
   We verbergen de sticky bar als het panel open is via body class.
*/
body.offscreen-panel--open .nbd-cart-notification,
body:has(#cart-panel.offscreen-panel--open) .nbd-cart-notification {
    display: none !important;
}
