:root {
    --xb-primary: #007bff;
    --xb-primary-dark: #0056b3;
    --xb-success: #25d366;
    --xb-surface: #ffffff;
    --xb-surface-blur: rgba(255, 255, 255, 0.95);
    --xb-text: #1d1d1f;
    --xb-text-light: #86868b;
    --xb-border: rgba(0, 0, 0, 0.08);
    --xb-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    --xb-radius: 12px;
}

/* =========================================
   1. SMART PRODUCT BUTTON LAYOUT (GRID)
   ========================================= */

/* Target both simple form and variable wrapper for perfect alignment */
.woocommerce div.product form.cart,
.woocommerce div.product form.cart .single_variation_wrap {
    display: grid !important;
    grid-template-columns: 80px 1fr 1fr; /* Qty | Add | Buy */
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

/* Handle Variable Product Variations Table above buttons */
.woocommerce div.product form.cart .variations {
    grid-column: 1 / -1; /* Span full width */
    margin-bottom: 15px;
    width: 100%;
}

.woocommerce div.product form.cart .woocommerce-variation-add-to-cart {
    display: contents; /* Let children (Qty, Btn) participate in grid */
}

/* Quantity Input */
.woocommerce div.product form.cart .quantity {
    width: 100%;
}

.woocommerce div.product form.cart .quantity .qty {
    width: 100%;
    height: 50px;
    border-radius: 12px;
    border: 1px solid var(--xb-border);
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    background: #f9f9f9;
}

/* Add to Cart Button */
.woocommerce div.product form.cart .button.single_add_to_cart_button {
    width: 100%;
    height: 50px;
    border-radius: 25px !important;
    background: var(--xb-primary);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.woocommerce div.product form.cart .button.single_add_to_cart_button:active {
    transform: scale(0.98);
}

/* Custom Buy Now Button */
.xb247-buy-now-btn {
    width: 100%;
    height: 50px;
    border-radius: 25px !important;
    background: #000;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
    margin: 0 !important;
}

.xb247-buy-now-btn:hover {
    background: #333;
}

.xb247-buy-now-btn:active {
    transform: scale(0.98);
}

/* MOBILE GRID ADJUSTMENTS */
@media (max-width: 500px) {
    .woocommerce div.product form.cart,
    .woocommerce div.product form.cart .single_variation_wrap {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 
            "qty qty"
            "add buy";
        gap: 10px;
    }

    .woocommerce div.product form.cart .quantity {
        grid-area: qty;
    }

    .woocommerce div.product form.cart .button.single_add_to_cart_button {
        grid-area: add;
    }

    .xb247-buy-now-btn {
        grid-area: buy;
    }
}


/* =========================================
   2. APP-LIKE CART PAGE REDESIGN
   ========================================= */

.woocommerce-cart .woocommerce {
    padding: 10px;
    max-width: 800px;
    margin: 0 auto;
}

/* Mobile Cart: Card Layout Transformation */
@media (max-width: 768px) {
    /* Hide Table Headers */
    .woocommerce-cart table.cart thead {
        display: none;
    }

    /* Make table elements block-level */
    .woocommerce-cart table.cart,
    .woocommerce-cart table.cart tbody,
    .woocommerce-cart table.cart tr,
    .woocommerce-cart table.cart td {
        display: block;
        width: 100%;
    }

    /* CARD STYLE FOR CART ITEMS */
    .woocommerce-cart table.cart tr.cart_item {
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.04);
        margin-bottom: 16px;
        padding: 16px;
        border: 1px solid rgba(0,0,0,0.04);
        position: relative;
        display: grid;
        grid-template-columns: 70px 1fr; /* Image | Info */
        grid-template-rows: auto auto;
        gap: 12px;
    }

    /* 1. Thumbnail */
    .woocommerce-cart table.cart td.product-thumbnail {
        grid-row: 1 / 3;
        padding: 0 !important;
        border: none !important;
    }

    .woocommerce-cart table.cart td.product-thumbnail img {
        width: 70px;
        height: 70px;
        border-radius: 12px;
        object-fit: cover;
    }

    /* 2. Product Name */
    .woocommerce-cart table.cart td.product-name {
        padding: 0 !important;
        border: none !important;
    }

    .woocommerce-cart table.cart td.product-name a {
        font-weight: 700;
        color: var(--xb-text);
        text-decoration: none;
        font-size: 15px;
        line-height: 1.3;
    }

    /* 3. Price & Quantity wrapper */
    .woocommerce-cart table.cart td.product-price,
    .woocommerce-cart table.cart td.product-quantity {
        padding: 0 !important;
        border: none !important;
        display: inline-block !important;
        width: auto !important;
    }

    .woocommerce-cart table.cart td.product-price {
        color: var(--xb-text-light);
        font-size: 13px;
    }

    .woocommerce-cart table.cart td.product-quantity {
        margin-top: 4px;
    }

    .woocommerce-cart .quantity .qty {
        height: 32px;
        width: 60px;
        padding: 0 8px;
        font-size: 14px;
        border-radius: 8px;
    }

    /* 4. Remove Button (Top Right Absolute) */
    .woocommerce-cart table.cart td.product-remove {
        position: absolute;
        top: 12px;
        right: 12px;
        padding: 0 !important;
        border: none !important;
        width: auto !important;
    }

    .product-remove a.remove {
        color: #ff4d4f !important;
        font-size: 18px;
        font-weight: bold;
        background: rgba(255, 77, 79, 0.1) !important;
        border-radius: 50%;
        width: 24px !important;
        height: 24px !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Cleanup */
    .woocommerce-cart table.cart td.product-subtotal {
        display: none !important;
    }

    .woocommerce-cart table.cart td.actions {
        padding: 0 !important;
        border: none !important;
        margin-top: 10px;
    }

    .coupon {
        display: flex;
        gap: 8px;
    }

    .coupon input.input-text {
        flex: 1;
        border-radius: 8px;
        border: 1px solid var(--xb-border);
        padding: 8px;
    }

    .coupon button.button {
        border-radius: 8px;
        background: #333;
        color: #fff;
    }
}

/* STICKY CHECKOUT BAR (Mobile) */
@media (max-width: 768px) {
    .cart-collaterals {
        margin-top: 20px;
    }

    .cart_totals h2 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    /* Sticky Footer Logic */
    .wc-proceed-to-checkout {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 16px;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
        z-index: 99999;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    /* Add padding to body so sticky bar doesn't cover content */
    body.woocommerce-cart {
        padding-bottom: 140px !important;
    }

    .wc-proceed-to-checkout a.checkout-button {
        display: block;
        width: 100%;
        background: #000;
        color: #fff;
        height: 50px;
        line-height: 50px;
        border-radius: 25px;
        text-align: center;
        font-weight: 700;
        font-size: 16px;
        text-transform: uppercase;
        margin: 0;
    }

    /* Hide standard Bottom Nav on Cart page so Checkout button is priority */
    body.woocommerce-cart .xb247-bottom-nav {
        display: none;
    }
}


/* =========================================
   3. GLOBAL & DESKTOP STYLES
   ========================================= */

/* --- Rich Desktop Header --- */
.xb247-desktop-header {
    display: none; /* Hidden on mobile */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: #fff;
    border-bottom: 1px solid var(--xb-border);
    z-index: 10000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.xb247-desktop-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.xb247-desktop-logo a {
    text-decoration: none;
    font-size: 24px;
    font-weight: 800;
    color: var(--xb-text);
    display: flex;
    align-items: center;
}

.xb247-desktop-logo img {
    height: 40px;
    width: auto;
}

.xb247-desktop-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 24px;
}

.xb247-desktop-nav ul li a {
    text-decoration: none;
    color: var(--xb-text);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.xb247-desktop-nav ul li a:hover {
    color: var(--xb-primary);
}

.xb247-desktop-search {
    flex: 1;
    max-width: 400px;
    margin: 0 40px;
    position: relative;
}

.xb247-desktop-search form {
    display: flex;
}

.xb247-search-input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--xb-border);
    border-radius: 24px;
    background: #f5f7fa;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.xb247-search-input:focus {
    background: #fff;
    border-color: var(--xb-primary);
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.xb247-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--xb-text-light);
    cursor: pointer;
}

.xb247-desktop-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.xb247-desktop-actions a {
    color: var(--xb-text);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.2s;
}

.xb247-desktop-actions a:hover {
    background: #f5f7fa;
    color: var(--xb-primary);
}

/* Visibility Trigger */
@media (min-width: 992px) {
    .xb247-desktop-header { display: block; }
    .xb247-mobile-only { display: none !important; }
}


/* --- Mobile App Top Navigation --- */
.xb247-app-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background: var(--xb-surface-blur);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

@media (min-width: 992px) {
    .xb247-app-nav { display: none; }
}

.xb247-nav-left {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 80px;
    z-index: 2;
}

.xb247-nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    text-align: center;
    z-index: 1;
}

.xb247-nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 80px;
    z-index: 2;
}

.xb247-nav-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--xb-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.xb247-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--xb-text);
    transition: background 0.2s;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
}

.xb247-nav-btn:hover {
    background: rgba(0,0,0,0.04);
}

.xb247-back-btn svg {
    margin-left: -2px;
}

.xb247-nav-cart {
    position: relative;
}

.xb247-nav-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--xb-primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    height: 16px;
    min-width: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
}


/* --- Mobile Bottom Navigation --- */
.xb247-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    border-top: 1px solid var(--xb-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 99998;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.03);
}

.xb247-bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--xb-text-light);
    font-size: 10px;
    gap: 4px;
    height: 100%;
    transition: color 0.2s;
}

.xb247-bnav-item svg {
    width: 22px;
    height: 22px;
}

.xb247-bnav-item.active {
    color: var(--xb-primary);
    font-weight: 600;
}

.xb247-bnav-icon-wrap {
    position: relative;
}

.xb247-bnav-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 1px solid #fff;
}

/* Center Circle Button */
.xb247-bnav-center-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-top: -30px;
}

.xb247-center-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--xb-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,123,255,0.4);
    border: 4px solid #fff;
    transition: transform 0.2s;
}

.xb247-center-label {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--xb-text);
}

.xb247-bnav-center-btn.is-digital .xb247-center-icon {
    background: #7c3aed;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.4);
}

.xb247-bnav-center-btn:active .xb247-center-icon {
    transform: scale(0.95);
}

/* Float Adjustments */
@media (max-width: 991px) {
    .xb247-sticky-bar.is-visible {
        bottom: 60px;
    }
    .xb247-fab-whatsapp {
        bottom: 80px;
    }
}


/* --- Burger Menu Drawer --- */
.xb247-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    pointer-events: none;
}

.xb247-drawer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.xb247-drawer.is-open {
    pointer-events: auto;
}

.xb247-drawer.is-open .xb247-drawer-backdrop {
    opacity: 1;
}

.xb247-drawer-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: #fff;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.xb247-drawer.is-open .xb247-drawer-content {
    transform: translateX(0);
}

.xb247-drawer-header {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--xb-border);
}

.xb247-drawer-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--xb-text);
}

.xb247-drawer-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--xb-text-light);
    cursor: pointer;
    line-height: 1;
}

.xb247-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

/* Menu List */
.xb247-mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.xb247-mobile-nav ul li a {
    display: block;
    padding: 12px 24px;
    color: var(--xb-text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.xb247-mobile-nav ul li a:hover {
    background: #f8f9fa;
    color: var(--xb-primary);
    border-left-color: var(--xb-primary);
}

.xb247-mobile-nav ul li.current-menu-item a,
.xb247-mobile-nav ul li.current_page_item a {
    background: #f0f7ff;
    color: var(--xb-primary);
    border-left-color: var(--xb-primary);
    font-weight: 600;
}

.xb247-mobile-nav ul ul {
    background: #fafafa;
    display: none;
}

.xb247-mobile-nav ul li.menu-item-has-children > a:after {
    content: '›';
    float: right;
    transform: rotate(90deg);
}


/* --- Related Products --- */
.related.products {
    margin-top: 40px;
    padding-bottom: 40px;
    clear: both;
}

.related.products h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-left: 4px;
    color: var(--xb-text);
}

.related.products ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.related.products ul.products li.product {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 0 !important;
    width: 100%;
}

.related.products ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.related.products ul.products li.product a img {
    border-radius: 0;
    margin: 0 auto;
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
}

.related.products ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px;
    padding: 12px 12px 4px 12px;
    margin: 0;
    line-height: 1.4;
    color: var(--xb-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related.products ul.products li.product .price {
    display: block;
    padding: 0 12px 12px 12px;
    font-weight: 700;
    color: var(--xb-primary);
    font-size: 15px;
    margin: 0;
}

.related.products ul.products li.product .button {
    width: 100%;
    border-radius: 0;
    margin: 0;
    text-align: center;
    background: #f8f9fa;
    color: var(--xb-text);
    font-weight: 600;
    font-size: 13px;
    padding: 10px;
    display: block;
}

.related.products ul.products li.product .button:hover {
    background: var(--xb-primary);
    color: #fff;
}

@media (max-width: 768px) {
    .related.products ul.products {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 12px;
        padding-bottom: 20px;
        margin-right: -20px;
        padding-right: 20px;
    }

    .related.products ul.products li.product {
        flex: 0 0 150px;
        scroll-snap-align: start;
        width: 150px;
    }

    .related.products ul.products::-webkit-scrollbar {
        display: none;
    }
}


/* --- Detail Modal & Trigger --- */
.xb247-btn-details {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--xb-text);
    border: 1px solid var(--xb-border);
    padding: 14px;
    border-radius: var(--xb-radius);
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    margin-bottom: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}

.xb247-btn-details:hover {
    background: #f8f9fa;
    border-color: #cbd5e1;
}

.xb247-icon-btn {
    margin-right: 8px;
    font-size: 16px;
    display: flex;
}

.xb247-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.xb247-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.xb247-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
}

.xb247-modal-content {
    position: relative;
    background: white;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    text-align: left;
}

.xb247-modal.is-open .xb247-modal-content {
    transform: translateY(0);
}

.xb247-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--xb-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.xb247-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.xb247-modal-body {
    padding: 24px;
    overflow-y: auto;
    line-height: 1.6;
    font-size: 15px;
    color: #444;
}

.xb247-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    z-index: 2;
}

.xb247-divider {
    border: 0;
    height: 1px;
    background: var(--xb-border);
    margin: 20px 0;
}

.xb247-modal-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--xb-primary);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* --- Trust Badges --- */
.xb247-trust-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.xb247-trust-item {
    display: flex;
    align-items: center;
    background: #f5f7fa;
    padding: 12px;
    border-radius: var(--xb-radius);
    border: 1px solid var(--xb-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.xb247-trust-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    background: #fff;
}

.xb247-icon {
    font-size: 20px;
    margin-right: 12px;
    display: flex;
}

.xb247-trust-content {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.xb247-trust-content strong {
    font-size: 13px;
    color: var(--xb-text);
    font-weight: 600;
}

.xb247-trust-content span {
    font-size: 11px;
    color: var(--xb-text-light);
}


/* --- Sticky Elements (Product Bar & FAB) --- */
.xb247-fab-whatsapp {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: var(--xb-success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.xb247-fab-whatsapp:hover {
    transform: scale(1.1);
    background: #1ebc57;
}

@keyframes xb-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.xb247-fab-whatsapp {
    animation: xb-pulse 2s infinite;
}

.xb247-sticky-bar {
    position: fixed;
    bottom: -100px;
    left: 0;
    width: 100%;
    background: var(--xb-surface-blur);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--xb-border);
    padding: 12px 16px;
    z-index: 9990;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
    transition: bottom 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.xb247-sticky-bar.is-visible {
    bottom: 0;
}

.xb247-sticky-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.xb247-sticky-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 8px;
    border: 1px solid var(--xb-border);
}

.xb247-sticky-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-right: 8px;
}

.xb247-sticky-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--xb-text);
}

.xb247-sticky-price {
    font-size: 13px;
    color: var(--xb-primary);
    font-weight: 700;
}

.xb247-sticky-atc-btn {
    background: var(--xb-primary);
    color: white;
    border: none;
    padding: 0 16px;
    height: 40px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.xb247-sticky-atc-btn:hover {
    background: var(--xb-primary-dark);
}

.xb247-sticky-atc-btn svg {
    margin-left: 6px;
}

.xb247-sticky-buy-now {
    background: #222;
    color: white;
    border: none;
    padding: 0 16px;
    height: 40px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    margin-right: 4px;
}

.xb247-sticky-buy-now:hover {
    background: #000;
}


/* --- Search Overlay --- */
.xb247-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 100002;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.xb247-search-overlay.is-open {
    transform: translateY(0);
}

.xb247-search-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--xb-border);
    gap: 12px;
}

.xb247-search-box-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.xb247-search-icon {
    position: absolute;
    left: 12px;
    color: var(--xb-text-light);
    pointer-events: none;
}

#xb247-search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border-radius: 10px;
    background: #f5f7fa;
    border: none;
    font-size: 15px;
    outline: none;
    -webkit-appearance: none;
}

#xb247-search-input:focus {
    background: #fff;
    box-shadow: 0 0 0 2px var(--xb-primary);
}

#xb247-search-close {
    background: none;
    border: none;
    color: var(--xb-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.xb247-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

.xb247-search-results ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.xb247-search-results li {
    margin-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 12px;
}

.xb247-search-results li a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--xb-text);
}

.xb247-search-results img {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 12px;
    background: #f0f0f0;
}

.xb247-search-title {
    font-weight: 500;
    font-size: 14px;
    display: block;
    line-height: 1.3;
}

.xb247-search-price {
    font-size: 13px;
    color: var(--xb-primary);
    font-weight: 600;
    display: block;
    margin-top: 4px;
}

.xb247-spinner {
    display: none;
    position: absolute;
    right: 12px;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,0.1);
    border-top-color: var(--xb-primary);
    border-radius: 50%;
    animation: xb-spin 0.8s linear infinite;
}

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

.xb-no-results {
    text-align: center;
    color: var(--xb-text-light);
    margin-top: 40px;
}