/* =====================================================
   BookedUp Quick View — styles
   Palette: white, pastel pink #FDE8EF / #e8a0b8, pastel blue #E8F0FD
   ===================================================== */

/* ── Quick View trigger button on shop cards ───────── */
.buqv-trigger {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    opacity: 0;
    background: rgba(255,255,255,.95);
    color: #b07090;
    border: 1.5px solid #e8a0b8;
    border-radius: 50px;
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: opacity .2s ease, transform .2s ease, background .15s, color .15s;
    z-index: 10;
    font-family: inherit;
    box-shadow: 0 2px 10px rgba(0,0,0,.10);
    pointer-events: none;
}

/* Show on card hover */
li.product:hover .buqv-trigger,
.product-item:hover .buqv-trigger {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.buqv-trigger:hover {
    background: #FDE8EF;
    color: #8c4060;
    border-color: #d4809a;
}

/* Make sure the product li is position:relative for the button */
ul.products li.product { position: relative; overflow: visible; }

/* ── Overlay ───────────────────────────────────────── */
#buqv-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 10, 15, .55);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: buqv-fade-in .2s ease;
}

@keyframes buqv-fade-in  { from { opacity: 0 } to { opacity: 1 } }
@keyframes buqv-slide-up { from { opacity: 0; transform: translateY(20px) } to { opacity: 1; transform: translateY(0) } }

/* ── Modal box ─────────────────────────────────────── */
#buqv-modal {
    background: #fff;
    border-radius: 20px;
    width: 94%;
    max-width: 860px;
    max-height: 88vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    animation: buqv-slide-up .22s ease;
    display: flex;
    flex-direction: column;
}
/* The inner content handles its own scroll */
#buqv-modal-inner {
    flex: 1;
    overflow: hidden;
    min-height: 0;
    max-height: 88vh;
}
#buqv-modal-inner .buqv-modal-layout {
    height: 100%;
    min-height: 0;
    max-height: 88vh;
}
/* Right panel is the scroll container on desktop. Bind it to the viewport so
   it scrolls reliably regardless of flex height resolution, keeping the Qty
   field and Add-to-Cart button always reachable. */
#buqv-modal-inner .buqv-mright {
    max-height: 88vh;
    overflow-y: auto !important;
    min-height: 0;
}

/* scrollbar */
#buqv-modal::-webkit-scrollbar { width: 5px; }
#buqv-modal::-webkit-scrollbar-thumb { background: #f0d6e0; border-radius: 3px; }

/* ── Close button ──────────────────────────────────── */
#buqv-close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: #f0ebe8 !important;
    border: 1px solid #e0d8d4 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #6E635A !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    transition: background .15s, color .15s !important;
    z-index: 100 !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}
#buqv-close:hover { background: #FDE8EF !important; color: #b07090 !important; }

/* ── Loading state ─────────────────────────────────── */
.buqv-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    color: #bbb;
    font-size: 14px;
    gap: 14px;
}
.buqv-spinner {
    width: 32px; height: 32px;
    border: 3px solid #F0D6E0;
    border-top-color: #e8a0b8;
    border-radius: 50%;
    animation: buqv-spin .7s linear infinite;
}
@keyframes buqv-spin { to { transform: rotate(360deg); } }

/* ── Content layout ────────────────────────────────── */
.buqv-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 8px 0 32px;
    clear: both;
}
@media (max-width: 640px) {
    .buqv-content { grid-template-columns: 1fr; }
}

/* ── Gallery (left) ────────────────────────────────── */
.buqv-gallery {
    padding: 8px 20px 20px 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.buqv-main-image {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #faf6f8;
    aspect-ratio: 1 / 1;
}
.buqv-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}
.buqv-main-image:hover img { transform: scale(1.04); }

.buqv-section-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Thumbnails */
.buqv-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.buqv-thumb {
    width: 60px; height: 60px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: border-color .15s;
    flex-shrink: 0;
}
.buqv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.buqv-thumb--active,
.buqv-thumb:hover { border-color: #e8a0b8; }

.buqv-no-image {
    aspect-ratio: 1/1;
    background: #f5f0f2;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Details (right) ───────────────────────────────── */
.buqv-details {
    padding: 8px 28px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.buqv-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.buqv-chip {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: #E8F0FD;
    color: #3a5ca0;
}
.buqv-chip--avail { background: #E8FAF0; color: #1a6640; }
.buqv-chip--eta   { background: #FFF8E1; color: #7a5e00; }

.buqv-product-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.3;
}

.buqv-categories {
    font-size: 12px;
    color: #aaa;
    margin: 0;
}
.buqv-categories a { color: #b07090; text-decoration: none; }
.buqv-categories a:hover { text-decoration: underline; }

.buqv-price {
    font-size: 22px;
    font-weight: 700;
    color: #c0392b;
}

.buqv-stock {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    width: fit-content;
}
.buqv-instock    { background: #E8FAF0; color: #1a6640; }
.buqv-outofstock { background: #fef2f2; color: #9a2020; }

.buqv-description {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
    max-height: 80px;
    overflow-y: auto;
}

.buqv-notes {
    font-size: 12px;
    color: #888;
    background: #faf6f8;
    border-radius: 8px;
    padding: 8px 12px;
    border-left: 3px solid #e8a0b8;
}

/* ── Add to cart row ───────────────────────────────── */
.buqv-qty-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.buqv-qty-label { font-size: 13px; font-weight: 600; color: #555; }
.buqv-qty-input {
    width: 64px;
    border: 1.5px solid #EDE0E8;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 14px;
    text-align: center;
    font-family: inherit;
}
.buqv-qty-input:focus { outline: none; border-color: #e8a0b8; }

.buqv-atc-btn {
    flex: 1;
    background: #e8a0b8 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 11px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background .15s !important;
    font-family: inherit !important;
    text-align: center !important;
}
.buqv-atc-btn:hover { background: #d4809a !important; }

/* Full link */
.buqv-full-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #b07090;
    text-decoration: none;
    margin-top: 4px;
    transition: color .15s;
}
.buqv-full-link:hover { color: #8c4060; text-decoration: underline; }

/* ── Plan selector stub — actual styles injected inline in modal HTML ── */
/* This avoids theme override issues entirely */

/* ── Mobile: modal shell ──────────────────────────── */
@media (max-width: 600px) {
    #buqv-overlay { padding: 0 !important; align-items: flex-end !important; }
    #buqv-modal {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 92vh !important;
        border-radius: 20px 20px 0 0 !important;
        margin: 0 !important;
        flex-direction: column !important;
    }
    #buqv-modal-inner {
        overflow-y: auto !important;
        max-height: 92vh !important;
    }
    #buqv-close {
        top: 12px !important;
        right: 12px !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 16px !important;
        z-index: 200 !important;
    }
}
