/* Spezielle Styles für den Warenkorb und den Checkout-Prozess */

/* Allgemeine Warenkorb-Stile */
.cart-section h2,
.delivery-section h2,
.payment-section h2 {
    margin-bottom: 1.5rem;
    color: #000;
    text-align: center;
}

/* Fortschrittsanzeige für den Checkout-Prozess */
.checkout-progress {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    position: relative;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.checkout-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #ddd;
    transform: translateY(-50%);
    z-index: 1;
}

.step {
    background-color: #fff;
    border: 2px solid #ddd;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.step-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #666;
}

.step.active {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.step.completed {
    background-color: #4caf50;
    color: #fff;
    border-color: #4caf50;
}

/* Warenkorbstile */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cart-table th {
    background-color: #f8f8f8;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #ddd;
}

.cart-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.cart-table tr:last-child td {
    border-bottom: none;
}

.quantity-control {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background-color: #e0e0e0;
}

.quantity-control span {
    margin: 0 12px;
    font-weight: 500;
}

.delete-button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-button:hover {
    background-color: #d32f2f;
}

.cart-summary {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cart-total {
    margin-bottom: 1.5rem;
}

.cart-total p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 1rem;
}

.cart-total p:last-child {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 1.2rem;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Kalender-Stile */
.calendar {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 1.5rem;
}

.day-name {
    text-align: center;
    font-weight: 600;
    padding: 10px;
    background-color: #f8f8f8;
    border-radius: 4px;
}

.day {
    text-align: center;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.day:not(.empty):hover {
    background-color: #f0f0f0;
}

.day.active {
    background-color: #000;
    color: white;
    font-weight: bold;
}

.day.empty {
    background-color: transparent;
    cursor: default;
}

.time-slots {
    margin-top: 2rem;
}

.time-slots-header {
    margin-bottom: 1rem;
    font-weight: 600;
}

.slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.slot {
    background-color: #f8f8f8;
    padding: 12px;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slot:hover {
    background-color: #f0f0f0;
}

.slot.active {
    background-color: #000;
    color: white;
    font-weight: bold;
}

/* Zahlungsmethoden */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.payment-method {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.payment-method:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.payment-method.active {
    border: 2px solid #000;
}

.payment-icon {
    width: 60px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.method-select {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #000;
    font-size: 20px;
    font-weight: bold;
    display: none;
}

.payment-form {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.payment-form .form-group {
    margin-bottom: 1.5rem;
}

.payment-form button {
    width: 100%;
}

/* Mobile-Optimierungen */
@media (max-width: 768px) {
    .cart-table {
        display: block;
        border: none;
        box-shadow: none;
    }
    
    .cart-table thead {
        display: none;
    }
    
    .cart-table tbody, .cart-table tr, .cart-table td {
        display: block;
        width: 100%;
    }
    
    .cart-table tr {
        background-color: white;
        border-radius: 8px;
        margin-bottom: 1rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        padding: 1rem;
    }
    
    .cart-table td {
        padding: 0.5rem 0;
        border-bottom: 1px solid #f0f0f0;
        text-align: right;
        position: relative;
        padding-left: 120px;
    }
    
    .cart-table td:last-child {
        border-bottom: none;
    }
    
    .cart-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 110px;
        font-weight: 600;
        text-align: left;
    }
    
    .quantity-control {
        justify-content: flex-end;
    }
    
    .cart-actions button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .calendar-header button {
        padding: 8px;
        font-size: 0.9rem;
    }
    
    .day-name, .day {
        padding: 8px 5px;
        font-size: 0.9rem;
    }
    
    .slots {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .checkout-progress {
        max-width: 100%;
    }
    
    /* Größere Touch-Ziele für mobile Geräte */
    .quantity-btn {
        width: 36px;
        height: 36px;
    }
    
    .slot {
        padding: 15px;
    }
    
    .day {
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Verbesserte Navigation zwischen den Schritten */
    .step-navigation {
        display: flex;
        justify-content: space-between;
        margin-top: 2rem;
    }
    
    .step-navigation button {
        flex: 1;
        margin: 0 5px;
    }
}

/* Animation für die Schritte */
.section-animation {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}