/* Arpo_QuickView — Quick View button + modals */

[x-cloak] {
    display: none !important;
}

body.arpo-qv-open {
    overflow: hidden;
}

/* ---- Hover Quick View button on product tiles ---- */
.product-item-info,
.item.product.product-item {
    position: relative;
}

.arpo-quickview-handler {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 36px;
    line-height: 36px;
    margin: 0;
    padding: 0 10px;
    background: #399f4c;
    color: #fff !important;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 20;
    cursor: pointer;
}

.arpo-quickview-handler:hover,
.arpo-quickview-handler:focus {
    background: #2f8a3f;
    color: #fff !important;
    text-decoration: none !important;
}

.product-item-info:hover > .product-item-details > .arpo-quickview-handler,
.product-item-info:hover .arpo-quickview-handler,
.item.product.product-item:hover > .arpo-quickview-handler,
.item.product.product-item:hover .product-info > .arpo-quickview-handler,
.item.product.product-item:hover .arpo-quickview-handler {
    opacity: 1;
    visibility: visible;
}

/*
 * Homepage Magebees (cwsBestSeller): keep product title where it is and pull
 * the Quick View bar up into the existing gap under the image (Sm-like).
 */
.cwsBestSeller .product-item-info {
    position: relative;
}

.cwsBestSeller .product-item-info .product-item-details {
    position: relative;
    padding-top: 0;
}

.cwsBestSeller .product-item-info .arpo-quickview-handler {
    position: absolute;
    left: 0;
    right: 0;
    top: -40px;
    margin: 0;
}

/* ---- Overlay / dialogs ---- */
.arpo-qv-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
    background: rgba(0, 0, 0, 0.55);
}

.arpo-qv-dialog {
    position: relative;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    max-height: 92vh;
    overflow: hidden;
}

.arpo-qv-dialog--product {
    width: min(980px, 96vw);
    height: min(860px, 92vh);
    display: flex;
    flex-direction: column;
}

.arpo-qv-dialog--report {
    width: min(430px, 94vw);
    padding: 40px 20px 20px;
    overflow: visible;
}

.arpo-qv-dialog--report .arpo-qv-close {
    top: 6px;
    right: 8px;
    color: #aaa;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    padding: 6px 10px;
}

.arpo-qv-close {
    position: absolute;
    top: 6px;
    right: 10px;
    z-index: 5;
    border: 0;
    background: transparent;
    color: #888;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}

.arpo-qv-close:hover {
    color: #333;
}

.arpo-qv-loading {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.arpo-qv-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #ddd;
    border-top-color: #287c37;
    border-radius: 50%;
    animation: arpo-qv-spin 0.7s linear infinite;
}

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

.arpo-qv-iframe-wrap {
    flex: 1;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.arpo-qv-iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 520px;
    border: 0;
}

/* Match Sm_CartQuickPro success report modal */
.arpo-qv-report-msg {
    display: block;
    margin: 0 0 10px;
    padding: 12px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
    text-align: center;
}

.arpo-qv-report-msg.is-success {
    color: #006400;
    background: #e5efe5;
}

.arpo-qv-report-msg.is-error {
    color: #e02b27;
    background: #fae5e5;
}

.arpo-qv-report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #eee;
}

.arpo-qv-btn {
    display: inline-block;
    min-width: 0;
    margin: 0;
    padding: 10px 20px;
    background: #444;
    color: #fff !important;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.arpo-qv-btn:hover {
    background: #333 !important;
    color: #fff !important;
}

@media (max-width: 767px) {
    .arpo-qv-dialog--product {
        width: 100%;
        height: 95vh;
    }

    /* Match Sm theme: Quick View is desktop/hover only */
    .arpo-quickview-handler {
        display: none !important;
    }
}
