/* NetzKiste - Moderner animierter Warenkorb - Dark Mode */

/* Warenkorb-Button im Header */
.cart-button {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-width: 120px;
    justify-content: center;
}

.cart-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
    background: linear-gradient(135deg, #5b4bc9, #8a7df0);
}

.cart-button:active {
    transform: translateY(0);
}

.cart-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

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

.cart-count {
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    position: absolute;
    top: -8px;
    right: -8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Warenkorb-Modal */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cart-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-heavy);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        transform: translateY(50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.cart-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.cart-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.cart-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.cart-body {
    padding: 20px;
    background: var(--glass-bg);
    color: var(--text-primary);
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.cart-empty-icon {
    font-size: 64px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.cart-empty h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.cart-empty p {
    font-size: 16px;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    margin-bottom: 15px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
    transition: all 0.3s ease;
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.cart-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

.cart-item-info {
    flex: 1;
    margin-left: 15px;
}

.cart-item-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.cart-item-domain {
    font-size: 14px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.cart-item-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--success-color);
    margin-left: 15px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

.cart-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 5px 10px;
    border: 1px solid var(--glass-border);
}

.quantity-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.quantity-btn:disabled {
    background: var(--medium-gray);
    cursor: not-allowed;
    transform: none;
}

.quantity-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
}

.remove-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.cart-footer {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 0 0 20px 20px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 2px solid var(--primary-color);
}

.cart-total-label {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.cart-total-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

.cart-actions {
    display: flex;
    gap: 15px;
}

.cart-continue {
    flex: 1;
    background: var(--medium-gray);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-continue:hover {
    background: var(--dark-gray);
    transform: translateY(-2px);
}

.cart-checkout {
    flex: 2;
    background: linear-gradient(135deg, var(--success-color), var(--accent-color));
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.cart-checkout:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Warenkorb-Animationen */
.cart-item-enter {
    animation: cartItemEnter 0.5s ease;
}

@keyframes cartItemEnter {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.cart-item-exit {
    animation: cartItemExit 0.3s ease;
}

@keyframes cartItemExit {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-100px);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-content {
        width: 95%;
        margin: 20px;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
    }
    
    .cart-item-info {
        margin: 15px 0;
    }
    
    .cart-item-actions {
        margin: 15px 0 0 0;
    }
    
    .cart-actions {
        flex-direction: column;
    }
}

/* Warenkorb-Button Animation beim Hinzufügen */
.cart-button.add-animation {
    animation: cartAdd 0.6s ease;
}

@keyframes cartAdd {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Floating Action Button für Mobile - ausgeblendet */
.cart-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
}

.cart-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.5);
}

/* Floating Action Button auch auf Mobilgeräten ausblenden */
@media (max-width: 768px) {
    .cart-fab {
        display: none;
    }
}

/* Toast-Benachrichtigungen */
.cart-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    z-index: 10000;
    animation: toastSlide 0.3s ease;
}

@keyframes toastSlide {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.cart-toast.error {
    background: #dc3545;
}

.cart-toast.warning {
    background: #ffc107;
    color: #212529;
}
