<?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:paddingStart="8dp"
    android:paddingTop="4dp"
    android:paddingEnd="60dp"
    android:paddingBottom="4dp">

    <!-- Product bubble only - no text message -->
    <LinearLayout
        android:id="@+id/layoutMessage"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:background="@drawable/bg_message_received"
        android:orientation="vertical"
        android:maxWidth="280dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <!-- Product card with horizontal layout -->
        <LinearLayout
            android:id="@+id/layoutProduct"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:padding="12dp"
            android:background="@android:color/transparent">

            <ImageView
                android:id="@+id/imgProduct"
                android:layout_width="60dp"
                android:layout_height="60dp"
                android:scaleType="centerCrop"
                android:background="@drawable/bg_product_inactive"
                android:src="@drawable/placeholder_image" />

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:layout_marginStart="12dp"
                android:orientation="vertical"
                android:layout_gravity="center_vertical">

                <TextView
                    android:id="@+id/tvProductName"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="Claude AI Pro - Solusi AI Canggih 1 Bulan"
                    android:textColor="@android:color/black"
                    android:textSize="14sp"
                    android:textStyle="bold"
                    android:maxLines="2"
                    android:ellipsize="end" />

                <TextView
                    android:id="@+id/tvProductPrice"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="Rp25.000"
                    android:textColor="#E91E63"
                    android:textSize="16sp"
                    android:textStyle="bold"
                    android:layout_marginTop="4dp" />

            </LinearLayout>
        </LinearLayout>

    </LinearLayout>

    <TextView
        android:id="@+id/tvTimestamp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="4dp"
        android:layout_marginTop="2dp"
        android:textColor="#888888"
        android:textSize="10sp"
        app:layout_constraintStart_toStartOf="@+id/layoutMessage"
        app:layout_constraintTop_toBottomOf="@+id/layoutMessage"
        tools:text="15:36" />

</androidx.constraintlayout.widget.ConstraintLayout>