/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.meal-calculator-wrapper {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    background: #fafafa;
}

/* Grid الرئيسي - sidebar يسار + محتوى يمين */
.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* العمود الكبير على الشمال (2 أجزاء) والصندوق على اليمين (1 جزء) */
    gap: 30px;
   /* align-items: center; */
}



/* ملخص الدفع - Sidebar يسار */
.payment-summary-box {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 20px;
}

.summary-image {
    text-align: center;
    margin-bottom: 20px;
}

.bag-image {
    width: 100px;
    height: 100px;
    background: #f3f4f6;
    border-radius: 12px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.summary-header {
    text-align: center;
    margin-bottom: 20px;
}

.summary-header h3 {
    font-size: 16px;
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 6px;
}

.summary-header p {
    font-size: 13px;
    color: #6b7280;
}

.discount-banner {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.summary-body {
    margin-bottom: 20px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

.summary-line .label {
    color: #6b7280;
}

.summary-line .value {
    color: #1f2937;
    font-weight: 600;
}

.summary-line .value.discount {
    color: #10b981;
}

.summary-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 16px 0;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
}

.summary-total .label {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.summary-total .value.total {
    font-size: 20px;
    font-weight: 700;
    color: #10b981;
}

.checkout-btn {
    width: 100%;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 16px;
}

.checkout-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25);
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
}

/* المحتوى الرئيسي - يمين */
.main-content-area {
    background: white;
    border-radius: 16px;
    padding: 40px;
}

/* Main Header */
.main-header {
    text-align: center;
    margin-bottom: 40px;
}

.main-header h1 {
    font-size: 28px;
    color: #1a1a1a;
    font-weight: 700;
}

/* Meal Types Grid - 6 كروت */
.meal-types-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 50px;
}

.meal-type-card {
    background: #fafafa;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.meal-type-card:hover {
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
    transform: translateY(-2px);
}

.meal-type-card.selected {
    border-color: #10b981;
    background: #f0fdf4;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
}

.card-header {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
}

.meal-icon {
    font-size: 40px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    flex-shrink: 0;
}

.card-title h3 {
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 6px;
    font-weight: 700;
}

.card-title p {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.btn-info {
    flex: 1;
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-info:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.btn-select {
    flex: 1;
    background: #10b981;
    border: none;
    color: white;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-select:hover {
    background: #059669;
}

/* Sections */
.section-meals,
.section-days,
.section-payment {
    margin-bottom: 50px;
}

.section-meals h2,
.section-days h2,
.section-payment h2 {
    font-size: 22px;
    color: #1f2937;
    text-align: center;
    margin-bottom: 8px;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 30px;
}

/* Meals Grid */
.meals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.meal-option {
    cursor: pointer;
}

.meal-option.mandatory {
    cursor: not-allowed;
}

.meal-option input {
    display: none;
}

.meal-box {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meal-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: transparent;
    background: white;
    transition: all 0.3s;
}

.meal-option input:checked + .meal-box,
.meal-box.active {
    border-color: #10b981;
    background: #ecfdf5;
}

.meal-option input:checked + .meal-box .meal-check,
.meal-box.active .meal-check {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.meal-box span {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}

.meal-option:hover .meal-box:not(.active) {
    border-color: #d1d5db;
}

/* Days Grid */
.days-grid {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.day-option {
    cursor: pointer;
}

.day-option input {
    display: none;
}

.day-box {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 24px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
    transition: all 0.3s;
    white-space: nowrap;
}

.day-option input:checked + .day-box {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.day-option:hover .day-box {
    border-color: #10b981;
}

/* Payment Options */
.payment-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.payment-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.payment-card input {
    display: none;
}

.payment-card:hover {
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.payment-card input:checked ~ .payment-content {
    color: #1f2937;
}

.payment-card input:checked ~ .radio-indicator {
    background: white;
    border-color: #10b981;
}

.payment-card input:checked ~ .radio-indicator::after {
    transform: scale(1);
}

.payment-card.recommended {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.payment-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.price-badge {
    background: #f3f4f6;
    color: #1f2937;
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 700;
}

.payment-content p {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 10px;
}

.save-badge {
    display: inline-block;
    background: #d1fae5;
    color: #065f46;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.save-badge.green {
    background: #d1fae5;
    color: #065f46;
}

.radio-indicator {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 50%;
    background: white;
    transition: all 0.3s;
}

.radio-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    transition: transform 0.3s;
}

.recommended-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 5px 14px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

/* Responsive */
@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-summary-box {
        position: relative;
        order: 2;
    }
    
    .main-content-area {
        order: 1;
    }
}

@media (max-width: 768px) {
    .meal-types-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-options {
        grid-template-columns: 1fr;
    }
    
    .days-grid {
        justify-content: stretch;
    }
    
    .day-box {
        flex: 1;
        text-align: center;
    }
    
    .meals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}