/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/

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

/* ==========================================================================
   WANYU TECH - SMART PACKAGING SOLUTIONS
   ========================================================================== */

/* Sử dụng CSS Variables của Flatsome để đồng bộ màu sắc. */
:root {
    --wanyu-primary: var(--primary-color, #0b1a4a); /* Sẽ tự động ăn theo Primary Color trong Customizer */
    --wanyu-secondary: var(--secondary-color, #d71920); /* Sẽ tự động ăn theo Secondary Color trong Customizer */
}

body, h1, h2, h3, h4, h5, h6, p, a, span {
    font-family: 'Inter', sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--wanyu-primary);
}

/* --- BUTTONS --- */
/* Nút Đỏ (Ăn theo Secondary Color) */
.btn-wanyu-primary {
    background-color: var(--wanyu-secondary) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 12px 25px !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
}

.btn-wanyu-primary:hover {
    filter: brightness(0.9);
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2) !important;
}

.btn-wanyu-primary i {
    margin-left: 8px;
    font-size: 0.9em;
}

/* Nút Trắng viền Xanh (Ăn theo Primary Color) */
.btn-wanyu-secondary {
    background-color: transparent !important;
    color: var(--wanyu-primary) !important;
    border: 1px solid var(--wanyu-primary) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 12px 25px !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: all 0.3s ease !important;
    margin-left: 10px;
}

.btn-wanyu-secondary:hover {
    background-color: var(--wanyu-primary) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
}

.btn-wanyu-secondary i {
    margin-left: 8px;
    font-size: 1.1em;
}

/* --- HERO SECTION --- */
.wanyu-hero-section {
    position: relative;
    overflow: hidden;
    background: #fdfdfd;
}

.wanyu-slanted-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    z-index: 0;
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
}

.wanyu-slanted-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wanyu-hero-content {
    position: relative;
    z-index: 1;
    padding: 80px 0;
}

.wanyu-hero-title {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--wanyu-primary);
    margin-bottom: 20px;
}

.wanyu-hero-desc {
    font-size: 15px;
    line-height: 1.7;
    color: #444444;
    margin-bottom: 30px;
    max-width: 90%;
}

/* --- INFO BOXES --- */
.wanyu-info-box-wrap {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.wanyu-info-box {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 150px;
    border: 1px solid #f0f0f0;
}

.wanyu-info-icon {
    font-size: 30px;
    color: var(--wanyu-primary);
    line-height: 1;
}

.wanyu-info-text {
    display: flex;
    flex-direction: column;
}

.wanyu-info-number {
    font-size: 22px;
    font-weight: 800;
    color: var(--wanyu-primary);
    line-height: 1.1;
}

.wanyu-info-label {
    font-size: 13px;
    color: #666666;
    margin-top: 2px;
}

/* Mobile Responsive */
@media only screen and (max-width: 849px) {
    .wanyu-slanted-bg {
        width: 100%;
        position: relative;
        clip-path: none;
        height: 300px;
    }
    .wanyu-hero-content {
        padding: 40px 0;
    }
    .wanyu-hero-title {
        font-size: 32px;
    }
    .wanyu-info-box-wrap {
        flex-direction: column;
    }
}

/* --- PRODUCT CATEGORY GRID (UX BUILDER) --- */
.product-category .col-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-category .col-inner > a {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-category .box {
    border-radius: 12px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #dcdcdc !important;
    transition: all 0.3s ease !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1;
}

.product-category:hover .box {
    box-shadow: 0 10px 30px rgba(11, 26, 74, 0.12) !important;
    transform: translateY(-5px) !important;
    border-color: var(--wanyu-primary) !important;
}

.product-category .box-image {
    background-color: #f8f9fa;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-category .box-image img {
    max-height: 150px;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.3s ease;
}

.product-category:hover .box-image img {
    transform: scale(1.05);
}

.product-category .box-text {
    padding: 20px 15px !important;
    background: #fff !important;
    position: relative;
    z-index: 2;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-category .box-text-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.product-category .header-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--wanyu-primary) !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.product-category .count {
    font-size: 11px !important;
    background: #f0f2f5;
    color: #555;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    margin: 0 !important;
    letter-spacing: 0;
    display: inline-block;
    text-transform: none;
}

.product-category:hover .header-title {
    color: var(--wanyu-secondary) !important;
}

/* --- CUSTOM LOADING EFFECT --- */
.loading-spin,
.blockUI.blockOverlay::before,
.button.loading .loading-spin {
    border: 3px solid rgba(11, 26, 74, 0.1) !important; /* Xanh Navy mờ */
    border-left-color: var(--wanyu-secondary, #d71920) !important; /* Đỏ */
    border-right-color: var(--wanyu-primary, #0b1a4a) !important; /* Xanh Navy */
    animation: wanyu-spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
}
.button.is-outline.loading .loading-spin,
.button.primary.loading .loading-spin,
.wanyu-btn-submit.loading .loading-spin,
.sangoys-submit-btn.loading .loading-spin,
.sc-submit-btn.loading .loading-spin {
    border-color: rgba(255, 255, 255, 0.3) !important;
    border-left-color: #fff !important;
    border-right-color: #fff !important;
}
@keyframes wanyu-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- TÊN SẢN PHẨM TRONG CARD --- */
.product-small .product-title {
    margin-bottom: 8px;
    height: auto !important;
    max-height: none !important;
    min-height: 48px; /* Đảm bảo 2 dòng đều nhau */
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.product-small .product-title a {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--wanyu-primary, #0b1a4a) !important;
    line-height: 1.4 !important;
    transition: color 0.3s ease;
    display: inline !important;
    overflow: visible !important;
    white-space: normal !important;
}
.product-small .product-title a:hover {
    color: var(--wanyu-secondary, #d71920) !important;
}
@media (min-width: 768px) {
    .product-small .product-title a {
        font-size: 17px !important;
    }
}

/* ==============================================================
   DESKTOP SUBMENU & MOBILE MENU STYLING 
============================================================== */

/* --- 1. DESKTOP SUBMENU --- */
@media (min-width: 850px) {
    .nav-dropdown {
        background-color: #fff !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 40px rgba(11,26,74,0.1) !important;
        border: none !important;
        padding: 8px 0 !important;
    }
    .nav-dropdown > li > a {
        color: #333 !important;
        font-size: 14.5px !important;
        font-weight: 500 !important;
        padding: 12px 20px !important;
        border-bottom: none !important;
        transition: background 0.25s ease, color 0.25s ease !important;
    }
    .nav-dropdown > li > a:hover,
    .nav-dropdown > li.active > a,
    .nav-dropdown > li.current-menu-item > a {
        background-color: var(--wanyu-primary, #0b1a4a) !important;
        color: #fff !important;
    }
    .nav-dropdown > li:first-child > a:hover {
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
    }
    .nav-dropdown > li:last-child > a:hover {
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
    }
}

/* --- 2. MOBILE MENU (OFF-CANVAS) --- */
@media only screen and (max-width: 849px) {
    .mfp-bg.off-canvas-center, .mfp-bg.off-canvas-left, .mfp-bg.off-canvas-right,
    .off-canvas-center.mfp-bg.mfp-ready, .off-canvas-left.mfp-bg.mfp-ready, .off-canvas-right.mfp-bg.mfp-ready {
        background-color: rgba(15, 23, 42, 0.6) !important;
        opacity: 1 !important;
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }
    
    .off-canvas-left .mfp-content, .off-canvas-right .mfp-content, .off-canvas-center .mfp-content {
        background: #fff !important;
        border: none !important;
        box-shadow: 0 0 50px rgba(11, 26, 74, 0.25) !important;
    }
    
    .sidebar-menu {
        padding: 56px 0 32px !important;
    }

    .mfp-content form.searchform, .mfp-content .searchform {
        position: relative !important;
        display: block !important;
        padding: 0 !important;
        background: #fff;
        border: 1px solid rgba(11, 26, 74, 0.15);
        border-radius: 999px !important;
        box-shadow: 0 8px 20px rgba(11, 26, 74, 0.08);
        margin: 0 15px 20px 15px !important;
    }

    .mfp-content form.searchform input.search-field,
    .mfp-content .searchform input[type="search"] {
        display: block !important;
        width: 100% !important;
        height: 48px !important;
        margin: 0 !important;
        padding: 0 54px 0 20px !important;
        background: transparent !important;
        border: none !important;
        border-radius: 999px !important;
        box-shadow: none !important;
        font-size: 14.5px;
        line-height: 48px;
        color: #0b1a4a;
    }

    .mfp-content .searchform .ux-search-submit,
    .mfp-content .searchform button[type="submit"] {
        position: absolute !important;
        top: 50% !important;
        right: 4px !important;
        transform: translateY(-50%);
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        border-radius: 50% !important;
        background: var(--wanyu-primary, #0b1a4a) !important;
        color: #fff !important;
        box-shadow: 0 6px 14px rgba(11,26,74,0.2) !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s ease, background 0.2s ease;
    }
    .mfp-content .searchform button[type="submit"]:hover {
        transform: translateY(-50%) scale(1.05);
        background: var(--wanyu-secondary, #d71920) !important;
    }

    .nav-sidebar.nav-vertical > li { border: none !important; }
    .nav-sidebar.nav-vertical > li + li { border-top: 1px solid rgba(11, 26, 74, 0.08) !important; }
    
    .nav-sidebar.nav-vertical > li > a {
        padding: 13px 20px !important;
        margin: 2px 10px;
        border-radius: 8px;
        color: #0b1a4a !important;
        font-size: 14.5px !important;
        font-weight: 700 !important;
        transition: background 0.25s ease, color 0.25s ease;
    }

    .nav-sidebar.nav-vertical > li > a:hover,
    .nav-sidebar.nav-vertical > li.active > a,
    .nav-sidebar.nav-vertical > li.current-menu-item > a {
        background: rgba(11, 26, 74, 0.06) !important;
        color: var(--wanyu-primary, #0b1a4a) !important;
    }

    .nav-sidebar.nav-vertical ul.children,
    .nav-sidebar.nav-vertical ul.sub-menu {
        background: rgba(11, 26, 74, 0.03);
        border-radius: 8px;
        margin: 4px 10px 8px;
        padding: 6px 0;
    }
    .nav-sidebar.nav-vertical ul.sub-menu > li > a {
        font-size: 14px !important;
        color: #444 !important;
        padding: 10px 20px 10px 30px !important;
        font-weight: 500 !important;
    }
    .nav-sidebar.nav-vertical ul.sub-menu > li > a:hover {
        color: var(--wanyu-secondary, #d71920) !important;
    }

    .mfp-close {
        position: fixed !important;
        top: 12px !important;
        width: 44px !important;
        height: 44px !important;
        line-height: 44px !important;
        border-radius: 50% !important;
        background: #fff !important;
        border: 1px solid #eee !important;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
        color: #333 !important;
        opacity: 1 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        z-index: 1100;
        transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
    }
    .off-canvas-left .mfp-close { right: 12px !important; left: auto !important; }
    .off-canvas-right .mfp-close { left: 12px !important; right: auto !important; }
    .off-canvas-center .mfp-close { top: 12px !important; right: 12px !important; }
    
    .mfp-close:hover {
        transform: rotate(90deg);
        background: var(--wanyu-secondary, #d71920) !important;
        color: #fff !important;
        border-color: var(--wanyu-secondary, #d71920) !important;
    }
}

/* --- ẨN TRẠNG THÁI KHO HÀNG (CÒN HÀNG) --- */
.product-info .stock, 
.product-summary .stock, 
p.stock, 
.is-in-stock, 
.in-stock {
    display: none !important;
}