/* --- CÀI ĐẶT CHUNG & MÀU SẮC --- */
:root {
    --primary-pink: #FFB6C1; /* Hồng nhạt dễ thương */
    --dark-pink: #FF69B4; /* Hồng đậm tạo điểm nhấn */
    --bg-cream: #FFF5EE; /* Nền màu kem mây */
    --text-brown: #5C4033; /* Chữ màu nâu chocolate */
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-cream);
    color: var(--text-brown);
}

/* --- HEADER & MENU ĐIỀU HƯỚNG --- */
header {
    background-color: var(--primary-pink);
    padding: 15px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

h1 {
    color: var(--white);
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--white);
    font-weight: bold;
    font-size: 1.1em;
    padding: 5px 15px;
    border-radius: 20px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: var(--white);
    color: var(--primary-pink);
}

/* --- CSS GRID: BỐ CỤC CHÍNH --- */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: 3fr 1fr; /* Chia 2 cột: Trái 3 phần, Phải 1 phần */
    gap: 20px;
}

/* --- CỘT TRÁI: DANH SÁCH SẢN PHẨM --- */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Tự động chia cột nhỏ bên trong */
    gap: 20px;
}

.product-card {
    background: var(--white);
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px dashed transparent;
}

/* Hiệu ứng hover sản phẩm */
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255,182,193,0.5);
    border-color: var(--primary-pink);
}

.product-card img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 10px;
}

.product-card h3 {
    color: var(--dark-pink);
    margin-bottom: 5px;
}

.product-card p {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 15px;
}

.price {
    display: block;
    font-weight: bold;
    font-size: 1.2em;
    color: var(--dark-pink);
    margin-bottom: 15px;
}

.buy-btn {
    background-color: var(--primary-pink);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.buy-btn:hover {
    background-color: var(--dark-pink);
}

/* --- CỘT PHẢI: THANH BÊN (SIDEBAR) --- */
.sidebar {
    background: var(--white);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: fit-content;
}

.sidebar h3 {
    color: var(--dark-pink);
    margin-bottom: 10px;
    text-align: center;
}

.sidebar p {
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.social-links {
    list-style: none;
}

.social-links li {
    margin-bottom: 10px;
}

.social-links a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--white);
    border-radius: 10px;
    font-weight: bold;
    transition: opacity 0.3s;
}

.social-links a:hover {
    opacity: 0.8;
}

/* Màu riêng cho từng mạng xã hội */
.fb { background-color: #3b5998; }
.tw { background-color: #1da1f2; }
.ig { background-color: #e1306c; }
.in { background-color: #0077b5; }

/* --- FOOTER --- */
footer {
    background-color: var(--text-brown);
    color: var(--bg-cream);
    padding: 40px 20px;
    margin-top: 50px;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Chân trang 3 cột */
    gap: 20px;
    max-width: 100%;
}

.footer-col h4 {
    color: var(--primary-pink);
    margin-bottom: 15px;
}

.footer-col p {
    line-height: 1.6;
    font-size: 0.9em;
}


@media (max-width: 768px) {
    /* Gom thành 1 cột trên thiết bị di động */
    .container {
        grid-template-columns: 1fr; 
    }
    
    footer {
        grid-template-columns: 1fr; /* Các cột footer xếp chồng lên nhau */
        text-align: center;
    }
    
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
}

button{
margin:5px;
padding:8px 15px;
border:none;
border-radius:5px;
cursor:pointer;
background:#00b894;
color:white;
}

button:hover{
background:#019875;
}

.sidebar{
flex:1;
background:#ffeaa7;
padding:20px;
border-radius:10px;
margin-left:20px;
}

.contact{
background:white;
padding:20px;
text-align:center;
}

footer{
background:#00b894;
color:white;
text-align:center;
padding:15px;
}

.detail{
text-align:center;
padding:40px;
}

.detail img{
width:300px;
border-radius:10px;
}
/* SOCIAL FLOAT */
.social-float{
position: fixed;
right: 20px;
bottom: 100px;
display: flex;
flex-direction: column;
gap: 15px;
z-index: 999;
}

.social-float a{
width: 50px;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
color: white;
font-size: 22px;
text-decoration: none;
box-shadow: 0 4px 10px rgba(0,0,0,0.2);
transition: 0.3s;
}

.social-float a:hover{
transform: scale(1.1);
}

/* Màu riêng từng mạng xã hội */
.zalo{
background: #0068ff;
}

.facebook{
background: #1877f2;
}

.instagram{
background: linear-gradient(45deg,#feda75,#d62976,#962fbf,#4f5bd5);
}

.tiktok{
background: black;
}
.product-card img{
width:100%;
height:220px;
object-fit:cover;
border-radius:12px;
transition:0.4s;
}

.product-card:hover img{
transform:scale(1.05);
}
/* BANNER */
.banner{
height:400px;
background: url("images/banner.jpg") center/cover no-repeat;
display:flex;
flex-direction:column;
justify-content:center;
align-items:center;
color:white;
text-align:center;
}

.banner h1{
font-size:50px;
margin-bottom:10px;
text-shadow:0 4px 10px rgba(0,0,0,0.4);
}

.banner p{
font-size:20px;
margin-bottom:20px;
}

.banner-btn{
padding:12px 25px;
background:#00b894;
color:white;
text-decoration:none;
border-radius:30px;
font-weight:bold;
transition:0.3s;
}

.banner-btn:hover{
background:#019875;
transform:scale(1.05);
}
/* --- 1. CĂN GIỮA TÊN TIỆM (HEADER) --- */
header {
    background: var(--primary-pink);
    padding: 30px 0; /* Tăng khoảng cách trên dưới cho thoáng */
    text-align: center;
}

header h1 {
    margin: 0 auto 15px; /* Căn giữa h1 và tạo khoảng cách với menu */
    font-size: 2.2em;
    display: block;
}

nav ul {
    justify-content: center; /* Đảm bảo menu luôn nằm giữa */
    padding: 0;
}

/* --- 2. ĐIỀU CHỈNH HÌNH ẢNH SẢN PHẨM NHỎ LẠI & CÂN ĐỐI --- */
.product-card img {
    width: 100%;
    max-width: 180px; /* Giới hạn độ rộng của ảnh bánh */
    height: 140px;    /* Cố định chiều cao để không bị lệch hàng */
    object-fit: cover; /* Cắt ảnh vừa khung mà không bị méo */
    margin: 0 auto 15px;
    display: block;
    border-radius: 12px;
}

.product-card h3 {
    font-size: 1.1em;
    margin-bottom: 5px;
}

/* --- 3. LÀM PHẦN KHUYẾN MÃI NHỎ LẠI --- */
.promo-box {
    margin-top: 20px;
    border: 1px dashed var(--dark-pink); /* Nét đứt mảnh hơn */
    padding: 12px;
    background-color: #fff9fa;
    border-radius: 10px;
}

.promo-text {
    font-size: 0.85em; /* Làm chữ khuyến mãi nhỏ hơn sản phẩm */
    line-height: 1.4;
    color: #666;
}
/* --- TỐI ƯU HÌNH ẢNH TRONG TRANG CHI TIẾT --- */
.detail-container {
    /* Căn giữa toàn bộ nội dung của trang chi tiết */
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    text-align: center; /* Căn giữa chữ */
    padding: 20px;
}

.detail-container img {
    /* 1. Làm nhỏ ảnh lại */
    max-width: 300px; /* Chiều rộng tối đa là 300px, bạn có thể tăng giảm tùy ý */
    height: auto;    /* Giữ nguyên tỉ lệ ảnh, không bị méo */
    
    /* 2. Căn giữa ảnh */
    margin: 0 auto 20px auto; /* Căn giữa theo chiều ngang và tạo khoảng cách dưới 20px */
    display: block;          /* Bắt buộc để margin: auto hoạt động */
    
    /* 3. Trang trí thêm (tùy chọn) */
    border-radius: 15px;      /* Bo góc ảnh cho mềm mại */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* Thêm bóng đổ nhẹ */
}