<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="#FFF8E1">

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:scrollbars="none">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <!-- Üst Görsel / Afiş Kısmı -->
            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="220dp"
                android:background="#FFE0B2">

                <!-- Kategori Emojisi (Arka planda büyük olarak duracak) -->
                <TextView
                    android:id="@+id/txtDetayEmoji"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center"
                    android:text="🍽️"
                    android:textSize="90sp" />

                <!-- URL'den yüklenen Resim -->
                <ImageView
                    android:id="@+id/imgDetayPoster"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:scaleType="centerCrop"
                    android:visibility="gone" />

                <!-- Geri Dön Ok Butonu -->
                <TextView
                    android:id="@+id/btnDetayBackCircle"
                    android:layout_width="40dp"
                    android:layout_height="40dp"
                    android:text="◀"
                    android:textColor="#3E2723"
                    android:textSize="18sp"
                    android:gravity="center"
                    android:background="@drawable/custom_input"
                    android:layout_margin="16dp"
                    android:clickable="true"
                    android:focusable="true" />
            </FrameLayout>

            <!-- Tarif Başlık ve Detay Kartı -->
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:padding="20dp">

                <!-- Yemek Adı -->
                <TextView
                    android:id="@+id/txtDetayBaslik"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="Tarif Başlığı"
                    android:textSize="26sp"
                    android:textStyle="bold"
                    android:textColor="#3E2723" />

                <!-- Kategori ve Ekleyen Bilgisi -->
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:layout_marginTop="8dp"
                    android:gravity="center_vertical">

                    <TextView
                        android:id="@+id/txtDetayKategori"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="Ana Yemek"
                        android:textSize="12sp"
                        android:textColor="#E64A19"
                        android:textStyle="bold"
                        android:background="#FFE0B2"
                        android:paddingHorizontal="10dp"
                        android:paddingVertical="4dp" />

                    <TextView
                        android:id="@+id/txtDetayEkleyen"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="Şef: Ahmet"
                        android:textSize="13sp"
                        android:textColor="#757575"
                        android:layout_marginStart="12dp" />
                </LinearLayout>

                <View
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="#FFE0B2"
                    android:layout_marginVertical="16dp" />

                <!-- Malzemeler Kartı -->
                <androidx.cardview.widget.CardView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:cardCornerRadius="12dp"
                    app:cardElevation="3dp"
                    app:cardBackgroundColor="#FFFFFF"
                    android:layout_marginBottom="16dp">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        android:padding="16dp">

                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:text="📋 Malzemeler"
                            android:textSize="16sp"
                            android:textStyle="bold"
                            android:textColor="#E64A19"
                            android:layout_marginBottom="8dp" />

                        <TextView
                            android:id="@+id/txtDetayMalzemeler"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:text="Malzemeler listesi burada olacak..."
                            android:textSize="15sp"
                            android:textColor="#5D4037"
                            android:lineSpacingExtra="4dp" />
                    </LinearLayout>
                </androidx.cardview.widget.CardView>

                <!-- Yapılışı Kartı -->
                <androidx.cardview.widget.CardView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:cardCornerRadius="12dp"
                    app:cardElevation="3dp"
                    app:cardBackgroundColor="#FFFFFF"
                    android:layout_marginBottom="16dp">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        android:padding="16dp">

                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:text="👨‍🍳 Hazırlanışı"
                            android:textSize="16sp"
                            android:textStyle="bold"
                            android:textColor="#E64A19"
                            android:layout_marginBottom="8dp" />

                        <TextView
                            android:id="@+id/txtDetayYapilis"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:text="Yapılış tarifi burada yer alacak..."
                            android:textSize="15sp"
                            android:textColor="#5D4037"
                            android:lineSpacingExtra="4dp" />
                    </LinearLayout>
                </androidx.cardview.widget.CardView>

            </LinearLayout>
        </LinearLayout>
    </ScrollView>

    <!-- Alt Kapat ve Dön Butonu -->
    <Button
        android:id="@+id/btnDetayKapat"
        android:layout_width="match_parent"
        android:layout_height="55dp"
        android:text="TARİFLERE GERİ DÖN"
        android:textSize="16sp"
        android:textColor="#FFFFFF"
        android:textStyle="bold"
        android:background="@drawable/custom_button"
        android:layout_margin="16dp"
        android:elevation="4dp" />

</LinearLayout>