/* ========= GLOBAL STYLES & VARIABLES ========= */
:root {
    --primary-color: #27ae60;
    --secondary-color: #2ecc71;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --white-color: #ffffff;
    --text-color: #555;
    --footer-bg: #1d2c26;
    --font-family: 'Quicksand', sans-serif;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 16px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.about .btn-secondary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: var(--white-color);
}

.btn i {
    margin-right: 8px;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.section-title p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Link card sản phẩm */
.product-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.product-card-link .product-card {
    height: 100%;
}
/* Giới hạn mô tả sản phẩm ở trang chủ */
.product-description {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    
    -webkit-box-orient: vertical;
    font-size: 0.9rem;
    color: #777;
    margin-top: 10px;
}


/* ========= HEADER ========= */
.header {
    background: var(--white-color);
    padding: 15px 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    margin-right: 5px;
}

.main-nav ul {
    display: flex;
}

.main-nav ul li a {
    padding: 10px 15px;
    color: var(--dark-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--primary-color);
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-contact i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.header-contact span {
    line-height: 1.2;
}

.menu-toggle {
    display: none; /* Ẩn mặc định trên desktop */
}

/* ========= HERO SECTION (ĐÃ TỐI ƯU HÓA) ========= */
.hero-section {
    position: relative;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white-color);
    overflow: hidden;
    background-image: url('uploads/banner-dac-san-tay-bac.webp');
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 2;
}

.hero-light-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px; /* Kích thước vệt sáng */
    height: 800px; /* Kích thước vệt sáng */
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 60%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 3;
}

.hero-content {
    position: relative;
    z-index: 4; /* Đảm bảo nội dung nổi lên trên cùng */
    padding: 20px;
    animation: fadeInDown 1.2s ease-in-out; /* Thêm animation */
}

.hero-title {
    font-size: 3.8rem; /* Tăng nhẹ kích thước */
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white-color);
    text-shadow: 0px 3px 15px rgba(0, 0, 0, 0.6); /* Tăng độ đậm cho bóng chữ */
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2.5rem; /* Tăng khoảng cách */
    font-weight: 400;
    color: var(--white-color);
    text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-content .btn {
    font-size: 1.1rem;
    padding: 15px 35px;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: fadeInUp 1.2s ease-in-out 0.3s; /* Thêm animation với độ trễ */
    animation-fill-mode: both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* --- Kết thúc phần HERO SECTION --- */

/* ========= PAGE HEADER / BANNER ========= */
.page-header {
    position: relative;
    padding: 50px 0;
    text-align: center;
    color: var(--white-color);
    
    background-size: cover;
    background-position: center center;



    
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55); /* Dark overlay */
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.breadcrumbs a, .breadcrumbs span {
    color: var(--white-color);
    text-decoration: none;
    font-size: 1rem;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    opacity: 0.8;
}

/* ========= PRODUCTS SECTION ========= */
.products {
    padding: 80px 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    background: var(--white-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column; /* Cho phép mô tả nằm dưới tên */
    justify-content: center;
    align-items: center;
}

.product-card h3 {
    font-size: 1.4rem;
    color: var(--dark-color);
}

.product-purchase {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-top: 1px solid #f0f0f0;
}

.product-card .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.product-card .btn {
    font-size: 14px;
    padding: 8px 15px;
}

/* ========= ABOUT SECTION ========= */
.about {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.about .container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-content {
    flex: 1;
}

.about-content h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.about-content p {
    margin-bottom: 30px;
}

.about-buttons .btn {
    margin-right: 15px;
}

.about-image {
    flex: 1;
}

.about-image img {
    border-radius: 15px;
    width: 100%;
}

/* ========= FEATURES SECTION ========= */
.features {
    padding: 80px 0;
}

.features .container {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.feature-item .icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    background: #eafaf1;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.feature-item .icon:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background-color: var(--primary-color);
    color: #fff;
}

.feature-item h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

/* ========= FOOTER ========= */
.footer {
    background-color: var(--footer-bg);
    color: var(--light-color);
    padding-top: 60px;
}

.footer .container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer .logo {
    color: var(--white-color);
}

.footer-col p {
    margin: 15px 0;
    max-width: 250px;
    color: #bdc3c7;
}

.social-icons a {
    color: var(--white-color);
    font-size: 1.2rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--secondary-color);
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--white-color);
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #bdc3c7;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--white-color);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.contact-info li i {
    margin-top: 5px;
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid #34495e;
    text-align: center;
    padding: 20px 0;
}

.footer-bottom p {
    color: #bdc3c7;
}

/* ========= PRODUCT DETAIL PAGE STYLES ========= */
.product-detail-page {
    padding: 60px 0;
    /* Trang chi tiết giờ không cần background riêng vì đã có banner */
    /* background-color: #f8f9fa; */ 
}

.product-detail-container {
    display: flex;
    gap: 40px;
    background-color: var(--white-color);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--box-shadow);
   
    position: relative; /* Để có thể kéo lên trên */
    z-index: 5;
}

.product-detail-image {
    flex: 1; /* Chiếm 1 phần */
    max-width: 500px;
}

.product-detail-image img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #eee;
}

.product-detail-info {
    flex: 1; /* Chiếm 1 phần */
    display: flex;
    flex-direction: column;
}

.product-detail-info .product-title {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.product-detail-info .product-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.product-description-full {
    margin-bottom: 30px;
    line-height: 1.8;
    color: #666;
    border-top: 1px solid #f0f0f0;
    padding-top: 25px;
}

.product-order-box {
    margin-top: auto; /* Đẩy box này xuống dưới cùng */
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-selector label {
    font-weight: 600;
}

.quantity-selector input[type="number"] {
    width: 70px;
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.btn-add-to-cart {
    flex-grow: 1; /* Nút chiếm phần không gian còn lại */
}

/* ========================================================= */
/* =================== RESPONSIVE STYLES =================== */
/* ========================================================= */

@media (max-width: 1024px) {
     /* --- Dành cho màn hình máy tính bảng (nhỏ hơn 1024px) --- */
    .product-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cột trên tablet */
    }

    .features .container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 30px;
    }

    .feature-item {
        width: 45%;
    }

    .footer .container {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    /* --- Dành cho màn hình điện thoại (nhỏ hơn 768px) --- */
    .container {
        padding: 0 15px;
    }

    /* --- HEADER (Cập nhật cho Hamburger Menu) --- */
    .header .container {
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    
    .header-contact {
        display: none; /* Ẩn hotline trên mobile cho gọn */
    }
    
    .menu-toggle {
        display: block;
        font-size: 1.8rem;
        color: var(--dark-color);
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }

    .main-nav {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(5px);
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        transition: left 0.35s ease-in-out;
        z-index: 1000;
    }

    .main-nav.is-open {
        left: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .main-nav ul li a {
        font-size: 1.5rem;
    }

    /* --- HERO SECTION --- */
    .hero-section {
        height: 450px;
    }

    .hero-title {
        font-size: 2.5rem !important;
    }

    .hero-subtitle {
        font-size: 1.2rem !important;
    }

    /* --- PAGE HEADER BANNER --- */
    .page-header h1 {
        font-size: 2rem;
    }

    /* --- PRODUCTS SECTION --- */
    .section-title h2 {
        font-size: 1.8rem;
    }
    .section-title p {
        font-size: 1rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* --- ABOUT SECTION --- */
    .about .container {
        flex-direction: column;
        gap: 30px;
    }

    .about-content h2 {
        font-size: 2rem;
        text-align: center;
    }

    .about-content p {
        text-align: center;
    }

    .about-buttons {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .about-image {
        order: -1;
    }

    /* --- FEATURES SECTION --- */
    .features .container {
        flex-direction: column;
        gap: 40px;
    }
    .feature-item {
        width: 100%;
    }

    /* --- FOOTER --- */
    .footer .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .footer-col p {
        margin-left: auto;
        margin-right: auto;
    }

    .social-icons {
        justify-content: center;
    }

    .contact-info li {
        justify-content: center;
    }

    /* --- Responsive for Product Detail Page --- */
    .product-detail-container {
        flex-direction: column;
        padding: 20px;
        margin-top: -60px;
    }
    .product-detail-info .product-title {
        font-size: 1.8rem;
    }
    .product-detail-info .product-price {
        font-size: 1.5rem;
    }

    

    .product-order-box {
        flex-direction: column;
        align-items: stretch;
    }

}

/* ========= WAVE DIVIDER STYLES (ĐÃ TỐI ƯU HÓA) ========= */
.wave-divider {
    position: absolute;
    bottom: -1px; /* Đặt -1px để đảm bảo không có đường kẻ hở nào */
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    /* Không cần lật ngược sóng nữa */
    /* transform: rotate(180deg); */ 
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 75px; /* Giảm nhẹ chiều cao của sóng cho tinh tế hơn */
}

.wave-divider .shape-fill {
    fill: var(--white-color); /* Màu sóng trùng với nền section products */
}



/* ========= NEW STYLES FOR PRODUCT DETAIL PAGE V2 ========= */

/* Main container layout */
.product-detail-container-new {
    display: flex;
    gap: 40px;
    background-color: var(--white-color);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--box-shadow);

    position: relative;
    z-index: 5;
}

/* Left column: Image Gallery */
.product-gallery {
    flex: 1;
    max-width: 550px; /* Max width for the gallery container */
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.thumbnail-item {
    aspect-ratio: 1 / 1; /* Make thumbnails square */
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.thumbnail-item:hover img {
    transform: scale(1.1);
    filter: brightness(0.8);
}

.thumbnail-item::after {
    content: '\f00e'; /* FontAwesome search-plus icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 2rem;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}

.thumbnail-item:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}


/* Right column: Product Info */
.product-detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Full Description Section (Below) */
.product-full-description-section {
    background-color: var(--white-color);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--box-shadow);
    margin-top: 40px;
}
.product-full-description-section h2{
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 15px;
}
.product-full-description-section hr{
    border: 0;
    border-top: 1px solid #eee;
    margin-bottom: 20px;
}
.description-content p {
    line-height: 1.8;
    color: #555;
}

/* ========= LIGHTBOX STYLES ========= */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 5px;
    animation: zoomIn 0.3s;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: #bbb;
}

.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: background-color 0.3s;
    border-radius: 0 3px 3px 0;
    user-select: none;
}

.lightbox-prev {
    left: -60px;
    border-radius: 3px 0 0 3px;
}

.lightbox-next {
    right: -60px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes zoomIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-detail-container-new {
        flex-direction: column;
    }
    .gallery-thumbnails {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on mobile too */
    }
    .lightbox-prev, .lightbox-next {
        padding: 10px;
        font-size: 16px;
        left: -30px;
    }
    .lightbox-next {
        right: -30px;
    }
}

/* SKU on Product Detail Page */
.product-sku {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
    font-weight: 500;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}
.product-sku span {
    font-weight: 700;
    color: var(--dark-color);
    background-color: #f8f9fa;
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid #eee;
}

/* BỔ SUNG VÀO CUỐI FILE ADMIN/STYLE.CSS */
.form-text {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
    display: block;
}
