v-aistudio / style.css
bep40's picture
Cập nhật style.css với styles cho product card và layout
2e6e8fe verified
Raw
History Blame Contribute Delete
3.62 kB
/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; }
body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background: #f8f9fa;
color: #333;
line-height: 1.6;
}
/* === Header === */
.header {
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
color: white;
padding: 20px 0;
box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.header-inner {
max-width: 1100px;
margin: 0 auto;
padding: 0 20px;
text-align: center;
}
.logo {
font-size: 28px;
margin: 0;
font-weight: 700;
letter-spacing: -0.5px;
}
.tagline {
font-size: 14px;
color: rgba(255,255,255,0.7);
margin: 5px 0 0;
}
/* === Container === */
.container {
max-width: 1100px;
margin: 0 auto;
padding: 20px;
}
/* === Hero === */
.hero {
text-align: center;
padding: 30px 0 20px;
}
.hero h2 {
font-size: 24px;
color: #1a1a2e;
margin: 0 0 8px;
}
.hero p {
color: #666;
font-size: 15px;
margin: 0;
}
/* === Product List (Grid) === */
.product-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 24px;
margin: 20px 0;
}
/* === Product Card === */
.product-card {
background: white;
border-radius: 16px;
overflow: hidden;
box-shadow: 0 2px 12px rgba(0,0,0,0.06);
transition: transform 0.2s, box-shadow 0.2s;
border: 1px solid #eee;
}
.product-card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.product-card a {
text-decoration: none;
color: inherit;
display: block;
}
.product-card-img {
width: 100%;
aspect-ratio: 1;
overflow: hidden;
background: #f0f0f0;
display: flex;
align-items: center;
justify-content: center;
}
.product-card-img img {
width: 100%;
height: 100%;
object-fit: cover;
}
.product-card-img.placeholder {
background: #f8f9fa;
font-size: 48px;
color: #ccc;
}
.product-card-body {
padding: 16px;
}
.product-card-body h3 {
font-size: 16px;
font-weight: 600;
color: #222;
margin: 0 0 6px;
line-height: 1.4;
}
.prod-desc {
font-size: 13px;
color: #666;
margin: 0 0 10px;
line-height: 1.5;
}
.prod-price {
font-size: 20px;
font-weight: 700;
color: #c0392b;
margin: 0 0 8px;
}
.prod-price .old-price {
font-size: 14px;
color: #999;
text-decoration: line-through;
font-weight: 400;
margin-left: 8px;
}
.prod-status {
display: inline-block;
font-size: 12px;
padding: 3px 10px;
border-radius: 20px;
}
.prod-status.còn-hàng {
background: #e8f5e9;
color: #27ae60;
}
/* === Placeholder card === */
.product-card-placeholder .product-card-body h3 {
color: #aaa;
}
/* === Footer === */
.footer {
background: #1a1a2e;
color: rgba(255,255,255,0.7);
margin-top: 40px;
padding: 30px 0 0;
}
.footer-inner {
max-width: 1100px;
margin: 0 auto;
padding: 0 20px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 30px;
}
.footer h4 {
color: white;
margin: 0 0 10px;
font-size: 15px;
}
.footer p {
font-size: 13px;
margin: 4px 0;
line-height: 1.6;
}
.copyright {
text-align: center;
padding: 20px;
margin-top: 20px;
border-top: 1px solid rgba(255,255,255,0.1);
font-size: 13px;
}
/* === Responsive === */
@media (max-width: 600px) {
.product-list {
grid-template-columns: 1fr;
}
.logo { font-size: 22px; }
}