/* Design A: Minimalist Clean Design - Fixed Gallery & 90% Lightbox */

.upseller-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Inter', sans-serif;
    background: #ffffff;
    color: #333333;
    box-sizing: border-box;
}

.upseller-products {
    margin-bottom: 60px;
}

.upseller-product {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    margin-bottom: 32px;
    padding: 32px;
    transition: all 0.2s ease;
    animation: cleanFadeIn 0.5s ease-out both;
    box-sizing: border-box;
}

@keyframes cleanFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.upseller-product:hover {
    border-color: #e0e0e0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}

.upseller-product.selected {
    border-color: #2196F3;
    background: #fafbff;
}

.upseller-product-header {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    cursor: pointer;
    position: relative;
    padding-right: 50px;
    flex-wrap: wrap; /* fix overflow issues */
}

.upseller-product-image {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    border-radius: 4px;
    overflow: hidden;
}

.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: 12px;
    min-width: 0;
}

.upseller-product-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    word-wrap: break-word;
}

.upseller-product-short-desc {
    color: #666666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.bistarito_but_div_cancel .upseller-toggle-btn {
    background: #2196F3;
    color: rgb(255, 255, 255);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    align-self: flex-start;
}

.bistarito_but_div_cancel .upseller-toggle-btn:hover {
    background: #1976D2;
}

.upseller-product-details {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
    display: none;
}

.upseller-product.expanded .upseller-product-details {
    display: block;
}

/* Video */
.upseller-video {
    margin-bottom: 24px;
    border-radius: 4px;
    overflow: hidden;
}

.upseller-video iframe {
    width: 100%;
    height: 280px;
    border: none;
    border-radius: 4px;
}

/* Description & Price */
.upseller-product-description {
    color: #555555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.upseller-product-price {
    font-size: 22px;
    font-weight: 700;
    color: #2196F3;
    margin-bottom: 20px;
    text-align: center;
    padding: 14px;
    background: #f8f9ff;
    border-radius: 4px;
    border: 1px solid #e3f2fd;
}

/* Checkbox */
.upseller-product-checkbox-container {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
}

.outside_checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #2196F3;
}

/* Price inline */
.out_box_price {
    float: right;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #2196F3;
}

/* Cart & Checkout */
.upseller-cart-checkout {
    background: #fafafa;
    border-radius: 8px;
    padding: 32px;
    margin-top: 48px;
}

.upseller-cart {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e0e0e0;
}

.upseller-cart h3,
.upseller-checkout h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 2px solid #2196F3;
}

.clean-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: white;
    margin-bottom: 8px;
    border-radius: 4px;
    border: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.cart-item-details {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.cart-item-details img {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
}

.cart-item-name {
    font-weight: 500;
    color: #1a1a1a;
    word-break: break-word;
}

.cart-item-price {
    color: #2196F3;
    font-weight: 600;
}

.upseller-cart-summary {
    background: white;
    padding: 20px;
    border-radius: 4px;
    margin-top: 16px;
    border: 1px solid #f0f0f0;
}

.cart-subtotal,
.cart-delivery,
.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 15px;
    flex-wrap: wrap;
}

.cart-total {
    border-top: 1px solid #f0f0f0;
    margin-top: 8px;
    padding-top: 12px;
    font-weight: 700;
    font-size: 16px;
    color: #1a1a1a;
}

.cart-total .amount {
    color: #2196F3;
    font-size: 18px;
}

/* Form */
.upseller-checkout-form {
    background: white;
    padding: 32px;
    border-radius: 4px;
    border: 1px solid #f0f0f0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #1a1a1a;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2196F3;
}

.form-group input.error,
.form-group textarea.error {
    border-color: #f44336;
}

/* Checkout total */
.checkout-total {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 24px 0;
    padding: 20px;
    background: #e8f5e8;
    border-radius: 4px;
    border: 1px solid #4CAF50;
}

.checkout-total .final-amount {
    color: #2196F3;
    font-size: 20px;
}

.confirm_but_div_cancel button {
    width: 100%;
    background: #4CAF50;
    color: white;
    border: none;
  
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.confirm_but_div_cancel button:hover:not(:disabled) {
    background: #45a049;
}

.confirm_but_div_cancel button:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* Notifications */
.clean-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 16px 20px;
    min-width: 300px;
    z-index: 10000;
    transform: translateX(350px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.clean-notification.show {
    transform: translateX(0);
}

.clean-notification.success {
    border-left: 4px solid #4CAF50;
}

.clean-notification.error {
    border-left: 4px solid #f44336;
}

.clean-notification.info {
    border-left: 4px solid #2196F3;
}

.notification-message {
    color: #1a1a1a;
    font-weight: 500;
}

.notification-dismiss {
    background: none;
    border: none;
    font-size: 18px;
    color: #666666;
    cursor: pointer;
    margin-left: 16px;
}

.notification-dismiss:hover {
    color: #1a1a1a;
}

/* Responsive */
@media (max-width: 768px) {

    

    .upseller-container {
        padding: 10px;
    }

    /* Compact collapsed product row */
    .upseller-products {
        display: block;
    }

    .upseller-product {
        display: flex;
        align-items: center;
        padding: 8px 10px;
        margin-bottom: 8px;
        border-radius: 6px;
        flex-direction: row;
    }

    .upseller-product-header {
        display: flex;
        flex-direction: row; /* collapsed view = row */
        align-items: center;
        gap: 8px;
        padding-right: 0;
        width: 100%;
    }

    .upseller-product-image {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }
    .upseller-product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .upseller-product-basic {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    .upseller-product-title {
        font-size: 13px;
        font-weight: 600;
        margin: 0;
        line-height: 1.2;
    }
    .upseller-product-short-desc {
        font-size: 11px;
        color: #666;
        margin: 0;
        line-height: 1.2;
    }

    .upseller-product-checkbox-container,
    .out_box_price {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        margin-left: 6px;
    }
    .out_box_price {
        font-size: 13px;
        font-weight: 600;
        padding: 2px 6px;
        border: 1px solid #e3f2fd;
        border-radius: 4px;
        background: #f8f9ff;
    }

    /* Expanded details: stack vertically */
    .upseller-product.expanded {
        flex-direction: column;
        align-items: flex-start;
    }
    .upseller-product.expanded .upseller-product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .upseller-product.expanded .upseller-product-image {
        width: 100%;
        height: auto;
    }
    .upseller-product.expanded .upseller-product-image img {
        width: 100%;
        height: auto;
        max-height: 200px;
        object-fit: cover;
    }
    .upseller-product.expanded .out_box_price {
        margin-left: 0;
    }

    .upseller-product-details {
        display: none;
        margin-top: 10px;
        padding-top: 10px;
        width: 100%;
    }
    .upseller-product.expanded .upseller-product-details {
        display: block;
    }

    /* Video smaller for mobile */
    .upseller-video iframe {
        height: 160px;
    }

    /* --- CART & CHECKOUT FIX --- */
    .clean-cart-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }
    .cart-item-details {
        flex-direction: row;
        gap: 10px;
        width: 100%;
        margin-bottom: 6px;
    }
    .cart-item-price {
        align-self: flex-end;
    }

    .cart-subtotal,
    .cart-delivery,
    .cart-total {
        flex-direction: row;
        font-size: 14px;
    }

    .upseller-checkout-form {
        padding: 16px;
    }
    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 13px;
    }

    .checkout-total {
        font-size: 16px;
        padding: 12px;
    }
    .checkout-total .final-amount {
        font-size: 18px;
    }
    .confirm_but_div_cancel button {
       
        font-size: 15px;
    }

    .upseller-cart-checkout{
        padding: 0px;
    }
}




/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ----------------------------- */
/* Gallery carousel */
.upseller-gallery {
    width: 100%;
    height: 200px;
    margin: 20px auto;
}
.upseller-gallery .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}
.upseller-gallery-img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 6px;
}

/* ----------------------------- */
/* Lightbox (90% coverage) */
.upseller-lightbox {
    position: fixed;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
    background: rgba(0,0,0,0.30);
    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: 8px;
}

/* Lightbox container & close */
.lightbox-content {
    position: relative;
    display: inline-block;
}
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff0000;
    color: #fff;
    border: none;
    font-size: 28px;
    font-weight: bold;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease, background 0.2s ease;
}
.lightbox-close:hover {
    transform: scale(1.2);
    background: #cc0000;
}


input.cart-quantity-input{
    max-width: 70px;
}



span.cart-item-name{
    width: 360px;
}