/* =========================================================
   WC Quick View – Stylesheet
   ========================================================= */

/* ---------- Trigger wrapper on product card ---------- */
.wc-quick-view-trigger {
    position: relative;
    display: block;
    cursor: pointer;
}

.wc-quick-view-icon {
    position: absolute;
    inset: 4px 4px auto auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.38);
    color: #e9e6ed;
    opacity: 0;
    transition: opacity 0.22s ease;
    border-radius: 4px;
    width: 36px;
    height: 36px;
    z-index: 9;
}

.wc-quick-view-icon:hover {
    color: #e9e6ed;
}

.wc-quick-view-icon svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .45));
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.woocommerce ul.products li.product:hover .wc-quick-view-icon,
.woocommerce ul.products li.product:focus .wc-quick-view-icon {
    opacity: 1;
}

/* ---------- Overlay ---------- */
.wc-qv-overlay {
    position: fixed;
    inset: 0;
    z-index: 999990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.55);
    animation: wc-qv-fade-in 0.22s ease forwards;
}

.wc-qv-overlay[hidden] {
    display: none;
}

@keyframes wc-qv-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ---------- Modal ---------- */
.wc-qv-modal-wrapper {
    width: 100%;
    max-width: 960px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #fff;
}

.wc-qv-modal {
    position: relative;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
    width: 100%;
    height: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    animation: wc-qv-slide-up 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    scrollbar-width: thin;
}

@keyframes wc-qv-slide-up {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ---------- Close button ---------- */
.wc-qv-close {
    position: sticky;
    top: 12px;
    float: right;
    margin: 12px 12px 0 0;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, .07);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
    padding: 0;
}

.wc-qv-close:hover {
    background: rgba(0, 0, 0, .14);
    transform: rotate(90deg);
}

.wc-qv-close svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* ---------- Content layout ---------- */
.wc-qv-content {
    padding: 32px;
}

@media (max-width: 680px) {
    .wc-qv-content {
        padding: 16px;
    }
}

/* ---------- Spinner ---------- */
.wc-qv-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 80px 0;
}

.wc-qv-spinner span {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    animation: wc-qv-bounce 1.1s ease-in-out infinite;
}

.wc-qv-spinner span:nth-child(2) {
    animation-delay: 0.18s;
}

.wc-qv-spinner span:nth-child(3) {
    animation-delay: 0.36s;
}

@keyframes wc-qv-bounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: .45;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ---------- Accessibility: focus ring ---------- */
.wc-qv-overlay:focus-within .wc-qv-close:focus {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}