/* ==========================================================================
   KBVISION.vn Authentic Corporate Design System (Matching kabevision.vn)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg-main: #ffffff;
    --bg-card: #f8fafc;
    --bg-card-hover: #f1f5f9;
    
    --primary: #0056b3; /* Authentic KBVision Corporate Blue */
    --primary-dark: #003d80;
    --primary-light: #e6f0fa;
    
    --secondary-navy: #0f172a;
    --secondary-dark: #1e293b;
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ================= Top Announcement Bar ================= */
.top-announcement {
    background: #0f172a;
    color: #94a3b8;
    padding: 6px 0;
    font-size: 0.8rem;
    border-bottom: 1px solid #1e293b;
}

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

.top-contact-info span {
    margin-right: 25px;
}

.top-contact-info strong {
    color: #ffffff;
}

.top-links a {
    color: #94a3b8;
    transition: color 0.2s;
}

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

/* ================= Header Navbar (Matching kabevision.vn) ================= */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

/* Corporate Brand Logo */
.brand-logo-text {
    font-size: 1.6rem;
    font-weight: 900;
    color: #0056b3;
    letter-spacing: -0.5px;
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-logo-text .sub-logo-tag {
    font-size: 0.52rem;
    color: #64748b;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 4px;
    text-transform: uppercase;
}

/* Clean Main Navigation Menu */
.main-nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav-item {
    position: relative;
}

.main-nav-link {
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
    white-space: nowrap;
    cursor: pointer;
}

.main-nav-link:hover, .main-nav-item.active .main-nav-link {
    color: #0056b3;
}

.nav-arrow {
    font-size: 0.65rem;
    color: #64748b;
    margin-left: 2px;
}

/* Dropdown Sub-menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    padding: 8px 0;
    display: none;
    z-index: 200;
}

.main-nav-item:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    transition: background 0.2s, color 0.2s;
    text-transform: none;
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: #0056b3;
}

/* Search Box Pill on Header Right */
.header-right-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kabevision-search-pill {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    overflow: hidden;
    background: #ffffff;
    width: 220px;
    transition: border-color 0.2s;
}

.kabevision-search-pill:focus-within {
    border-color: #0056b3;
}

.kabevision-search-pill input {
    border: none;
    outline: none;
    padding: 7px 14px;
    font-size: 0.8rem;
    width: 100%;
    color: #0f172a;
}

.kabevision-search-pill button {
    background: #0056b3;
    color: #ffffff;
    border: none;
    width: 38px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
}

.kabevision-search-pill button:hover {
    background: #003d80;
}

.btn-header-cart {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-header-cart:hover {
    background: #0056b3;
    color: #ffffff;
    border-color: #0056b3;
}

.cart-count-badge {
    background: #0056b3;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 10px;
}

.btn-header-cart:hover .cart-count-badge {
    background: #ffffff;
    color: #0056b3;
}

/* ================= Hero Banner (Blue Atmospheric Style) ================= */
.hero-banner-kb {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 40%, #0056b3 100%);
    padding: 45px 0;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero-kb-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.hero-kb-text h1 {
    font-size: 3rem;
    font-weight: 900;
    color: #0056b3;
    line-height: 1.15;
    margin-bottom: 12px;
}

.hero-kb-text h1 span {
    font-style: italic;
    color: #0284c7;
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
}

.hero-kb-text p {
    font-size: 1rem;
    color: #1e293b;
    margin-bottom: 25px;
    max-width: 500px;
}

.hero-kb-actions {
    display: flex;
    gap: 15px;
}

.btn-kb-primary {
    background: #0056b3;
    color: #ffffff;
    padding: 12px 26px;
    border-radius: 25px;
    font-weight: 800;
    font-size: 0.88rem;
    text-transform: uppercase;
    transition: background 0.2s;
}

.btn-kb-primary:hover {
    background: #003d80;
}

.btn-kb-secondary {
    background: #ffffff;
    color: #0056b3;
    border: 2px solid #0056b3;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 800;
    font-size: 0.88rem;
    text-transform: uppercase;
    transition: all 0.2s;
}

.btn-kb-secondary:hover {
    background: #0056b3;
    color: #ffffff;
}

.hero-kb-img {
    text-align: center;
}

.hero-kb-img img {
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
}

/* ================= Clean Tab Navigation (SẢN PHẨM | CÔNG NGHỆ) ================= */
.kabevision-tab-header {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 35px;
    border-bottom: 1px solid #e2e8f0;
}

.tab-btn {
    font-size: 1.1rem;
    font-weight: 800;
    color: #64748b;
    padding: 10px 15px 14px;
    cursor: pointer;
    text-transform: uppercase;
    position: relative;
    background: none;
    border: none;
    transition: color 0.2s;
}

.tab-btn.active {
    color: #0f172a;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: #0f172a;
}

/* ================= Product Showcase Grid (Matching kabevision.vn cards) ================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.product-card {
    background: #f1f5f9;
    border-radius: 18px;
    padding: 22px 18px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid transparent;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
    background: #e2e8f0;
}

.product-thumb {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.product-thumb img {
    max-width: 100%;
    max-height: 170px;
    object-fit: contain;
}

.product-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 10px;
    height: 38px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.price-current {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0056b3;
}

.price-old {
    font-size: 0.8rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.product-btn-group {
    display: flex;
    gap: 8px;
}

.btn-card-buy {
    flex: 1;
    background: #0056b3;
    color: #ffffff;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-card-buy:hover {
    background: #003d80;
}

.btn-card-zalo {
    background: #ffffff;
    color: #0056b3;
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

/* ================= Middle Showcase Banner ================= */
.middle-showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1.8fr 1fr;
    gap: 20px;
    margin-bottom: 45px;
    align-items: stretch;
}

.side-showcase-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.featured-center-card {
    background: linear-gradient(180deg, #0056b3 0%, #002b66 100%);
    border-radius: 20px;
    padding: 30px;
    color: #ffffff;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.featured-center-card h3 {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.featured-center-card p {
    font-size: 1.1rem;
    color: #bae6fd;
}

.featured-center-card img {
    max-width: 100%;
    max-height: 260px;
    object-fit: contain;
    margin: 20px auto;
}

/* ================= Section Heading Clean ================= */
.section-clean-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.section-clean-heading h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
}

.section-clean-heading a {
    color: #0056b3;
    font-size: 0.85rem;
    font-weight: 700;
}

/* ================= Form & Modals ================= */
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    font-size: 0.88rem;
}

.form-control:focus {
    border-color: #0056b3;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 550px;
    padding: 30px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #64748b;
}

.toast-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.floating-contact {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.float-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.float-btn.zalo { background: #0068ff; }
.float-btn.phone { background: #10b981; }

.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 50px 0 20px;
    margin-top: 60px;
    font-size: 0.88rem;
}

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

.footer-col h3 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 18px;
}

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

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

.footer-col ul li a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
}

/* Placeholder style for camera without image */
.product-thumb-placeholder {
    width: 100%;
    height: 180px;
    background: #f1f5f9;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 2.5rem;
    border: 1px dashed #cbd5e1;
}


/* ==========================================================================
   MOBILE RESPONSIVE DESIGN SYSTEM (Tối Ưu Giao Diện Di Động & App Mobile)
   ========================================================================== */

/* Mobile Bottom Fixed Navigation Bar */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.06);
    z-index: 9999;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    text-decoration: none;
    gap: 3px;
    position: relative;
    width: 20%;
}

.mobile-nav-item i {
    font-size: 1.15rem;
}

.mobile-nav-item.active, .mobile-nav-item:hover {
    color: #0056b3;
}

.mobile-cart-badge {
    position: absolute;
    top: -2px;
    right: 18px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 10px;
}

/* Mobile Toggle Hamburger Button */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.4rem;
    color: #0f172a;
    cursor: pointer;
    padding: 6px;
}

@media (max-width: 768px) {
    /* Enable Mobile Bottom Navigation Bar */
    .mobile-bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 65px; /* Prevent bottom nav overlap */
    }

    /* Top Announcement Bar */
    .top-announcement .container {
        flex-direction: column;
        gap: 6px;
        text-align: center;
        padding: 6px 10px;
        font-size: 0.72rem;
    }

    .top-links {
        display: flex;
        justify-content: center;
        gap: 10px;
    }

    /* Navbar Inner Header */
    .site-header {
        padding: 10px 0;
    }

    .navbar-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        flex-wrap: wrap;
    }

    .brand-logo-text img {
        height: 40px !important;
    }

    .header-right-wrap {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .kabevision-search-pill {
        width: 130px;
    }

    .kabevision-search-pill input {
        padding: 5px 8px;
        font-size: 0.75rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Mobile Menu Drawer Dropdown */
    .main-nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        padding: 12px;
        margin-top: 10px;
        border: 1px solid #e2e8f0;
    }

    .main-nav-menu.mobile-active {
        display: flex !important;
    }

    .main-nav-item {
        width: 100%;
        text-align: left;
    }

    .main-nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        font-size: 0.85rem;
        border-bottom: 1px solid #f1f5f9;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: #f8fafc;
        padding-left: 15px;
    }

    /* Hero Banner Mobile */
    .hero-banner-kb {
        padding: 25px 0;
        margin-bottom: 25px;
    }

    .hero-kb-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }

    .hero-kb-text h1 {
        font-size: 1.8rem;
    }

    .hero-kb-text h1 span {
        font-size: 1.3rem;
    }

    .hero-kb-text p {
        font-size: 0.88rem;
        margin-bottom: 18px;
    }

    .hero-kb-actions {
        justify-content: center;
        gap: 10px;
    }

    .btn-kb-primary, .btn-kb-secondary {
        padding: 10px 16px;
        font-size: 0.82rem;
    }

    .hero-kb-img img {
        height: 210px !important;
    }

    /* Middle Showcase Grid Mobile */
    .middle-showcase-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .side-showcase-column {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .side-showcase-column .product-card {
        padding: 10px;
    }

    .side-showcase-column .product-thumb img {
        height: 100px !important;
    }

    .featured-center-card {
        padding: 20px 15px;
    }

    /* 2 Columns Products Grid for Shopee/Lazada Mobile Experience */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-card {
        padding: 12px 8px;
        border-radius: 14px;
    }

    .product-thumb {
        height: 130px;
        margin-bottom: 8px;
    }

    .product-thumb img {
        max-height: 120px;
    }

    .product-thumb-placeholder {
        height: 120px;
        font-size: 1.8rem;
    }

    .product-title {
        font-size: 0.78rem;
        height: 32px;
        margin-bottom: 6px;
    }

    .product-price-row {
        flex-direction: column;
        gap: 2px;
        margin-bottom: 8px;
    }

    .price-current {
        font-size: 0.92rem;
    }

    .price-old {
        font-size: 0.7rem;
    }

    .product-btn-group {
        gap: 4px;
    }

    .btn-card-buy {
        font-size: 0.7rem;
        padding: 6px 4px;
    }

    .btn-card-zalo {
        font-size: 0.7rem;
        padding: 6px 6px;
    }

    /* Showroom Showcase Section Mobile */
    #showroom-section > div {
        grid-template-columns: 1fr !important;
        padding: 25px 18px !important;
        gap: 20px !important;
        text-align: center;
    }

    #showroom-section h2 {
        font-size: 1.4rem !important;
    }

    #showroom-section img {
        height: 220px !important;
    }

    /* Custom Build Form Mobile */
    #customBuildForm {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    /* Footer Mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }

    /* Floating Contact Buttons Mobile Adjust */
    .floating-contact {
        bottom: 75px;
        right: 12px;
    }

    .float-btn {
        width: 44px;
        height: 44px;
        font-size: 1.15rem;
    }

    /* Modal Mobile Tweak */
    .modal-content {
        width: 94% !important;
        padding: 20px 15px !important;
        max-height: 88vh;
        overflow-y: auto;
    }
}
