/*
Theme Name: Satvlo Premium Theme
Theme URI: https://satvlo.com.vn
Description: Theme chuyên nghiệp chuẩn SEO và tối ưu tốc độ dành cho satvlo.com.vn, thay thế WooCommerce bằng Custom Post Type và Flatsome bằng giao diện báo chí cao cấp.
Version: 1.0.0
Author: Web3s
Author URI: https://web3s.vn
Text Domain: satvlo-theme
*/

:root {
    --primary-color: #d82c2c;
    --primary-hover: #b51f1f;
    --secondary-color: #2c3e50;
    --accent-color: #e67e22;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a1a;
    --text-color: #333333;
    --text-muted: #7f8c8d;
    --border-color: #e2e8f0;
    --font-heading: 'Outfit', 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', 'Segoe UI', Roboto, sans-serif;
    --border-radius: 8px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

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

/* Base Layout Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Premium Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(216, 44, 44, 0.3);
}

.btn-primary:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(216, 44, 44, 0.4);
}

.btn-secondary {
    background: var(--secondary-color);
    color: #ffffff;
}

.btn-secondary:hover {
    background: #1e2b37;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-color), #d35400);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(230, 126, 34, 0.3);
}

.btn-accent:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(230, 126, 34, 0.4);
}

/* Premium Flex & Grid Utilities */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Header UI Styles */
header.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-top {
    background-color: var(--secondary-color);
    color: #ffffff;
    font-size: 0.85rem;
    padding: 8px 0;
}

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

.header-top-links a {
    color: rgba(255,255,255,0.8);
    margin-left: 15px;
}

.header-top-links a:hover {
    color: #ffffff;
}

.header-main {
    padding: 15px 0;
}

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

.site-logo img {
    max-height: 55px;
    display: block;
}

.site-logo a {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
}

.header-search {
    flex: 1;
    max-width: 450px;
}

.search-form {
    display: flex;
    position: relative;
}

.search-field {
    width: 100%;
    padding: 10px 15px;
    padding-right: 50px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.search-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(216, 44, 44, 0.1);
}

.search-submit {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 15px;
    padding: 0 15px;
    cursor: pointer;
    font-size: 0.85rem;
}

.search-submit:hover {
    background: var(--primary-hover);
}

/* Nav Menu UI */
nav.main-navigation {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

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

.menu-primary {
    display: flex;
    list-style: none;
}

.menu-primary li {
    position: relative;
}

.menu-primary a {
    display: block;
    padding: 12px 18px;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.menu-primary a:hover, .menu-primary li.current-menu-item a {
    color: var(--primary-color);
    background-color: rgba(0,0,0,0.02);
}

/* Dropdown Menu Support */
.menu-primary li ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    box-shadow: var(--shadow-md);
    list-style: none;
    min-width: 200px;
    display: none;
    z-index: 999;
}

.menu-primary li:hover ul {
    display: block;
}

.menu-primary li ul li a {
    padding: 10px 15px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

/* Google Translation Flags styling */
.google-translate-flags {
    display: flex;
    align-items: center;
    gap: 8px;
}

.google-translate-flags img {
    cursor: pointer;
    width: 24px;
    height: 16px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: var(--transition);
}

.google-translate-flags img:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}

.goog-te-banner-frame, .goog-te-balloon-frame {
    display: none !important;
}

body {
    top: 0px !important;
}

/* Home News Section */
.hero-news-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin: 30px 0;
}

@media (max-width: 768px) {
    .hero-news-grid {
        grid-template-columns: 1fr;
    }
}

.main-hero-story {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 480px;
    box-shadow: var(--shadow-md);
}

.main-hero-story img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.main-hero-story:hover img {
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.4), transparent);
    padding: 25px;
    color: #ffffff;
}

.hero-tag {
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 10px;
}

.hero-title {
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 10px;
}

.hero-title a {
    color: #ffffff;
}

.hero-meta {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
}

/* Sidebar Recent List */
.sidebar-list-stories {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.side-story-card {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.side-story-card:last-child {
    border: none;
}

.side-story-thumb {
    width: 90px;
    height: 65px;
    border-radius: var(--border-radius);
    overflow: hidden;
    flex-shrink: 0;
}

.side-story-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.side-story-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.side-story-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
}

.side-story-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Category Grid Block (Home Sections) */
.category-block-section {
    margin-bottom: 40px;
}

.section-title-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--secondary-color);
    margin-bottom: 20px;
    padding-bottom: 8px;
}

.section-title-wrap h2 {
    color: var(--secondary-color);
    font-size: 1.4rem;
    position: relative;
    padding-bottom: 8px;
}

.section-title-wrap h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--primary-color);
}

.section-title-wrap .view-all-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
}

.news-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px;
}

.news-card {
    background: #ffffff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.news-card-thumb {
    height: 175px;
    overflow: hidden;
    position: relative;
}

.news-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-cat {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary-color);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}

.news-card-body {
    padding: 15px;
}

.news-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-card-excerpt {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* Product Card Grid & Styling */
.product-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: #ffffff;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.product-card-thumb {
    height: 200px;
    overflow: hidden;
    background-color: #f8f9fa;
}

.product-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.product-card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-meta-specs {
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.product-meta-specs span {
    display: block;
}

.product-price-row {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.15rem;
    color: var(--primary-color);
    font-weight: 700;
}

.product-btn {
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 4px;
}

/* Premium Sidebar Ads / Web3s System Ads widget */
.web3s-ad-widget {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #ffffff;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.web3s-ad-widget::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.web3s-ad-title {
    font-size: 1.1rem;
    color: #38bdf8;
    margin-bottom: 10px;
}

.web3s-ad-content {
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-bottom: 15px;
}

.web3s-ad-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.6rem;
    background: rgba(255,255,255,0.15);
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

/* Call to Action Forms & CTA widgets */
.detail-cta-box {
    background: #f8fafc;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    margin: 30px 0;
    box-shadow: var(--shadow-sm);
}

.detail-cta-box h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.detail-cta-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.detail-cta-buttons {
    display: flex;
    gap: 15px;
}

/* Footer layout style */
footer.site-footer {
    background-color: var(--bg-dark);
    color: #cbd5e1;
    font-size: 0.85rem;
    padding: 50px 0 20px;
    border-top: 5px solid var(--primary-color);
}

footer.site-footer h3 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

footer.site-footer h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

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

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

.footer-column ul li a {
    color: #94a3b8;
}

.footer-column ul li a:hover {
    color: #ffffff;
    padding-left: 3px;
}

.footer-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.footer-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #334155;
    color: #ffffff;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-social-links a:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

/* Footer Button Highlighted Style (New Post & Assistant next to each other) */
.footer-cta-action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.footer-btn-post {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
    font-size: 0.8rem !important;
    padding: 8px 14px !important;
    border-radius: 20px !important;
}

.footer-btn-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(16, 185, 129, 0.3);
}

.footer-btn-ai {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
    font-size: 0.8rem !important;
    padding: 8px 14px !important;
    border-radius: 20px !important;
}

.footer-btn-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(59, 130, 246, 0.3);
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-copyright {
    color: #64748b;
}

/* Member Portal Form styles */
.member-portal-wrapper {
    background: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 30px;
    margin: 30px 0;
    border: 1px solid var(--border-color);
}

.portal-nav {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 25px;
    gap: 15px;
}

.portal-nav-tab {
    padding: 10px 15px;
    font-family: var(--font-heading);
    font-weight: 700;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.portal-nav-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.portal-section {
    display: none;
}

.portal-section.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(216, 44, 44, 0.1);
}

.google-login-btn-wrap {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

.btn-google {
    background: #ffffff;
    color: #757575;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-sm);
}

.btn-google:hover {
    background: #f8f9fa;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* Post submit tables / list */
.portal-post-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.9rem;
}

.portal-post-table th, .portal-post-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.portal-post-table th {
    background-color: var(--bg-light);
    font-family: var(--font-heading);
    font-weight: 700;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-publish { background: #d1fae5; color: #065f46; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-draft { background: #e2e8f0; color: #475569; }

/* Single Product specs layout */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

@media (max-width: 768px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
    }
}

.product-gallery {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.product-gallery img {
    max-width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: contain;
}

.product-info-panel h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.product-info-panel .price {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 20px;
}

.product-specs-table {
    width: 100%;
    margin-bottom: 25px;
    border-collapse: collapse;
}

.product-specs-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.product-specs-table td.spec-name {
    font-weight: 600;
    color: var(--secondary-color);
    width: 150px;
}

/* Pagination UI */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    font-family: var(--font-heading);
    font-weight: 600;
    transition: var(--transition);
}

.pagination a:hover, .pagination span.current {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

/* ==========================================
   MEGA MENU & COLLAPSIBLE MOBILE SUBMENU
   ========================================== */

/* Nút ẩn mũi tên chỉ hiện ở Mobile */
.submenu-toggle-arrow {
    display: none;
}

/* Hamburger button styling for mobile navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 10px;
    outline: none;
}

@media (min-width: 769px) {
    header.site-header {
        position: relative;
    }
    
    .main-navigation .mega-menu-item {
        position: static !important;
    }

    .main-navigation .mega-menu-item > .mega-menu-wrapper {
        left: 0;
        right: 0;
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        position: absolute;
        top: 100%;
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
        padding: 25px 30px;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-lg);
        background-color: #ffffff;
        border: 1px solid var(--border-color);
        z-index: 999;
    }

    .main-navigation .mega-menu-wrapper > li {
        width: auto !important;
    }

    .main-navigation .mega-menu-wrapper > li > a {
        font-weight: 700 !important;
        color: var(--primary-color) !important;
        border-bottom: 2px solid var(--border-color);
        padding: 0 0 8px 0 !important;
        margin-bottom: 12px;
        display: block;
        font-size: 15px;
    }

    .main-navigation .mega-menu-wrapper > li .sub-menu,
    .main-navigation .mega-menu-wrapper > li .children {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        background: none !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
    }

    .main-navigation .mega-menu-wrapper > li .sub-menu a,
    .main-navigation .mega-menu-wrapper > li .children a {
        padding: 4px 0 !important;
        font-size: 13.5px !important;
        color: var(--text-color) !important;
        font-weight: 500 !important;
    }

    .main-navigation .mega-menu-wrapper > li .sub-menu a:hover,
    .main-navigation .mega-menu-wrapper > li .children a:hover {
        color: var(--primary-color) !important;
        background: none !important;
        padding-left: 3px !important;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-navigation .menu-primary {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
        background-color: #ffffff;
        border-top: 1px solid var(--border-color);
    }

    .main-navigation .menu-primary.active {
        display: flex;
    }

    .main-navigation .menu-primary li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .main-navigation .menu-primary li a {
        padding: 12px 20px;
        width: 100%;
        display: block;
    }

    .main-navigation .menu-primary .sub-menu,
    .main-navigation .menu-primary .children {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--primary-color);
        padding: 5px 0 10px 15px;
        margin-left: 20px;
        width: calc(100% - 20px);
    }

    .main-navigation .menu-primary .sub-menu .sub-menu,
    .main-navigation .menu-primary .children .children {
        margin-left: 15px !important;
        border-left: 1px dashed var(--border-color) !important;
        padding-left: 10px !important;
        margin-top: 5px;
        margin-bottom: 5px;
    }

    .submenu-toggle-arrow {
        display: inline-flex;
        position: absolute;
        right: 15px;
        top: 8px;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: var(--text-color);
        background-color: rgba(0,0,0,0.02);
        border-radius: 4px;
        transition: var(--transition);
        z-index: 10;
    }

    .submenu-toggle-arrow.expanded i {
        transform: rotate(180deg);
    }

    .submenu-toggle-arrow i {
        transition: transform 0.2s ease;
    }
}

/* ==========================================
   SHOPPING CART & CHECKOUT PAGE STYLING
   ========================================== */

.cart-header-btn {
    position: relative;
    font-size: 1.25rem;
    color: var(--secondary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background-color: #ffffff;
    transition: var(--transition);
    height: 40px;
    width: 50px;
}

.cart-header-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.cart-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: 700;
    line-height: 1;
}

.cart-table-wrapper {
    background: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 30px;
    margin: 30px 0;
    border: 1px solid var(--border-color);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
}

.cart-table th, .cart-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.cart-table th {
    background: var(--bg-light);
    font-weight: 700;
    color: var(--secondary-color);
    font-family: var(--font-heading);
}

.cart-table td {
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.quantity-input {
    width: 70px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
    font-family: var(--font-body);
    outline: none;
    transition: var(--transition);
}

.quantity-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(216, 44, 44, 0.1);
}

.form-message {
    font-size: 0.95rem;
    line-height: 1.4;
    transition: var(--transition);
}

/* Responsive Cart Grid & Tables */
@media (max-width: 992px) {
    .cart-grid-container {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
}

@media (max-width: 768px) {
    .cart-table, 
    .cart-table thead, 
    .cart-table tbody, 
    .cart-table th, 
    .cart-table td, 
    .cart-table tr {
        display: block;
    }
    
    .cart-table thead {
        display: none; /* Hide standard headers on mobile */
    }
    
    .cart-table tr {
        margin-bottom: 20px;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        padding: 15px;
        background: #ffffff;
        box-shadow: var(--shadow-sm);
    }
    
    .cart-table td {
        border: none;
        position: relative;
        padding-left: 45% !important;
        text-align: right;
        padding-top: 10px;
        padding-bottom: 10px;
        border-bottom: 1px dashed #f1f5f9;
    }

    .cart-table td:last-child {
        border-bottom: none;
    }
    
    .cart-table td:before {
        content: attr(data-label);
        position: absolute;
        top: 10px;
        left: 10px;
        width: 40%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 700;
        font-family: var(--font-heading);
        color: var(--secondary-color);
    }
    
    /* Dynamically assign mobile labels */
    .cart-table td:nth-of-type(1):before { content: "Sản phẩm"; }
    .cart-table td:nth-of-type(2):before { content: "Đơn giá"; }
    .cart-table td:nth-of-type(3):before { content: "Số lượng"; }
    .cart-table td:nth-of-type(4):before { content: "Thành tiền"; }
    .cart-table td:nth-of-type(5):before { content: "Thao tác"; }

    .cart-table td div {
        justify-content: flex-end;
    }
}

/* ==========================================
   CONTACT PAGE STYLING
   ========================================== */
.contact-grid {
    transition: var(--transition);
}
.contact-info-panel .info-card {
    transition: var(--transition);
}
.contact-info-panel .info-card li a:hover {
    color: var(--primary-color) !important;
    text-decoration: underline;
}
.contact-form-panel .form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(216, 44, 44, 0.1) !important;
}

/* ==========================================
   VIDEO PAGE STYLING
   ========================================== */
.video-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md) !important;
    border-color: var(--primary-color) !important;
}
.video-card:hover .play-overlay {
    background: rgba(0, 0, 0, 0.35) !important;
}
.video-card:hover .play-overlay i {
    transform: scale(1.1);
    color: var(--primary-color) !important;
}
.video-card-title a {
    transition: var(--transition);
}
.video-card-title a:hover {
    color: var(--primary-color) !important;
}

/* ==========================================
   GALLERY & LIGHTBOX SLIDESHOW STYLING
   ========================================== */
.gallery-album-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md) !important;
    border-color: var(--primary-color) !important;
}
.gallery-album-card:hover .album-cover-wrap img {
    transform: scale(1.05);
}
.gallery-album-title a {
    transition: var(--transition);
}
.gallery-album-title a:hover {
    color: var(--primary-color) !important;
}

.gallery-item:hover .gallery-hover-overlay {
    opacity: 1 !important;
}
.gallery-item:hover img {
    transform: scale(1.08);
}
.gallery-item:hover .gallery-hover-overlay i {
    transform: scale(1) !important;
}

.satvlo-lightbox-modal {
    transition: opacity 0.3s ease;
}
.lightbox-nav {
    transition: var(--transition);
}
.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: var(--primary-color) !important;
}
.lightbox-close {
    transition: var(--transition);
}
.lightbox-close:hover {
    color: var(--primary-color) !important;
    transform: scale(1.1);
}

/* ==========================================
   AI ASSISTANT CHATBOT FLOATING WIDGET
   ========================================== */
.ai-widget-toggler {
    position: fixed;
    bottom: 95px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color, #d82c2c), var(--primary-hover, #b51f1f));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 25px rgba(216, 44, 44, 0.35);
    cursor: pointer;
    z-index: 999999;
    transition: all 0.25s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
    font-size: 24px;
}
.ai-widget-toggler:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 30px rgba(216, 44, 44, 0.45);
}
.ai-widget-invitation {
    position: fixed;
    bottom: 165px;
    right: 25px;
    background: #ffffff;
    border: 1px solid var(--border-color, #E2E8F0);
    border-radius: 12px;
    padding: 15px 35px 15px 18px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    z-index: 999998;
    max-width: 300px;
    font-size: 13.5px;
    color: var(--text-color, #2D3748);
    cursor: pointer;
    transform: translateY(15px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: left;
    border-left: 4px solid var(--primary-color, #d82c2c);
}
.ai-widget-invitation.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.ai-widget-invitation:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}
.ai-widget-invitation-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    color: var(--text-muted, #718096);
    cursor: pointer;
    font-size: 16px;
    padding: 2px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ai-widget-container {
    position: fixed;
    bottom: 165px;
    right: 25px;
    width: 380px;
    max-width: calc(100vw - 50px);
    height: 520px;
    background: #ffffff;
    border: 1px solid var(--border-color, #E2E8F0);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 999999;
    transform: scale(0.85) translateY(30px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ai-widget-container.active {
    transform: scale(1) translateY(0);
    opacity: 1;
    visibility: visible;
}
.ai-widget-history {
    flex: 1;
    padding: 20px 15px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.01);
}
.chat-bubble-user {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
    animation: slideInUp 0.3s ease;
}
.chat-bubble-user .bubble-content {
    background: linear-gradient(135deg, var(--primary-color, #d82c2c), var(--primary-hover, #b51f1f));
    color: #fff;
    padding: 12px 18px;
    border-radius: 18px 18px 2px 18px;
    max-width: 80%;
    font-size: 14.5px;
    box-shadow: 0 4px 10px rgba(216, 44, 44, 0.15);
    line-height: 1.5;
    text-align: left;
}
.chat-bubble-ai {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 15px;
    animation: slideInUp 0.3s ease;
}
.chat-bubble-ai .bubble-content {
    background: var(--bg-light, #f8f9fa);
    color: var(--text-color, #333);
    padding: 12px 18px;
    border-radius: 18px 18px 18px 2px;
    max-width: 80%;
    font-size: 14.5px;
    border: 1px solid var(--border-color, #E2E8F0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    line-height: 1.6;
    text-align: left;
}
.chat-bubble-error .bubble-content {
    background: #fdf2f2 !important;
    color: #9b1c1c !important;
    border-color: #fbd5d5 !important;
}
.ai-widget-form {
    padding: 15px;
    border-top: 1px solid var(--border-color, #E2E8F0);
    display: flex;
    gap: 10px;
    background: #ffffff;
    align-items: center;
    margin-bottom: 0;
}
.ai-widget-input-field {
    flex: 1;
    border: 1px solid var(--border-color, #E2E8F0);
    border-radius: 24px;
    padding: 10px 18px;
    font-size: 14px;
    outline: none;
    background: #ffffff;
    color: var(--text-color, #2D3748);
    transition: all 0.25s ease;
}
.ai-widget-input-field:focus {
    border-color: var(--primary-color, #d82c2c);
    box-shadow: 0 0 0 3px rgba(216, 44, 44, 0.1);
}
.ai-widget-send-button {
    background: var(--primary-color, #d82c2c);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 3px 8px rgba(216, 44, 44, 0.2);
    padding: 0;
    font-size: 16px;
}
.ai-widget-send-button:hover {
    background: var(--primary-hover, #b51f1f);
    transform: scale(1.05);
}
.ai-widget-send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



