/* ════════════════════════════════════════════════════════════════
   QUICK VIEW MODAL  —  quick-view-modal.css
   Scoped to .qv-* so zero bleed into page styles.
   Designed to live inside a Bootstrap .modal-dialog.modal-xl
   ════════════════════════════════════════════════════════════════ */

/* ── Modal shell overrides ───────────────────────────────────── */
.qv-modal .modal-content {
    border: none;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
}

.qv-modal .modal-body {
    padding: 0;
}

/* ── Two-pane layout ─────────────────────────────────────────── */
.qv-wrap {
    display: flex;
    min-height: 520px;
    font-family: 'DM Sans', system-ui, sans-serif;
    color: #111827;
}

/* ── LEFT — image pane ───────────────────────────────────────── */
.qv-gallery {
    flex: 0 0 42%;
    max-width: 42%;
    background: #f7f6f2;
    display: flex;
    flex-direction: column;
    padding: 20px 16px 16px;
    gap: 12px;
    position: relative;
}

/* Main image */
.qv-main-img {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #efefef;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
}

.qv-main-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    max-height: 320px;
    transition: opacity 0.2s ease;
}

.qv-main-img img.qv-img-fade {
    opacity: 0;
}

/* Thumbnail strip */
.qv-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
    flex-shrink: 0;
}

.qv-thumbs::-webkit-scrollbar {
    display: none;
}

.qv-thumb {
    flex: 0 0 52px;
    height: 52px;
    border-radius: 9px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
    background: #e8e8ec;
}

.qv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qv-thumb:hover {
    border-color: #a5b4fc;
    transform: scale(1.05);
}

.qv-thumb.active {
    border-color: #4f35e8;
}

/* ── RIGHT — info pane ───────────────────────────────────────── */
.qv-info {
    flex: 1;
    padding: 24px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    max-height: 580px;
}

/* Scrollbar style for info pane */
.qv-info::-webkit-scrollbar {
    width: 4px;
}

.qv-info::-webkit-scrollbar-track {
    background: transparent;
}

.qv-info::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

/* Close button */
.qv-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #6b7280;
    z-index: 10;
    transition: background 0.15s, color 0.15s;
    backdrop-filter: blur(4px);
}

.qv-close:hover {
    background: #fff;
    color: #111827;
}

/* Product name */
.qv-name {
    font-family: 'Sora', system-ui, sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    color: #111827;
    margin: 0 0 8px;
    word-break: break-word;
}

/* Rating row */
.qv-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #6b7280;
}

.qv-stars {
    color: #f59e0b;
    letter-spacing: 1px;
}

/* ── Divider ─────────────────────────────────────────────────── */
.qv-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 4px 0 14px;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   VARIANT PILL PICKER
   ══════════════════════════════════════════════════════════════ */
.qv-picker-group {
    margin-bottom: 14px;
}

.qv-picker-label {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.65px;
    color: #9ca3af;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.qv-picker-label i {
    font-size: 10px;
}

/* Scrollable pill row */
.qv-pill-row {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

/* Base pill */
.qv-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 13px;
    border-radius: 9px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
    position: relative;
}

.qv-pill:hover {
    border-color: #4f35e8;
    color: #4f35e8;
    background: #eef2ff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(79, 53, 232, 0.12);
}

.qv-pill.active {
    border-color: #4f35e8;
    background: #4f35e8;
    color: #fff;
    box-shadow: 0 3px 12px rgba(79, 53, 232, 0.3);
}

.qv-pill.active .qv-pill-price {
    color: rgba(255, 255, 255, 0.8);
}

/* Price suffix inside variant pill */
.qv-pill-price {
    font-size: 11.5px;
    font-weight: 600;
    color: #6b7280;
    margin-left: 1px;
}

/* Size pills — more compact, centered */
.qv-pill-size {
    padding: 6px 10px;
    min-width: 40px;
    justify-content: center;
}

/* Color pills — circular swatch */
.qv-color-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

/* ══════════════════════════════════════════════════════════════
   PRICING PANEL
   Updates live when variant pill is clicked.
   ══════════════════════════════════════════════════════════════ */
.qv-pricing {
    background: #f8f7fd;
    border: 1.5px solid #e5e3f8;
    border-radius: 13px;
    padding: 14px 16px 12px;
    margin: 4px 0 14px;
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.qv-pricing.updating {
    opacity: 0.35;
    transform: translateY(3px);
}

/* Three-column price grid: Cost → Profit → Sell */
.qv-price-row {
    display: grid;
    grid-template-columns: 1fr 14px 1fr 14px 1fr;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
}

.qv-price-col {
    text-align: center;
}

.qv-price-lbl {
    display: block;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.55px;
    color: #9ca3af;
    margin-bottom: 5px;
}

.qv-price-val {
    display: block;
    font-family: 'Sora', system-ui, sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.qv-price-val--profit {
    color: #059669;
}

.qv-price-val--sell {
    color: #4f35e8;
}

.qv-price-arrow {
    text-align: center;
    color: #d1cfe8;
    font-size: 10px;
    padding-top: 14px;
}

/* Monthly earnings strip inside pricing panel */
.qv-earnings {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: 9px;
    padding: 9px 12px;
    gap: 8px;
}

.qv-earnings-left {}

.qv-earnings-lbl {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.55px;
    color: #059669;
    margin-bottom: 3px;
}

.qv-earnings-range {
    font-family: 'Sora', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #065f46;
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.qv-earnings-mo {
    font-size: 9.5px;
    font-weight: 800;
    color: #059669;
    background: rgba(5, 150, 105, 0.12);
    border-radius: 4px;
    padding: 1px 5px;
}

.qv-earnings-icon {
    font-size: 22px;
    opacity: 0.18;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   CTA BUTTONS
   ══════════════════════════════════════════════════════════════ */
.qv-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    flex-shrink: 0;
}

.qv-btn {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 11px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.18s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.1px;
}

/* Import button — indigo */
.qv-btn-import {
    background: linear-gradient(135deg, #4f35e8, #6d52f5);
    color: #fff;
    box-shadow: 0 4px 14px rgba(79, 53, 232, 0.25);
}

.qv-btn-import:hover {
    box-shadow: 0 6px 20px rgba(79, 53, 232, 0.38);
    transform: translateY(-1px);
}

.qv-btn-import:disabled {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    box-shadow: none;
    cursor: default;
    transform: none;
}

/* Sample button — emerald outline */
.qv-btn-sample {
    background: #fff;
    color: #059669;
    border: 1.5px solid #059669;
}

.qv-btn-sample:hover {
    background: #059669;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
}

.qv-btn-sample:disabled {
    opacity: 0.55;
    cursor: default;
    transform: none;
}

/* Shimmer on import button hover */
.qv-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transition: left 0.35s ease;
    pointer-events: none;
}

.qv-btn:hover::before {
    left: 130%;
}

/* Validation shake when "Order Sample" clicked without selecting variant */
.qv-picker-group.qv-shake {
    animation: qvShake 0.38s ease;
}

@keyframes qvShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-5px);
    }

    40% {
        transform: translateX(5px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

/* Highlight label when validation fails */
.qv-picker-group.qv-required .qv-picker-label {
    color: #dc2626;
    animation: qvShake 0.38s ease;
}

/* ── View full details link ───────────────────────────────────── */
.qv-view-full {
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
    color: #9ca3af;
}

.qv-view-full a {
    color: #4f35e8;
    text-decoration: none;
    font-weight: 700;
}

.qv-view-full a:hover {
    text-decoration: underline;
}

/* ── Stock / availability badge ──────────────────────────────── */
.qv-stock {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    color: #059669;
    background: #dcfce7;
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: 20px;
    padding: 3px 10px;
    margin-bottom: 14px;
}

.qv-stock i {
    font-size: 10px;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE  ≤ 768px — stack vertically
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .qv-wrap {
        flex-direction: column;
        min-height: auto;
    }

    .qv-gallery {
        flex: none;
        max-width: 100%;
        padding: 16px 16px 12px;
    }

    .qv-main-img {
        min-height: 200px;
        max-height: 220px;
    }

    .qv-main-img img {
        max-height: 210px;
    }

    .qv-info {
        max-height: none;
        padding: 16px;
        overflow-y: visible;
    }

    .qv-name {
        font-size: 15px;
    }

    .qv-price-val {
        font-size: 15px;
    }

    .qv-actions {
        position: sticky;
        bottom: 0;
        background: #fff;
        padding: 12px 0 4px;
        margin-top: 14px;
    }
}

@media (max-width: 480px) {
    .qv-btn {
        height: 40px;
        font-size: 12px;
    }

    .qv-price-val {
        font-size: 13px;
    }

    .qv-earnings-range {
        font-size: 13px;
    }
}