/*
Theme Name: TnT Comfy Home Mega Test
Theme URI: https://tntcomfyhome.vn
Author: TnT Team
Author URI: https://tntcomfyhome.vn
Description: Custom e-commerce theme for TNT Comfy-Home - Optimized for WooCommerce
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tntcomfy
Tags: e-commerce, woocommerce, responsive, custom
*/

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Enhanced Color Scheme */
    --primary-color: #FFC107;
    --primary-dark: #FFA000;
    --primary-light: #FFE082;
    --primary-gradient: linear-gradient(135deg, #FFC107 0%, #FFA000 100%);
    --secondary-color: #212121;
    --secondary-dark: #000000;
    --secondary-light: #424242;
    --accent-color: #F44336;
    --accent-light: #FF6B6B;
    --accent-gradient: linear-gradient(135deg, #F44336 0%, #D32F2F 100%);
    --text-color: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --bg-color: #FFFFFF;
    --bg-light: #F5F5F5;
    --bg-dark: #2C2C2C;
    --border-color: #E0E0E0;
    --success-color: #4CAF50;
    --info-color: #2196F3;
    --warning-color: #FF9800;
    
    /* New Accent Colors */
    --blue-accent: #0066CC;
    --blue-dark: #003366;
    --green-accent: #00A86B;
    --green-light: #00D084;
    
    /* Typography */
    --font-primary: 'Roboto', 'Segoe UI', Arial, sans-serif;
    --font-size-base: 14px;
    --font-size-small: 12px;
    --font-size-large: 16px;
    --font-size-h1: 36px;
    --font-size-h2: 28px;
    --font-size-h3: 20px;
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    
    /* Layout */
    --container-width: 1200px;
    --header-height: 60px;
    --nav-height: 50px;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Top Bar - Đã xóa */
.header-top-bar {
    display: none;
}

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

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.top-link {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.3s;
    font-size: var(--font-size-small);
    min-height: 44px;
    padding: 6px 8px;
}

.top-link:hover {
    opacity: 0.8;
}

.top-link .icon {
    font-size: 14px;
}

.top-link .badge {
    background: var(--accent-color);
    color: #fff;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    margin-left: 4px;
}

/* Main Header */
.site-header,
#masthead {
    background-color: #1a1a1a; /* Cùng màu với topbar */
    padding: 16px 0 0 0;
    transition: transform 0.3s ease-in-out;
}

/* Ẩn header khi scroll down trên mobile */
@media (max-width: 768px) {
    .site-header.header-hidden {
        transform: translateY(-100%);
    }
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    position: relative;
    padding-bottom: 16px;
}

/* Hamburger Menu */
.mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 24px;
    height: 18px;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s;
}

.mobile-menu-toggle:hover .hamburger-icon span {
    background-color: var(--primary-color);
}

/* Mobile Menu Dropdown */
.mobile-menu-dropdown {
    position: relative;
    flex-shrink: 0;
}

.mobile-category-mega {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
    overflow-y: auto;
    padding: 20px;
}

.mobile-menu-dropdown.is-open .mobile-category-mega {
    display: block;
}

.mobile-mega-content {
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 100%;
    margin: 0;
    position: relative;
    min-height: 400px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
}

/* Mobile Navigation Icons - Chỉ hiển thị trên mobile */
.mobile-nav-icons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f8f8;
    gap: 16px;
    position: relative;
    z-index: 1;
}

/* Ẩn navigation icons trên desktop */
@media (min-width: 769px) {
    .mobile-nav-icons {
        display: none !important;
    }
}

.mobile-nav-icon-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.mobile-nav-icon-item .nav-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.mobile-nav-icon-item:active,
.mobile-nav-icon-item:hover {
    background: linear-gradient(135deg, #FFC107 0%, #FFA000 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

.mobile-nav-icon-item:active .nav-icon,
.mobile-nav-icon-item:hover .nav-icon {
    stroke: #fff;
}

.mobile-category-mega .category-mega-left {
    border-right: none;
    padding-right: 0;
    width: 100%;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    max-height: 90vh;
}

.mobile-category-mega .category-mega-right {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 0 20px 20px 20px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 2;
}

.mobile-category-mega .category-mega-right.is-active {
    display: flex;
    transform: translateX(0);
}

/* Ẩn menu cấp 1 khi menu cấp 2 active - Dùng class trên parent */
.mobile-category-mega.has-submenu-active .category-mega-left {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

/* Header cho panel subcategories */
.category-mega-right-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
    margin: 0 -20px 16px -20px;
}

.category-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: color 0.2s;
    font-weight: 500;
}

.category-back-btn:hover {
    color: var(--primary-color);
}

.category-back-btn .back-icon {
    width: 20px;
    height: 20px;
}

.category-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    padding: 0;
    cursor: pointer;
    color: #666;
    transition: color 0.2s, background-color 0.2s;
    border-radius: 4px;
}

.category-close-btn:hover {
    color: #333;
    background-color: #f5f5f5;
}

.category-close-btn .close-icon {
    width: 20px;
    height: 20px;
}

/* Accordion style cho mobile */
.mobile-category-mega .category-root {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
    position: relative;
}

.mobile-category-mega .category-root:hover,
.mobile-category-mega .category-root.root-active {
    background-color: #fff9e6;
    color: var(--primary-color);
}

.mobile-category-mega .category-root .root-title {
    font-weight: 600;
    font-size: 15px;
    flex: 1;
}

.mobile-category-mega .category-root .root-sub {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    display: block;
}

.mobile-category-mega .category-root.root-active .root-sub {
    color: var(--primary-color);
}

/* Arrow icon cho accordion */
.mobile-category-mega .category-root::after {
    content: '›';
    font-size: 24px;
    color: #999;
    margin-left: 12px;
    transition: transform 0.3s;
}

.mobile-category-mega .category-root.root-active::after {
    transform: rotate(90deg);
    color: var(--primary-color);
}

/* Subcategories styling */
.mobile-category-mega .category-mega-group {
    margin-bottom: 0;
    border-bottom: 1px solid #f5f5f5;
}

.mobile-category-mega .category-mega-group:last-child {
    border-bottom: none;
}

.mobile-category-mega .group-title {
    font-weight: 600;
    font-size: 14px;
    padding: 14px 0 8px 0;
    color: var(--primary-color);
    text-decoration: none;
    display: block;
}

.mobile-category-mega .group-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-bottom: 12px;
}

.mobile-category-mega .group-link {
    padding: 8px 0 8px 16px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.mobile-category-mega .group-link::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.mobile-category-mega .group-link:hover {
    color: var(--primary-color);
}

.mobile-category-mega .mega-menu-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #333;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    min-width: 32px;
    min-height: 32px;
}

.mobile-category-mega .mega-menu-close:hover {
    background: var(--primary-color);
    color: #fff;
}

.site-logo {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-link {
    display: block;
    text-decoration: none;
}

.logo-svg, .logo-image {
    height: 60px;
    width: auto;
    display: block;
    max-width: 220px;
    object-fit: contain;
}

.logo-tnt-comfy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

/* TnT House Logo CSS Version */
.logo-house {
    position: relative;
    width: 60px;
    height: 40px;
    display: inline-block;
}

.logo-house .roof {
    position: absolute;
    left: 0;
    top: 0;
    width: 60px;
    height: 20px;
    background: var(--primary-color);
    clip-path: polygon(0% 100%, 50% 0%, 100% 100%);
}

.logo-house .left-wall {
    position: absolute;
    left: 0;
    top: 20px;
    width: 12px;
    height: 20px;
    background: var(--primary-color);
}

.logo-house .left-wall::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    width: 20px;
    height: 6px;
    background: var(--primary-color);
}

.logo-house .center-n {
    position: absolute;
    left: 24px;
    top: 20px;
    width: 12px;
    height: 20px;
    background: transparent;
    border-left: 3px solid var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.logo-house .center-n::before {
    content: 'n';
    position: absolute;
    left: -2px;
    top: 0;
    width: 16px;
    height: 20px;
    color: var(--primary-color);
    font-size: 20px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    line-height: 20px;
    text-align: center;
}

.logo-house .right-wall {
    position: absolute;
    right: 0;
    top: 20px;
    width: 12px;
    height: 20px;
    background: var(--primary-color);
}

.logo-house .right-wall::before {
    content: '';
    position: absolute;
    right: -4px;
    top: 0;
    width: 20px;
    height: 6px;
    background: var(--primary-color);
}

.logo-main-text {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
    margin: 0;
}

.logo-sub-text {
    font-size: 10px;
    font-weight: bold;
    color: #ffffff; /* Màu trắng như hình ảnh */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin: 2px 0 0 0;
}

.site-logo img {
    height: 60px;
    width: auto;
}

/* Header Actions (Compare & Cart) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.header-action-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s;
    cursor: pointer;
    z-index: 10;
}

.header-action-link:hover {
    opacity: 0.8;
}

.action-icon {
    width: 24px;
    height: 24px;
    stroke: #fff;
    pointer-events: none;
}

.action-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--primary-color);
    color: #1a1a1a;
    pointer-events: none;
    z-index: 1;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Search Bar Section */
.header-search-section {
    margin-top: 16px;
    padding-bottom: 16px;
}

.search-form-main {
    display: flex;
    position: relative;
    margin-bottom: 8px;
}

.search-input-main {
    flex: 1;
    padding: 14px 60px 14px 16px;
    border: none;
    border-radius: 4px;
    background-color: #e8e8e8; /* Light grey như hình */
    font-size: var(--font-size-base);
    outline: none;
    transition: background-color 0.3s;
}

.search-input-main:focus {
    background-color: #f0f0f0;
}

.search-button-main {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.search-button-main:hover {
    background: var(--primary-dark);
}

.search-icon {
    width: 20px;
    height: 20px;
    stroke: #1a1a1a;
    stroke-width: 2.5;
}

/* Suggested Search Terms */
.suggested-search-terms {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.suggested-label {
    color: #fff;
    font-size: 12px;
    opacity: 0.8;
}

.suggested-term {
    color: #fff;
    font-size: 12px;
    text-decoration: none;
    transition: opacity 0.3s;
}

.suggested-term:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* Mobile search button */
@media (max-width: 768px) {
    .search-button {
        min-width: 48px;
        min-height: 48px;
        padding: 12px;
    }
    
    .search-input {
        padding: 14px 60px 14px 16px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Cart Info */
.header-cart {
    min-width: 150px;
}

/* Ẩn cart icon ở main header trên desktop */
@media (min-width: 769px) {
    .header-cart {
        display: none;
    }
}

.cart-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    color: var(--text-color);
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.cart-link:hover {
    background-color: var(--bg-light);
}

.cart-icon {
    font-size: 28px;
}

.cart-info {
    display: flex;
    flex-direction: column;
}

.cart-count {
    font-size: var(--font-size-small);
    color: var(--text-light);
}

.cart-total {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--accent-color);
}

/* Navigation Bar */
.main-navigation {
    background-color: #1a1a1a; /* Dark background giống header */
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-wrapper {
    display: flex;
    align-items: center;
}

.category-dropdown {
    position: relative;
    min-width: 220px;
}

.category-toggle {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    padding: 14px 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    font-size: var(--font-size-base);
    transition: background-color 0.3s;
}

.category-toggle:hover {
    background-color: var(--primary-dark);
}

/* Mega menu 2 cột (theme test) */
.category-mega {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    margin-top: 2px;
    padding: 16px 20px;
    display: grid; /* Luôn dùng grid để bố cục 2 cột */
    grid-template-columns: 260px 1fr;
    column-gap: 24px;
    min-width: 720px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.category-dropdown.is-open .category-mega {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.category-mega-left {
    border-right: 1px solid var(--border-color);
}

.category-root {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-color);
}

.root-title {
    display: block;
    font-weight: 600;
}

.root-sub {
    display: block;
    font-size: 13px;
    color: var(--text-light);
}

.category-root.root-active,
.category-root:hover {
    color: var(--primary-color);
}

.category-mega-right {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
}

.category-mega-group {
    min-width: 180px;
}

.group-title {
    display: block;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
    text-decoration: none;
}

.group-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.group-link {
    font-size: 14px;
    color: var(--text-color);
    text-decoration: none;
}

.group-link:hover {
    text-decoration: underline;
    color: var(--primary-color);
}

/* Class is-open hiện tại chỉ để tham chiếu JS (không set display ở CSS nữa) */

/* Main Menu */
.main-menu-wrapper {
    flex: 1;
}

.main-menu {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
}

.main-menu li {
    margin: 0;
}

.main-menu a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 14px 20px;
    display: block;
    transition: background-color 0.3s;
    font-size: var(--font-size-base);
    text-transform: uppercase;
}

.main-menu a:hover {
    background-color: var(--secondary-light);
    text-decoration: underline;
}

/* Hero Banner */
.hero-banner {
    position: relative;
    height: 500px;
    overflow: hidden;
    margin-bottom: var(--spacing-xl);
}

.banner-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s;
}

.banner-slide.active {
    opacity: 1;
}

.banner-image {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
}

.banner-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #fff;
    max-width: 800px;
    padding: var(--spacing-xl);
}

.banner-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    text-transform: uppercase;
}

.banner-subtitle {
    font-size: var(--font-size-large);
    margin-bottom: var(--spacing-lg);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.btn-banner {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 14px 40px;
    border: none;
    border-radius: 4px;
    font-size: var(--font-size-large);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
    text-transform: uppercase;
}

.btn-banner:hover {
    background-color: var(--primary-dark);
}

.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background: var(--primary-color);
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-size: var(--font-size-h2);
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    margin: 0;
}

.btn-view-all {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 10px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
    font-size: var(--font-size-base);
}

.btn-view-all:hover {
    background-color: var(--primary-dark);
}

/* Product Categories Section */
.product-categories-section {
    padding: var(--spacing-xl) 0;
    background: var(--bg-light);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--spacing-md);
}

.category-card {
    background: #fff;
    border-radius: 8px;
    padding: var(--spacing-md);
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.category-icon-wrapper {
    margin-bottom: var(--spacing-sm);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
}

.category-icon {
    font-size: 48px;
}

.category-name {
    font-size: var(--font-size-base);
    color: var(--text-color);
    font-weight: 600;
    margin: 0;
}

.category-card a {
    text-decoration: none;
    color: inherit;
}

/* Products Section */
.bestselling-products-section {
    padding: var(--spacing-xl) 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--spacing-md);
}

.product-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--bg-light);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.price-discount {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent-color);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: var(--font-size-small);
    font-weight: 600;
    z-index: 5;
}

.stock-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: var(--font-size-small);
    z-index: 5;
}

.product-info {
    padding: var(--spacing-md);
}

.product-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
    line-height: 1.4;
}

.product-price {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
}

.price-current {
    font-size: var(--font-size-large);
    font-weight: 700;
    color: var(--accent-color);
}

.price-old {
    font-size: var(--font-size-base);
    color: var(--text-light);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: var(--spacing-xs);
}

.btn-add-cart {
    flex: 1;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    padding: 10px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: var(--font-size-small);
}

.btn-add-cart:hover {
    background-color: var(--primary-dark);
}

.btn-add-cart:disabled {
    background-color: var(--bg-light);
    color: var(--text-light);
    cursor: not-allowed;
}

.btn-wishlist, .btn-compare {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 18px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-wishlist:hover, .btn-compare:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Brands Section */
.brands-section {
    padding: var(--spacing-xl) 0;
    background: var(--bg-light);
}

.brands-carousel {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.brand-item {
    background: #fff;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 8px;
    font-weight: 600;
    font-size: var(--font-size-large);
    color: var(--text-color);
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
}

.brand-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* News Section */
.news-section {
    padding: var(--spacing-xl) 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.news-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.news-image-link {
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-item:hover .news-image {
    transform: scale(1.05);
}

.news-image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.news-content {
    padding: var(--spacing-md);
}

.news-date {
    font-size: var(--font-size-small);
    color: var(--text-light);
    margin-bottom: var(--spacing-xs);
}

.news-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.news-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-excerpt {
    font-size: var(--font-size-small);
    color: var(--text-light);
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--font-size-small);
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Footer */
.site-footer {
    background-color: var(--bg-dark);
    color: #fff;
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

/* Fix footer on shop pages - reduce spacing */
body.woocommerce-shop .site-footer,
body.woocommerce-archive .site-footer,
body.woocommerce-page .site-footer {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
}

/* Homepage Mobile & Desktop Separation */
/* Ẩn homepage desktop trên mobile */
@media (max-width: 768px) {
    .homepage-desktop {
        display: none !important;
    }
}

/* Ẩn homepage mobile trên desktop */
@media (min-width: 769px) {
    .homepage-mobile {
        display: none !important;
    }
}

/* Footer Mobile & Desktop Separation */
/* Ẩn footer desktop trên mobile */
@media (max-width: 768px) {
    .footer-desktop {
        display: none !important;
    }
}

/* Ẩn footer mobile trên desktop */
@media (min-width: 769px) {
    .footer-mobile {
        display: none !important;
    }
}

/* Footer Mobile Styles */
.footer-top-mobile {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-section-mobile {
    display: flex;
    flex-direction: column;
}

.footer-section-mobile h3 {
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-section-mobile p {
    font-size: var(--font-size-small);
    margin-bottom: var(--spacing-xs);
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
}

.footer-section-mobile ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section-mobile ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-section-mobile ul li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: var(--font-size-small);
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-section-mobile ul li a:hover {
    color: var(--primary-color);
}

/* Footer Top: 4 Columns (Desktop) - Chỉ áp dụng cho footer-desktop */
.footer-desktop .footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Đảm bảo footer desktop luôn 4 cột trên desktop */
@media (min-width: 769px) {
    .footer-desktop .footer-top {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: var(--spacing-lg) !important;
    }
}

/* Footer Column Styles */
.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-column h3 {
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-column p {
    font-size: var(--font-size-small);
    margin-bottom: var(--spacing-xs);
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-column ul li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: var(--font-size-small);
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

/* Reduce footer top spacing on shop pages - Chỉ áp dụng cho footer desktop */
body.woocommerce-shop .footer-desktop .footer-top,
body.woocommerce-archive .footer-desktop .footer-top,
body.woocommerce-page .footer-desktop .footer-top {
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
}

/* Footer Middle: Logo Center */
.footer-middle {
    text-align: center;
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md) 0;
}

.footer-logo-center {
    display: inline-block;
    text-decoration: none;
}

.footer-logo-large {
    height: 36px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.footer-logo-text {
    text-align: center;
}

.footer-logo-main {
    font-size: 14px;
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    line-height: 1.3;
}

.footer-logo-sub {
    font-size: 8px;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.9;
    line-height: 1.3;
}

/* Footer Bottom: Contact Info */
.footer-bottom-section {
    text-align: center;
    margin: var(--spacing-lg) 0;
}

/* Reduce footer bottom spacing on shop pages */
body.woocommerce-shop .footer-bottom-section,
body.woocommerce-archive .footer-bottom-section,
body.woocommerce-page .footer-bottom-section {
    margin: var(--spacing-md) 0;
}

.footer-contact-info {
    text-align: left;
}

.footer-contact-info .footer-logo-center {
    margin-bottom: var(--spacing-md);
}

.footer-contact-info .footer-logo-large {
    height: 70px;
    max-width: 210px;
}

.footer-contact-info .footer-logo-text {
    text-align: left;
    margin-bottom: var(--spacing-md);
}

.footer-contact-info .footer-logo-main {
    font-size: 20px;
}

.footer-contact-info .footer-logo-sub {
    font-size: 11px;
}

.footer-contact-info p {
    font-size: var(--font-size-small);
    margin-bottom: var(--spacing-xs);
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
}

.footer-contact-info p strong {
    color: var(--primary-color);
    font-weight: 600;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-column h3 {
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
    font-weight: 600;
}

.footer-logo {
    font-size: var(--font-size-large);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: var(--spacing-md);
}

.footer-logo-link {
    display: block;
    margin-bottom: var(--spacing-md);
}

.footer-logo-svg, .footer-logo-image {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.footer-column p {
    font-size: var(--font-size-small);
    margin-bottom: var(--spacing-xs);
    line-height: 1.8;
    color: rgba(255,255,255,0.8);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-column ul li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: var(--font-size-small);
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

.footer-payment {
    margin-top: 0;
    text-align: center;
}

.footer-payment p {
    margin-bottom: var(--spacing-sm);
    color: rgba(255,255,255,0.8);
    font-size: var(--font-size-small);
}

.footer-payment p strong {
    color: var(--primary-color);
    font-weight: 600;
}

.footer-payment .payment-icons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.footer-payment .payment-icon {
    font-size: 24px;
    display: inline-block;
}

.payment-icons {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xs);
}

.payment-icon {
    font-size: 32px;
    cursor: pointer;
    transition: transform 0.3s;
}

.payment-icon:hover {
    transform: scale(1.1);
}

.newsletter-form {
    display: flex;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
}

.newsletter-input {
    flex: 1;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: var(--font-size-small);
}

.newsletter-input::placeholder {
    color: rgba(255,255,255,0.6);
}

.newsletter-button {
    background: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: var(--font-size-small);
}

.newsletter-button:hover {
    background: var(--primary-dark);
}

.footer-social {
    margin-top: var(--spacing-md);
}

.footer-social h4 {
    font-size: var(--font-size-small);
    margin-bottom: var(--spacing-xs);
    color: rgba(255,255,255,0.8);
}

.social-icons {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xs);
}

.social-icon {
    font-size: 24px;
    text-decoration: none;
    transition: transform 0.3s;
}

.social-icon:hover {
    transform: scale(1.2);
}

/* WooCommerce: layout chung cho trang danh mục cấp 1 (Thiết bị vệ sinh, bếp, điện, ...) */
.product-category-header {
    margin-bottom: var(--spacing-lg);
}

.product-category-title {
    font-size: var(--font-size-h2);
    font-weight: 700;
    margin: 0 0 var(--spacing-sm);
    text-transform: uppercase;
}

.product-category-description {
    font-size: var(--font-size-base);
    color: var(--text-light);
    max-width: 800px;
}

.product-category-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--spacing-lg);
}

.product-category-sidebar {
    border-right: 1px solid var(--border-color);
    padding-right: var(--spacing-lg);
}

.product-category-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.product-category-menu li {
    margin-bottom: 8px;
}

.product-category-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    display: block;
    padding: 6px 0;
}

.product-category-menu a:hover {
    color: var(--primary-color);
}

.product-category-main {
    min-height: 200px;
}

.footer-copyright {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: var(--font-size-small);
    color: rgba(255,255,255,0.6);
    margin-top: var(--spacing-lg);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: var(--font-size-small);
    color: rgba(255,255,255,0.6);
}

/* Responsive */
/* Header Table Layout */
.header-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
}

.header-row-top,
.header-row-bottom {
    width: 100%;
}

.header-cell {
    padding: 12px 8px;
    vertical-align: middle;
}

/* Cột 1: Menu */
.header-cell-menu {
    width: auto;
    text-align: left;
    }
    
/* Cột 2: Logo */
.header-cell-logo {
    width: auto;
    text-align: center;
}

/* Cột 3: Account + Cart */
.header-cell-actions {
    width: auto;
    text-align: right;
}

/* Hàng dưới: Search box (colspan=3) */
.header-cell-search {
    text-align: center;
    padding-top: 0;
}

.header-search-section {
    display: inline-block;
    width: 100%;
    max-width: 600px;
    margin-top: 16px;
}

.search-form-main {
    display: flex;
    width: 100%;
}

.search-input-main {
    flex: 1;
    padding: 12px 50px 12px 16px;
    font-size: 14px;
}

.search-button-main {
    width: 44px;
    height: 44px;
    min-width: 44px;
}

@media (max-width: 768px) {
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Header Table Layout - Áp dụng cho tất cả các trang mobile */
    .site-header .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    
    .header-table {
        display: table !important;
        width: 100% !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
        border-spacing: 0 !important;
    }
    
    .header-row-top,
    .header-row-bottom {
        display: table-row !important;
        width: 100% !important;
    }
    
    .header-cell {
        display: table-cell !important;
        padding: 12px 4px !important;
        vertical-align: middle !important;
    }
    
    /* Cột 1: Menu */
    .header-cell-menu {
        width: auto !important;
        text-align: left !important;
    }
    
    /* Cột 2: Logo */
    .header-cell-logo {
        width: auto !important;
        text-align: center !important;
    }
    
    /* Cột 3: Account + Cart */
    .header-cell-actions {
        width: auto !important;
        text-align: right !important;
    }
    
    /* Hàng dưới: Search box */
    .header-cell-search {
        text-align: center !important;
        padding-top: 0 !important;
    }
    
    /* Logo text - Kích thước phù hợp mobile */
    .logo-main-text {
        font-size: 16px !important;
        color: var(--primary-color) !important;
    }
    
    .logo-sub-text {
        font-size: 9px !important;
        color: #ffffff !important;
    }
    
    /* Account + Cart */
    .header-actions {
        gap: 12px !important;
        display: flex !important;
        justify-content: flex-end !important;
    }
    
    /* Ẩn compare link trên mobile */
    .header-actions .compare-link {
        display: none !important;
    }
    
    /* Search section */
    .header-search-section {
        display: inline-block !important;
        width: 100% !important;
        max-width: 600px !important;
        margin-top: 16px !important;
    }
    
    .search-form-main {
        display: flex !important;
        width: 100% !important;
    }
    
    .search-input-main {
        flex: 1 !important;
        padding: 12px 50px 12px 16px !important;
        font-size: 14px !important;
    }
    
    .search-button-main {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
    }
    
    /* Ẩn header-main cũ nếu có */
    .header-main {
        display: none !important;
    }
    
    /* Navigation - Ẩn trên mobile vì đã di chuyển lên top bar */
    .main-navigation {
        display: none !important;
    }
    
    /* Top Bar Menu Toggle - Hiển thị trên mobile */
    .top-bar-menu-toggle {
        display: block !important;
        order: -1 !important; /* Đặt ở đầu tiên */
    }
    
    /* Ẩn category-dropdown trong navigation bar trên mobile */
    .main-navigation .category-dropdown {
        display: none !important;
    }
    
    .top-bar-left, .top-bar-right {
        display: flex !important;
        align-items: center !important;
        gap: 1px !important;
        flex-wrap: nowrap !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
        max-width: calc(50vw - 5px) !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    
    .top-bar-left {
        flex: 0 1 auto !important;
        min-width: 0 !important;
        max-width: calc(50vw - 5px) !important;
    }
    
    .top-bar-right {
        flex: 0 1 auto !important;
        min-width: 0 !important;
        max-width: calc(50vw - 5px) !important;
        margin-left: auto !important;
    }
    
    .top-bar-menu-toggle {
        flex-shrink: 0 !important;
        max-width: 40px !important;
        min-width: 40px !important;
        width: 40px !important;
    }
    
    .top-bar-menu-toggle .category-toggle {
        min-height: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        width: 40px !important;
        height: 40px !important;
        padding: 6px !important;
        font-size: 11px;
        justify-content: center !important;
        align-items: center !important;
        position: relative !important;
        gap: 0 !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border-radius: 6px !important;
        transition: all 0.3s ease !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        display: flex !important;
        box-sizing: border-box !important;
    }
    
    .top-bar-menu-toggle .category-toggle .icon {
        font-size: 18px !important;
    }
    
    .top-bar-menu-toggle .category-toggle:hover {
        background: rgba(255, 255, 255, 0.25) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    }
    
    .top-bar-menu-toggle .category-toggle .icon {
        font-size: 24px !important;
        margin: 0 !important;
        display: inline-block !important;
        filter: brightness(1.2) !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    }
    
    .top-bar-menu-toggle .category-toggle > span {
        display: none !important;
    }
    
    .top-bar-menu-toggle .category-toggle > span.icon {
        display: inline-block !important;
    }
    
    .main-menu {
        flex-wrap: nowrap;
    }
    
    /* Mega menu full-screen trên mobile - Chỉ hiển thị khi có class is-open */
    .category-mega {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 9998 !important;
        background: #ffffff !important;
        overflow-y: auto !important;
        padding: var(--spacing-xl) var(--spacing-lg) var(--spacing-lg) !important;
        margin-top: 0 !important;
        min-width: 100% !important;
        grid-template-columns: 1fr !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: translateX(-100%) !important;
        transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease !important;
    }
    
    /* Hiển thị menu khi có class is-open */
    .category-dropdown.is-open .category-mega {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateX(0) !important;
    }
    
    /* Close button cho mega menu */
    .mega-menu-close {
        position: absolute !important;
        top: var(--spacing-md) !important;
        right: var(--spacing-md) !important;
        width: 48px !important;
        height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 9999 !important;
        background: var(--bg-light) !important;
        border: 2px solid var(--border-color) !important;
        border-radius: 50% !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .mega-menu-close:hover {
        background: var(--accent-color) !important;
        border-color: var(--accent-color) !important;
        transform: scale(1.1) !important;
    }
    
    .mega-menu-close:active {
        transform: scale(0.95) !important;
    }
    
    .mega-menu-close .close-icon {
        font-size: 28px !important;
        color: var(--text-color) !important;
        font-weight: bold !important;
        line-height: 1 !important;
    }
    
    .mega-menu-close:hover .close-icon {
        color: #ffffff !important;
    }
    
    /* Mobile menu: Accordion layout */
    .mobile-mega-content {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        padding: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    .mobile-category-mega .category-mega-left {
        width: 100% !important;
        border-right: none !important;
        border-bottom: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .mobile-category-mega .category-mega-right {
        width: 100% !important;
        display: none !important;
        flex-direction: column !important;
        padding: 0 20px 20px 20px !important;
    }
    
    .mobile-category-mega .category-mega-right.is-active {
        display: flex !important;
    }
    
    .category-mega-group {
        min-width: auto;
        width: 100%;
        margin-bottom: var(--spacing-md);
    }
    
    .group-title {
        min-height: 44px;
        padding: 8px 0;
        display: flex;
        align-items: center;
    }
    
    .group-link {
        min-height: 44px;
        padding: 8px 0;
        display: flex;
        align-items: center;
    }
    
    .banner-title {
        font-size: 32px;
    }
    
    .products-grid {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-md);
    }
    
    .categories-grid, .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    /* Touch targets cho các buttons trên mobile */
    button, .button, a.button, input[type="submit"], input[type="button"] {
        min-height: 48px;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Xóa các responsive rules cũ cho footer-top vì đã tách mobile/desktop */

/* ========================================
   DESKTOP HEADER (≥769px)
   ======================================== */

/* Ẩn header mobile và navigation bar cũ trên desktop */
@media (min-width: 769px) {
    /* Ẩn mobile header và old navigation trên desktop */
    .site-header,
    #masthead {
        display: none !important;
    }
    
    .main-navigation {
        display: none !important;
    }
    
    /* Hiển thị header desktop */
    .header-desktop {
        display: block !important;
        background-color: #1a1a1a;
        padding: 0;
        position: relative;
        z-index: 99998;
    }
    
    .header-desktop .container {
        max-width: 1600px;
        margin: 0 auto;
        padding: 0 20px;
    }
}

/* Ẩn header desktop trên mobile */
@media (max-width: 768px) {
    /* Ẩn desktop header trên mobile */
    .header-desktop {
        display: none !important;
    }
    
    /* Hiển thị mobile header trên mobile */
    .site-header,
    #masthead {
        display: block !important;
    }
    
    /* Ẩn old navigation trên mobile vì đã có mobile menu riêng */
    .main-navigation,
    #site-navigation {
        display: none !important;
    }
}

/* Desktop Header Table Layout */
.header-desktop-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    border-spacing: 0;
}

.header-desktop-row-1,
.header-desktop-row-2 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-desktop-row-2 {
    border-bottom: none;
    /* Đảm bảo row không bị đẩy xuống bởi menu */
    position: relative;
    z-index: 1;
}

.header-desktop-cell {
    padding: 12px 16px;
    vertical-align: middle;
}

.header-desktop-cell-logo {
    width: 25%;
    text-align: left;
}

.header-desktop-cell-search {
    width: 50%;
    text-align: center;
    }

.header-desktop-cell-icons {
    width: 25%;
    text-align: right;
}

.header-desktop-cell-category {
    width: 25%;
    text-align: left;
    position: relative;
    /* Đảm bảo cell không bị ảnh hưởng bởi menu float */
    overflow: visible;
}

.header-desktop-cell-menu {
    width: 75%;
    text-align: left;
}

/* Logo Desktop */
.site-logo-desktop {
    display: flex;
    align-items: center;
}

.site-logo-desktop .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
}

.logo-image-desktop {
    height: 60px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.logo-svg-desktop {
    height: 60px;
    width: auto;
    max-width: 220px;
}

/* Search Bar Desktop */
.search-form-desktop {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 4px;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-desktop {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    color: #333;
}

.search-input-desktop::placeholder {
    color: #999;
}

.search-button-desktop {
    background: #FFC107;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.search-button-desktop:hover {
    background: #FFA000;
}

.search-button-desktop .search-icon {
    width: 20px;
    height: 20px;
    stroke: #212121;
}

/* Icons Desktop */
.header-icons-desktop {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.header-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
    position: relative;
    cursor: pointer;
    z-index: 10;
}

.header-icon-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.icon-desktop {
    width: 24px;
    height: 24px;
    stroke: #ffffff;
    pointer-events: none;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    pointer-events: none;
    z-index: 1;
    background: #F44336;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
}

/* Category Dropdown Desktop */
.category-dropdown-desktop {
    position: relative;
    z-index: 99999;
}

.category-toggle-desktop {
    background: linear-gradient(135deg, #FFC107 0%, #FFA000 100%);
    color: #212121;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    position: relative;
    overflow: hidden;
}

.category-toggle-desktop::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.category-toggle-desktop:hover {
    background: linear-gradient(135deg, #FFA000 0%, #FF8F00 100%);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
    transform: translateY(-1px);
}

.category-toggle-desktop:hover::before {
    left: 100%;
}

.category-dropdown-desktop.is-open .category-toggle-desktop {
    background: linear-gradient(135deg, #FFA000 0%, #FF8F00 100%);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.5);
}

.category-toggle-desktop .icon {
    font-size: 18px;
}

/* Mega Menu Desktop */
.category-mega-desktop {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 900px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 28px;
    display: none;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999;
    margin-top: 0;
    border: 1px solid rgba(255, 193, 7, 0.1);
    overflow: hidden;
    /* Đảm bảo menu không chiếm không gian trong flow */
    pointer-events: none;
}

.category-mega-desktop::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FFC107 0%, #FFA000 50%, #FFC107 100%);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Chỉ hiển thị menu khi có class is-open (click), không dùng hover */
.category-dropdown-desktop.is-open .category-mega-desktop {
    display: grid !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
    animation: slideDownFade 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* Đảm bảo menu có thể tương tác khi mở */
}

@keyframes slideDownFade {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.category-mega-desktop .mega-menu-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.category-mega-desktop .mega-menu-close:hover {
    background: linear-gradient(135deg, #FFC107 0%, #FFA000 100%);
    color: #fff;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.category-mega-desktop .category-mega-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-right: 2px solid #f0f0f0;
    padding-right: 20px;
    position: relative;
}

.category-mega-desktop .category-mega-left::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent 0%, #FFC107 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-dropdown-desktop.is-open .category-mega-desktop .category-mega-left::after {
    opacity: 1;
}

.category-mega-desktop .category-root {
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    text-decoration: none;
    color: #333;
    border-radius: 8px;
    transition: all 0.3s ease;
    gap: 4px;
    position: relative;
    border-left: 3px solid transparent;
}

.category-mega-desktop .category-root::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #FFC107 0%, #FFA000 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0 3px 3px 0;
}

.category-mega-desktop .category-root:hover {
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.08) 0%, rgba(255, 193, 7, 0.03) 100%);
    transform: translateX(4px);
    border-left-color: #FFC107;
}

.category-mega-desktop .category-root:hover::before {
    opacity: 1;
}

.category-mega-desktop .category-root.root-active {
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.12) 0%, rgba(255, 193, 7, 0.05) 100%);
    border-left-color: #FFC107;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
}

.category-mega-desktop .category-root.root-active::before {
    opacity: 1;
}

.category-mega-desktop .root-title {
    font-size: 15px;
    font-weight: 700;
    color: #212121;
    transition: color 0.3s ease;
    letter-spacing: 0.3px;
}

.category-mega-desktop .category-root:hover .root-title,
.category-mega-desktop .category-root.root-active .root-title {
    color: #FF8F00;
}

.category-mega-desktop .root-sub {
    font-size: 12px;
    color: #666;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.category-mega-desktop .category-root:hover .root-sub,
.category-mega-desktop .category-root.root-active .root-sub {
    color: #888;
}

.category-mega-desktop .category-mega-right {
    display: none !important;
    flex-direction: column;
    gap: 16px;
    max-height: 500px;
    overflow-y: auto;
    padding-left: 8px;
}

/* Custom scrollbar cho category-mega-right */
.category-mega-desktop .category-mega-right::-webkit-scrollbar {
    width: 6px;
}

.category-mega-desktop .category-mega-right::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
}

.category-mega-desktop .category-mega-right::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FFC107 0%, #FFA000 100%);
    border-radius: 10px;
}

.category-mega-desktop .category-mega-right::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #FFA000 0%, #FF8F00 100%);
}

.category-mega-desktop .category-mega-right[data-root].is-active {
    display: flex !important;
    animation: fadeInRight 0.3s ease;
}

@keyframes fadeInRight {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.category-mega-desktop .category-mega-group {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.category-mega-desktop .category-mega-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.category-mega-desktop .group-title {
    font-size: 15px;
    font-weight: 700;
    color: #212121;
    margin-bottom: 10px;
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 4px 0;
    position: relative;
    letter-spacing: 0.2px;
}

.category-mega-desktop .group-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #FFC107 0%, #FFA000 100%);
    transition: width 0.3s ease;
}

.category-mega-desktop .group-title:hover {
    color: #FF8F00;
    transform: translateX(2px);
}

.category-mega-desktop .group-title:hover::after {
    width: 40px;
}

.category-mega-desktop .group-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-mega-desktop .group-link {
    font-size: 13px;
    color: #666;
    text-decoration: none;
    padding: 6px 8px;
    transition: all 0.3s ease;
    border-radius: 4px;
    position: relative;
    padding-left: 20px;
}

.category-mega-desktop .group-link::before {
    content: '→';
    position: absolute;
    left: 0;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
    color: #FFC107;
    font-weight: bold;
}

.category-mega-desktop .group-link:hover {
    color: #FF8F00;
    background: rgba(255, 193, 7, 0.05);
    transform: translateX(4px);
    padding-left: 24px;
}

.category-mega-desktop .group-link:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Main Menu Desktop */
.main-menu-desktop {
    display: flex;
    align-items: center;
}

.main-menu-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 24px;
}

.main-menu-links li {
    margin: 0;
}

.main-menu-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 8px 0;
    transition: color 0.3s ease;
    letter-spacing: 0.5px;
    }

.main-menu-links a:hover {
    color: #FFC107;
}

/* Policy Page Styles */
.policy-page {
    padding: var(--spacing-xl) 0;
    background: var(--bg-light);
    min-height: 80vh;
}

.policy-content {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    padding: var(--spacing-xl);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.policy-section {
    margin-bottom: var(--spacing-xl);
}

.policy-section:last-child {
    margin-bottom: 0;
}

.policy-section h2 {
    font-size: var(--font-size-h2);
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-md);
    margin-top: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-color);
    text-transform: uppercase;
}

.policy-section h2:first-child {
    margin-top: 0;
}

.policy-section h3 {
    font-size: var(--font-size-h3);
    font-weight: 600;
    color: var(--secondary-color);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.policy-section p {
    font-size: var(--font-size-base);
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.policy-section ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: var(--spacing-md);
}

.policy-section ul li {
    padding: var(--spacing-xs) 0;
    padding-left: var(--spacing-lg);
    position: relative;
    color: var(--text-color);
    line-height: 1.8;
    font-size: var(--font-size-base);
}

.policy-section ul li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 20px;
}

.policy-section ul li strong {
    color: var(--secondary-color);
    font-weight: 600;
}

.policy-section a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.policy-section a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.policy-section .contact-info {
    background: var(--bg-light);
    padding: var(--spacing-md);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin-top: var(--spacing-md);
}

.policy-section .contact-info p {
    margin-bottom: var(--spacing-xs);
    line-height: 1.8;
}

.policy-section .contact-info strong {
    color: var(--secondary-color);
    font-size: var(--font-size-large);
}

/* Policy Page Table Styles */
.policy-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.policy-content table thead {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.policy-content table th {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
    font-weight: 600;
    font-size: var(--font-size-base);
}

.policy-content table td {
    padding: 12px;
    border: 1px solid #ddd;
    font-size: var(--font-size-base);
    line-height: 1.6;
}

.policy-content table tbody tr:nth-child(even) {
    background: var(--bg-light);
}

.policy-content table tbody tr:hover {
    background: rgba(255, 193, 7, 0.1);
}

/* Responsive Policy Page */
@media (max-width: 768px) {
    .policy-page {
        padding: var(--spacing-md) 0;
    }
    
    .policy-content {
        padding: var(--spacing-md);
        margin: 0 var(--spacing-sm);
    }
    
    .policy-section h2 {
        font-size: 24px;
    }
    
    .policy-section h3 {
        font-size: 18px;
    }
    
    .policy-section p,
    .policy-section ul li {
        font-size: var(--font-size-small);
    }
    
    .policy-content table {
        font-size: var(--font-size-small);
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .policy-content table th,
    .policy-content table td {
        padding: 8px;
        font-size: var(--font-size-small);
    }
}
