/**
 * Custom Cart Styles
 *
 * @package ProductBuilder
 * @since 2.8.0
 */

/* Container */
#pb-custom-cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Loading State */
.pb-cart-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* Bundles Container */
.pb-cart-bundles {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

/* Single Bundle */
.pb-cart-bundle {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Bundle Header */
.pb-bundle-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.pb-bundle-header h3 {
    margin: 0;
    font-size: 1.3em;
    color: #333;
}

.pb-bundle-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.pb-bundle-type {
    display: inline-block;
    padding: 4px 12px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

.pb-bundle-price {
    font-size: 1.4em;
    font-weight: bold;
    color: #2e7d32;
}

/* Bundle Products */
.pb-bundle-products ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pb-bundle-product {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.pb-bundle-product:last-child {
    border-bottom: none;
}

.pb-product-name {
    flex: 1;
    color: #555;
}

.pb-product-price {
    font-weight: 500;
    color: #666;
    margin-left: 20px;
}

/* Bundle Actions */
.pb-bundle-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}

.pb-remove-bundle {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s;
}

.pb-remove-bundle:hover {
    background: #c82333;
}

.pb-remove-bundle:disabled {
    background: #999;
    cursor: not-allowed;
}

/* Cart Summary */
#pb-custom-cart-summary {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
}

.pb-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.pb-cart-total h3 {
    margin: 0;
    font-size: 1.5em;
    color: #333;
}

#pb-cart-total-amount {
    color: #2e7d32;
}

#pb-checkout-btn {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 1.1em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

#pb-checkout-btn:hover {
    background: #218838;
}

#pb-checkout-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

/* Empty Cart */
#pb-custom-cart-empty {
    text-align: center;
    padding: 60px 20px;
}

#pb-custom-cart-empty p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 20px;
}

#pb-custom-cart-empty .button {
    background: #007bff;
    color: #fff;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

#pb-custom-cart-empty .button:hover {
    background: #0056b3;
}

/* Error State */
.pb-cart-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 15px;
    color: #856404;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .pb-bundle-header {
        flex-direction: column;
        gap: 10px;
    }

    .pb-bundle-meta {
        align-items: flex-start;
    }

    .pb-cart-total {
        flex-direction: column;
        align-items: stretch;
    }

    .pb-cart-total h3 {
        font-size: 1.3em;
    }

    #pb-checkout-btn {
        width: 100%;
    }

    .pb-bundle-product {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .pb-product-price {
        margin-left: 0;
    }
}
