<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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="wrap_content"
    android:paddingTop="1dp"
    android:paddingBottom="1dp"
    >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="400dp"
        android:layout_marginTop="1dp"
        android:background="@color/white"
        android:orientation="horizontal"
        android:gravity="center"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <TextView
            android:id="@+id/textPosition"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_marginStart="5dp"
            android:layout_marginEnd="2dp"
            android:layout_weight="0.3"
            android:gravity="center"
            android:text="0"
            android:textSize="16sp"
            android:textStyle="bold"
            android:visibility="gone" />

        <RelativeLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="3"
            android:paddingTop="5dp"
            android:paddingBottom="5dp">

            <ImageView
                android:id="@+id/imageProductPicture"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:adjustViewBounds="true"
                android:scaleType="fitCenter"
                android:src="@drawable/default_product"
                app:layout_constraintDimensionRatio="16:9" />

            <TextView
                android:id="@+id/productSlot"
                android:layout_width="50dp"
                android:layout_height="30dp"
                android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"
                android:background="@drawable/rounded_background"
                android:gravity="center"
                android:text="000"
                android:textColor="@color/white"
                android:textSize="20sp"
                android:layout_alignParentTop="true"
                android:layout_alignParentEnd="true" />
            <TextView
                android:id="@+id/productRemaining"
                android:layout_width="40dp"
                android:layout_height="30dp"
                android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"
                android:background="@drawable/rounded_background_gary"
                android:gravity="center"
                android:textSize="18sp"
                android:layout_below="@id/productSlot"
                android:layout_alignEnd="@id/productSlot" />
        </RelativeLayout>

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="@color/white"
            android:gravity="center"
            android:orientation="vertical"
            tools:layout_editor_absoluteY="1dp">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center_vertical"
                android:paddingStart="10dp"
                android:orientation="horizontal">

                <TextView
                    android:id="@+id/textProductName"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center"
                    android:text="@string/product_name"
                    android:textSize="24sp"
                    android:textStyle="bold" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@color/white"
                android:orientation="horizontal">

                <TextView
                    android:id="@+id/textPrice"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:gravity="center"
                    android:text="NT $0"
                    android:textSize="80sp"
                    android:textColor="@color/error"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/textCount"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:gravity="center"
                    android:text="x0"
                    android:visibility="gone"
                    android:textSize="24sp"
                    android:textStyle="bold" />
            </LinearLayout>
        </LinearLayout>

        <LinearLayout
            android:id="@+id/layout_edit_count"
            android:layout_width="160dp"
            android:layout_height="match_parent"
            android:layout_weight="0.1"
            android:gravity="center"
            android:orientation="horizontal"
            android:visibility="gone">

            <Button
                android:id="@+id/buttonSubtraction"
                android:layout_width="80dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:backgroundTint="@color/light_gray"
                android:text="-1"
                android:textColor="@color/white"
                android:textSize="24sp"
                android:textStyle="bold" />

            <Button
                android:id="@+id/buttonAddition"
                android:layout_width="80dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:backgroundTint="@color/light_gray"
                android:text="+1"
                android:textColor="@color/white"
                android:textSize="24sp"
                android:textStyle="bold" />
        </LinearLayout>
    </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>