/**
 * Golden Hive Blocks — WooCommerce Quick View modal styles.
 * Class names (.rp-qv-*, .rp-quick-view-btn) are preserved from the original
 * site snippet this was migrated from. See includes/quick-view.php.
 */

/* Product card needs relative positioning */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    position: relative;
    /* Contain the quick-view button's z-index inside the card so it can never
       paint over a sticky header while the card scrolls underneath it. */
    isolation: isolate;
}

/* Mini icon button */
.rp-quick-view-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Show on card hover */
.woocommerce ul.products li.product:hover .rp-quick-view-btn,
.woocommerce-page ul.products li.product:hover .rp-quick-view-btn {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Always visible on touch devices */
@media (hover: none) {
    .rp-quick-view-btn {
        opacity: 1;
        transform: scale(1);
        pointer-events: auto;
    }
}

.rp-quick-view-btn:hover {
    background: #721124;
    color: #fff;
    box-shadow: 0 4px 12px rgba(114, 17, 36, 0.3);
    transform: scale(1.1);
}

/* Overlay */
.rp-qv-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99998;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.rp-qv-overlay.active { display: block; }

/* Modal */
.rp-qv-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    z-index: 99999;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.2);
}
.rp-qv-modal.active { display: block; }

.rp-qv-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    z-index: 2;
    transition: color 0.2s;
    line-height: 1;
}
.rp-qv-close:hover { color: #721124; }

.rp-qv-body {
    display: flex;
    gap: 0;
}

/* Gallery */
.rp-qv-gallery {
    flex: 1;
    min-width: 0;
    background: #f9f9f9;
    border-radius: 16px 0 0 16px;
    overflow: hidden;
}
.rp-qv-main-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.rp-qv-thumbs {
    display: flex;
    gap: 6px;
    padding: 8px;
    overflow-x: auto;
}
.rp-qv-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    flex-shrink: 0;
}
.rp-qv-thumb:hover,
.rp-qv-thumb.active {
    border-color: #721124;
}

/* Info */
.rp-qv-info {
    flex: 1;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rp-qv-cats {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rp-qv-title {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
}
.rp-qv-price {
    font-size: 22px;
    font-weight: 700;
    color: #721124;
}
.rp-qv-stock {
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    width: fit-content;
}
.rp-qv-stock.in-stock {
    background: #e8f5e9;
    color: #2e7d32;
}
.rp-qv-stock.out-of-stock {
    background: #fbe9e7;
    color: #c62828;
}
.rp-qv-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}
.rp-qv-desc p { margin: 0 0 8px; }
.rp-qv-attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.rp-qv-attr {
    font-size: 12px;
    padding: 4px 10px;
    background: #f5f5f5;
    border-radius: 6px;
    color: #555;
}
.rp-qv-attr strong {
    color: #333;
}
.rp-qv-sku {
    font-size: 11px;
    color: #bbb;
}
.rp-qv-view-full {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 24px;
    background: #721124;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: background 0.2s;
}
.rp-qv-view-full:hover {
    background: #5a0d1d;
    color: #fff;
}

/* Add-to-cart control inside the modal */
.rp-qv-atc {
    margin-top: auto;
    padding-top: 14px;
}
.rp-qv-atc.is-busy {
    opacity: .6;
    pointer-events: none;
}
.rp-qv-add {
    display: block;
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: 25px;
    background: #1f2532;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: filter .15s ease;
}
.rp-qv-add:hover { filter: brightness(1.15); color: #fff; }
.rp-qv-add[disabled] { background: #d9d9de; color: #8a8a90; cursor: not-allowed; }

.rp-qv-sizes-label {
    font-size: 12px;
    font-weight: 600;
    color: #777;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.rp-qv-sizes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 8px;
}
.rp-qv-size {
    padding: 10px 4px;
    border: 1px solid #e2e2e6;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: #1f2532;
    text-align: center;
    cursor: pointer;
    transition: border-color .12s ease, color .12s ease;
}
.rp-qv-size:hover { border-color: #721124; color: #721124; }
.rp-qv-size.is-oos {
    color: #c3c3c8;
    background: #f6f6f7;
    cursor: not-allowed;
    text-decoration: line-through;
}

.rp-qv-cart-msg {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #2e7d32;
    opacity: 0;
    transition: opacity .2s ease;
}
.rp-qv-cart-msg.show { opacity: 1; }

/* Loading */
.rp-qv-loading {
    padding: 60px;
    text-align: center;
    color: #999;
    font-size: 14px;
    width: 100%;
}

/* Mobile */
@media (max-width: 640px) {
    .rp-qv-body { flex-direction: column; }
    .rp-qv-gallery { border-radius: 16px 16px 0 0; }
    .rp-qv-info { padding: 20px 16px; }
    .rp-qv-title { font-size: 18px; }
}
