<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white"
    android:fillViewport="true">

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

        <!-- Header -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingHorizontal="24dp"
            android:paddingTop="32dp">

            <TextView
                android:id="@+id/greeting"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:fontFamily="sans-serif-black"
                android:text="Olá, Explorador"
                android:textColor="@color/colorTextPrimary"
                android:textSize="32sp" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="4dp"
                android:text="Onde gostaria de jantar hoje?"
                android:textColor="@color/colorTextSecondary"
                android:textSize="16sp" />
        </LinearLayout>

        <!-- Search Bar -->
        <com.google.android.material.card.MaterialCardView
            style="@style/Widget.NaMesa.Card"
            android:layout_width="match_parent"
            android:layout_height="56dp"
            android:layout_marginHorizontal="24dp"
            android:layout_marginTop="24dp"
            app:cardElevation="0dp"
            app:strokeColor="@color/colorBorder"
            app:strokeWidth="1dp">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:gravity="center_vertical"
                android:orientation="horizontal"
                android:paddingHorizontal="16dp">

                <ImageView
                    android:layout_width="20dp"
                    android:layout_height="20dp"
                    android:src="@android:drawable/ic_menu_search"
                    app:tint="@color/colorTextSecondary" />

                <EditText
                    android:id="@+id/etSearch"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_marginStart="12dp"
                    android:background="@null"
                    android:hint="Procurar restaurantes, cozinhas..."
                    android:inputType="text"
                    android:textColor="@color/colorTextPrimary"
                    android:textColorHint="@color/colorTextHint"
                    android:textSize="15sp" />
            </LinearLayout>
        </com.google.android.material.card.MaterialCardView>

        <!-- Categories -->
        <HorizontalScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="24dp"
            android:clipToPadding="false"
            android:paddingHorizontal="24dp"
            android:scrollbars="none">

            <com.google.android.material.chip.ChipGroup
                android:id="@+id/categoryChips"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:singleLine="true"
                app:singleSelection="true">

                <com.google.android.material.chip.Chip
                    style="@style/Widget.Material3.Chip.Filter"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Tudo"
                    app:chipBackgroundColor="@color/colorChip"
                    app:chipStrokeWidth="0dp" />

                <com.google.android.material.chip.Chip
                    style="@style/Widget.Material3.Chip.Filter"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Italiano"
                    app:chipBackgroundColor="@color/colorChip"
                    app:chipStrokeWidth="0dp" />

                <com.google.android.material.chip.Chip
                    style="@style/Widget.Material3.Chip.Filter"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Sushi"
                    app:chipBackgroundColor="@color/colorChip"
                    app:chipStrokeWidth="0dp" />

                <com.google.android.material.chip.Chip
                    style="@style/Widget.Material3.Chip.Filter"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Hambúrgueres"
                    app:chipBackgroundColor="@color/colorChip"
                    app:chipStrokeWidth="0dp" />
            </com.google.android.material.chip.ChipGroup>
        </HorizontalScrollView>

        <!-- Featured Section -->
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="24dp"
            android:layout_marginTop="32dp"
            android:fontFamily="sans-serif-black"
            android:text="Destaques"
            android:textColor="@color/colorTextPrimary"
            android:textSize="22sp" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rvFeatured"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:clipToPadding="false"
            android:orientation="horizontal"
            android:paddingHorizontal="24dp"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
            tools:listitem="@layout/item_restaurant_featured" />

        <!-- Near You Section -->
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="24dp"
            android:layout_marginTop="32dp"
            android:fontFamily="sans-serif-black"
            android:text="Perto de si"
            android:textColor="@color/colorTextPrimary"
            android:textSize="22sp" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rvNearYou"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:clipToPadding="false"
            android:paddingHorizontal="24dp"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
            tools:listitem="@layout/item_restaurant_card" />

    </LinearLayout>
</androidx.core.widget.NestedScrollView>
