/* --- Variables & Reset --- */
:root {
    --primary-color: #1A1A40; /* Màu xanh đậm từ Logo Hiroki */
    --secondary-color: #00A8E8; /* Màu xanh sáng (cyan) */
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-padding {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.bg-light {
    background-color: var(--bg-light);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-large {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 14px 32px;
    font-size: 1.1rem;
}

.btn-large:hover {
    background-color: var(--primary-color);
}

/* --- Header --- */
.site-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img {
    height: 50px; /* Điều chỉnh phù hợp với ảnh logo của bạn */
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-weight: 600;
    color: var(--primary-color);
    transition: var(--transition);
}

.main-nav a:hover, .main-nav a.active {
    color: var(--secondary-color);
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(rgba(26, 26, 64, 0.8), rgba(26, 26, 64, 0.8)), url('images/HK9.4_NgoaiThat_SonCaoCapNano.jpg') center/cover;
    height: 60vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* --- Grid Layouts --- */
/* Tự động chia cột: nếu màn hình hẹp thì 1 cột, rộng thì nhiều cột */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

/* --- Category Cards --- */
.category-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.category-card img {
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.category-card h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.category-card p {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.text-link {
    color: var(--secondary-color);
    font-weight: 600;
}

/* --- Product Cards --- */
.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-img {
    padding: 20px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-info {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eee;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-info h4 {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.product-info h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 30px 0;
}

.text-center {
    text-align: center;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .main-nav {
        display: none; /* Trên thực tế cần làm menu hamburger (nút gạch ngang) cho mobile */
    }

    .hero h1 {
        font-size: 2rem;
    }
}

/* =========================================
   CHI TIẾT SẢN PHẨM (PRODUCT DETAIL PAGE)
========================================= */

/* --- Breadcrumb --- */
.breadcrumb-wrap {
    padding: 15px 0;
    border-bottom: 1px solid #e1e1e1;
}

.breadcrumb {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.breadcrumb li a {
    color: var(--text-light);
    transition: var(--transition);
}

.breadcrumb li a:hover {
    color: var(--primary-color);
}

.breadcrumb .separator {
    margin: 0 10px;
    color: #ccc;
}

.breadcrumb li.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* --- Product Detail Grid (2 Cột) --- */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

/* Cột Hình ảnh */
.product-gallery {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

.product-gallery img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Cột Thông tin */
.product-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.3;
}

.product-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    color: var(--text-light);
}

.short-description p {
    margin-bottom: 15px;
}

.feature-list {
    list-style-type: none;
    margin-bottom: 30px;
}

.feature-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    color: var(--text-color);
}

/* Tạo icon check mark (dấu tích) trước mỗi bullet */
.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.product-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* --- Tabs Content --- */
.tab-headers {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 30px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
}

/* Thanh gạch chân chạy dưới tab đang active */
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.tab-pane {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);

    /* Bổ sung phần ẩn/hiện */
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.4s ease-in-out; /* Hiệu ứng chuyển tab mượt mà */
}

/* Định nghĩa hiệu ứng fadeIn */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-pane h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* --- Responsive cho Mobile & Tablet --- */
@media (max-width: 992px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-title {
        font-size: 1.6rem;
    }

    .tab-headers {
        flex-direction: column;
        border-bottom: none;
    }

    .tab-btn.active::after {
        display: none; /* Ẩn gạch chân trên mobile */
    }

    .tab-btn {
        border-bottom: 1px solid #ddd;
        text-align: left;
    }
}

/* =========================================
   TRANG DANH MỤC SẢN PHẨM (CATEGORY PAGE)
========================================= */

/* --- Category Title Banner --- */
.category-banner {
    padding: 40px 0;
    border-bottom: 1px solid #eee;
}

.category-main-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.category-desc {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-light);
    font-size: 1rem;
}

/* --- Layout Sidebar + Content --- */
.layout-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr; /* Sidebar cố định 280px, nội dung chiếm phần còn lại */
    gap: 40px;
    align-items: start;
}

/* --- Sidebar Styling --- */
.sidebar-widget {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 12px;
}

.sidebar-menu li a {
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    display: block;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    color: var(--secondary-color);
    padding-left: 5px; /* Hiệu ứng dịch chuyển nhẹ khi hover */
}

.promo-box {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
}

.promo-box h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.promo-box p {
    font-size: 0.9rem;
    margin-bottom: 15px;
    opacity: 0.8;
}

/* --- Products Archive Area --- */
.archive-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Lưới sản phẩm 3 cột bên vùng nội dung chính */
.grid-3-col {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

/* --- Responsive cho Trang Danh mục --- */
@media (max-width: 992px) {
    /* Chuyển từ layout 2 cột dọc thành 1 cột xếp chồng trên Mobile/Tablet */
    .layout-sidebar {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .sidebar {
        order: 2; /* Đẩy sidebar xuống dưới danh sách sản phẩm trên mobile */
    }

    .products-archive {
        order: 1; /* Ưu tiên hiển thị sản phẩm lên trước */
    }
}

/* =========================================
   TRANG LIÊN HỆ (CONTACT PAGE)
========================================= */

.pb-0 {
    padding-bottom: 0;
}

.text-light {
    color: var(--text-light);
    line-height: 1.8;
}

/* --- Contact Info Grid --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.contact-card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: var(--secondary-color);
}

.contact-icon {
    width: 70px;
    height: 70px;
    background-color: var(--bg-light);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.contact-card h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.contact-card p {
    color: var(--text-color);
    margin-bottom: 5px;
    font-size: 1rem;
}

.contact-card a {
    color: var(--secondary-color);
    transition: var(--transition);
}

.contact-card a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.small-text {
    font-size: 0.85rem !important;
    color: var(--text-light) !important;
    margin-top: 5px;
}

/* --- Map Section --- */
.map-section {
    display: flex; /* Xóa khoảng trống dưới iframe */
}

/* --- Responsive Layout --- */
@media (max-width: 768px) {
    .contact-card {
        padding: 30px 15px;
    }
}