:root {
    --primary: #e63946;
    --primary-light: #f4a261;
    --warm: #fff8f0;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #fff;
}

/* Sản phẩm tạm ngưng — ảnh nhạt màu nhẹ để phân biệt nhưng vẫn hấp dẫn */
.product-img-paused {
    filter: grayscale(35%);
    opacity: 0.85;
}

/* Tiêu đề cách điệu (tên danh mục, section trang chủ) — phông viết tay, màu thương hiệu */
.section-title-script {
    font-family: 'Dancing Script', cursive;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

/* Navbar */
.navbar-brand { font-size: 1.3rem; letter-spacing: -0.5px; }

/* Menu chính — mục đang chọn thành "viên kẹo" gradient, hover có gạch chân kem bơ */
.main-menu .nav-link {
    position: relative;
    font-weight: 500;
    margin: 0 0.15rem;
    padding: 0.45rem 1rem !important;
    border-radius: 2rem;
    transition: color 0.25s ease, transform 0.2s ease;
}
.main-menu .nav-link::after {
    content: '';
    position: absolute;
    left: 50%; bottom: 3px;
    width: 0; height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transform: translateX(-50%);
    transition: width 0.3s ease;
}
.main-menu .nav-link:hover {
    color: var(--primary) !important;
    transform: translateY(-1px);
}
.main-menu .nav-link:hover::after { width: 55%; }
.main-menu .nav-link.active {
    color: #fff !important;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.35);
    transform: none;
}
.main-menu .nav-link.active::after { width: 0; }
.main-menu .nav-link.active::before {
    content: '🧁';
    position: absolute;
    top: -13px; right: -2px;
    font-size: 0.9rem;
    animation: nav-cupcake 1.8s ease-in-out infinite;
}
@keyframes nav-cupcake {
    0%, 100% { transform: translateY(0) rotate(-10deg); }
    50%      { transform: translateY(-4px) rotate(10deg); }
}
/* Khi menu thu gọn trên mobile: bỏ hiệu ứng nhấc lên, thêm khoảng thở */
@media (max-width: 991.98px) {
    .main-menu .nav-link { margin: 0.15rem 0; display: inline-block; }
    .main-menu .nav-link.active::before { right: auto; left: -4px; }
}

/* Hero — ảnh nền banner tại wwwroot/images/hero-banner.jpg.
   3 lớp: phủ tối nhẹ (chữ dễ đọc) → ảnh banner → gradient dự phòng khi thiếu ảnh */
.hero-section {
    background:
        linear-gradient(rgba(45, 27, 18, 0.40), rgba(45, 27, 18, 0.40)),
        url('../images/hero-banner.jpg') center / cover no-repeat,
        linear-gradient(135deg, #e63946, #f4a261);
}
.hero-section h1,
.hero-section .lead { text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); }

/* Section title */
.section-title {
    font-weight: 700;
    font-size: 1.4rem;
    position: relative;
    padding-bottom: 8px;
    margin-bottom: 1rem;
}
.section-title::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 50px; height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* Product card */
.product-card { transition: transform 0.2s, box-shadow 0.2s; border-radius: 12px !important; overflow: hidden; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12) !important; }

.product-img-wrap { height: 200px; overflow: hidden; }
.product-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.product-card:hover .product-img { transform: scale(1.05); }
.product-img-placeholder { height: 200px; }

.product-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Category card — nổi lên + ảnh phóng to nhẹ khi hover để báo hiệu "bấm được" */
.category-card {
    background: var(--warm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    border-radius: 14px;
}
.category-card:hover {
    background: #fff;
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(230, 57, 70, 0.18);
}
.category-img {
    width: 100px; height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease;
}
.category-card:hover .category-img { transform: scale(1.08); }
.category-icon {
    width: 100px; height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Zalo floating button */
.zalo-float {
    position: fixed;
    bottom: 30px; right: 24px;
    z-index: 9999;
    width: 56px; height: 56px;
    background: #0068ff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(0,104,255,.5);
    animation: pulse 2s infinite;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 0.7rem;
}
.zalo-float img { width: 36px; height: 36px; object-fit: contain; }
.zalo-float span { color: white; font-size: 0.65rem; }
@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(0,104,255,.5); }
    50% { box-shadow: 0 4px 24px rgba(0,104,255,.8); }
}

/* Footer links */
.footer-link:hover { color: #fff !important; }

/* Product description — cũng dùng cho nội dung bài viết ở Blog/Detail.
   Nội dung soạn bằng TinyMCE nên phải style đủ các thẻ editor sinh ra. */
.product-description { line-height: 1.8; font-size: 1rem; color: #333; }
.product-description > *:first-child { margin-top: 0; }
.product-description > *:last-child { margin-bottom: 0; }

.product-description p { line-height: 1.8; margin-bottom: 1rem; }

.product-description h1,
.product-description h2,
.product-description h3,
.product-description h4,
.product-description h5 {
    margin-top: 1.75rem;
    margin-bottom: .75rem;
    font-weight: 600;
    line-height: 1.35;
    color: #b23a48;
}
.product-description h1 { font-size: 1.5rem; }
.product-description h2 { font-size: 1.3rem; }
.product-description h3 { font-size: 1.15rem; }
.product-description h4,
.product-description h5 { font-size: 1.05rem; }

.product-description ul,
.product-description ol { margin-bottom: 1rem; padding-left: 1.4rem; }
.product-description li { margin-bottom: .4rem; }

.product-description img { max-width: 100%; height: auto; border-radius: 8px; margin: .75rem 0; }

.product-description a { color: #b23a48; }

.product-description blockquote {
    margin: 1rem 0;
    padding: .5rem 0 .5rem 1rem;
    border-left: 3px solid #f0c4ca;
    color: #666;
    font-style: italic;
}

.product-description hr { margin: 1.5rem 0; opacity: .15; }

/* Bảng do editor chèn — cuộn ngang trên mobile thay vì phá vỡ layout */
.product-description table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
}
.product-description th,
.product-description td { border: 1px solid #e5e5e5; padding: .5rem .65rem; }
.product-description th { background: #faf6f7; font-weight: 600; }

/* Responsive tweaks */
@media (max-width: 576px) {
    .hero-section h1 { font-size: 1.8rem; }
    .product-img-wrap { height: 150px; }
}

/* Product detail gallery */
.product-thumb { border: 2px solid transparent; opacity: .75; transition: all .15s ease; }
.product-thumb:hover { opacity: 1; }
.product-thumb-active { border-color: #dc3545; opacity: 1; }

/* Promo banner (mã giảm giá trang chủ) */
.promo-banner {
    background: linear-gradient(90deg, #fff3cd, #ffe0e0);
    border: 1px dashed var(--primary);
    color: #7a2e35;
}
.promo-code {
    background: var(--primary);
    color: #fff;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: monospace;
}

/* USP strip (dạng có nền — còn dùng ở trang Về Thảo My) */
.usp-item { background: var(--warm); transition: transform .2s; }
.usp-item:hover { transform: translateY(-3px); }

/* USP tối giản trang chủ: chỉ icon + chữ trên nền trắng */
.usp-minimal i {
    font-size: 2rem;
    color: var(--primary);
    display: inline-block;
    transition: transform 0.25s ease;
}
.usp-minimal:hover i { transform: translateY(-3px) scale(1.12); }

/* Testimonials */
.testimonial-section { background: var(--warm); }

/* Blog card */
.post-card { border-radius: 12px !important; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12) !important; }

/* Hộp quà tặng ở checkout */
.gift-box { background: var(--warm); border: 1px dashed var(--primary-light); }
