/* ==========================================================================
   Le Belle Arti — Quick View Modal
   ========================================================================== */

/* ── Backdrop + dialog wrapper ── */
.lba-qv {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

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

.lba-qv__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    animation: lba-qv-fade-in 0.2s ease;
}

/* ── Dialog ── */
.lba-qv__dialog {
    position: relative;
    background: var(--lba-white);
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: lba-qv-slide-up 0.25s ease;
}

/* ── Close button ── */
.lba-qv__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--lba-gray-500, #777);
    transition: color 0.15s ease;
}

.lba-qv__close:hover {
    color: var(--lba-black);
}

/* ── Spinner ── */
.lba-qv__spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}

.lba-qv__spinner[hidden] {
    display: none;
}

.lba-qv__spinner-ring {
    display: block;
    width: 36px;
    height: 36px;
    border: 2px solid var(--lba-gray-200);
    border-top-color: var(--lba-black);
    border-radius: 50%;
    animation: lba-qv-spin 0.7s linear infinite;
}

/* ── Content layout ── */
.lba-qv__content {
    display: flex;
    gap: 0;
    overflow: hidden;
    max-height: 90vh;
}

.lba-qv__content[hidden] {
    display: none;
}

/* ── Gallery (left half) ── */
.lba-qv__gallery {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    background: var(--lba-gray-50, #f7f7f7);
}

.lba-qv__img-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 340px;
}

.lba-qv__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 420px;
    padding: 1.5rem;
}

/* Gallery arrows */
.lba-qv__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lba-white);
    border: 1px solid var(--lba-gray-200);
    cursor: pointer;
    color: var(--lba-black);
    opacity: 0.85;
    transition: opacity 0.15s ease;
    z-index: 2;
}

.lba-qv__arrow[hidden] {
    display: none;
}

.lba-qv__arrow:hover {
    opacity: 1;
}

.lba-qv__arrow--prev { left: 0.5rem; }
.lba-qv__arrow--next { right: 0.5rem; }

/* Thumbnails */
.lba-qv__thumbs {
    display: flex;
    gap: 0.375rem;
    padding: 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
}

.lba-qv__thumbs::-webkit-scrollbar { display: none; }

.lba-qv__thumb {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border: 1.5px solid transparent;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s ease;
    background: var(--lba-white);
}

.lba-qv__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
    display: block;
}

.lba-qv__thumb.is-active,
.lba-qv__thumb:hover {
    border-color: var(--lba-black);
}

/* ── Info panel (right half) ── */
.lba-qv__info {
    flex: 0 0 50%;
    padding: 2.5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
}

.lba-qv__brand {
    font-family: var(--lba-font-secondary);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lba-gray-500, #777);
    margin: 0;
}

.lba-qv__name {
    font-family: var(--lba-font-primary);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.2;
    color: var(--lba-black);
    margin: 0 0 0.25rem;
}

.lba-qv__price {
    font-family: var(--lba-font-secondary);
    font-size: 1rem;
    color: var(--lba-black);
    margin: 0;
}

.lba-qv__desc {
    font-family: var(--lba-font-secondary);
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--lba-gray-600, #555);
    margin-top: 0.5rem;
    flex: 1;
}

/* ── Action buttons row ── */
.lba-qv__actions {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1.5rem;
}

/* Primary CTA fills all available space */
.lba-qv__add-cart,
.lba-qv__permalink {
    flex: 1;
    text-align: center;
    justify-content: center;
    white-space: nowrap;
    text-decoration: none;
}

/* Quote icon — fixed square, sits beside primary CTA */
.lba-qv__quote-icon {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--lba-gray-200);
    cursor: pointer;
    color: var(--lba-gray-400, #aaa);
    transition: color 0.2s ease, border-color 0.2s ease;
    overflow: visible;
    padding: 0;
    min-height: unset;
}

.lba-qv__quote-icon:hover,
.lba-qv__quote-icon:focus-visible {
    color: var(--lba-black);
    border-color: var(--lba-black);
    background: transparent;
}

.lba-qv__quote-icon.is-in-list {
    color: var(--lba-black);
    border-color: var(--lba-black);
}

.lba-qv__quote-icon.is-in-list svg {
    fill: var(--lba-black);
}

/* Reuse the card tooltip style for the modal quote icon */
.lba-qv__quote-icon .lba-card-quote-btn__tooltip {
    bottom: calc(100% + 6px);
    right: 0;
    left: auto;
}

/* ── Quick View trigger button on product card ── */
.lba-qv-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    border-top: 1px solid var(--lba-gray-200);
    font-family: var(--lba-font-secondary);
    font-size: 0.5625rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lba-black);
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 3;
}

.lba-product-card__img-wrap:hover .lba-qv-btn,
.lba-product-card:hover .lba-qv-btn {
    opacity: 1;
    transform: translateY(0);
}

/* ── Animations ── */
@keyframes lba-qv-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes lba-qv-slide-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

/* ── Responsive ── */
@media (max-width: 640px) {
    .lba-qv {
        padding: 0;
        align-items: flex-end;
    }

    .lba-qv__dialog {
        max-width: 100%;
        max-height: 92vh;
        border-radius: 0;
    }

    .lba-qv__content {
        flex-direction: column;
    }

    .lba-qv__gallery {
        flex: 0 0 auto;
    }

    .lba-qv__img-wrap {
        min-height: 240px;
    }

    .lba-qv__info {
        padding: 1.5rem 1.25rem;
    }
}
