/* Warenkorb Icon im Header */
.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.3rem;
    padding: 0;
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.cart-icon:hover {
    transform: scale(1.1);
}

#cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff8c42;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Warenkorb Modal */
.cart-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.cart-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    margin: 0;
    color: #005bb7;
}

.cart-close {
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #666;
    line-height: 1;
}

.cart-close:hover {
    color: #005bb7;
}

.cart-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Warenkorb-Ansichten */
#cart-view, #checkout-view, #order-success {
    display: none;
}

#cart-view {
    display: block;
}

#cart-empty {
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* Cart Items */
.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: white;
    border: 1px solid #eee;
    border-radius: 4px;
}

.cart-item-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #333;
}

.cart-item-price {
    color: #ff8c42;
    font-weight: bold;
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-controls button {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-controls button:hover {
    background: #f0f0f0;
}

.quantity-controls span {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
}

.cart-item-sum {
    font-weight: bold;
    color: #005bb7;
}

.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

.remove-btn:hover {
    background: #c82333;
}

/* Cart Footer */
.cart-footer {
    padding: 1.5rem;
    border-top: 2px solid #ddd;
    background: #f9f9f9;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: bold;
}

.cart-actions {
    display: flex;
    gap: 1rem;
}

.btn-cart {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-cart-primary {
    background: #ff8c42;
    color: white;
}

.btn-cart-primary:hover {
    background: #e67a35;
}

.btn-cart-secondary {
    background: #666;
    color: white;
}

.btn-cart-secondary:hover {
    background: #555;
}

/* Checkout Formular */
.checkout-form {
    display: grid;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkout-form .form-group {
    margin-bottom: 0;
}

.checkout-form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: #333;
}

.checkout-form input,
.checkout-form textarea,
.checkout-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.checkout-form input:focus,
.checkout-form textarea:focus,
.checkout-form select:focus {
    outline: none;
    border-color: #005bb7;
}

#checkout-summary {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

/* Erfolgsansicht */
#order-success {
    text-align: center;
    padding: 3rem;
}

#order-success h3 {
    color: #28a745;
    font-size: 2rem;
    margin-bottom: 1rem;
}

#order-success p {
    color: #666;
    margin-bottom: 2rem;
}

/* Benachrichtigung */
.cart-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #28a745;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 3000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
}

.cart-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .cart-modal-content {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .cart-item {
        grid-template-columns: 60px 1fr;
        gap: 0.75rem;
    }

    .cart-item img {
        width: 60px;
        height: 60px;
    }

    .cart-item-controls {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .cart-actions {
        flex-direction: column;
    }

    .cart-notification {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}
