<style>
body {
font-family: Arial, sans-serif;
background: linear-gradient(135deg, #ff0099 0%, #493240 100%);
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
}
.container {
width: 100%;
max-width: 600px;
margin: 0 auto;
padding: 20px;
text-align: justify;
color: white;
}
.product-card {
display: flex;
flex-wrap: wrap;
margin: 10px 0;
padding: 20px;
background: rgba(255, 255, 255, 0.2);
border-radius: 15px;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.3);
color: white;
transition: transform 0.3s ease;
}
.product-card:hover {
transform: translateY(-10px);
}
.product-info {
flex: 2 1 200px;
display: flex;
flex-direction: column;
justify-content: space-between;
order: 2; /* Đặt thông tin sản phẩm sau hình ảnh */
}
.product-description {
margin-bottom: 10px;
}
.product-image {
flex: 1 1 100px;
max-width: 150px;
margin-right: 20px; /* Chuyển sang margin-right */
border-radius: 10px;
order: 1; /* Đặt hình ảnh trước thông tin sản phẩm */
}
.product-image img {
width: 100%;
height: auto;
border-radius: 10px;
}
.buy-button {
background-color: rgba(255, 255, 255, 0.4);
color: #000;
border: none;
padding: 10px;
text-align: center;
border-radius: 5px;
cursor: pointer;
text-decoration: none;
font-weight: bold;
transition: background-color 0.3s ease;
}
.buy-button:hover {
background-color: rgba(255, 255, 255, 0.6);
}
@media (max-width: 600px) {
.product-card {
flex-direction: column;
align-items: center;
text-align: center;
}
.product-image {
margin-right: 0; /* Reset margin-right */
margin-top: 15px;
max-width: 100%;
}
}
</style>
<div class="container">
<p>Nội dung bên trên Product card.</p>
<div class="product-card">
<div class="product-image">
<img src="https://via.placeholder.com/150" alt="Product Image">
</div>
<div class="product-info">
<div class="product-description">
<h3>Sản phẩm ABC</h3>
<p>
Mô Tả Sản Phẩm
</p>
</div>
<a href="#" class="buy-bu
tton">Mua Ngay</a>
</div>
</div>
<p>
Nội dung bên dưới Product Card
</p>
</div>