/* ============================================================
   Ajith Variation Buttons — Plugin Styles
   Author: Ajith
   Version: 1.0.0
   ============================================================ */

/* ---- Product Page: Hide default dropdown ---- */
.variations select {
    display: none !important;
}

/* ---- Product Page: Selected label ---- */
.custom-variation-label {
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 10px;
    display: block;
}
.custom-variation-label span {
    font-weight: bold;
}

/* ---- Product Page: Buttons wrapper ---- */
.custom-variation-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

/* ---- Product Page: Each button ---- */
.custom-var-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    padding: 14px 12px 8px;
    border: 1.5px solid #ddd;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    font-weight: 500;
    color: #222;
    line-height: 1.4;
}
.custom-var-btn .var-price {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
    font-weight: 400;
}
.custom-var-btn.active {
    background: #111;
    color: #fff;
    border-color: #111;
    font-weight: 700;
}
.custom-var-btn.active .var-price {
    color: #ccc;
}
.custom-var-btn:not(.active):hover {
    border-color: #999;
    background: #f9f9f9;
}

/* ---- Popup: Overlay ---- */
#qv-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9998;
}

/* ---- Popup: Modal box ---- */
#qv-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    z-index: 9999;
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* ---- Popup: Header ---- */
.qv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.qv-header h3 {
    margin: 0;
    font-size: 17px;
}
.qv-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #555;
    line-height: 1;
    padding: 4px 8px;
}
.qv-close:hover {
    color: #111;
}

/* ---- Popup: Product image ---- */
.qv-img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 14px;
    background: #f7f7f7;
}

/* ---- Popup: Selected label ---- */
.qv-label {
    font-size: 14px;
    margin-bottom: 12px;
    color: #444;
}

/* ---- Popup: Buttons row ---- */
.qv-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.qv-var-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 75px;
    padding: 12px 10px 8px;
    border: 1.5px solid #ddd;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #222;
    transition: all 0.2s;
}
.qv-var-btn .var-price {
    font-size: 10px;
    color: #888;
    margin-top: 4px;
    font-weight: 400;
}
.qv-var-btn.active {
    background: #111;
    color: #fff;
    border-color: #111;
    font-weight: 700;
}
.qv-var-btn.active .var-price {
    color: #ccc;
}
.qv-var-btn:not(.active):hover {
    border-color: #999;
    background: #f5f5f5;
}

/* ---- Popup: Add to cart button ---- */
.qv-add-btn {
    width: 100%;
    padding: 14px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 4px;
}
.qv-add-btn:hover:not([disabled]) {
    background: #333;
}
.qv-add-btn[disabled] {
    background: #ccc;
    cursor: not-allowed;
}

/* ---- Hide "View Cart" notice after add to cart ---- */
.woocommerce-message,
.added_to_cart.wc-forward {
    display: none !important;
}
@media (max-width: 480px) {
    #qv-modal {
        padding: 18px;
        width: 95%;
    }
    .qv-var-btn {
        min-width: 65px;
        font-size: 13px;
    }
    .custom-var-btn {
        min-width: 70px;
        font-size: 13px;
    }
}
