<style>
    /* Premium, Modern, and Compact Layout */
    .product-container {
        width: 100%;
        margin: 5px 0;
        background-color: #ffff
        border-radius: 10px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        overflow: hidden;
        transition: all 0.3s ease;
        display: flex;
        flex-wrap: wrap;
        border: 0.5px solid rgba(105, 0, 158, 0.1);
        padding-top: 8px;
        padding-bottom: 8px;
    }
    
    .live_data, body {
        background-color: #fff !important;
    }
    
    .product-image-wrapper {
        width: 100%;
        float: right;
        padding: 0px;
        position: relative;
        z-index: 1; /* Ensure wrapper has a defined z-index */
    }
    
    .product-content-wrapper {
        width: 100%;
        padding: 0px;
    }
    
    .product-image-container {
        width: 100%;
        height: 0;
        padding-bottom: 85%;
        position: relative;
        overflow: hidden;
        border-radius: 6px;
        background: #fff;
        z-index: 1; /* Lower z-index to keep image behind buttons */
    }
    
    .product-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        transition: transform 0.4s ease;
        z-index: 1; /* Ensure image stays behind buttons */
    }
    
    .product-image:hover {
        transform: scale(1.05);
    }
    
    .product-badge {
        position: absolute;
        top: 1px;
        /*right: 60px;*/
        float: left;
        width: auto;
        background: linear-gradient(135deg, #ffd700, #ffca28);
        color: black;
        padding: 2px 6px;
        border-radius: 4px;
        font-size: 9px;
        font-weight: 900;
        z-index: 2;
        text-transform: uppercase;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
        border: 1px solid #fff;

    }
    
   .product-title {
    font-size: clamp(14px, 3.6vw, 15px); /* Responsive scaling */
    font-weight: 500;
    color: #111827; /* Rich dark gray for better contrast */
    margin: 0 0 8px 0;
    padding: 0 10px;
    line-height: 1.4;
    text-align: left;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;

    transition: color 0.3s ease;
    letter-spacing: 0.25px;
}



 
    .product-price {
        display: flex;
        align-items: center;
        margin-bottom: 5px;
        flex-wrap: wrap;
    }
    
    .current-price {
        font-size: 13px;
        font-weight: 700;
        color: #5a008a;
    }
    
    .original-price {
        font-size: 10px;
        color: #777;
        text-decoration: line-through;
        margin-left: 4px;
    }
    
    .discount-badge {
        background: linear-gradient(135deg, #ffd700, #ffca28);
        color: #1a1a1a;
        padding: 1px 4px;
        border-radius: 3px;
        font-size: 9px;
        font-weight: 700;
        margin-left: 4px;
    }

    .Lowest-Price {
        background: linear-gradient(135deg, #a8e063, #f9f3ec);
        color: #1a1a1a;
        padding: 1px 4px;
        border-radius: 3px;
        font-size: 9px;
        font-weight: 700;
        margin-left: 4px;
    }

    .Start-From {
        /*background: linear-gradient(135deg, #d4fc79, #96e6a1);*/

        color: #1a1a1a;
        padding: 1px 4px;
        border-radius: 3px;
        font-size: 9px;
        font-weight: 700;
        margin-left: 4px;
    }

    .QTY-CountDiv {
        background: linear-gradient(135deg, #5a008a, #8a00d4);
        color: #1a1a1a;
        padding: 0px 0px;
        border-radius: 3px;
        font-size: 9px;
        font-weight: 700;
        margin-left: 4px;
    }
    
    .out-of-stock {
        color: #d81b60;
        font-size: 10px;
        font-weight: 500;
        margin-bottom: 5px;
    }
    
    .product-action-row {
        
        
        width: 100%;
    }
    
    .size-selector {
        flex: 1;
        max-width: 57%;
        min-width: 100px;
        padding: 5px 28px 5px 2px;
        border: 2px solid #bdbdbd;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 900;
        background-color: white;
        appearance: none;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235a008a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 12px;
        transition: border-color 0.3s ease;
        cursor: pointer;
    }
    
    .size-selector:hover {
        border-color: #8a00d4;
        box-shadow: 0 0 5px rgba(90, 0, 138, 0.2);
    }
    
    .add-to-cart-btn {
        background: linear-gradient(135deg, #6b21a8, #9333ea);
        color: #fff;
        border: none;
        padding: 8px 16px;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        width: 110px;
        text-align: center;
        transition: all 0.3s ease;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        position: relative;
        overflow: hidden;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .add-to-cart-btn:hover {
        background: linear-gradient(135deg, #7c3aed, #c084fc);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
    
    .add-to-cart-btn i {
        margin-right: 6px;
        font-size: 12px;
    }
    
    .add-to-cart-btn.loading::after {
        content: '';
        position: absolute;
        right: 12px;
        top: 50%;
        width: 16px;
        height: 16px;
        margin-top: -8px;
        border: 2px solid #fff;
        border-top: 2px solid transparent;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }
    
    .add-to-cart-btn.loading {
        pointer-events: none;
        opacity: 0.85;
    }


        .customize-btn.loading::after {
        content: '';
        position: absolute;
        right: 12px;
        top: 50%;
        width: 16px;
        height: 16px;
        margin-top: -8px;
        border: 2px solid #fff;
        border-top: 2px solid transparent;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }
    
    .customize-btn.loading {
        pointer-events: none;
        opacity: 0.85;
    }
    
    .customize-btn {
        background: linear-gradient(135deg, #6b21a8, #9333ea);

        color: #fff;
        border: none;
        padding: 8px 16px;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 900;
        cursor: pointer;
        width: 110px;
        text-align: center;
        transition: all 0.3s ease;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        position: relative;
        overflow: hidden;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .customize-btn:hover {
        background: linear-gradient(135deg, #7c3aed, #c084fc);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
    
    .quantity-control {
        display: flex;
        align-items: center;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        overflow: hidden;
        width: 110px;
        /*height: 40px;*/
        justify-content: space-between;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }
    
    .qty-btn {
        width: 35px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #6b21a8, #9333ea);
        border: none;
        color: #fff;
        font-size: 16px;
        font-weight: 900;
        transition: all 0.3s ease;
    }
    
    .qty-btn:hover {
        background: linear-gradient(135deg, #7c3aed, #c084fc);
        transform: scale(1.05);
    }
    
    .qty-btn.loading::after {
        content: '';
        position: absolute;
        width: 12px;
        height: 12px;
        border: 2px solid rgba(255, 255, 255, 0.4);
        border-top: 2px solid #fff;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    
    .qty-btn.loading {
        pointer-events: none;
        opacity: 0.85;
    }
    
    .qty-display {
    width: 40px;
    text-align: center;
    font-weight: 900;
    font-size: 17px;
    color: #6b21a8;
    line-height: 40px;
    background: #f3f4f6;
    text-shadow: 0.8px 0.8px 0 #6b21a8;
}

    
    .deal-badge {
        background: linear-gradient(135deg, #ff4081, #ff6f61);
        color: #fff;
        padding: 1px 4px;
        border-radius: 3px;
        font-size: 9px;
        font-weight: 700;
        display: inline-block;
        margin-bottom: 4px;
        animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.05); }
        100% { transform: scale(1); }
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    .loading-animation {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px;
        clear: both;
    }
    
    .spinner {
        width: 28px;
        height: 28px;
        border: 3px solid rgba(90, 0, 138, 0.2);
        border-radius: 50%;
        border-top-color: #5a008a;
        animation: spin 1s ease-in-out infinite;
        margin-bottom: 5px;
    }
    
    .end-of-results {
        text-align: center;
        padding: 10px;
        color: #555;
        font-size: 11px;
        clear: both;
    }
    
    .search-header {
        background: linear-gradient(135deg, #5a008a, #8a00d4);
        color: #fff;
        padding: 7px 9px;
        border-radius: 6px;
        margin-bottom: 10px;
        font-size: 13px;
        font-weight: 600;
        clear: both;
        display: flex;
        align-items: center;
        box-shadow: 0 2px 6px rgba(90, 0, 138, 0.2);
    }
    
    .package-details {
        width: 100%;
        clear: both;
        padding: 5px;
        border-top: 1px dashed rgba(90, 0, 138, 0.2);
        font-size: 10px;
        color: #333;
    }
    
   .toast {
        position: fixed;
        top: 20px;
        right: 20px;
        background: linear-gradient(135deg, #6b21a8, #a855f7);
        color: #fff;
        padding: 12px 20px;
        border-radius: 10px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        z-index: 10001;
        font-size: 14px;
        font-weight: 700;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        display: flex;
        align-items: center;
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
        transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
        max-width: 300px;
        will-change: opacity, transform;
    }
    
    .toast.show {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    
    .toast-error {
        background: linear-gradient(135deg, #e3342f, #f56565);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    
    @media (max-width: 768px) {
        .product-image-wrapper {
            width: 100%;
            padding: 0px;
            z-index: 1;
        }
        .buttons_content {
            margin-top: -5px;
            z-index: 10;
        }
        .product-content-wrapper {
            width: 100%;
            padding: 0px;
        }
        .product-title {
            font-size: 13px;
        }
        .current-price {
            font-size: 12px;
        }
        
        .cart-actions {
            flex-direction: row;
            align-items: center;
        }
        .quantity-control {
            margin-bottom: 0;
            margin-right: 5px;
            width: 100%;
            height: 39px;
            border: 1px solid #6b21a8;
        }
        .qty-btn {
            width: 35px;
            /*height: 40px;*/
            font-size: 16px;
        }
        .qty-display {
            font-size: 17px;
            line-height: 36px;
        }
        .toast {
            right: 10px;
            left: 10px;
            top: 10px;
        }
    }
    
    @media (max-width: 280px) {
        .product-image-wrapper {
            width: 100%;
            float: none;
            padding: 6px 6px 0;
            z-index: 0px;
        }
        .product-content-wrapper {
            width: 100%;
            float: none;
            padding: 0 6px 6px;
        }
        .product-image-container {
            padding-bottom: 70%;
        }
        .add-to-cart-btn, .customize-btn {
            width: 100%;
            padding: 8px;
        }
        .quantity-control {
            height: 34px;
        }
        .qty-btn {
            width: 34px;
            height: 34px;
        }
        .qty-display {
            line-height: 34px;
        }
    }
    
    .clearfix::after {
        content: "";
        clear: both;
        display: table;
    }
    
    .cart-item {
        width: 100%;
        height: 40px;
        z-index: 10;
    }

    .buttons_content {
        margin-top: 0px;
        z-index: 10;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
        float: right;
    }
</style>