/* Mobile product page — sticky Add to Cart / Buy Now above site bottom nav */
:root {
    --ac-primary: #775a00;
    --ac-outline-variant: #d1c5b0;
    --ac-soft-blue: #e8f4ff;
    --ac-blue: #0080ff;
    --ac-mobile-bottom-nav-h: 58px;
    --ac-mobile-btn-gap: 0;
}

.arbuda-product-mobile-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--ac-mobile-bottom-nav-h);
    z-index: 1080;
    display: flex;
    justify-content: center;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #e5e7eb;
    /* dotted join line to bottom menu */
    border-bottom: 2px dotted #c9cdd4;
    box-shadow: 0 -4px 16px rgba(27, 28, 28, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.4rem 0.5rem;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

/* Keep toasts / WhatsApp above sticky CTA */
body.arbuda-product-mobile-actions-active .aiz-notify,
body.arbuda-product-mobile-actions-active [data-notify="container"] {
    bottom: calc(var(--ac-mobile-bottom-nav-h) + 62px) !important;
    z-index: 1090 !important;
}

/* Floating chat widgets only — do NOT target in-page Order via WhatsApp CTAs */
body.arbuda-product-mobile-actions-active #gb-widget,
body.arbuda-product-mobile-actions-active .whatsapp:not(.order-via-whatsapp):not(.arbuda-whatsapp-order-wrap):not(.arbuda-whatsapp-order-btn),
body.arbuda-product-mobile-actions-active [id*="getbutton"],
body.arbuda-product-mobile-actions-active iframe[src*="whatsapp"],
body.arbuda-product-mobile-actions-active .floating-wpp,
body.arbuda-product-mobile-actions-active .wa-chat-box,
body.arbuda-product-mobile-actions-active .wa-widget-send-button {
    bottom: calc(var(--ac-mobile-bottom-nav-h) + 62px) !important;
    z-index: 1070 !important;
}

/* Add to Cart success modal must sit above sticky CTAs + WhatsApp widget */
#addToCart.modal {
    z-index: 12000 !important;
}
body.modal-open .modal-backdrop.show,
body.modal-open .modal-backdrop {
    z-index: 11990 !important;
}

/* Hide floating WhatsApp + sticky CTAs while Add to Cart (or any) modal is open */
body.modal-open.arbuda-product-mobile-actions-active .arbuda-product-mobile-actions,
body.modal-open #gb-widget,
body.modal-open .whatsapp:not(.order-via-whatsapp):not(.arbuda-whatsapp-order-wrap):not(.arbuda-whatsapp-order-btn),
body.modal-open [id*="getbutton"],
body.modal-open iframe[src*="whatsapp"],
body.modal-open .floating-wpp,
body.modal-open .wa-chat-box,
body.modal-open .wa-widget-send-button,
body.modal-open .arbuda-whatsapp-order-wrap,
body.modal-open .order-via-whatsapp,
body.arbuda-addtocart-modal-open .arbuda-product-mobile-actions,
body.arbuda-addtocart-modal-open #gb-widget,
body.arbuda-addtocart-modal-open .floating-wpp,
body.arbuda-addtocart-modal-open .wa-chat-box,
body.arbuda-addtocart-modal-open .wa-widget-send-button,
body.arbuda-addtocart-modal-open .arbuda-whatsapp-order-wrap,
body.arbuda-addtocart-modal-open .order-via-whatsapp {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.arbuda-product-mobile-actions-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    justify-content: center;
    column-gap: 0;
    row-gap: 0;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    overflow: hidden;
}

.arbuda-product-mobile-actions .buy-now,
.arbuda-product-mobile-actions .add-to-cart {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    min-height: 46px;
    border-radius: 0 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.01em;
    padding: 0.65rem 0.3rem !important;
    margin: 0 !important;
    border: none !important;
    touch-action: manipulation;
    white-space: nowrap;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

.arbuda-product-mobile-actions .add-to-cart {
    grid-column: 1;
    background: var(--ac-soft-blue) !important;
    color: var(--ac-blue) !important;
    border-right: 1px dotted #b8c7d9 !important;
}

.arbuda-product-mobile-actions .buy-now {
    grid-column: 2;
    background: #1b1c1c !important;
    color: #fff !important;
}

.arbuda-product-mobile-actions .buy-now:active {
    opacity: 0.85;
}

.arbuda-product-mobile-actions .add-to-cart.adding,
.arbuda-product-mobile-actions .add-to-cart.added-success {
    background: var(--ac-blue) !important;
    color: #fff !important;
}

.arbuda-product-mobile-actions .out-of-stock {
    grid-column: 1 / -1;
    width: 100% !important;
    min-height: 46px;
    border-radius: 0;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-align: center !important;
    display: none;
    align-items: center;
    justify-content: center;
    border: none;
    background: #efeded;
    color: #9d9da6;
}

.arbuda-product-mobile-actions .out-of-stock:not(.d-none) {
    display: inline-flex !important;
}

.arbuda-product-mobile-actions .out-of-stock:not(.d-none) ~ .add-to-cart,
.arbuda-product-mobile-actions .out-of-stock:not(.d-none) ~ .buy-now,
.arbuda-product-mobile-actions-inner:has(.out-of-stock:not(.d-none)) .add-to-cart,
.arbuda-product-mobile-actions-inner:has(.out-of-stock:not(.d-none)) .buy-now {
    display: none !important;
}

body.arbuda-product-mobile-actions-active {
    padding-bottom: calc(var(--ac-mobile-bottom-nav-h) + 56px);
}

@media (max-width: 1199.98px) {
    .arbuda-product-mobile-actions {
        display: flex !important;
    }

    /* Hide Free Shipping on mobile */
    .arbuda-free-shipping-item,
    .warranty-section li:has(.warranty-text:only-child) {
        /* handled via d-none d-xl-flex on Free Shipping li */
    }
    .warranty-section .arbuda-free-shipping-item {
        display: none !important;
    }

    /* Sold by + Brand: compact boxed dotted layout */
    .arbuda-pdp-seller-brand-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px !important;
        padding: 8px 0 12px !important;
        align-items: stretch !important;
        flex-wrap: nowrap !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .arbuda-pdp-seller-brand-row > .arbuda-pdp-meta-box {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 8px !important;
        min-width: 0;
        border: 1.5px dotted #94a3b8 !important;
        border-radius: 10px !important;
        background: #fff !important;
        box-shadow: none !important;
        align-items: center !important;
        gap: 0;
    }

    .arbuda-pdp-seller-brand-row .store-logo-container {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        margin-right: 6px !important;
        border-radius: 6px !important;
        border: 1px dotted #cbd5e1 !important;
    }

    .arbuda-pdp-seller-brand-row .store-logo-container img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .arbuda-pdp-seller-brand-row .arbuda-pdp-meta-links {
        display: none !important;
    }

    .arbuda-pdp-seller-brand-row > .arbuda-pdp-meta-box > div:last-child {
        min-width: 0;
        flex: 1 1 auto;
    }

    .arbuda-pdp-seller-brand-row p {
        font-size: 11px !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .arbuda-pdp-seller-brand-row .fw-400.text-gray {
        display: block;
        font-size: 9px !important;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        margin-bottom: 1px;
        color: #64748b !important;
    }

    .arbuda-pdp-seller-brand-row .fw-bold,
    .arbuda-pdp-seller-brand-row a.fw-bold {
        font-size: 11px !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
    }

    /* Estimated delivery — always visible on mobile */
    .arbuda-est-delivery {
        display: flex !important;
        align-items: center;
        gap: 10px;
        margin: 10px 0 4px;
        padding: 12px 12px;
        border-radius: 12px;
        background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 55%, #fed7aa 100%);
        border: 1.5px dotted #ea580c;
        box-shadow: 0 6px 18px rgba(234, 88, 12, 0.12);
        animation: arbudaEstPulse 2.4s ease-in-out infinite;
        position: relative;
        overflow: hidden;
        width: 100%;
        box-sizing: border-box;
    }

    .arbuda-est-delivery::after {
        content: "";
        position: absolute;
        top: 0;
        left: -40%;
        width: 40%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
        animation: arbudaEstShine 3s linear infinite;
    }

    .arbuda-est-delivery-icon {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: #ea580c;
        color: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        flex-shrink: 0;
        animation: arbudaEstBounce 1.6s ease-in-out infinite;
        z-index: 1;
    }

    .arbuda-est-delivery-body {
        min-width: 0;
        position: relative;
        z-index: 1;
        flex: 1;
    }

    .arbuda-est-delivery-title {
        display: block;
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #9a3412;
        margin-bottom: 2px;
    }

    .arbuda-est-delivery-days {
        display: block;
        font-size: 14px;
        font-weight: 800;
        color: #7c2d12;
        line-height: 1.25;
    }

    .arbuda-est-delivery-urgency {
        display: block;
        font-size: 10px;
        font-weight: 600;
        color: #c2410c;
        margin-top: 2px;
    }

    /* Order Via WhatsApp — centered below Buy Now on mobile */
    .arbuda-whatsapp-order-wrap,
    .order-via-whatsapp {
        display: flex !important;
        width: 100%;
        margin-top: 12px !important;
        margin-bottom: 0 !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
    }

    .arbuda-whatsapp-order-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: auto;
        max-width: 100%;
        min-width: min(100%, 280px);
        min-height: 46px;
        padding: 0.7rem 1.25rem;
        border-radius: 10px;
        background: #25d366 !important;
        color: #fff !important;
        font-size: 14px;
        font-weight: 700;
        text-decoration: none !important;
        border: 1.5px dotted #16a34a;
        box-shadow: 0 6px 16px rgba(37, 211, 102, 0.28);
        touch-action: manipulation;
    }

    .arbuda-whatsapp-order-btn i {
        font-size: 22px;
        line-height: 1;
    }

    .arbuda-whatsapp-order-btn:active {
        opacity: 0.9;
        transform: scale(0.99);
    }
}

@keyframes arbudaEstPulse {
    0%, 100% { transform: translateY(0); box-shadow: 0 6px 18px rgba(234, 88, 12, 0.12); }
    50% { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(234, 88, 12, 0.18); }
}

@keyframes arbudaEstShine {
    0% { left: -40%; }
    100% { left: 120%; }
}

@keyframes arbudaEstBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* WhatsApp CTA — centered below Buy Now (desktop + mobile) */
.arbuda-whatsapp-order-wrap,
.order-via-whatsapp {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.arbuda-whatsapp-order-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0.55rem 1.35rem;
    border-radius: 10px;
    background: #25d366;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    border: 1.5px dotted #16a34a;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.22);
}
.arbuda-whatsapp-order-btn i {
    font-size: 20px;
    line-height: 1;
}
.arbuda-whatsapp-order-btn:hover {
    color: #fff !important;
    background: #1ebe57;
    text-decoration: none !important;
}

@media (min-width: 1200px) {
    .arbuda-product-mobile-actions {
        display: none !important;
    }

    body.arbuda-product-mobile-actions-active {
        padding-bottom: 0;
    }

    .arbuda-est-delivery {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-top: 14px;
        padding: 14px 16px;
        border-radius: 12px;
        background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 55%, #fed7aa 100%);
        border: 1px solid #fdba74;
    }

    /* Sold by + Brand — same boxed dotted layout as mobile, slightly roomier */
    .arbuda-pdp-seller-brand-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 12px !important;
        padding: 12px 0 16px !important;
        align-items: stretch !important;
        flex-wrap: nowrap !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .arbuda-pdp-seller-brand-row > .arbuda-pdp-meta-box {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 12px 14px !important;
        min-width: 0;
        border: 1.5px dotted #94a3b8 !important;
        border-radius: 12px !important;
        background: #fff !important;
        box-shadow: none !important;
        align-items: center !important;
        gap: 0;
    }

    .arbuda-pdp-seller-brand-row .store-logo-container {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        margin-right: 10px !important;
        border-radius: 8px !important;
        border: 1px dotted #cbd5e1 !important;
        background: #f8fafc !important;
    }

    .arbuda-pdp-seller-brand-row .store-logo-container img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .arbuda-pdp-seller-brand-row > .arbuda-pdp-meta-box > div:last-child {
        min-width: 0;
        flex: 1 1 auto;
        overflow: hidden;
    }

    .arbuda-pdp-seller-brand-row p {
        font-size: 13px !important;
        line-height: 1.3 !important;
        margin: 0 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .arbuda-pdp-seller-brand-row .fw-400.text-gray {
        display: block;
        font-size: 11px !important;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-bottom: 2px;
        color: #64748b !important;
    }

    .arbuda-pdp-seller-brand-row .fw-bold,
    .arbuda-pdp-seller-brand-row a.fw-bold {
        font-size: 13px !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: bottom;
    }

    .arbuda-pdp-seller-brand-row .arbuda-pdp-meta-links {
        display: inline-block !important;
        margin-top: 2px;
        font-size: 12px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .arbuda-est-delivery-icon {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: #ea580c;
        color: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        flex-shrink: 0;
    }

    .arbuda-est-delivery-title {
        display: block;
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #9a3412;
    }

    .arbuda-est-delivery-days {
        display: block;
        font-size: 16px;
        font-weight: 800;
        color: #7c2d12;
    }

    .arbuda-est-delivery-urgency {
        display: block;
        font-size: 12px;
        font-weight: 600;
        color: #c2410c;
        margin-top: 2px;
    }
}

@media (max-width: 360px) {
    .arbuda-product-mobile-actions .buy-now,
    .arbuda-product-mobile-actions .add-to-cart {
        font-size: 12px !important;
        padding: 0.55rem 0.2rem !important;
    }
}
