/*
Theme Name: TimVoucher Theme
Theme URI: https://timvoucher.com/
Author: TimVoucher
Description: Theme tối ưu cho tốc độ, SEO và trải nghiệm người dùng
Version: 2.2
*/

/* ============================================================
   1. CORE CONFIGURATION & RESET
   ============================================================ */
/* CSS Variables */
:root {
    /* Colors */
    --color-primary: #d9534f;
    --color-primary-dark: #c9302c;
    --color-secondary: #f59e0b;
    --color-secondary-dark: #d97706;
    --color-text: #122842;
    --color-text-light: #666;
    --color-text-lighter: #999;
    --color-border: #eee;
    --color-bg: #f9f9f9;
    --color-white: #fff;
    
    /* Spacing */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;
    --spacing-2xl: 40px;
    --spacing-3xl: 60px;
    
    /* Typography */
    --font-base: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --font-size-base: 17px;
    --font-size-sm: 14px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 21px;
    --font-size-3xl: 26px;
    --font-size-4xl: 32px;
    --font-size-base-mobile: 16px;
    --font-size-h4-mobile: 17px;
    --font-size-h3-mobile: 19px;
    --font-size-h2-mobile: 22px;
    --font-size-h1-mobile: 26px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 10px rgba(0,0,0,0.07);
    --shadow-lg: 0 6px 20px rgba(0,0,0,0.12);
    
    /* Borders */
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 50%;
    
    /* Layout */
    --container-max: 1200px;
    --header-height: 50px;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-base);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}

/* ============================================================
   2. UTILITIES & ACCESSIBILITY
   ============================================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-lg); }
.mb-2 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: 24px; }

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-sm) var(--spacing-lg);
    z-index: 10000;
    text-decoration: none;
    font-weight: bold;
    transition: top var(--transition-base);
}
.skip-link:focus {
    top: 0;
    outline: 3px solid var(--color-primary-dark);
}

/* ============================================================
   3. HEADER & NAVIGATION
   ============================================================ */
.main-header {
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--header-height);
}

/* Logo */
.site-logo a {
    font-weight: bold;
    font-size: var(--font-size-2xl);
    color: var(--color-primary);
    transition: opacity var(--transition-fast);
}
.site-logo a:hover { opacity: 0.8; }
.site-logo img { max-height: 50px; width: auto; }

/* Desktop Menu */
.main-navigation { transition: transform var(--transition-base); }
.main-navigation ul { display: flex; gap: var(--spacing-lg); }
.main-navigation a {
    color: var(--color-text-light);
    font-weight: 600;
    padding: var(--spacing-sm);
    transition: color var(--transition-fast);
    position: relative;
}
.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}
.main-navigation a:hover { color: var(--color-primary); }
.main-navigation a:hover::after { width: 100%; }
.main-navigation .current-menu-item a,
.main-navigation .current_page_item a {
    color: var(--color-primary);
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    padding: var(--spacing-xs);
    cursor: pointer;
    z-index: 1001;
}
.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background: var(--color-primary);
    border-radius: 3px;
    transition: all var(--transition-base);
    margin: 3px 0;
}
.menu-toggle .menu-text { display: none; }
.menu-toggle.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Breadcrumbs */
.breadcrumbs-wrapper {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: var(--spacing-sm) 0;
    display: none; 
}
.breadcrumbs {
    font-size: var(--font-size-sm);
    color: var(--color-text-lighter);
}
.breadcrumbs a {
    color: var(--color-text-light);
    transition: color var(--transition-fast);
}
.breadcrumbs a:hover { color: var(--color-primary); }

/* ============================================================
   4. HOME & SECTIONS (Layouts)
   ============================================================ */

/* --- GIAO DIỆN BANNER GRID TRANG CHỦ --- */
.home-dark-wrapper {
    background-color: #ffffff;
    color: #333333;
    min-height: 100vh;
    padding: 40px 0;
}
.banner-grid-section {
    margin-bottom: 50px;
}
.banner-grid-section .text-white {
    color: #333333 !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 24px;
    letter-spacing: 0.5px;
}
.banner-grid {
    display: grid;
    gap: 20px;
    width: 100%;
}
.grid-col-6 { grid-template-columns: repeat(6, 1fr); }
.grid-col-3 { grid-template-columns: repeat(3, 1fr); }

.banner-card {
    border-radius: 15px;
    overflow: hidden;
    background-color: #f5f5f5;
}
.banner-img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    border-radius: 15px;
    transition: transform 0.3s ease;
}
.hover-scale {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-scale:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* Section Wrappers chung */
.section-wrapper { padding: 15px 0; }
.section-title {
    text-align: center;
    font-size: var(--font-size-3xl);
    margin: 0 0 var(--spacing-sm);
    color: var(--color-primary);
}
.section-subtitle {
    text-align: center;
    font-size: var(--font-size-base);
    margin: 0 0 var(--spacing-2xl);
    color: var(--color-text-light);
}

/* ============================================================
   5. COMPONENTS (Cards, Grids, Elements)
   ============================================================ */

/* --- Guide Section --- */
.guide-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
}
.guide-step {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.guide-step:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
.guide-step-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto var(--spacing-lg);
    font-size: var(--font-size-2xl);
}
.guide-step h3 { margin: 0 0 var(--spacing-sm); color: var(--color-text); }
.guide-step p { margin: 0; font-size: var(--font-size-sm); color: var(--color-text-light); }

/* --- Voucher Cards --- */
.voucher-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-xl);
}
.voucher-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    height: 100%;
}
.voucher-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.voucher-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.voucher-card:hover img { transform: scale(1.05); }

/* Lazy Load */
.voucher-card img.lazyload { opacity: 0; transition: opacity var(--transition-base); }
.voucher-card img.lazyload.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
.voucher-card img.lazyload.loaded { opacity: 1; }
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.voucher-content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
    align-items: center;
    justify-content: flex-start;
}
.voucher-content h2.voucher-card-title,
.voucher-content h3.voucher-card-title {
    margin: 0 0 10px 0;
    font-size: var(--font-size-lg);
    text-align: center;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 600;
}
.voucher-content .voucher-card-title a { color: var(--color-text); transition: color var(--transition-fast); }
.voucher-content .voucher-card-title a:hover { color: var(--color-primary); }
.voucher-details {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    line-height: 1.5;
    min-height: 42px;
    margin-bottom: var(--spacing-md);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.voucher-details ul { padding-left: var(--spacing-lg); }
.voucher-button {
    display: inline-block;
    width: 100%;
    max-width: 200px;
    margin-top: auto;
    white-space: nowrap;
    padding: 10px 0;
    background: var(--color-primary);
    color: var(--color-white);
    text-align: center;
    font-weight: bold;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}
.voucher-button:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(217, 83, 79, 0.3);
}

/* --- Discover Cards --- */
.discover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-xl);
}
.discover-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.discover-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.discover-card-image { width: 100%; height: 250px; object-fit: cover; }
.discover-content { padding: var(--spacing-lg); }
.discover-date {
    font-size: 12px;
    color: var(--color-text-lighter);
    margin-bottom: var(--spacing-xs);
}
.discover-content h3 {
    margin: 0 0 var(--spacing-sm);
    font-size: var(--font-size-xl);
    color: var(--color-primary);
}
.discover-excerpt {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    line-height: 1.6;
}

/* --- Brand Cards & Taxonomy --- */
.brand-grid { display: grid; gap: var(--spacing-xl); }
.brand-grid.grid-col-2 { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }
.brand-grid.grid-col-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.brand-grid.grid-col-5 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.brand-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.brand-card img { width: 100%; height: auto; max-height: 400px; object-fit: cover; }
.brand-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.brand-content h3 {
    margin: 0 0 var(--spacing-sm);
    font-size: var(--font-size-lg);
    line-height: 1.4;
    min-height: auto;
}
.brand-content h3 a { color: var(--color-text); transition: color var(--transition-fast); }
.brand-content h3 a:hover { color: var(--color-primary); }
.brand-content p {
    font-size: var(--font-size-base);
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
    line-height: 1.5;
    min-height: 45px;
}
.brand-button {
    display: inline-block;
    padding: 12px 25px;
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: bold;
    border-radius: var(--radius-md);
    margin-top: auto;
    transition: background var(--transition-base);
}
.brand-button:hover { background: var(--color-primary-dark); }

/* Shopee Card Specifics */
.shopee-card { border-color: #f0f0f0; }
.shopee-price {
    font-size: var(--font-size-lg) !important;
    font-weight: bold;
    color: var(--color-primary) !important;
    min-height: auto;
    line-height: 1.5;
    margin-bottom: var(--spacing-lg);
}
.shopee-button { background: var(--color-secondary); }
.shopee-button:hover { background: var(--color-secondary-dark); }

/* Brand Notices & Custom Sections */
#huong-dan-brand { padding-bottom: 15px !important; }
#huong-dan-brand .faq-question { color: var(--color-text); }

#brand-notice.brand-notice-section {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    margin-top: 8px !important;
    margin-bottom: 8px !important;
}
.brand-notice-box {
    margin: 0;
    padding: 10px 16px;
    border-radius: 8px;
    background: #FFF7E6;
    border-left: 4px solid #F58E4E;
    font-size: 14px;
    line-height: 1.6;
    color: #000000;
}
.brand-notice-box strong { font-weight: 700; }
.brand-notice-box a { color: #D9534F; text-decoration: underline; }

/* --- FAQ Accordion --- */
.faq-accordion {
    max-width: 100%;
    margin: 0 auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item:last-child { border-bottom: none; }
.faq-question {
    width: 100%;
    background: var(--color-white);
    padding: var(--spacing-lg) 25px;
    font-size: var(--font-size-lg);
    font-weight: bold;
    text-align: left;
    cursor: pointer;
    position: relative;
    color: var(--color-primary);
    transition: background var(--transition-fast);
}
.faq-question:hover { background: #fafafa; }
.faq-question::after {
    content: '+';
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--font-size-2xl);
    font-weight: bold;
    color: var(--color-text-light);
    transition: transform var(--transition-base);
}
.faq-item.active .faq-question::after {
    content: '-';
    transform: translateY(-50%) rotate(180deg);
}
.faq-answer {
    background: #f9f9f9;
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}
.faq-answer p {
    margin: 0;
    padding-bottom: var(--spacing-lg);
    line-height: 1.6;
}
.faq-item.active .faq-answer {
    max-height: 500px;
    padding-top: var(--spacing-lg);
    transition: max-height 0.4s ease-in, padding-top 0.3s ease-in;
}

/* ============================================================
   6. BLOG & ARCHIVE (Grid Layout)
   ============================================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.blog-card {
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.blog-card-img {
    position: relative;
    overflow: hidden;
    height: 180px;
    background-color: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}
.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 0;
    transition: transform 0.5s ease;
    display: block;
    object-position: center center;
}
.blog-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.blog-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.blog-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 15px 0;
    min-height: 50px;
}
.blog-title a { color: #333; transition: color 0.2s; }
.blog-title a:hover { color: #d9534f; }
.blog-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}
.read-more-link {
    font-size: 14px;
    font-weight: 600;
    color: #d9534f;
    text-transform: uppercase;
}
.read-more-link:hover { text-decoration: underline; }

/* Pagination */
.pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-weight: 600;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: #d9534f;
    color: #fff;
    border-color: #d9534f;
}

/* ============================================================
   7. SINGLE POST / PAGE STYLES
   ============================================================ */
body.single { background-color: #f4f5f7; }
body.single .single-container-wrapper {
    display: flex;
    gap: 30px;
    padding: 30px 0;
    flex-wrap: nowrap;
    align-items: flex-start;
}

/* 70/30 Layout */
body.single .content-area {
    flex: 1 1 70%;
    max-width: 70%;
    min-width: 0;
}
body.single .sidebar-area,
body.single aside,
body.single #secondary {
    flex: 0 0 30%;
    max-width: 30%;
    width: 30%;
    min-width: 280px;
}

/* Voucher Hero Box */
.voucher-hero-box {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.voucher-hero-grid {
    display: flex;
    gap: 25px;
    align-items: center;
}
.voucher-hero-image { width: 40%; flex-shrink: 0; }
.voucher-hero-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    object-fit: cover;
}
.voucher-hero-info { width: 60%; }
.voucher-hero-info h1.entry-title {
    font-size: 24px;
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.3;
}
.voucher-meta {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
    background: #f9f9f9;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
}
.btn-main-voucher {
    display: block;
    width: 100%;
    background-color: #d9534f;
    color: #fff;
    text-align: center;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 6px rgba(217, 83, 79, 0.3);
}
.btn-main-voucher:hover {
    background-color: #c9302c;
    transform: translateY(-2px);
    color: #fff;
}
.cta-note {
    text-align: center;
    color: #999;
    margin-top: 8px;
    margin-bottom: 0;
    font-size: 12px;
}

/* Article Content */
.single-article {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #eee;
}
.content-heading {
    font-size: 20px;
    border-bottom: 2px solid #d9534f;
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: inline-block;
}
.entry-content {
    line-height: 1.8;
    color: #333;
    font-size: 17px;
}
.entry-content img { max-width: 100%; height: auto; }
.entry-content h2 {
    color: #d9534f;
    font-size: 24px;
    margin-top: 25px;
    margin-bottom: 15px;
}
.entry-content ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}
.single-post .entry-content p,
.single-post .post-content p,
.single .entry-content p {
    text-align: justify;
    text-justify: inter-word;
}

/* Sidebar Widgets */
.widget {
    background: #ffffff;
    border: 1px solid #eee;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.widget-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 20px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
    padding-bottom: 5px;
    letter-spacing: 0.5px;
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li {
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    align-items: center;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a {
    color: #333;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s;
}
.widget ul li a:hover { color: var(--color-primary); text-decoration: none; }

/* Newsletter Form */
.newsletter-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 14px;
}
.newsletter-form button {
    width: 100%;
    padding: 12px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    transition: background 0.3s;
}
.newsletter-form button:hover { background: var(--color-primary-dark); }

/* ============================================================
   8. INTERACTIVE (Floating Buttons & Animations)
   ============================================================ */
.back-top,
.fab-btn {
    position: fixed;
    right: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Back-To-Top */
.back-top {
    bottom: 18px;
    width: 40px;
    height: 40px;
    background: #D9534F;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s ease, visibility .25s ease, transform .25s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.back-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Floating Icons General */
.fab-btn {
    width: 45px;
    height: 45px;
    padding: 0;
    border: none;
    background: none !important;
    box-shadow: none !important;
    transition: transform 0.3s ease;
}

.fab-btn img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: ring-shake 2s ease-in-out infinite;
    transform-origin: center;
    will-change: transform;
}

/* --- VỊ TRÍ MỚI --- */
.fab-facebook { bottom: 80px; }
.fab-zalo { bottom: 140px; }

/* --- ANIMATION KEYFRAMES --- */
@keyframes ring-shake {
    0% { transform: rotate(0) scale(1); }
    5% { transform: rotate(10deg) scale(1.1); }
    10% { transform: rotate(-10deg) scale(1.1); }
    15% { transform: rotate(10deg) scale(1.1); }
    20% { transform: rotate(-10deg) scale(1.1); }
    25% { transform: rotate(0) scale(1); }
    100% { transform: rotate(0) scale(1); }
}

/* ============================================================
   9. FOOTER
   ============================================================ */
.main-footer {
    background: #f1f1f1;
    border-top: 1px solid var(--color-border);
    padding: var(--spacing-lg) 0;
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-top: var(--spacing-2xl);
}

/* ============================================================
   10. RESPONSIVE DESIGN (MEDIA QUERIES)
   ============================================================ */

/* --- TABLET (768px - 991px) --- */
@media (max-width: 991.98px) {
    :root {
        --font-size-4xl: 30px;
        --font-size-3xl: 24px;
    }
    .hero-image { height: 300px; }
    .section-wrapper { padding: 20px 0; }
    .voucher-grid { grid-template-columns: repeat(3, 1fr); }
    .voucher-button {
        padding: 10px var(--spacing-md);
        font-size: 15px;
        max-width: 150px;
    }
    
    /* Giao diện Banner Grid trên Tablet */
    .grid-col-6 { grid-template-columns: repeat(4, 1fr); }
    .grid-col-3 { grid-template-columns: repeat(3, 1fr); }

    /* Single Page Tablet Fixes */
    body.single .single-container-wrapper {
        flex-direction: column;
        padding: 15px;
        gap: 20px;
    }
    body.single .content-area {
        flex: 0 0 100%;
        max-width: 100%;
    }
    body.single .sidebar-area,
    body.single aside,
    body.single #secondary {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
        min-width: 0;
    }
    .voucher-hero-grid {
        flex-direction: column;
        text-align: center;
    }
    .voucher-hero-image,
    .voucher-hero-info {
        width: 100%;
    }

    /* Blog Grid Tablet */
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- MOBILE (< 768px) --- */
@media (max-width: 767.98px) {
    :root {
        --font-size-4xl: var(--font-size-h1-mobile);
        --font-size-3xl: var(--font-size-h2-mobile);
        --font-size-2xl: var(--font-size-h3-mobile);
        --font-size-lg: var(--font-size-h4-mobile);
        --font-size-base: var(--font-size-base-mobile);
    }

    /* Layout & Overflow Fix */
    .container {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
        width: 100%;
        max-width: 100%;
    }
    .header-container { position: relative; }
    .menu-toggle { display: flex; }

    /* Mobile Menu */
    .main-navigation {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 280px;
        max-width: 80vw;
        height: calc(100vh - var(--header-height));
        background: var(--color-white);
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        overflow-y: auto;
        transition: right var(--transition-base);
        z-index: 999;
    }
    .main-navigation.active { right: 0; }
    .main-navigation ul {
        flex-direction: column;
        padding: var(--spacing-lg);
        gap: 0;
    }
    .main-navigation li { border-bottom: 1px solid var(--color-border); }
    .main-navigation a {
        display: block;
        padding: var(--spacing-md);
        font-size: var(--font-size-lg);
    }
    .main-navigation a::after { display: none; }

    /* Overlay */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: rgba(0,0,0,0.5);
        z-index: 998;
        animation: fadeIn var(--transition-base);
    }
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    /* Hero & Sections */
    .hero-image { height: 250px; }
    .hero-content { width: 95%; padding: 0 var(--spacing-sm); }
    .section-wrapper { padding: 20px 0; }
    
    /* Giao diện Banner Grid Mobile */
    .grid-col-6, .grid-col-3 { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 15px;
    }
    .banner-grid-section .text-white {
        font-size: 20px;
    }
    .banner-card, .banner-img {
        border-radius: 12px;
    }

    /* Voucher Grid Fix */
    .voucher-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--spacing-sm);
        margin-left: 0;
        margin-right: 0;
    }
    .voucher-card {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .voucher-card img {
        width: 100%;
        max-height: 400px;
    }
    .voucher-content {
        padding: var(--spacing-md);
        width: 100%;
        min-width: 0;
    }
    .voucher-content h2.voucher-card-title,
    .voucher-content h3.voucher-card-title {
        font-size: 16px;
        min-height: auto;
        line-height: 1.4;
        margin-bottom: var(--spacing-xs);
        word-break: break-word;
    }
    .voucher-details {
        font-size: 13px;
        min-height: auto;
        margin-bottom: var(--spacing-sm);
        word-break: break-word;
    }
    .voucher-button {
        padding: 8px 12px;
        font-size: 13px;
        font-weight: 700;
        width: auto;
        letter-spacing: -0.3px;
        white-space: nowrap;
    }

    /* Grid Fixes */
    .discover-grid,
    .brand-grid.grid-col-2,
    .brand-grid.grid-col-3 {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        margin-left: 0;
        margin-right: 0;
    }
    .brand-grid.grid-col-5 {
        grid-template-columns: repeat(2, 1fr)!important;
        gap: var(--spacing-md);
        margin-left: 0;
        margin-right: 0;
    }
    .guide-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    .guide-step { padding: var(--spacing-lg); }

    /* Component Details Mobile */
    .discover-card-image { height: 180px; }
    .discover-content { padding: var(--spacing-md); }
    .brand-card img { height: auto; max-height: none; }
    .brand-content { padding: var(--spacing-md); }
    .brand-content h3 { font-size: var(--font-size-base); min-height: auto; }
    .brand-content p { font-size: var(--font-size-sm); min-height: auto; }

    /* FAQ Mobile */
    .faq-question, .faq-answer {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }
    .faq-question {
        font-size: var(--font-size-base);
        padding-top: var(--spacing-md);
        padding-bottom: var(--spacing-md);
    }
    .faq-question::after {
        right: var(--spacing-md);
        font-size: var(--font-size-xl);
    }

    /* Shopee Card Mobile Fix */
    .shopee-card .shopee-price {
        font-size: var(--font-size-base) !important;
        line-height: 1.4;
        margin-bottom: var(--spacing-sm);
    }

    /* Floating Buttons Mobile */
    .back-top { width: 36px; height: 36px; bottom: 16px; right: 10px; }
    .fab-btn { width: 36px; height: 36px; right: 10px; }
    .fab-zalo { bottom: 100px; }
    .fab-facebook { bottom: 60px; }
}

/* --- SMALL MOBILE (< 600px) --- */
@media (max-width: 600px) {
    .blog-grid { grid-template-columns: 1fr; }
    .blog-card-img { height: 200px; }
}

/* --- EXTRA SMALL MOBILE (< 480px) --- */
@media (max-width: 479.98px) {
    :root { --spacing-md: 10px; }
    
    .voucher-grid,
    .brand-grid.grid-col-5 {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .hero-content h1 { font-size: 24px; }
    .hero-content p { font-size: var(--font-size-base); }
    .section-title { font-size: 22px; }
    
    .voucher-button {
        font-size: 14px;
        padding: 10px 15px;
        letter-spacing: 0;
    }
    
    .voucher-content,
    .brand-content,
    .discover-content {
        padding: var(--spacing-sm);
    }
}

/* --- PRINT --- */
@media print {
    .main-header,
    .menu-toggle,
    .skip-link,
    .main-footer { display: none; }
    body { background: white; color: black; }
    a { text-decoration: underline; }
}
