/* BUSINESS PROFESSIONAL THEME */
.upseller-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #1e293b;
    box-sizing: border-box;
    min-height: 100vh;
}

.upseller-products {
    margin-bottom: 40px;
}

.upseller-product {
    background: #ffffff;
    border: 2px solid #3b83f664;
    border-left: 6px solid #3b83f663;
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.upseller-product:hover {
    border-color: #6489ee56;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.upseller-product.selected {
    border-color: #22c55e;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 12px 35px rgba(29, 78, 216, 0.2);
}

.upseller-product.expanded {
    border-color: #1d4ed8;
}

.upseller-product-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    cursor: pointer;
    position: relative;
    padding-right: 40px;
}

.upseller-product-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid #e2e8f0;
}

.upseller-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upseller-product-basic {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}

.upseller-product-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1e40af;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.upseller-product-short-desc {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
}

.bistarito_but_div_cancel .upseller-toggle-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

.bistarito_but_div_cancel .upseller-toggle-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.4);
}

.upseller-product-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
    display: none;
}

.upseller-product.expanded .upseller-product-details {
    display: block;
}

.upseller-video {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid #e2e8f0;
}

.upseller-video iframe {
    width: 100%;
    height: 250px;
    border: none;
}

.upseller-product-description {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 16px;
    font-weight: 500;
}

.upseller-product-price {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.upseller-product-checkbox-container {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    background: #3b83f64a;
    padding: 4px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.outside_checkbox {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.out_box_price {
    float: right;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Cart & Checkout */
.upseller-cart-checkout {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 24px;
    margin-top: 32px;
    border: 2px solid #cbd5e1;
}

.upseller-cart {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 3px solid #3b82f6;
}

.upseller-cart h3,
.upseller-checkout h3 {
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1e40af;
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 8px;
    border: 2px solid #3b82f6;
}

.clean-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: white;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cart-item-details {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.cart-item-details img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.cart-item-name {
    font-weight: 600;
    color: #1e293b;
    max-width: 250px;
}

.cart-item-price {
   
    color: #3b82f6;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 16px;
     
   
}

.upseller-cart-summary {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 12px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.cart-subtotal,
.cart-delivery,
.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 15px;
    font-weight: 600;
}

.cart-total {
    border-top: 3px solid #3b82f6;
    margin-top: 12px;
    padding-top: 12px;
    font-weight: 800;
    font-size: 18px;
    color: #1e293b;
}

.cart-total .amount {
    color: #3b82f6;
    font-size: 20px;
}

/* Form */
.upseller-checkout-form {
    background: white;
    padding: 24px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #1e40af;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.checkout-total {
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border-radius: 10px;
    border: 3px solid #22c55e;
}

.checkout-total .final-amount {
    color: #3b82f6;
    font-size: 22px;
}

.confirm_but_div_cancel button {
    width: 100%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
    transition: all 0.2s ease;
}

.confirm_but_div_cancel button:hover:not(:disabled) {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
}

.confirm_but_div_cancel button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cart-quantity-input {
    max-width: 60px;
}

/* Gallery */
.upseller-gallery {
    width: 100%;
    height: 180px;
    margin: 16px auto;
}

.upseller-gallery .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.upseller-gallery-img {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 10px;
    border: 3px solid #e2e8f0;
}

.upseller-lightbox {
    position: fixed;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
    background: rgba(30, 41, 91, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    z-index: 10000;
    padding: 10px;
    box-sizing: border-box;
}

.upseller-lightbox img {
    max-width: 95%;
    max-height: 85%;
    border-radius: 10px;
}

.lightbox-content {
    position: relative;
    display: inline-block;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border: none;
    font-size: 24px;
    font-weight: bold;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.lightbox-close:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: scale(1.1);
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .upseller-container {
        padding: 8px;
    }

    .upseller-product {
        display: flex;
        align-items: center;
        padding: 12px;
        margin-bottom: 10px;
        flex-direction: row;
    }

    .upseller-product-header {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding-right: 0;
        width: 100%;
    }

    .upseller-product-image {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }

    .upseller-product-basic {
        flex: 1;
        gap: 4px;
        min-width: 0;
    }

    .upseller-product-title {
        font-size: 14px;
        font-weight: 700;
        margin: 0;
        line-height: 1.3;
    }

    .upseller-product-short-desc {
        font-size: 12px;
        color: #64748b;
        margin: 0;
        line-height: 1.3;
    }

    .upseller-product-checkbox-container,
    .out_box_price {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        margin-left: 8px;
    }

    .out_box_price {
        font-size: 14px;
        font-weight: 700;
        padding: 6px 12px;
    }

    .outside_checkbox {
        width: 24px;
        height: 24px;
    }

    .upseller-product.expanded {
        flex-direction: column;
        align-items: flex-start;
    }

    .upseller-product.expanded .upseller-product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .upseller-product.expanded .upseller-product-image {
        width: 100%;
        height: 180px;
    }

    .upseller-product.expanded .out_box_price {
        margin-left: 0;
    }

    .upseller-product-details {
        display: none;
        margin-top: 12px;
        padding-top: 12px;
        width: 100%;
    }

    .upseller-product.expanded .upseller-product-details {
        display: block;
    }

    .upseller-video iframe {
        height: 160px;
    }

    .clean-cart-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
    }

    .cart-item-details {
        flex-direction: row;
        gap: 10px;
        width: 100%;
        margin-bottom: 6px;
    }

    .cart-item-name {
        max-width: 200px;
    }

    .cart-item-price {
        font-size: 16px;
        
        
    }

    .upseller-checkout-form {
        padding: 16px;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px;
        font-size: 14px;
    }

    .checkout-total {
        font-size: 16px;
        padding: 16px;
    }

    .checkout-total .final-amount {
        font-size: 18px;
    }

    .confirm_but_div_cancel button {
        font-size: 15px;
        padding: 14px;
    }

    .upseller-cart-checkout {
        padding: 16px;
        margin-top: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}



.upseller-cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
}

.cart-item-img img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cart-item-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cart-item-actions button {
    border: none;
    background: #007c91;
    color: #fff;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}

.cart-item-actions .cart-item-remove {
    background: #d8d8d8;
    margin-left: 5%;
   
}

.cart-item-price {
    font-weight: 600;
    color: #007c91;
   
    font-size: 16px;
}

/* Mobile */
@media (max-width: 600px) {
    .upseller-cart-item {
        flex-direction: row;
        align-items: flex-start;
    }
    .cart-item-img img {
        width: 50px;
        height: 50px;
    }
    .cart-item-title {
        font-size: 13px;
            font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;

    /* NEW for ellipsis */
    white-space: nowrap;       /* keep on one line */
    overflow: hidden;          /* hide overflow */
    text-overflow: ellipsis;   /* show ... at the end */
    max-width: 200px;          /* adjust width as needed */
    display: block;
        
        
    }
    .cart-item-actions {
        gap: 4px;
    }
    .cart-item-actions button {
        font-size: 12px;
        padding: 3px 6px;
    }
}



.upseller-collapse-btn{
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}


/* Spinner inside button */
.upseller-confirm-order.loading {
  position: relative;
  pointer-events: none; /* prevent clicks */
}

/* Spinner element inside button */
.upseller-confirm-order.loading .spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px; /* space between spinner and text */
  border: 2px solid #fff; /* border color matches button text */
  border-top-color: transparent; /* spinning effect */
  border-radius: 50%;
  vertical-align: middle;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}



/* Order toggle button */
.upseller-order-toggle-btn {
  background: #28a745; /* green for order */
  color: #fff;
  border: none;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 10px;
}

.upseller-order-toggle-btn:hover {
  background: #218838;
}

/* When it's বাতিল করুন */
.upseller-product.selected .upseller-order-toggle-btn {
  background: #dc3545; /* red for cancel */
}

.upseller-product.selected .upseller-order-toggle-btn:hover {
  background: #c82333;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  .upseller-order-toggle-btn {
   
    margin: 10px 0 0 0;
    font-size: 15px;
    padding: 16px;
    margin-left: 5%;
    width: 150px;
  }
}
