/* ================================================================
   BDCommerz — Frontend Product Page Styles
   ================================================================ */

/* ── Quantity row ──────────────────────────────────────────────── */
.bdcz-qty-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.bdcz-qty-label {
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    white-space: nowrap;
    min-width: 72px;
}

/* ── Primary buttons (Add to Cart + Buy Now) ───────────────────── */
.bdcz-primary-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

.bdcz-primary-btns .single_add_to_cart_button {
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 10px;
    font-size: 15px;
    font-weight: 700;
    min-height: 52px;
    border-radius: 8px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

.bdcz-primary-btns .bdcz-buy-now-btn {
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 14px 10px;
    font-size: 15px;
    font-weight: 700;
    min-height: 52px;
    border-radius: 8px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    cursor: pointer;
    border: none;
    transition: opacity .25s ease;
}

.bdcz-primary-btns .bdcz-buy-now-btn:hover {
    opacity: .88;
}

/* ── Primary btns: Add to Cart disabled (Qty row + Buy Now) ───── */
.bdcz-primary-btns.bdcz-atc-disabled {
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

/* Qty row sits in the left cell */
.bdcz-primary-btns.bdcz-atc-disabled .bdcz-qty-row {
    margin-bottom: 0;
    width: 100%;
    justify-content: center;
}

/* Force the WooCommerce qty wrapper to stay horizontal */
.bdcz-primary-btns.bdcz-atc-disabled .quantity {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: auto !important;
    height: auto !important;
}

/* Qty input */
.bdcz-primary-btns.bdcz-atc-disabled .quantity input.qty {
    width: 40px !important;
    min-width: 0 !important;
    text-align: center;
    flex-shrink: 1;
}

/* Qty +/- buttons */
.bdcz-primary-btns.bdcz-atc-disabled .quantity .minus,
.bdcz-primary-btns.bdcz-atc-disabled .quantity .plus {
    padding: 6px 10px !important;
    line-height: 1 !important;
    flex-shrink: 0;
}

.bdcz-primary-btns.bdcz-atc-disabled .bdcz-buy-now-btn {
    width: 100% !important;
    align-self: stretch;
}

/* ── WhatsApp + Call row ───────────────────────────────────────── */
.bdcz-contact-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0;
}

.bdcz-wa-btn,
.bdcz-call-btn {
    width: 100% !important;
    min-height: 52px;
    padding: 14px 10px;
    border-radius: 8px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 15px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    transition: opacity .25s ease;
    overflow: hidden;
}

.bdcz-wa-btn:hover,
.bdcz-call-btn:hover {
    opacity: .88;
    color: #fff !important;
    text-decoration: none !important;
}

.bdcz-wa-btn svg,
.bdcz-call-btn svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* ── Tablet (601–900px) ────────────────────────────────────────── */
@media ( max-width: 900px ) {
    .bdcz-primary-btns,
    .bdcz-contact-buttons {
        gap: 8px;
    }

    /* Hold 2-column grid on tablet */
    .bdcz-primary-btns {
        grid-template-columns: 1fr 1fr;
    }

    /* Disabled mode: Qty + Buy Now side by side on tablet */
    .bdcz-primary-btns.bdcz-atc-disabled {
        grid-template-columns: 1fr 1fr;
    }

    .bdcz-primary-btns.bdcz-atc-disabled .quantity .minus,
    .bdcz-primary-btns.bdcz-atc-disabled .quantity .plus {
        padding: 5px 5px !important;
    }

    .bdcz-primary-btns .single_add_to_cart_button,
    .bdcz-primary-btns .bdcz-buy-now-btn,
    .bdcz-wa-btn,
    .bdcz-call-btn {
        font-size: 13px;
        padding: 10px 6px;
        min-height: 46px;
        gap: 4px;
        white-space: nowrap;
    }

    .bdcz-wa-btn svg,
    .bdcz-call-btn svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }
}

/* ── Mobile (≤600px) — single column ──────────────────────────── */
@media ( max-width: 600px ) {
    .bdcz-primary-btns,
    .bdcz-contact-buttons {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* Disabled mode: Qty + Buy Now stack vertically on mobile */
    .bdcz-primary-btns.bdcz-atc-disabled {
        grid-template-columns: 1fr;
    }

    .bdcz-primary-btns .single_add_to_cart_button,
    .bdcz-primary-btns .bdcz-buy-now-btn,
    .bdcz-wa-btn,
    .bdcz-call-btn {
        font-size: 15px;
        padding: 14px 16px;
        min-height: 52px;
    }
}

/* ── Sticky Buy Now Bar (tablet + mobile only) ─────────────────── */
.bdcz-sticky-bar {
    display: none; /* hidden by default on all screens */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
    padding: 10px 16px;
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.bdcz-sticky-bar.bdcz-sticky-bar--visible {
    transform: translateY(0);
}

.bdcz-sticky-bar__inner {
    max-width: 600px;
    margin: 0 auto;
}

.bdcz-sticky-form {
    margin: 0;
    padding: 0;
}

.bdcz-sticky-btn {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    text-align: center;
    padding: 12px 20px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    min-height: 52px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    line-height: 1.2;
}

.bdcz-sticky-btn__text {
    display: block !important;
    width: 100%;
}

.bdcz-sticky-btn__note {
    display: block !important;
    width: 100%;
    font-size: 11px;
    font-weight: 400;
    opacity: 0.82;
    margin-top: 3px;
    line-height: 1.2;
}

/* Show only on tablet + mobile */
@media ( max-width: 900px ) {
    .bdcz-sticky-bar {
        display: block;
    }
}

/* ── Loop page Buy Now form + button ──────────────────────────────── */
.bdcz-loop-form {
    margin: 0;
    padding: 0;
    display: block;
    width: 100%;
}

/* ── Loop page Buy Now button ──────────────────────────────────── */
.bdcz-loop-btn.bdcz-buy-now-btn {
    display: inline-block;
    text-align: center;
    font-weight: 600;
    border: none !important;
    border-radius: 4px;
    transition: opacity .2s ease;
    text-decoration: none !important;
}

.bdcz-loop-btn.bdcz-buy-now-btn:hover {
    opacity: .88;
    color: inherit !important;
    text-decoration: none !important;
}
