Generated HTML Code (Double-Click to Copy)
CSS for Product Card (Double-Click to Copy)
/* Compact Product Card Styling */
.product-card {
width: 100%;
max-width: 250px;
border: 1px solid #ddd;
border-radius: 10px;
background-color: #ffffff;
padding: 15px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
font-family: Arial, sans-serif;
text-align: center;
margin: 10px auto;
transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.product-card:hover {
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
transform: translateY(-2px);
}
/* Image Styling */
.product-card img {
max-width: 70%;
height: auto;
border-radius: 6px;
margin-bottom: 10px;
transition: transform 0.2s ease;
}
.product-card img:hover {
transform: scale(1.03);
}
/* Title Styling */
.product-card h3 {
font-size: 16px;
color: #333333;
margin-bottom: 8px;
font-weight: bold;
}
/* Specifications Table */
.specifications {
width: 100%;
border-collapse: collapse;
margin: 10px 0;
font-size: 12px;
}
.specifications th {
text-align: left;
font-weight: 600;
color: #555555;
padding: 4px 6px;
background-color: #f9f9f9;
border-bottom: 1px solid #ddd;
}
.specifications td {
padding: 4px 6px;
color: #666666;
border-bottom: 1px solid #ddd;
}
/* Rating Styling */
.rating {
font-size: 12px;
color: #ffffff;
background-color: #ffcc00;
padding: 4px 8px;
border-radius: 6px;
display: inline-block;
font-weight: bold;
margin: 8px 0;
}
/* Price and Availability Section */
.price-section {
display: flex;
align-items: center;
justify-content: space-between;
margin: 8px 0;
}
.price {
font-size: 18px;
color: #e60000;
font-weight: bold;
}
.availability {
font-size: 12px;
color: #4caf50;
font-weight: 500;
}
/* Buy Link */
.buy-link {
background-color: #ff5722;
color: white;
padding: 8px 16px;
text-decoration: none;
border-radius: 4px;
font-size: 12px;
font-weight: 600;
display: inline-block;
transition: background-color 0.2s ease;
margin-top: 10px;
}
.buy-link:hover {
background-color: #e64a19;
}
/* Responsive Design */
@media (max-width: 480px) {
.product-card {
max-width: 90%;
padding: 12px;
}
.product-card h3 {
font-size: 14px;
}
.price {
font-size: 16px;
}
.buy-link {
padding: 6px 12px;
font-size: 11px;
}
}