/* ================= Sticky Bar Container ================= */
#sb-sticky-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--sb-sticky-bg, #ffffff);
    box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
    z-index: 9999;
    padding: 10px 20px;
    transform: translateY(110%); /* Hidden by default (below screen) */
    transition: transform 0.3s ease-in-out;
    border-top: 1px solid #f0f0f0;
    font-family: inherit;
    box-sizing: border-box;
}

#sb-sticky-cart-bar.active {
    transform: translateY(0); /* Slide Up */
}

.sb-sticky-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    gap: 15px;
}

/* ================= Product Info (Left) ================= */
.sb-sticky-product-info {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.sb-sticky-thumb img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    display: block;
}

.sb-sticky-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.3;
}

.sb-sticky-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--sb-sticky-title, #333);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* Price Styling */
.sb-sticky-price {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sb-sticky-price del {
    color: #999;
    font-size: 12px;
    font-weight: 400;
}

.sb-sticky-price ins {
    color: var(--sb-sticky-sale-price, #E5AE41); /* Sale Price Color */
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
}
.sb-sticky-price .sb-price-normal {
    font-weight: 700;
    color: var(--sb-sticky-price, #333);
}

/* ================= Buttons (Right) ================= */
.sb-sticky-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sb-sticky-actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.2;
    transition: opacity 0.2s;
    border: none;
    white-space: nowrap;
    height: 40px; /* Uniform height */
}

.sb-sticky-actions .button:hover {
    opacity: 0.9;
}

/* Specific Button Colors (Fallbacks if variables miss) */
.sb-sticky-add-to-cart {
    background-color: var(--sb-sticky-atc-bg, #333);
    color: var(--sb-sticky-atc-text, #fff);
}
.buy_now_button {
    background-color: var(--sb-buy-now-bg, #8C8CEA);
    color: #fff;
}
.whatsapp_button {
    background-color: var(--sb-whatsapp-bg, #25D366);
    color: #fff;
}
.call-now-button {
    background-color: var(--sb-call-now-bg, #5A7AED);
    color: #fff;
}

/* ================= Visibility & Responsive Logic ================= */

/* Desktop Only Class */
.sb-desktop-only { display: inline-flex !important; }
/* Mobile Only Class */
.sb-mobile-only { display: none !important; }

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    #sb-sticky-cart-bar {
        padding: 8px 10px; 
        bottom: 0;
    }
    
    /* Hide Image and Title on Mobile to save space */
    .sb-sticky-product-info {
        display: none !important;
    }

    .sb-sticky-inner {
        justify-content: center;
        width: 100%;
    }

    .sb-sticky-actions {
        width: 100%;
        gap: 6px; 
        justify-content: space-between;
        margin: 0;
    }

    .sb-sticky-actions .button {
        flex: 1;
        font-size: 12px !important;
        padding: 0 5px !important; 
        height: 34px !important; 
        line-height: 34px !important; 
        min-height: 0 !important; 
        text-align: center;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }
}