/* ═══════════════════════════════════════════════════════════════
   Quick View Button
   ═══════════════════════════════════════════════════════════════ */

.p-card-quickview {
    position: absolute;
    top: 96px;
    right: 14px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--shop-transition, 0.25s ease);
    border: none;
    cursor: pointer;
    z-index: 3;
}

ul.products .product:hover .p-card-quickview,
.product:hover .p-card-quickview {
    opacity: 1;
    transform: scale(1);
}

.p-card-quickview svg {
    width: 16px;
    height: 16px;
    stroke: var(--shop-fg, var(--brand-dark, #1a1a1a));
    stroke-width: 1.5;
    fill: none;
}

.p-card-quickview:hover {
    background: #fff;
}

.p-card-quickview:hover svg {
    stroke: var(--shop-accent, var(--brand-sky, #0072FF));
}

/* ── Responsive: 768px ── */
@media (max-width: 768px) {
    .p-card-quickview {
        top: 86px;
        width: 32px;
        height: 32px;
    }

    .p-card-quickview svg {
        width: 14px;
        height: 14px;
    }
}

/* ── Responsive: 480px ── */
@media (max-width: 480px) {
    .p-card-quickview {
        top: 74px;
        right: 10px;
        width: 28px;
        height: 28px;
    }

    .p-card-quickview svg {
        width: 12px;
        height: 12px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   Quick View Modal
   ═══════════════════════════════════════════════════════════════ */

.qv-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.qv-overlay.active {
    opacity: 1;
    visibility: visible;
}

.qv-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: 90%;
    max-width: 920px;
    max-height: 85vh;
    background: var(--shop-bg, #fff);
    border-radius: var(--shop-radius, 12px);
    overflow: hidden;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.qv-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.qv-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
}

.qv-close:hover {
    background: var(--shop-fg, #1a1a1a);
}

.qv-close:hover svg {
    stroke: #fff;
}

.qv-close svg {
    width: 16px;
    height: 16px;
    stroke: var(--shop-fg, #1a1a1a);
    stroke-width: 2;
    fill: none;
}

.qv-modal-body {
    overflow-y: auto;
    max-height: 85vh;
    padding: 0;
}

/* ── Quick View Content Grid ── */

.qv-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

/* ── Image Section ── */

.qv-image {
    position: relative;
    background: var(--shop-card-bg, #f5f5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    overflow: hidden;
}

.qv-gallery {
    width: 100%;
}

.qv-gallery-main {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qv-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.qv-gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
}

.qv-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
    flex-shrink: 0;
    opacity: 0.6;
}

.qv-thumb:hover,
.qv-thumb.active {
    border-color: var(--shop-fg, #1a1a1a);
    opacity: 1;
}

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

/* ── Details Section ── */

.qv-details {
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.qv-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0 0 12px;
    line-height: 1.3;
}

.qv-title a {
    color: var(--shop-fg, #1a1a1a);
    text-decoration: none;
    transition: color var(--shop-transition);
}

.qv-title a:hover {
    color: var(--shop-muted, #888);
}

.qv-sku {
    font-size: 0.78rem;
    color: var(--shop-muted, #888);
    margin: 0 0 12px;
}

.qv-sku span {
    font-weight: 600;
    color: var(--shop-fg, #1a1a1a);
}

.qv-price {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--shop-fg, #1a1a1a);
}

.qv-price .price {
    margin: 0;
}

.qv-price del {
    font-size: 0.88rem;
    color: var(--shop-muted, #888);
    font-weight: 400;
}

.qv-price ins {
    text-decoration: none;
    font-weight: 600;
}

.qv-desc {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--shop-muted, #666);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qv-attributes {
    margin-bottom: 18px;
    padding-top: 2px;
}

.qv-attributes-title {
    margin: 0 0 10px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--shop-fg, #1a1a1a);
    letter-spacing: 0.02em;
}

.qv-attributes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qv-attribute-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.82rem;
    line-height: 1.6;
}

.qv-attribute-label {
    min-width: 56px;
    font-weight: 600;
    color: var(--shop-fg, #1a1a1a);
}

.qv-attribute-values {
    color: var(--shop-muted, #666);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.qv-color-swatch,
.qv-size-swatch {
    position: relative;
    flex-shrink: 0;
}

.qv-color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.08) inset;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.qv-color-swatch--light {
    box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.18) inset;
}

.qv-color-swatch:hover {
    transform: scale(1.08);
    border-color: #1a1a1a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.qv-size-swatch {
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1.5px solid #e0e0e0;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    color: #555;
    letter-spacing: 0.02em;
    transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.qv-size-swatch:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qv-color-swatch .qv-swatch-tooltip,
.qv-size-swatch .qv-swatch-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    font-size: 12px;
    line-height: 1.3;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
    font-weight: 400;
}

.qv-color-swatch .qv-swatch-tooltip::after,
.qv-size-swatch .qv-swatch-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1a1a1a;
}

.qv-color-swatch:hover .qv-swatch-tooltip,
.qv-size-swatch:hover .qv-swatch-tooltip {
    opacity: 1;
}

.qv-stock {
    margin-bottom: 20px;
    font-size: 0.82rem;
}

.qv-in-stock {
    color: #16a34a;
    font-weight: 500;
}

.qv-out-of-stock {
    color: #dc2626;
    font-weight: 500;
}

.qv-actions {
    margin-bottom: 16px;
}

.qv-actions .qv-add-to-cart,
.qv-actions .qv-view-product {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px;
    background: rgba(26, 26, 26, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    border: none;
    border-radius: var(--shop-radius-sm, 8px);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--shop-transition);
    width: 100%;
    line-height: 1;
}

.qv-actions .qv-add-to-cart:hover,
.qv-actions .qv-view-product:hover {
    background: var(--shop-fg, #1a1a1a);
    color: #fff;
}

.qv-view-details {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--shop-muted, #888);
    text-decoration: none;
    transition: color var(--shop-transition);
    letter-spacing: 0.02em;
}

.qv-view-details:hover {
    color: var(--shop-fg, #1a1a1a);
}

/* ── Loading Spinner ── */

.qv-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
}

.qv-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--shop-border, #e5e5e5);
    border-top-color: var(--shop-fg, #1a1a1a);
    border-radius: 50%;
    animation: qv-spin 0.7s linear infinite;
}

@keyframes qv-spin {
    to { transform: rotate(360deg); }
}


/* ═══════════════════════════════════════════════════════════════
   Quick View Modal Responsive
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .qv-modal {
        width: 95%;
        max-height: 90vh;
    }

    .qv-content {
        grid-template-columns: 1fr;
    }

    .qv-image {
        min-height: 280px;
    }

    .qv-details {
        padding: 24px 20px;
    }

    .qv-title {
        font-size: 1.15rem;
    }

    .qv-attribute-row {
        flex-direction: column;
        gap: 6px;
    }

    .qv-attribute-label {
        min-width: 0;
    }

    .qv-thumb {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .qv-modal {
        width: 98%;
        max-height: 92vh;
    }

    .qv-details {
        padding: 20px 16px;
    }

    .qv-title {
        font-size: 1.05rem;
    }

    .qv-thumb {
        width: 40px;
        height: 40px;
    }
}
