/* ── First-visit welcome popup (Jumia/Shein style) ─────────── */

.dz-wp {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
}

.dz-wp.dz-wp-show {
    display: block;
}

.dz-wp-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 10, 40, 0.55);
    backdrop-filter: blur(2px);
    animation: dzWpFade 0.25s ease;
}

.dz-wp-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(430px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: dzWpPop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    transition: width 0.2s ease;
}

/* Deals variant gets a wider dialog with a scrolling product strip */
.dz-wp-dialog.dz-wp-wide {
    width: min(780px, calc(100vw - 32px));
}

@keyframes dzWpFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes dzWpPop {
    from { opacity: 0; transform: translate(-50%, -46%) scale(0.94); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.dz-wp-panel {
    padding: 26px 26px 20px;
    text-align: center;
    position: relative;
}

.dz-wp-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #f2f0fa;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.dz-wp-close:hover {
    background: #e4dff5;
}

.dz-wp-hero {
    background: linear-gradient(135deg, var(--diilzo-primary, #7C3AED), #5B21B6);
    margin: -26px -26px 18px;
    padding: 26px 24px;
    border-radius: 12px 12px 0 0;
    text-align: center;
}

.dz-wp-logo {
    height: 44px;
    filter: brightness(0) invert(1);
}

.dz-wp-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--diilzo-text, #1E1B4B);
    margin: 0 0 6px;
}

.dz-wp-sub {
    font-size: 13px;
    color: #666;
    margin: 0 0 14px;
}

.dz-wp-perks {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    text-align: left;
    display: inline-block;
}

.dz-wp-perks li {
    font-size: 13px;
    color: #444;
    padding: 5px 0;
}

.dz-wp-perks li i {
    color: var(--diilzo-primary, #7C3AED);
    width: 20px;
    text-align: center;
    margin-right: 6px;
}

.dz-wp-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.dz-wp-btn {
    flex: 1;
    display: inline-block;
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid var(--diilzo-primary, #7C3AED);
    cursor: pointer;
    transition: opacity 0.15s;
}

.dz-wp-btn:hover {
    opacity: 0.88;
}

.dz-wp-btn-primary {
    background: var(--diilzo-primary, #7C3AED);
    color: #fff;
}

.dz-wp-btn-outline {
    background: #fff;
    color: var(--diilzo-primary, #7C3AED);
}

.dz-wp-btn-block {
    display: block;
    margin-top: 10px;
    padding-top: 9px;
    padding-bottom: 9px;
}

.dz-wp-later {
    background: none;
    border: none;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    padding: 6px;
}

.dz-wp-later:hover {
    color: #555;
    text-decoration: underline;
}

/* Deals variant — compact, no vertical scroll */

#dzWpDeals {
    padding: 16px 16px 10px;
}

#dzWpDeals .dz-wp-close {
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.dz-wp-deals-head {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    margin-bottom: 10px;
    padding-right: 30px;
}

.dz-wp-deals-head > i {
    font-size: 22px;
    color: #EA580C;
}

.dz-wp-deals-head .dz-wp-title {
    font-size: 17px;
    margin-bottom: 2px;
}

.dz-wp-deals-head .dz-wp-sub {
    font-size: 12px;
    margin-bottom: 0;
}

/* Horizontal scrolling product strip (Jumia-style) */
.dz-wp-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 0 8px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.dz-wp-grid::-webkit-scrollbar {
    height: 6px;
}

.dz-wp-grid::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.dz-wp-prod {
    flex: 0 0 130px;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.dz-wp-prod:hover {
    border-color: var(--diilzo-primary, #7C3AED);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.15);
}

.dz-wp-prod img {
    width: 100%;
    height: 72px;
    object-fit: contain;
    display: block;
    margin-bottom: 4px;
}

.dz-wp-prod-name {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    line-height: 1.25;
    height: 27px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 4px;
}

.dz-wp-prod-price {
    font-size: 13px;
    font-weight: 800;
    color: var(--diilzo-primary, #7C3AED);
}

.dz-wp-prod-old {
    font-size: 10px;
    color: #999;
    text-decoration: line-through;
    margin-left: 4px;
    font-weight: 400;
}

.dz-wp-prod-off {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: #EA580C;
    border-radius: 3px;
    padding: 1px 4px;
    margin-top: 3px;
}

/* ── Mobile ────────────────────────────────────────────────── */
@media (max-width: 560px) {
    .dz-wp-dialog {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 24px);
        border-radius: 12px;
    }

    .dz-wp-panel {
        padding: 20px 16px 16px;
    }

    #dzWpDeals {
        padding: 14px 14px 10px;
    }

    .dz-wp-hero {
        margin: -20px -16px 14px;
        padding: 18px 16px;
    }

    .dz-wp-logo {
        height: 34px;
    }

    .dz-wp-title {
        font-size: 16px;
    }

    .dz-wp-actions {
        flex-direction: column;
        gap: 8px;
    }

    .dz-wp-prod {
        flex-basis: 108px;
    }

    .dz-wp-prod img {
        height: 64px;
    }
}
