/*
Theme Name: Ống Nhựa Phan Đình
Theme URI: https://ongnhuaphandinh.com
Author: Antigravity
Description: Giao diện dành riêng cho công ty Ống Nhựa Phan Đình. Tích hợp đầy đủ các tính năng nâng cao, không sử dụng plugin ngoại lai để tối ưu tốc độ.
Version: 2.0.0
Text Domain: ongnhuaphandinh
*/

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ============================================================
   CSS CUSTOM PROPERTIES (Light Mode Default)
   ============================================================ */
:root {
    /* Brand Colors */
    --primary-color:   #0b3d91;
    --primary-light:   #1e5ab3;
    --primary-dark:    #072a6b;
    --secondary-color: #f39c12;
    --secondary-dark:  #d68910;

    /* Text */
    --text-color:      #1a1a2e;
    --text-muted:      #6b7280;
    --text-light:      #9ca3af;

    /* Backgrounds */
    --bg-color:        #ffffff;
    --bg-gray:         #f8fafc;
    --bg-card:         #ffffff;

    /* Borders & Shadows */
    --gray-border:     #e2e8f0;
    --shadow-sm:       0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md:       0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.05);
    --shadow-lg:       0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 10px -2px rgba(0,0,0,0.05);
    --shadow-xl:       0 20px 50px -12px rgba(0,0,0,0.15);

    /* Layout */
    --border-radius:   10px;
    --border-radius-lg: 16px;
    --transition:      all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;

    /* Header */
    --header-topbar-bg:  #0b3d91;
    --header-bg:         #ffffff;
    --header-height:     70px;
}

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
    --text-color:      #e2e8f0;
    --text-muted:      #94a3b8;
    --text-light:      #64748b;
    --bg-color:        #0f172a;
    --bg-gray:         #1e293b;
    --bg-card:         #1e293b;
    --gray-border:     #334155;
    --shadow-sm:       0 1px 3px rgba(0,0,0,0.3);
    --shadow-md:       0 4px 6px -1px rgba(0,0,0,0.4);
    --shadow-lg:       0 10px 25px -5px rgba(0,0,0,0.5);
    --shadow-xl:       0 20px 50px -12px rgba(0,0,0,0.6);
    --header-bg:       #0f172a;
}

[data-theme="dark"] body { background-color: var(--bg-gray); color: var(--text-color); }
[data-theme="dark"] .site-header { background: var(--header-bg) !important; border-bottom-color: var(--gray-border) !important; }
[data-theme="dark"] .header-main { background: var(--bg-color); border-bottom: 1px solid var(--gray-border); }
[data-theme="dark"] .product-card,
[data-theme="dark"] .news-card,
[data-theme="dark"] .album-card,
[data-theme="dark"] .video-card,
[data-theme="dark"] .store-card { background: var(--bg-card); border-color: var(--gray-border); }
[data-theme="dark"] .product-detail-layout .product-summary,
[data-theme="dark"] .tab-content-wrapper { color: var(--text-color); }
[data-theme="dark"] .timeline-content { background: var(--bg-card) !important; border-color: var(--gray-border) !important; }
[data-theme="dark"] .sales-policies-box { background: rgba(30,90,179,0.1); border-color: rgba(30,90,179,0.25); }
[data-theme="dark"] .product-tabs-section { background: var(--bg-card); border-color: var(--gray-border); }
[data-theme="dark"] .tab-nav { background: var(--bg-gray); border-color: var(--gray-border); }
[data-theme="dark"] .tab-btn.active { background: var(--bg-card); }
[data-theme="dark"] .mobile-nav { background: var(--bg-color); }
[data-theme="dark"] .mobile-nav-menu a { color: var(--text-color); }
[data-theme="dark"] .main-navigation .nav-menu a { color: var(--text-color); }
[data-theme="dark"] .hero-section { background: linear-gradient(135deg, rgba(7,42,107,0.95) 0%, rgba(11,61,145,0.85) 100%), url('assets/img/hero-bg.jpg') center/cover; }
[data-theme="dark"] input, [data-theme="dark"] textarea, [data-theme="dark"] select {
    background: var(--bg-gray);
    color: var(--text-color);
    border-color: var(--gray-border);
}
[data-theme="dark"] .footer-bottom { background: #020617; }
[data-theme="dark"] .header-topbar { background: #072a6b; }
[data-theme="dark"] .bg-gray { background: var(--bg-gray); }
[data-theme="dark"] .album-img-item, [data-theme="dark"] .video-card { background: var(--bg-card); }
[data-theme="dark"] .recruitment-card, [data-theme="dark"] .profile-card { background: var(--bg-card); }
[data-theme="dark"] .product-main-slider { border-color: var(--gray-border); background: var(--bg-gray); }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: inline; }

/* Light mode dark toggle icons */
.icon-sun { display: inline; }
.icon-moon { display: none; }

/* ============================================================
   BASE STYLES
   ============================================================ */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-gray);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a { text-decoration: none; color: var(--primary-color); transition: var(--transition-fast); }
a:hover { color: var(--primary-light); }

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 700;
    color: var(--text-color);
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.mt-4        { margin-top: 2rem; }
.mb-4        { margin-bottom: 2rem; }
.bg-gray     { background-color: var(--bg-gray); }
.bg-primary  { background-color: var(--primary-color); color: #fff; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
    line-height: 1.4;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff !important;
    border-color: var(--primary-color);
    box-shadow: 0 4px 14px rgba(11, 61, 145, 0.35);
}
.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 61, 145, 0.4);
    color: #fff !important;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

.btn-secondary {
    background: var(--secondary-color);
    color: #fff;
    border-color: var(--secondary-color);
}
.btn-secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

/* ============================================================
   HEADER - TOP BAR
   ============================================================ */
.header-topbar {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.85);
    font-size: 0.82rem;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

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

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.topbar-item {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}
.topbar-item:hover { color: #fff; }

.topbar-hotline {
    background: var(--secondary-color);
    color: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.83rem;
    text-decoration: none;
    transition: var(--transition);
    animation: pulse-sm 2s infinite;
}
.topbar-hotline:hover { background: var(--secondary-dark); color: #fff; }

@keyframes pulse-sm {
    0%, 100% { box-shadow: 0 0 0 0 rgba(243,156,18,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(243,156,18,0); }
}

.topbar-social { display: flex; align-items: center; gap: 8px; }
.topbar-social-link {
    color: rgba(255,255,255,0.75);
    display: flex;
    align-items: center;
    transition: color 0.2s, transform 0.2s;
    text-decoration: none;
}
.topbar-social-link:hover { color: #fff; transform: translateY(-1px); }

/* ============================================================
   HEADER - MAIN BAR
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    transition: box-shadow 0.3s ease;
}

.site-header.scrolled .header-main {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.header-main {
    background: var(--bg-color);
    border-bottom: 1px solid var(--gray-border);
    transition: var(--transition);
}

.header-main-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: var(--header-height);
}

/* Logo */
.site-logo { flex-shrink: 0; }
.site-logo .logo-img { max-height: 52px; width: auto; }
.site-logo .logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

/* Desktop Navigation */
.main-navigation { flex: 1; display: flex; justify-content: center; }

.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-menu li { position: relative; }

.nav-menu a {
    display: block;
    padding: 8px 14px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    position: relative;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu li.current-menu-item > a {
    color: var(--primary-color);
    background: rgba(11,61,145,0.06);
}

.nav-menu li.current-menu-item > a {
    color: var(--primary-color);
    font-weight: 700;
}

/* Dropdown (sub-menu) */
.nav-menu .sub-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: var(--bg-color);
    border: 1px solid var(--gray-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    list-style: none;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 1000;
}

.nav-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu a {
    padding: 9px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    width: 100%;
}

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Dark Mode Button */
.dark-mode-btn {
    background: transparent;
    border: 1.5px solid var(--gray-border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    color: var(--text-color);
}
.dark-mode-btn:hover {
    background: var(--bg-gray);
    border-color: var(--primary-color);
    transform: rotate(20deg);
}

/* Call Button */
.btn-call {
    padding: 9px 18px;
    font-size: 0.88rem;
    white-space: nowrap;
}

/* Hamburger Button */
.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition-fast);
}
.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--text-color);
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}
.hamburger-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================================
   MOBILE NAVIGATION DRAWER
   ============================================================ */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1199;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    backdrop-filter: blur(2px);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100dvh;
    background: var(--bg-color);
    z-index: 1200;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: -8px 0 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}

.mobile-nav.active { right: 0; }

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--gray-border);
    background: var(--primary-color);
    color: #fff;
}

.mobile-nav-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}

.mobile-nav-close {
    background: rgba(255,255,255,0.15);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.mobile-nav-close:hover { background: rgba(255,255,255,0.25); }

.mobile-nav-menu {
    list-style: none;
    padding: 12px;
    flex: 1;
}

.mobile-nav-menu li {
    border-bottom: 1px solid var(--gray-border);
}

.mobile-nav-menu a {
    display: block;
    padding: 13px 10px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.mobile-nav-menu a:hover,
.mobile-nav-menu li.current-menu-item > a {
    color: var(--primary-color);
    background: rgba(11,61,145,0.05);
    padding-left: 18px;
}

.mobile-nav-menu .sub-menu {
    list-style: none;
    padding-left: 15px;
    border-left: 2px solid var(--gray-border);
    margin: 0 0 8px 10px;
}

.mobile-nav-menu .sub-menu a {
    font-size: 0.9rem;
    padding: 10px 10px;
    color: var(--text-muted);
}

.mobile-nav-cta {
    padding: 16px;
    border-top: 1px solid var(--gray-border);
    background: var(--bg-gray);
}

/* ============================================================
   HERO SECTION & SLIDER
   ============================================================ */
.hero-section, .hero-slider-section {
    position: relative;
    overflow: hidden;
    color: #fff;
}

.hero-section {
    background: linear-gradient(135deg, rgba(11,61,145,0.92) 0%, rgba(7,42,107,0.85) 100%), url('assets/img/hero-bg.jpg') center/cover no-repeat;
    padding: 120px 0;
    text-align: center;
    min-height: 560px;
    display: flex;
    align-items: center;
}

.hero-slider-section .swiper-slide {
    padding: 120px 0;
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-slider-section .swiper-slide::before,
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, rgba(30,90,179,0.3), transparent 70%);
    pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-swiper .swiper-pagination-bullet {
    background: rgba(255,255,255,0.5);
    opacity: 1;
}
.hero-swiper .swiper-pagination-bullet-active {
    background: #fff;
}
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}
.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover {
    color: #fff;
}
    letter-spacing: -1px;
    line-height: 1.15;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-desc {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-actions .btn-outline {
    border-color: rgba(255,255,255,0.7);
    color: #fff;
}
.hero-actions .btn-outline:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: #fff;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 80px 0; }
.section-sm { padding: 50px 0; }

.section-header { margin-bottom: 50px; }

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 12px;
    line-height: 1.2;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============================================================
   CARDS - PRODUCTS
   ============================================================ */
.product-grid, .news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
}

.product-card, .news-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-border);
    display: flex;
    flex-direction: column;
}

.product-card:hover, .news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(11,61,145,0.15);
}

.product-thumb img, .news-thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.product-card:hover .product-thumb img,
.news-card:hover .news-thumb img {
    transform: scale(1.06);
}

.product-info, .news-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title, .news-title {
    font-size: 1.05rem;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.product-title a, .news-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

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

.product-price {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-top: auto;
}

.contact-price {
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 600;
}

/* Product Category Tags */
.product-cats {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.product-cat-tag {
    background: rgba(11,61,145,0.08);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: #0d1b2a;
    color: #94a3b8;
    padding-top: 70px;
    margin-top: auto;
}

.footer-top { padding-bottom: 50px; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.widget-title {
    color: #e2e8f0;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

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

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

.footer-widget a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-widget a:hover { color: var(--secondary-color); padding-left: 4px; }

.footer-contact p {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #94a3b8;
}

.footer-social { display: flex; gap: 12px; margin-top: 16px; margin-bottom:10px; }
.footer-social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8 !important;
    font-size: 1rem;
    transition: var(--transition);
    text-decoration: none;
}
.footer-social a:hover { background: var(--primary-color); color: #fff !important; transform: translateY(-3px); }

.footer-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 24px;
}

.footer-bottom {
    background: #060d14;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.copyright { font-size: 0.85rem; color: #64748b; }

/* ============================================================
   HEADER INFO BAR (Ticker + Search)
   ============================================================ */
.header-infobar {
    background: linear-gradient(90deg, #0b2e6b 0%, #0b3d91 60%, #1652b5 100%);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
    z-index: 500;          /* Đủ cao để phủ lên slider bên dưới */
    overflow: visible;     /* Cho phép dropdown search tràn ra ngoài */
}

.header-infobar-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 40px;
    padding-top: 0;
    padding-bottom: 0;
}

/* --- Ticker bên trái --- */
.infobar-ticker {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    height: 40px;
}

.ticker-label {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--secondary-color, #f59e0b);
    color: #1a1a1a;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0 14px;
    height: 100%;
    white-space: nowrap;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
    padding-right: 22px;
}
.ticker-label .ticker-icon { font-size: 0.9rem; }

/* Vùng ticker chạy */
.ticker-track {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
    padding-left: 16px;
}

/* Mỗi item */
.ticker-item {
    position: absolute;
    left: 16px;
    right: 0;
    color: rgba(255,255,255,0.92);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    transition: none;
    opacity: 0;
    transform: translateY(100%);
    line-height: 40px;
    display: block;
}
.ticker-item:hover { color: var(--secondary-color, #f59e0b); text-decoration: underline; }
.ticker-item.active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.ticker-item.exit-up {
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Nút prev/next ticker */
.ticker-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    margin-right: 8px;
}
.ticker-btn {
    background: rgba(255,255,255,0.12);
    border: none;
    color: rgba(255,255,255,0.7);
    width: 22px;
    height: 22px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    padding: 0;
}
.ticker-btn:hover { background: rgba(255,255,255,0.25); color: #fff; }

/* Separator */
.infobar-sep {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.2);
    flex-shrink: 0;
}

/* --- Search bên phải --- */
.infobar-search {
    flex-shrink: 0;
    width: 280px;
    position: relative;   /* Gốc toạ độ cho dropdown con */
    z-index: 501;
}

/* Override live search input trong infobar */
.infobar-search .onpd-search-wrapper {
    margin: 0;
}
.infobar-search .onpd-search-input {
    background: rgba(255,255,255,0.12) !important;
    border: 1px solid rgba(255,255,255,0.25) !important;
    color: #fff !important;
    border-radius: 20px !important;
    font-size: 0.82rem !important;
    padding: 6px 16px 6px 36px !important;
    height: 30px !important;
    transition: background 0.3s, border-color 0.3s;
}
.infobar-search .onpd-search-input::placeholder { color: rgba(255,255,255,0.55) !important; }
.infobar-search .onpd-search-input:focus {
    background: rgba(255,255,255,0.22) !important;
    border-color: rgba(255,255,255,0.5) !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.15) !important;
}
.infobar-search .onpd-search-icon {
    color: rgba(255,255,255,0.6) !important;
    font-size: 0.85rem;
    top: 50% !important;
    transform: translateY(-50%);
    left: 12px !important;
}
/* Dropdown kết quả live search trong infobar */
.infobar-search .onpd-search-results,
.infobar-search .onpd-live-search-wrapper .onpd-search-results,
.infobar-search #onpd-search-results {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25) !important;
    z-index: 99999 !important;   /* Nằm trên mọi thứ kể cả slider */
    background: #fff !important;
}

/* Responsive: ẩn infobar trên mobile */
@media (max-width: 768px) {
    .header-infobar { display: none; }
}


/* ============================================================
   FLOATING CONTACT BUTTONS
   ============================================================ */
.floating-contact {
    position: fixed;
    bottom: 30px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 998;
}

.float-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 1.4rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    transition: var(--transition);
    position: relative;
}

.float-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.float-btn .float-tooltip {
    position: absolute;
    right: calc(100% + 10px);
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 6px;
    opacity: 0;
    transform: translateX(4px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

.float-btn:hover .float-tooltip { opacity: 1; transform: translateX(0); }

.float-phone { background: linear-gradient(135deg, #28a745, #20913b); }
.float-zalo  { background: linear-gradient(135deg, #0068ff, #0052cc); font-weight: 900; font-size: 1rem; letter-spacing: -0.5px; }
.float-messenger { background: linear-gradient(135deg, #0084ff, #0b5fcc); }

/* Ring animation */
@keyframes ring {
    0%, 50%, 100% { transform: rotate(0); }
    10% { transform: rotate(15deg); }
    20% { transform: rotate(-12deg); }
    30% { transform: rotate(10deg); }
    40% { transform: rotate(-8deg); }
}
.float-phone { animation: ring 3s infinite; }

/* ============================================================
   ANIMATIONS & EFFECTS
   ============================================================ */

/* Pulse for CTA button */
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(11, 61, 145, 0.6); }
    70%  { box-shadow: 0 0 0 12px rgba(11, 61, 145, 0); }
    100% { box-shadow: 0 0 0 0 rgba(11, 61, 145, 0); }
}

.btn-pulse {
    animation: pulse 2.5s infinite;
}

/* Fade in up */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.7s ease forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

/* ============================================================
   SWIPER CUSTOMIZATION
   ============================================================ */
.product-thumb-slider .swiper-slide-thumb-active {
    opacity: 1 !important;
    border-color: var(--primary-color) !important;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-color); }
.breadcrumb .current { color: var(--primary-color); font-weight: 500; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination-wrapper { margin-top: 40px; }
.pagination-wrapper .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination-wrapper .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1.5px solid var(--gray-border);
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    text-decoration: none;
    background: var(--bg-color);
}
.pagination-wrapper .page-numbers:hover,
.pagination-wrapper .page-numbers.current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ============================================================
   FORMS
   ============================================================ */
input, textarea, select {
    font-family: inherit;
    font-size: 0.95rem;
    border: 1.5px solid var(--gray-border);
    border-radius: var(--border-radius);
    padding: 10px 14px;
    width: 100%;
    background: var(--bg-color);
    color: var(--text-color);
    transition: border-color 0.2s, box-shadow 0.2s;
    line-height: 1.5;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(11,61,145,0.12);
}

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }

.form-message {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    margin-top: 12px;
    font-weight: 500;
    font-size: 0.9rem;
}
.form-message.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.form-message.error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ============================================================
   RESPONSIVE - MOBILE FIRST
   ============================================================ */

/* ---- Tablet (≤1024px) ---- */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .nav-menu a { padding: 8px 10px; font-size: 0.88rem; }
		.mobilehiden {    padding: 5px !important;
    font-size: 12px !important;}
}

/* ---- Mobile (≤768px) ---- */
@media (max-width: 768px) {
    :root { --header-height: 58px; }

    /* Header */
    .main-navigation { display: none; }
    .header-topbar   { display: none; }
    .btn-call        { display: none; }
    .hamburger-btn   { display: flex; }

    /* Logo nhỏ lại */
    .site-logo .logo-img { max-height: 40px; }
    .site-logo .logo-text { font-size: 1.05rem; }

    /* Dark mode btn nhỏ lại */
    .dark-mode-btn { width: 34px; height: 34px; font-size: 0.9rem; }

    /* Hero */
    .hero-section { padding: 70px 0 60px; min-height: 360px; }
    .hero-title   { font-size: 1.8rem; }
    .hero-desc    { font-size: 0.95rem; }

    /* Sections */
    .section    { padding: 50px 0; }
    .section-sm { padding: 35px 0; }

    /* Footer Accordion (Mobile) */
    .footer-grid { grid-template-columns: 1fr; gap: 0; }
    .footer-widget { margin-bottom: 0; border-bottom: 1px solid rgba(255,255,255,0.07); }
    .footer-widget:last-child { border-bottom: none; }

    /* Widget title – flex row: tiêu đề bên trái, icon bên phải */
    .footer-widget .widget-title {
        margin-bottom: 0;
        padding: 16px 0;
        padding-right: 36px;   /* nhường chỗ cho icon */
        cursor: pointer;
        position: relative;    /* để icon absolute theo title */
        display: block;        /* text bình thường */
        user-select: none;
    }

    /* Xoá đường gạch vàng dưới title trên mobile */
    .footer-widget .widget-title::after {
        display: none;
    }

    /* Icon +/- nằm tuyệt đối bên phải, căn giữa dọc */
    .footer-widget .widget-title::before {
        content: '+';
        position: absolute;
        right: 4px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.4rem;
        font-weight: 300;
        line-height: 1;
        color: var(--secondary-color);
        transition: transform 0.3s ease;
    }
    .footer-widget .widget-title.active::before {
        content: '−';
        transform: translateY(-50%) rotate(0deg);
    }

    /* Nội dung ẩn/hiện */
    .footer-widget-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding-top 0.25s ease;
        padding-top: 0;
        padding-bottom: 0;
    }
    .footer-widget .widget-title.active + .footer-widget-content {
        padding-bottom: 16px;
    }
    /* Product / news grids - 2 cột */
    .product-grid, .news-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
    .product-thumb img, .news-thumb img { height: 160px; }
    .product-info, .news-content { padding: 12px; }
    .product-title, .news-title { font-size: 0.9rem; }

    /* Floating buttons */
    .float-btn { width: 44px; height: 44px; font-size: 1.15rem; }
    .floating-contact { bottom: 18px; right: 14px; gap: 10px; }
    .float-tooltip { display: none; } /* Ẩn tooltip trên mobile */

    /* Section title */
    .section-title { font-size: 1.6rem; }
}

/* ---- Mobile nhỏ (≤480px) ---- */
@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { text-align: center; }
    .product-grid, .news-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .footer-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 1.4rem; }
}

/* ============================================================
   MOBILE NAVIGATION - NÂNG CẤP
   ============================================================ */

/* Hamburger lớn hơn để dễ bấm */
.hamburger-btn {
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}
.hamburger-btn:hover { background: rgba(11,61,145,0.07); }

/* Drawer rộng hơn trên màn lớn mobile */
@media (max-width: 768px) {
    .mobile-nav { width: 280px; }
}
@media (max-width: 380px) {
    .mobile-nav { width: 260px; max-width: 90vw; }
}

/* Menu items lớn hơn để tap dễ */
.mobile-nav-menu > li > a {
    padding: 14px 12px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Sub-menu toggle arrow */
.mobile-nav-menu li.menu-item-has-children > a::after {
    content: '›';
    font-size: 1.3rem;
    line-height: 1;
    transition: transform 0.25s;
    color: var(--text-muted);
}
.mobile-nav-menu li.menu-item-has-children.open > a::after {
    transform: rotate(90deg);
    color: var(--primary-color);
}

/* Active menu item */
.mobile-nav-menu li.current-menu-item > a,
.mobile-nav-menu li.current-menu-ancestor > a {
    color: var(--primary-color) !important;
    background: rgba(11,61,145,0.07);
    border-left: 3px solid var(--primary-color);
    padding-left: 14px;
}

/* Sub-menu ẩn/hiện mượt */
.mobile-nav-menu .sub-menu {
    display: none;
    list-style: none;
    padding: 4px 0 8px 16px;
    border-left: 2px solid rgba(11,61,145,0.2);
    margin-left: 12px;
    margin-bottom: 4px;
}
.mobile-nav-menu li.open > .sub-menu { display: block; }

.mobile-nav-menu .sub-menu a {
    padding: 10px 10px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 6px;
    display: block;
    justify-content: flex-start;
}
.mobile-nav-menu .sub-menu a:hover { color: var(--primary-color); padding-left: 16px; }

/* Mobile nav header - tên trang web */
.mobile-nav-header {
    padding: 16px 20px;
}

/* CTA trong mobile nav */
.mobile-nav-cta {
    padding: 14px;
}
.mobile-nav-cta .btn {
    width: 100%;
    text-align: center;
    padding: 13px;
    font-size: 0.95rem;
}

/* Body lock khi menu mở */
body.mobile-nav-open { overflow: hidden; }

/* ============================================================
   SCROLL TO TOP BUTTON
   ============================================================ */
#scroll-top {
    position: fixed;
    bottom: 110px;
    right: 24px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 997;
    transform: translateY(10px);
}
#scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#scroll-top:hover { background: var(--primary-light); transform: translateY(-3px); }

@media (max-width: 768px) {
    #scroll-top { bottom: 90px; right: 14px; width: 36px; height: 36px; font-size: 1rem; }
}

/* ============================================================
   TOUCH IMPROVEMENTS
   ============================================================ */
@media (hover: none) {
    /* Thiết bị cảm ứng: bỏ hover animations để tránh stuck */
    .product-card:hover,
    .news-card:hover,
    .album-card:hover,
    .video-card:hover { transform: none; }

    /* Tap highlight màu nhạt */
    a, button { -webkit-tap-highlight-color: rgba(11,61,145,0.1); }

    /* Input lớn hơn để dễ bấm trên mobile */
    input, textarea, select { font-size: 16px; } /* Ngăn iOS zoom khi focus */
}

