.food-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px auto;
    max-width: 1200px;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}


/* Food Gallery */
.food-gallery {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    overflow: hidden;
}

.food-main-image {
    width: 100%;
    max-width: 450px;
    height: 350px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.4s ease;
    margin-bottom: 12px;
    cursor: zoom-in;
}

.food-main-image:hover {
    transform: scale(1.03);
}

/* Food Info Section */
.food-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
}

.food-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 12px;
}

.food-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #212529;
    margin: 0;
    line-height: 1.2;
    flex: 1;
}

/* Price Container */
.price-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.food-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2E5D50;
    margin: 0;
}

.original-price {
    font-size: 1.4rem;
    color: #6c757d;
    text-decoration: line-through;
    font-weight: 500;
}

.discount-badge {
    background: #dc3545;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: center;
}

/* Rating Section */
.food-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}

.food-rating i.fas.fa-star,
.food-rating i.far.fa-star,
.food-rating i.fas.fa-star-half-alt {
    color: #ffd700 !important;
    font-size: 1.1rem;
}

.rating-text {
    color: #666;
    font-size: 0.9rem;
    margin-left: 4px;
}

.no-rating {
    color: #999;
    font-size: 0.9rem;
    font-style: italic;
}

.food-description {
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
    margin: 12px 0;
}

/* Food Details Section */
.food-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e1e1e1;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-label i {
    color: #2E5D50;
    font-size: 0.9rem;
}

.detail-value {
    color: #6c757d;
    font-weight: 500;
}

.prep-time {
    color: #2E5D50;
    font-weight: 600;
}

/* Allergens */
.allergens-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.allergen-tag {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    border: 1px solid #ffeaa7;
    font-weight: 500;
}

/* Quantity Selection */
.quantity-selection {
    margin: 20px 0;
}

.quantity-selection h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #2E5D50;
    background: transparent;
    color: #2E5D50;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: #2E5D50;
    color: white;
    transform: translateY(-1px);
}

.quantity-input {
    width: 60px;
    text-align: center;
    padding: 8px 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
}

.quantity-input:focus {
    border-color: #2E5D50;
    outline: none;
}

/* Food Actions */
.food-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.food-actions .btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: #2E5D50;
    color: white;
}

.btn-primary:hover {
    background: #245043;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: #2E5D50;
    border: 2px solid #2E5D50;
}

.btn-outline:hover {
    background: #2E5D50;
    color: white;
    transform: translateY(-1px);
}

/* Reviews Section */
.reviews-section {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid #e1e1e1;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.reviews-section h2 {
    font-size: 1.8rem;
    margin-bottom: var(--space-lg);
    color: var(--dark);
}

.add-review-section {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-lg);
}

.add-review-title {
    font-size: 1.3rem;
    margin-bottom: var(--space-md);
    color: var(--dark);
}

.star-rating-input {
    direction: rtl;
    unicode-bidi: bidi-override;
    margin-bottom: var(--space-md);
}

.star-rating-input input {
    display: none;
}

.star-rating-input label {
    color: #ddd;
    font-size: 1.5rem;
    padding: 0 2px;
    cursor: pointer;
}

.star-rating-input input:checked ~ label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label {
    color: #f39c12;
}

.star-rating-input input:checked + label {
    color: #f39c12;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group textarea {
    width: 100%;
    padding: var(--space-sm);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
}

.edit-notice {
    margin-top: var(--space-sm);
    color: #666;
    font-size: 0.9rem;
}

.login-to-review {
    text-align: center;
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.login-to-review a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.login-to-review a:hover {
    text-decoration: underline;
}

.reviews-list {
    display: grid;
    gap: var(--space-lg);
}

.review-item {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.reviewer-name {
    font-weight: 600;
}

.review-rating {
    display: flex;
    gap: 2px;
}

.review-rating i.fas.fa-star,
.review-rating i.far.fa-star {
    color: #f39c12 !important;
    font-size: 0.9rem;
}

.review-date {
    color: var(--gray);
    font-size: 0.9rem;
}

.review-content {
    color: var(--dark);
    line-height: 1.6;
    margin-top: var(--space-sm);
}

.review-edited {
    margin-top: var(--space-xs);
    color: #666;
    font-size: 0.8rem;
}

.review-actions {
    margin-top: var(--space-sm);
    display: flex;
    gap: var(--space-sm);
}

.btn-delete-review {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-delete-review:hover {
    background: #c82333;
}

.btn-delete-review:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.no-reviews {
    text-align: center;
    padding: var(--space-xl);
    color: var(--gray);
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

/* Related Foods */
.related-foods {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid #e1e1e1;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.related-foods h3 {
    margin-bottom: var(--space-lg);
    color: var(--dark);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.related-food-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.related-food-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.related-food-image {
    height: 120px;
    overflow: hidden;
}

.related-food-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-food-info {
    padding: var(--space-sm);
}

.related-food-title {
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--dark);
}

.related-food-price {
    color: var(--primary);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .food-detail-container {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 16px auto;
        padding: 12px;
    }
    
    .food-main-image {
        height: 250px;
    }
    
    .food-title {
        font-size: 1.5rem;
    }
    
    .food-price {
        font-size: 1.4rem;
    }
    
    .original-price {
        font-size: 1.2rem;
    }
    
    .food-actions {
        flex-direction: column;
    }
    
    .food-actions .btn {
        flex: none;
    }
}

@media (max-width: 480px) {
    .food-detail-container {
        padding: 8px;
        margin: 8px auto;
    }
    
    .food-gallery {
        padding: 12px;
    }
    
    
    .food-main-image {
        height: 200px;
    }
    
    .food-title {
        font-size: 1.3rem;
    }
    
    .price-container {
        gap: 8px;
    }
    
    .food-price {
        font-size: 1.2rem;
    }
    
    .original-price {
        font-size: 1rem;
    }
    
    .discount-badge {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
    
    .quantity-btn {
        width: 32px;
        height: 32px;
    }
    
    .quantity-input {
        width: 50px;
    }
}

.cart-success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border-left: 5px solid #28a745;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 20px auto;
    max-width: 400px;   
    text-align: center;
}

.review-message {
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 15px 20px;
    border-left: 5px solid #17a2b8;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 20px auto;
    max-width: 400px;   
    text-align: center;
    position: relative;
}

.review-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.review-message .fa-times {
    position: absolute;
    right: 10px;
    top: 10px;
    cursor: pointer;
}

.review-message.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.review-message.success {
    background-color: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.review-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.review-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}