<template>
    <div class="hello">
        <header>
            <h1>Coffee Menu</h1>
            <div class="menu2">
                <h2>咖啡菜单</h2>
                <div class="divider-container">
                    <div class="divider-pink">
                    </div>
                    <div class="divider-green">
                    </div>
                    <div class="divider-orange">
                    </div>
                </div>
            </div>
        </header>
        <div class="menu-container">
            <li v-for="item in coffeeList" :key="item.productName">
                <div class="menu-item">
                    <img src="../assets/coffee1.png" alt="Golden Iced Coffee">
                    <div class="menu-item-content">
                        <h3 class="menu-item-title">{{ item.productName }}</h3>
                        <p class="menu-item-details">{{ item.temperature }}</p>
                        <p class="menu-item-details">{{ item.capacity }}</p>
                        <p class="menu-item-price">{{ item.price }}</p>
                    </div>
                </div>
            </li>
            <!-- Sample Menu Item -->

            <!-- Repeat similar blocks for other menu items -->
        </div>
    </div>
</template>

<script setup>
const coffeeList = [
    {
        productName: "金典冷萃咖啡",
        image: "path-to-image.jpg",
        temperature: "冷",
        capacity: "400ml",
        price: 33,
    },
    {
        productName: "拿铁",
        image: "path-to-image.jpg",
        temperature: "热",
        capacity: "400ml",
        price: 30,
    },
    {
        productName: "摩卡",
        image: "path-to-image.jpg",
        temperature: "热",
        capacity: "400ml",
        price: 35,
    },
    {
        productName: "卡布奇诺",
        image: "path-to-image.jpg",
        temperature: "热",
        capacity: "400ml",
        price: 30,
    },
    {
        productName: "美式",
        image: "path-to-image.jpg",
        temperature: "热",
        capacity: "400ml",
        price: 25,
    },
    {
        productName: "馥芮白",
        image: "path-to-image.jpg",
        temperature: "冷",
        capacity: "400ml",
        price: 35,
    },
    {
        productName: "焦糖玛奇朵",
        image: "path-to-image.jpg",
        temperature: "热",
        capacity: "400ml",
        price: 35,
    },
    {
        productName: "抹茶拿铁",
        image: "path-to-image.jpg",
        temperature: "热",
        capacity: "400ml",
        price: 35,
    },
    {
        productName: "冰美式",
        image: "path-to-image.jpg",
        temperature: "冷",
        capacity: "400ml",
        price: 25,
    },
    {
        productName: "冰拿铁",
        image: "path-to-image.jpg",
        temperature: "冷",
        capacity: "400ml",
        price: 30,
    },
    {
        productName: "冰摩卡",
        image: "path-to-image.jpg",
        temperature: "冷",
        capacity: "400ml",
        price: 35,
    },
    {
        productName: "冰卡布奇诺",
        image: "path-to-image.jpg",
        temperature: "冷",
        capacity: "400ml",
        price: 30,
    },
]
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.menu2 {
    display: flex;
    flex-wrap: nowrap;
}

.divider-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 70%;
    margin-top: 10px;
    margin-left: 7px;
    padding: 0;
}

.divider-pink, .divider-green, .divider-orange {
    height: 13px;
    width: 33%;
    margin: 0px;
}
.divider-pink {
    background-color: #e91e63;
}
.divider-green {
    background-color: #4caf50;
}
.divider-orange {
    background-color: #ff9800;
}

.hello {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    height: 100%;
    width: 100%;
}

header {
    text-align: left;
    background-color: #ffffff;
    padding: 20px;
    padding-left: 80px;
    border-bottom: 2px solid #ddd;
}

header h1 {
    margin-left: 20px;
    margin-top: 0px;
    margin-bottom: 0px;
    font-size: 2.1rem;
}

header h2 {
    margin-left: 20px;
    margin-top: 0px;
    margin-bottom: 0px;
    font-size: 1.5rem;
    color: #777;
}

.menu-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
}

.menu-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 15px;
    width: 280px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.menu-item img {
    width: 100%;
    height: auto;
}

.menu-item-content {
    padding: 15px;
}

.menu-item-title {
    font-size: 1.2rem;
    margin: 0;
    color: #333;
}

.menu-item-details {
    margin: 10px 0;
    font-size: 0.9rem;
    color: #555;
}

.menu-item-price {
    font-size: 1rem;
    color: #e91e63;
    font-weight: bold;
}
</style>