/* ================= CÀI ĐẶT CHUNG ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f6f9;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ================= HEADER TỔNG HỢP ================= */
/* 1. Top Bar (Đăng nhập, Đăng ký) */
.top-bar {
    background-color: #2c3e50;
    color: white;
    font-size: 13px;
    padding: 8px 0;
}
.top-bar-content {
    display: flex;
    justify-content: space-between;
}
.user-actions a {
    color: white;
    text-decoration: none;
    margin: 0 5px;
    transition: color 0.3s;
}
.user-actions a:hover {
    color: #ff6b6b;
}

/* 2. Main Header (Logo, Tìm kiếm, Giỏ hàng) */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
    background-color: white;
}
.logo {
    font-size: 32px;
    font-weight: bold;
    color: #ff6b6b;
}

/* Khung Tìm Kiếm */
.search-bar {
    display: flex;
    width: 40%;
}
.search-bar input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ff6b6b;
    border-radius: 5px 0 0 5px;
    outline: none;
}
.search-bar button {
    padding: 10px 20px;
    background-color: #ff6b6b;
    color: white;
    border: 2px solid #ff6b6b;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-weight: bold;
}
.search-bar button:hover {
    background-color: #e63946;
}

/* Giỏ hàng */
.cart a {
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    border: 2px solid #2c3e50;
    padding: 10px 15px;
    border-radius: 5px;
    transition: 0.3s;
}
.cart a:hover {
    background-color: #2c3e50;
    color: white;
}

/* 3. Menu Ngang */
.horizontal-menu {
    background-color: #ff6b6b;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.horizontal-menu ul {
    list-style: none;
    display: flex;
}
.horizontal-menu a {
    display: block;
    padding: 15px 25px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s;
}
.horizontal-menu a:hover {
    background-color: #e63946;
}

/* ================= BỐ CỤC CHÍNH (LAYOUT 2 CỘT) ================= */
.main-wrapper {
    display: flex;
    gap: 25px;
    margin-top: 30px;
    align-items: flex-start; /* Giúp menu dọc không bị kéo dài bằng nội dung */
}

/* 4. Menu Dọc (Sidebar) */
.vertical-menu {
    width: 250px;
    flex-shrink: 0; /* Giữ cố định độ rộng */
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.vertical-menu h3 {
    font-size: 18px;
    color: #ff6b6b;
    border-bottom: 2px solid #ffe66d;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.vertical-menu ul {
    list-style: none;
}
.vertical-menu li {
    border-bottom: 1px solid #eee;
}
.vertical-menu li:last-child {
    border-bottom: none;
}
.vertical-menu a {
    display: block;
    padding: 12px 5px;
    color: #333;
    text-decoration: none;
    transition: 0.3s;
}
.vertical-menu a:hover {
    color: #ff6b6b;
    padding-left: 10px; /* Hiệu ứng đẩy chữ nhẹ sang phải */
    font-weight: bold;
}

/* Nội dung bên phải */
main {
    flex-grow: 1; /* Chiếm hết phần không gian còn lại */
}

/* ================= ĐỊNH DẠNG CÁC SECTION NỘI DUNG ================= */
section {
    background-color: white;
    margin-bottom: 30px;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    scroll-margin-top: 70px;
}
.section-title {
    color: #ff6b6b;
    border-bottom: 3px solid #ffe66d;
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 25px;
}

.brand-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}
.brand-header .brand-label {
    display: inline-block;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #888;
    background: #ffebe8;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #ffd4cf;
}
.brand-header .brand-title {
    margin: 0;
    font-size: 26px;
    color: #1f3044;
}
.brand-intro {
    background-color: #f9f5ff;
    border: 1px solid #e6d8ff;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 30px;
}
.brand-intro p {
    color: #3a3f51;
    line-height: 1.8;
    font-size: 16px;
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.brand-card {
    background: white;
    border: 1px solid #f0f0f5;
    border-radius: 24px;
    overflow: hidden;
    text-align: center;
    padding: 28px 18px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(34, 62, 104, 0.12);
}
.brand-card img {
    width: 100%;
    max-width: 220px;
    height: auto;
    margin-bottom: 18px;
    filter: saturate(0.95);
}
.brand-card span {
    display: block;
    margin-top: 12px;
    font-size: 17px;
    font-weight: 700;
    color: #1f3044;
}

@media (max-width: 960px) {
    .brand-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .brand-grid {
        grid-template-columns: 1fr;
    }
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.product-card {
    background: #ffffff;
    border: 1px solid #eef2f5;
    border-radius: 20px;
    box-shadow: 0 16px 30px rgba(34, 62, 104, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 40px rgba(34, 62, 104, 0.12);
}
.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.product-info {
    padding: 20px;
    flex-grow: 1;
}
.product-info h3 {
    font-size: 18px;
    color: #1f3044;
    margin-bottom: 10px;
}
.product-info .price {
    color: #ff6b6b;
    font-size: 17px;
    font-weight: 700;
    margin-top: 8px;
}
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: #ff6b6b;
    color: white;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-mua {
    margin: 0 20px 20px;
    padding: 12px 0;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}
.btn-mua:hover {
    background-color: #e63946;
    transform: translateY(-1px);
}

@media (max-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    .product-card img {
        height: 260px;
    }
}

/* Sản phẩm */
/* ================= CSS CHO SẢN PHẨM TRƯỢT NGANG ================= */
#trangchu {
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.product-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    padding: 20px 0;
    overflow: visible;
    width: 100%;
    max-width: calc(4 * 320px + 3 * 18px + 40px);
    margin: 0 auto;
}

.featured-products-section {
    padding: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    padding: 25px 20px 0;
}

.section-label {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #db0024;
    font-weight: 800;
    font-size: 12px;
    margin-bottom: 10px;
}

.section-header h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.section-header p {
    color: #626f7f;
    max-width: 570px;
}

.slider-hint {
    font-size: 14px;
    color: #7a8a9a;
    padding: 12px 18px;
    background: #f7fafc;
    border-radius: 999px;
    border: 1px solid #e8eef3;
}

.slider-hint-btn {
    display: inline-block;
    font-size: 14px;
    color: #fff;
    background-color: #ff6b6b;
    padding: 12px 18px;
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid #ff6b6b;
    transition: background-color 0.3s, color 0.3s;
    font-weight: bold;
}

.slider-hint-btn:hover {
    background-color: #e63946;
    color: #fff;
}

/* Vùng chứa cuộn ngang */
.product-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 20px;
    background-color: #f8fafc;
    border-radius: 20px;
    border: 1px solid #eef3f8;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    scroll-behavior: smooth;
}
.product-row::-webkit-scrollbar {
    display: none;
}

/* Banner dọc đầu tiên */
.promo-card {
    flex: 0 0 320px; /* Chiều rộng cố định */
    min-height: 450px;
    scroll-snap-align: start;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 18px 40px rgba(0,0,0,0.08);
}
.promo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.promo-card .promo-tag {
    position: absolute;
    bottom: 18px;
    left: 18px;
    background: rgba(255, 255, 255, 0.95);
    color: #2c3e50;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* Thẻ Sản Phẩm */
.product-item {
    flex: 0 0 320px; /* Chiều rộng cố định cho mỗi thẻ */
    border: 1px solid #edf2f7;
    border-radius: 24px;
    padding: 20px;
    position: relative;
    background: white;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(16, 24, 40, 0.08);
    border-color: #d9e2ec;
}

/* Badge Giảm Giá */
.discount-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #db0024 100%);
    color: white;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(219, 0, 36, 0.2);
    z-index: 2;
}

/* Hình ảnh sản phẩm */
.product-img {
    width: 100%;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 18px;
    background: #f7fafc;
}
.product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Thông tin phụ (Danh mục & Mã SP) */
.product-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #7a8a9a;
    margin-bottom: 12px;
    text-transform: uppercase;
    gap: 10px;
}

/* Tên Sản Phẩm */
.product-title {
    font-size: 15px;
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 18px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Giá Sản Phẩm */
.product-price {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 18px;
}
.new-price {
    color: #db0024;
    font-size: 18px;
    font-weight: 800;
}
.old-price del {
    color: #9ca3af;
    font-size: 13px;
}

/* Khối Nút Bấm */
.product-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}
.btn-add-cart {
    flex: 1;
    background-color: #db0024;
    color: white;
    border: none;
    padding: 12px 0;
    border-radius: 14px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.btn-add-cart:hover {
    background-color: #b3001d;
    transform: translateY(-1px);
}
.btn-wishlist {
    background: #fff5f6;
    border: 1px solid #ffccd5;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 20px;
    color: #db0024;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s ease;
}
.btn-wishlist:hover {
    transform: scale(1.08);
    background-color: #ffebee;
}

/* ================= NÚT MŨI TÊN TRƯỢT NGANG ================= */
.slider-btn {
    background: white;
    border: 1px solid #db0024;
    color: #db0024;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    position: absolute;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 12px 32px rgba(219, 0, 36, 0.12);
}
.slider-btn:hover {
    background: #db0024;
    color: white;
}
.slider-btn:disabled {
    opacity: 0.4;
    cursor: default;
    background: #fff;
    color: #db0024;
    border-color: #e2e8f0;
}
.prev-btn {
    left: -17px;
}
.next-btn {
    right: -17px;
}


/* Giới thiệu & Lab */
.content-box {
    background-color: #fdf5e6;
    border: 1px solid #ffe0b2;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.blog-hero {
    background: linear-gradient(135deg, #f5f7ff 0%, #fff7f2 100%);
    border-color: #dbe5ff;
}
.blog-intro {
    margin-bottom: 26px;
}
.blog-intro .eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.12);
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.blog-intro h3 {
    margin: 0 0 12px;
    font-size: 28px;
    color: #1f2937;
    line-height: 1.2;
}
.blog-intro p {
    margin: 0;
    color: #475569;
    font-size: 16px;
    line-height: 1.8;
    max-width: 700px;
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.blog-card {
    overflow: hidden;
    border-radius: 24px;
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
}
.blog-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}
.blog-card-content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.blog-card-content h3 {
    margin: 0;
    font-size: 20px;
    color: #111827;
    line-height: 1.3;
}
.blog-card-content p {
    margin: 0;
    color: #4b5563;
    line-height: 1.75;
}
.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.meta-row small {
    color: #6b7280;
}
.read-more {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}
.read-more:hover {
    text-decoration: underline;
}
@media (max-width: 1100px) {
    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 760px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .blog-card img {
        height: 220px;
    }
}

.hero-section {
    background: linear-gradient(135deg, #fff8f2 0%, #f7f0ff 100%);
    border-color: #ffddc5;
}
.hero-text {
    max-width: 720px;
}
.hero-text .eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    color: #c0392b;
    background: rgba(255, 108, 108, 0.12);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.hero-text h3 {
    margin: 0 0 14px;
    color: #1f3044;
    font-size: 28px;
    line-height: 1.2;
}
.hero-text p {
    margin: 0;
    color: #4b5563;
    font-size: 16px;
    line-height: 1.8;
}

.brand-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}
.brand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
    background-color: #ff6b6b;
    color: white;
    border: 1px solid transparent;
}
.brand-btn:hover {
    transform: translateY(-1px);
    background-color: #e63946;
}
.brand-btn.outline {
    background-color: transparent;
    color: #ff6b6b;
    border-color: #ff6b6b;
}
.brand-btn.active {
    background-color: #ff6b6b;
    color: white;
}
@media (max-width: 860px) {
    .hero-text h3 {
        font-size: 24px;
    }
}
@media (max-width: 680px) {
    .hero-text h3 {
        font-size: 22px;
    }
    .brand-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .brand-btn {
        width: 100%;
    }
}

.lab-hero {
    background: linear-gradient(135deg, #f8fbff 0%, #fdf6f9 100%);
    border-color: #dbe9ff;
}

.lab-header {
    margin-bottom: 24px;
}

.lab-header .eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(54, 116, 255, 0.12);
    color: #1e40af;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
}

.lab-header h3 {
    margin: 0 0 12px;
    font-size: 26px;
    color: #1f3044;
    line-height: 1.2;
}

.lab-header p {
    margin: 0;
    color: #4b5563;
    line-height: 1.8;
    max-width: 720px;
}

.lab-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.lab-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    min-height: 310px;
    border-radius: 24px;
    background: white;
    border: 1px solid #eef2f6;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
    text-decoration: none;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.lab-card:hover {
    transform: translateY(-4px);
    border-color: #dbeafe;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.09);
}

.lab-number {
    display: inline-block;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #eef2ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
}

.lab-card h4 {
    margin: 0 0 12px;
    font-size: 20px;
    color: #111827;
}

.lab-card p {
    margin: 0;
    color: #475569;
    line-height: 1.75;
    font-size: 14px;
}

.lab-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.lab-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    background-color: #ff6b6b;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.lab-link-btn:hover {
    background-color: #e63946;
}

@media (max-width: 1100px) {
    .lab-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .lab-grid {
        grid-template-columns: 1fr;
    }

    .lab-links {
        flex-direction: column;
    }
}

.lab-card-multi {
    display: flex;
    flex-direction: column;
}

.lab-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.lab-link-btn {
    padding: 10px 14px;
    border-radius: 8px;
    background-color: #dbeafe;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    transition: background-color 0.25s ease, color 0.25s ease;
    border: 1px solid #bfdbfe;
}

.lab-link-btn:hover {
    background-color: #93c5fd;
    color: white;
}

@media (max-width: 1100px) {
    .lab-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .lab-grid {
        grid-template-columns: 1fr;
    }
}

.info-group {
    margin-bottom: 25px;
    padding: 18px;
    border: 1px solid #ffe6c3;
    border-radius: 8px;
    background-color: white;
}

.info-group h3 {
    margin-bottom: 10px;
    color: #ff6b6b;
    font-size: 18px;
}

.info-group p,
.info-group ul {
    color: #444;
    line-height: 1.8;
}

.info-group ul,
.lab-list {
    margin-left: 20px;
    margin-top: 10px;
}

.info-group li,
.lab-list li {
    margin-bottom: 10px;
}

.lab-list a {
    color: #2980b9;
    text-decoration: none;
}

.lab-list a:hover {
    color: #ff6b6b;
    text-decoration: underline;
}

/* ================= FOOTER ================= */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}
/* ================= LIÊN HỆ & KHUYẾN MÃI ================= */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
}
.contact-form input, .contact-form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    width: 100%;
}
.contact-form button {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    width: 150px;
}
.contact-form button:hover {
    background-color: #e63946;
}
    .contact-form .form-field {
        margin-bottom: 18px;
    }
    .contact-form .field-error {
        display: none;
        color: #d90429;
        font-size: 0.9rem;
        margin-top: 6px;
        min-height: 18px;
    }
    .contact-form .form-message {
        margin-top: 14px;
        font-size: 14px;
        line-height: 1.5;
        padding: 12px 14px;
        border-radius: 8px;
        display: none;
    }
    .contact-form .form-message.success {
        display: block;
        background-color: #e6ffed;
        color: #1d7a2c;
        border: 1px solid #8fca99;
    }
    .contact-form .form-message.error {
        display: block;
        background-color: #ffe7e4;
        color: #9f2a2c;
        border: 1px solid #f5a1a1;
    }
    .contact-form input.input-error,
    .contact-form textarea.input-error {
        border-color: #e63946;
        box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.12);
    }
.discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    background: linear-gradient(135deg, #ff6b6b 0%, #e63946 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    box-shadow: 0 6px 18px rgba(230, 57, 70, 0.35);
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

.price-sale {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.original-price {
    text-decoration: line-through;
    color: #aaa;
    font-size: 14px;
}

.sale-price {
    color: #e63946;
    font-weight: 900;
    font-size: 22px;
}

/* ================= BANNER SLIDER (CHỈ DÙNG CSS, CHỒNG ẢNH) ================= */
.banner-slider {
    position: relative;
    width: 100%;
    height: 350px; /* Chiều cao cố định */
    border-radius: 8px;
    overflow: hidden; 
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    
    /* QUAN TRỌNG: Xóa khoảng trắng thừa xung quanh */
    padding: 0; 
    background-color: white; 
}

/* Ẩn các nút radio mặc định */
.banner-slider input[type="radio"] {
    display: none;
}

/* Cho phép các nhãn điều khiển trỏ chuột rõ ràng */
.banner-slider label {
    cursor: pointer;
}

/* Khu vực chứa tất cả slide chồng lên nhau */
.slides {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Định dạng từng slide ảnh */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* Ẩn theo mặc định */
    z-index: 1; /* Thứ tự chồng thấp */
    transition: opacity 0.6s ease; /* Hiệu ứng mờ dần */
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Giúp ảnh phủ kín toàn bộ chiều rộng mà không bị méo */
    display: block;
}

/* Xử lý logic chuyển slide bằng CSS - Chồng ảnh lên trên và hiện mờ */
#slide1:checked ~ .slides .slide-1 { opacity: 1; z-index: 2; }
#slide2:checked ~ .slides .slide-2 { opacity: 1; z-index: 2; }
#slide3:checked ~ .slides .slide-3 { opacity: 1; z-index: 2; }

/* ================= CHẤM TRÒN ĐIỀU HƯỚNG ================= */
.slider-dots {
    position: absolute;
    bottom: 15px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.dot:hover {
    background-color: white;
}

/* Tô màu đỏ cho chấm tròn khi slide tương ứng đang được chọn */
#slide1:checked ~ .slider-dots label[for="slide1"],
#slide2:checked ~ .slider-dots label[for="slide2"],
#slide3:checked ~ .slider-dots label[for="slide3"] {
    background-color: #ff6b6b;
    border-color: #ff6b6b;
}

/* ================= MŨI TÊN ĐIỀU HƯỚNG ================= */
.slider-arrows {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    z-index: 10; /* Đảm bảo nằm trên slides và dots */
}

.arrow-prev, .arrow-next {
    position: absolute;
    display: none; /* Ẩn mặc định */
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 107, 107, 0.7); /* Màu đỏ như hình ảnh bạn gửi */
    color: white;
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    transition: background 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    opacity: 0;
}

.arrow-prev:hover, .arrow-next:hover {
    background: rgba(255, 107, 107, 1);
}

.arrow-prev {
    left: 20px;
}

.arrow-next {
    right: 20px;
}

/* Logic hiển thị mũi tên bằng CSS */
/* Khi Slide 1 được chọn: Hiện Prev của Slide 3, Next của Slide 2 */
#slide1:checked ~ .slider-arrows .arrow-prev[for="slide3"],
#slide1:checked ~ .slider-arrows .arrow-next[for="slide2"] { display: flex; opacity: 1; }

/* Khi Slide 2 được chọn: Hiện Prev của Slide 1, Next của Slide 3 */
#slide2:checked ~ .slider-arrows .arrow-prev[for="slide1"],
#slide2:checked ~ .slider-arrows .arrow-next[for="slide3"] { display: flex; opacity: 1; }

/* Khi Slide 3 được chọn: Hiện Prev của Slide 2, Next của Slide 1 */
#slide3:checked ~ .slider-arrows .arrow-prev[for="slide2"],
#slide3:checked ~ .slider-arrows .arrow-next[for="slide1"] { display: flex; opacity: 1; }

/* Tô màu đỏ cho chấm tròn khi slide tương ứng đang được chọn */
#slide1:checked ~ .slider-dots label[for="slide1"],
#slide2:checked ~ .slider-dots label[for="slide2"],
#slide3:checked ~ .slider-dots label[for="slide3"] {
    background-color: #ff6b6b;
    border-color: #ff6b6b;
}

/* ================= PRODUCT DETAIL PAGE OVERRIDES ================= */
.product-detail-page {
    padding-bottom: 80px; /* Chừa chỗ cho nút chat cố định */
}
.product-detail-page .container {
    max-width: 1200px;
}
.product-detail-page .logo {
    color: #db0024; /* Màu đỏ đậm khớp với Lego */
}
.product-detail-page .search-bar input {
    border: 2px solid #db0024;
}
.product-detail-page .search-bar button {
    background-color: #db0024; /* Nền đỏ */
    color: white;
    border: 2px solid #db0024;
}
.product-detail-page .search-bar button:hover {
    background-color: #b3001d;
}
.product-detail-page .horizontal-menu {
    background-color: #db0024; /* Màu đỏ đậm chủ đạo mới */
}
.product-detail-page .horizontal-menu ul {
    justify-content: center; /* Căn giữa menu */
}
.product-detail-page .horizontal-menu a {
    font-size: 14px;
}
.product-detail-page .horizontal-menu a:hover {
    background-color: #b3001d;
}
.product-detail-page .vertical-menu h3 {
    color: #db0024; /* Chữ đỏ */
}
.product-detail-page .vertical-menu a:hover {
    color: #db0024;
}
.product-detail-page main {
    flex-grow: 1;
}

/* ================= ĐỊNH DẠNG TRANG CHI TIẾT SẢN PHẨM ================= */
.product-detail-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 30px;
}

/* Khu vực trên (Ảnh lớn và Thông tin) */
.top-product-area {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

/* Bên trái: Gallery ảnh lớn */
.product-gallery {
    width: 45%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 20px;
}
.product-gallery .main-image {
    max-width: 100%;
    height: auto;
}

/* Bên phải: Panel thông tin */
.product-info-panel {
    width: 55%;
}
.product-info-panel h1 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}
.meta-info {
    font-size: 13px;
    color: #777;
    margin-bottom: 20px;
}
.meta-info span {
    margin-right: 15px;
}

/* Giá cả */
.price-section {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.current-price {
    font-size: 28px;
    color: #db0024;
    font-weight: bold;
}
.old-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
}
.product-detail-page .price-section .discount-badge {
    background-color: #db0024;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
}

/* Danh sách lợi ích */
.benefits-list {
    list-style: none;
    font-size: 14px;
    color: #555;
    margin-bottom: 25px;
}
.benefits-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}
.benefits-list li::before {
    content: '✓'; /* Dấu tích xanh */
    color: #27ae60;
    font-weight: bold;
    margin-right: 10px;
    font-size: 16px;
}

/* Tồn kho và Số lượng */
.stock-status {
    font-size: 14px;
    color: #777;
    margin-bottom: 15px;
}
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}
.quantity-selector label {
    font-size: 14px;
    font-weight: bold;
}
.qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    border-radius: 4px;
}
.quantity-selector input {
    width: 50px;
    height: 30px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Nút hành động */
.action-buttons {
    display: flex;
    gap: 15px;
}
.btn-detail {
    flex: 1;
    padding: 15px 0;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
}
.product-detail-page .btn-add-cart {
    background-color: #ffe6e6; /* Màu hồng nhạt khớp ảnh */
    color: #db0024;
    border: 1px solid #db0024;
}
.product-detail-page .btn-add-cart:hover {
    background-color: #ffcccc;
}
.product-detail-page .btn-buy-now {
    background-color: #db0024; /* Màu đỏ đậm khớp ảnh */
    color: white;
}
.product-detail-page .btn-buy-now:hover {
    margin-bottom: 40px;
    position: relative;
    padding: 0 40px;
}
.gallery-arrow {
    background: white;
    border: 1px solid #ddd;
    color: #db0024;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}
.prev { left: 0; }
.next { right: 0; }

.thumbnail-list {
    display: flex;
    gap: 10px;
}
.thumbnail-item {
    width: 80px;
    height: 80px;
    border: 1px solid #f0f0f0;
    border-radius: 5px;
    padding: 5px;
    cursor: pointer;
}
.thumbnail-item img {
    max-width: 100%;
    height: auto;
}
.thumbnail-item.active {
    border: 2px solid #db0024; /* Khung đỏ cho ảnh đang chọn */
}

/* Khu vực dưới (Tabs và Mô tả) */
.product-tabs-section {
    border-top: 1px solid #eee;
    padding-top: 20px;
}
.tab-header {
    display: flex;
    gap: 30px;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}
.tab-btn {
    background: none;
    border: none;
    padding: 10px 0;
    font-size: 15px;
    font-weight: bold;
    color: #777;
    cursor: pointer;
    position: relative;
}
.tab-btn.active {
    color: #db0024;
}
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #db0024;
}

.tab-content h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
}
.tab-content p {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
    text-align: justify;
}

/* ================= ICON CỐ ĐỊNH (YÊU THÍCH, CHAT) ================= */
.fixed-icons-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}
.icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.icon-wishlist {
    background-color: white;
    color: #db0024;
    font-size: 24px;
}
.icon-chat {
    background-color: #db0024;
    color: white;
    width: auto;
    padding: 0 20px;
    border-radius: 25px;
}
.icon-chat span {
    font-size: 14px;
    font-weight: bold;
    margin-left: 8px;
}

/* ================= FOOTER ================= */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
    font-size: 13px;
}
footer p {
    margin-bottom: 5px;
}

/* ================= RESPONSIVE LAYOUT ================= */
@media (max-width: 1200px) {
    .container {
        padding: 0 12px;
    }
    .main-header {
        padding: 18px 12px;
    }
    .search-bar {
        width: 45%;
    }
    .horizontal-menu ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    .horizontal-menu a {
        padding: 12px 18px;
    }
    .product-grid,
    .brand-grid,
    .blog-grid,
    .lab-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .top-bar-content,
    .main-header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    .search-bar {
        width: 100%;
        margin-top: 10px;
    }
    .search-bar input,
    .search-bar button {
        width: 100%;
    }
    .cart {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        margin-top: 10px;
    }
    .horizontal-menu ul {
        justify-content: center;
    }
    .main-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    .vertical-menu {
        width: 100%;
    }
    .section,
    .product-detail-container {
        padding: 24px;
    }
    .product-card img {
        height: 220px;
    }
    .product-row {
        padding: 15px;
    }
}

@media (max-width: 760px) {
    .main-header {
        padding: 15px 10px;
        align-items: flex-start;
    }
    .logo {
        font-size: 28px;
    }
    .search-bar {
        flex-direction: column;
        width: 100%;
    }
    .search-bar input,
    .search-bar button {
        width: 100%;
        border-radius: 8px;
    }
    .search-bar button {
        margin-top: 10px;
    }
    .horizontal-menu ul {
        flex-direction: column;
        align-items: stretch;
    }
    .horizontal-menu a {
        width: 100%;
        text-align: center;
    }
    .top-bar-content {
        justify-content: center;
        text-align: center;
    }
    .main-wrapper {
        flex-direction: column;
        gap: 18px;
    }
    .vertical-menu,
    main {
        width: 100%;
    }
    .product-grid,
    .brand-grid,
    .blog-grid,
    .lab-grid {
        grid-template-columns: 1fr;
    }
    .product-card img,
    .blog-card img {
        height: 240px;
    }
    .product-info,
    .product-card,
    .blog-card-content,
    .lab-card {
        padding: 18px;
    }
    .btn-mua,
    .btn-add-cart,
    .btn-detail,
    .slider-hint-btn,
    .brand-btn,
    .lab-link-btn,
    .contact-form button {
        width: 100%;
    }
    .action-buttons {
        flex-direction: column;
    }
    .quantity-selector {
        flex-wrap: wrap;
    }
    .product-gallery,
    .product-info-panel {
        width: 100%;
    }
    .top-product-area {
        flex-direction: column;
    }
    .thumbnail-list {
        overflow-x: auto;
        padding-bottom: 5px;
    }
    .tab-header {
        flex-direction: column;
        gap: 12px;
    }
    .tab-btn {
        width: 100%;
        text-align: left;
    }
    .fixed-icons-container {
        bottom: 0;
        left: 0;
        right: 0;
        padding: 10px;
        justify-content: center;
        flex-direction: row;
        gap: 12px;
    }
    .icon-circle {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 12px 8px;
    }
    .logo {
        font-size: 26px;
    }
    .horizontal-menu a {
        padding: 12px 10px;
        font-size: 13px;
    }
    .search-bar button {
        padding: 12px;
    }
    .product-card img,
    .blog-card img {
        height: 220px;
    }
    .product-info h3,
    .brand-header .brand-title,
    .hero-text h3,
    .blog-intro h3,
    .lab-header h3 {
        font-size: 22px;
    }
    .current-price {
        font-size: 24px;
    }
    .product-title {
        font-size: 14px;
    }
    .tab-btn {
        font-size: 14px;
    }
    .footer {
        padding: 22px 12px;
    }
}
/* ================= Cơ bản & Reset ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f6f8; /* Màu nền xám nhạt */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
}

/* ================= Top Bar ================= */
.top-bar {
    background-color: #2c3e50;
    color: #ffffff;
    font-size: 13px;
    padding: 10px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
}

.user-actions a {
    color: #ffffff;
    margin: 0 5px;
}

.user-actions a:hover {
    text-decoration: underline;
}

/* ================= Main Header ================= */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
    background-color: #ffffff;
}

.logo {
    font-size: 32px;
    font-weight: bold;
    color: #ff6666; 
}

.search-bar {
    display: flex;
    width: 100%;
    max-width: 500px;
}

.search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ff6666;
    border-right: none;
    outline: none;
}

.search-bar button {
    background-color: #ff6666;
    color: white;
    border: 1px solid #ff6666;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
}

.cart a {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #333;
    font-weight: bold;
}

/* ================= Menu Ngang ================= */
.horizontal-menu {
    background-color: #ff6666;
}

.horizontal-menu ul {
    display: flex;
    list-style: none;
}

.horizontal-menu li a {
    display: block;
    padding: 15px 25px;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
}

.horizontal-menu li a:hover {
    background-color: #e05555;
}

/* ================= Bố cục nội dung chính ================= */
.main-wrapper {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
}

/* --- Cột trái: Danh mục --- */
.vertical-menu {
    width: 250px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    align-self: flex-start;
}

.vertical-menu h3 {
    color: #ff6666;
    padding: 15px 20px;
    font-size: 16px;
    border-bottom: 2px solid #ffeeba;
    margin: 0 10px;
}

.vertical-menu ul {
    list-style: none;
}

.vertical-menu li a {
    display: block;
    padding: 15px 20px;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.vertical-menu li:last-child a {
    border-bottom: none;
}

.vertical-menu li a:hover {
    color: #ff6666;
    background-color: #fafafa;
}

/* --- Cột phải: Form Đăng ký --- */
main {
    flex: 1;
    background-color: #ffffff;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.section-title {
    color: #ff6666;
    font-size: 24px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: #ffc107; /* Đường gạch chân màu vàng */
}

.content-box {
    background-color: #fdf8ee; /* Màu nền vàng kem nhẹ */
    border: 1px solid #fce4c4;
    padding: 40px;
    border-radius: 8px;
}

.contact-form input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
    background-color: #ffffff;
}

.contact-form input:focus {
    border-color: #ff6666;
}

.contact-form button {
    background-color: #ff6666;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

.contact-form button:hover {
    background-color: #e05555;
}

/* ================= Footer ================= */
footer {
    background-color: #2c3e50;
    color: #ffffff;
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
    line-height: 1.8;
}