/**
 * Krimphove Catering - Frontend Styles
 */

/* ====== Warenkorb Tabelle ====== */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cart-table thead {
    background: #2c3e50;
    color: #fff;
}

.cart-table thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}

.cart-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s;
}

.cart-table tbody tr:hover {
    background-color: #f8f9fa;
}

.cart-table tbody tr.updating {
    opacity: 0.6;
    pointer-events: none;
}

.cart-table tbody td {
    padding: 20px 15px;
    vertical-align: middle;
}

.cart-table .product-name {
    font-weight: 600;
    color: #2c3e50;
}

.cart-table .product-category {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 5px;
}

/* ====== Mengensteuerung ====== */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.quantity-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cart-quantity-input {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.cart-quantity-input:focus {
    outline: none;
    border-color: #3498db;
}

.quantity-unit {
    font-size: 13px;
    color: #7f8c8d;
    margin-left: 5px;
}

/* ====== Preise ====== */
.cart-price {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.row-total {
    font-weight: 700;
    color: #27ae60;
    font-size: 18px;
}

.price-note {
    font-size: 12px;
    color: #95a5a6;
    display: block;
    margin-top: 4px;
}

/* ====== Entfernen-Button ====== */
.remove-cart-item {
    background: transparent;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 20px;
    padding: 8px;
    transition: all 0.2s;
    border-radius: 4px;
}

.remove-cart-item:hover {
    background: #e74c3c;
    color: #fff;
}

/* ====== Gesamtsumme ====== */
.cart-footer {
    margin-top: 30px;
    padding: 20px;
    background: #ecf0f1;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-total-label {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.cart-total {
    font-size: 28px;
    font-weight: 700;
    color: #27ae60;
}

/* ====== Mindestbestellmenge Hinweis ====== */
.min-order-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.min-order-notice .icon {
    font-size: 20px;
}

.min-order-notice .text {
    font-size: 14px;
    color: #856404;
}

/* ====== Paket-Konfigurator ====== */
.package-configurator {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    max-width: 800px;
    margin: 30px auto;
}

.package-configurator .header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #3498db;
}

.package-configurator .title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.package-configurator .description {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.6;
}

.package-configurator .config-section {
    margin-bottom: 30px;
}

.package-configurator .section-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.package-configurator .persons-input-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.package-persons-input {
    width: 120px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.package-persons-input:focus {
    outline: none;
    border-color: #3498db;
}

.package-configurator .product-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.package-configurator .product-item {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s;
    cursor: pointer;
}

.package-configurator .product-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.package-configurator .product-item.selected {
    border-color: #27ae60;
    background: #f0fff4;
}

.package-configurator .product-checkbox {
    margin-right: 10px;
}

.package-configurator .product-name {
    font-weight: 600;
    color: #2c3e50;
}

.package-configurator .selection-info {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 10px;
    text-align: center;
}

.package-configurator .price-summary {
    background: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.package-configurator .price-label {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.package-configurator .package-total-price {
    font-size: 28px;
    font-weight: 700;
    color: #27ae60;
}

.package-configurator .add-package-btn {
    width: 100%;
    padding: 15px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 20px;
}

.package-configurator .add-package-btn:hover {
    background: #2980b9;
}

.package-configurator .add-package-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* ====== Benachrichtigungen ====== */
.krimphove-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
    max-width: 400px;
}

.krimphove-notification.success {
    background: #27ae60;
    color: #fff;
}

.krimphove-notification.error {
    background: #e74c3c;
    color: #fff;
}

.krimphove-notification.warning {
    background: #f39c12;
    color: #fff;
}

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

/* ====== Leerer Warenkorb ====== */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #7f8c8d;
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
    .cart-table {
        font-size: 14px;
    }
    
    .cart-table thead {
        display: none;
    }
    
    .cart-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
    }
    
    .cart-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 12px 15px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .cart-table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #2c3e50;
    }
    
    .cart-table tbody td:last-child {
        border-bottom: none;
    }
    
    .quantity-controls {
        flex-direction: column;
        align-items: flex-end;
    }
    
    .package-configurator .product-selection {
        grid-template-columns: 1fr;
    }
}
