/*
Theme Name: Flatsome Child
Description: Giao diện clone chuẩn xác theo phong cách WPFast.vn dành cho OnePage
Author: OnePage Team
Template: flatsome
Version: 3.1.0
*/

/* --- 1. TYPOGRAPHY & ROOT VARIABLES --- */
:root {
    --primary-color: #0050c7;
    --secondary-color: #e11515;
    --dark-red: #af1319;
    --dark-red-hover: #7c0e10;
    --text-color: #111111;
    --border-color: #e2e8f0;
}

body,
h1, h2, h3, h4, h5, h6,
.heading-font,
.banner h1, .banner h2,
.nav > li > a,
.nav-dropdown > li > a,
.button,
button,
input,
select,
textarea,
p,
span,
a,
li {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- 2. HEADER THEO CHUẨN WPFAST --- */
.header-main {
    height: 95px;
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

#logo img {
    max-height: 80px;
}

#logo a img:nth-child(2),
#logo a img.header-logo-dark,
.header-logo-dark {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

/* Đảm bảo element mobile chỉ hiện trên màn hình nhỏ */
@media (min-width: 850px) {
    .show-for-medium,
    .mobile-nav {
        display: none !important;
    }
}
@media (max-width: 849px) {
    .hide-for-medium {
        display: none !important;
    }
}

/* Giới hạn container toàn trang chuẩn 1200px như wpfast.vn */
.container-width,
.full-width .ubermenu-nav,
.container,
.row {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.header-bottom {
    background-color: var(--dark-red) !important;
    min-height: 48px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.header-bottom-nav > li > a {
    color: #ffffff !important;
    background-color: transparent !important;
    font-size: 13.5px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 48px;
    padding: 0 16px;
    border-radius: 0 !important;
    border: none !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.header-bottom-nav > li:hover > a {
    background-color: #8c0f13 !important;
    color: #ffffff !important;
}

.header-bottom-nav > li.active > a,
.header-bottom-nav > li.current-menu-item > a {
    background-color: #800d11 !important;
    color: #ffffff !important;
}

/* --- 3. GIFT BOX (QUÀ TẶNG TRỊ GIÁ $1200) --- */
.wpfast-gift-box {
    background: #ffffff;
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 22px 20px;
    margin-left: 25px;
    box-shadow: 0 6px 18px rgba(0, 80, 199, 0.06);
    transition: transform 0.3s ease;
}

.wpfast-gift-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 80, 199, 0.12);
}

.wpfast-gift-list li {
    padding: 4px 0;
    font-size: 14px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

/* --- 4. ICON CATEGORIES (THANH DANH MỤC NGÀNH NGHỀ ĐỀU TĂM TẮP) --- */
.wpfast-cat-grid {
    display: grid !important;
    grid-template-columns: repeat(9, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

.wpfast-cat-grid br,
.wpfast-cat-grid > br,
.wpfast-cat-grid p {
    display: none !important;
}

@media (max-width: 1024px) {
    .wpfast-cat-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
}

@media (max-width: 640px) {
    .wpfast-cat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
}

.wpfast-cat-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 4px;
    text-align: center;
    transition: all 0.25s ease;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 96px;
    height: 100%;
    box-sizing: border-box !important;
    text-decoration: none !important;
    color: inherit !important;
}

.wpfast-cat-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 80, 199, 0.12);
    color: var(--primary-color) !important;
}

.wpfast-cat-item .cat-icon {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 8px;
    display: block;
}

.wpfast-cat-item .cat-name {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.wpfast-cat-item:hover .cat-name {
    color: var(--primary-color);
}

/* --- 5. CATEGORY SECTION HEADER (THANH TIÊU ĐỀ CHUYÊN MỤC ĐỎ) --- */
.wpfast-sec-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, var(--dark-red) 0%, #c51c22 100%);
    padding: 8px 18px;
    border-radius: 6px 6px 0 0;
    color: #ffffff;
    margin-bottom: 0;
}

.wpfast-sec-title span,
.wpfast-sec-title h1,
.wpfast-sec-title .wpfast-main-heading,
.wpfast-sec-title h3 {
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.4;
    letter-spacing: 0.5px;
}

.wpfast-sec-title a,
.wpfast-sec-title a.view-all {
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    background: rgba(0, 0, 0, 0.15);
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: inline-block;
}

.wpfast-sec-title a:hover,
.wpfast-sec-title a.view-all:hover {
    color: #ffffff !important;
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

/* --- 6. THEME SHOWCASE CARDS (LƯỚI 5 CỘT CHUẨN WPFAST) --- */
.wpfast-theme-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 14px !important;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: none;
    padding: 18px 12px;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    margin-bottom: 25px;
}

@media (max-width: 1024px) {
    .wpfast-theme-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 640px) {
    .wpfast-theme-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 12px 8px;
    }
}

.wpfast-card {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.25s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.wpfast-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.wpfast-card .card-thumb,
.wpfast-card .wpfast-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f8fafc;
    overflow: hidden;
}

.wpfast-card .card-thumb img,
.wpfast-card .wpfast-card-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.wpfast-card .card-badge,
.wpfast-card .wpfast-badge-sale {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--secondary-color);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 12px;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(225, 21, 21, 0.4);
    line-height: 1.2;
}

.wpfast-card .card-body,
.wpfast-card .wpfast-card-body {
    padding: 12px 10px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wpfast-card .card-title,
.wpfast-card .wpfast-card-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    color: #1e293b;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 36px;
    text-decoration: none;
}

.wpfast-card:hover .card-title,
.wpfast-card:hover .wpfast-card-title {
    color: var(--primary-color);
}

.wpfast-card .card-price,
.wpfast-card .wpfast-card-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.wpfast-card .wpfast-price-sale {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--secondary-color);
    letter-spacing: -0.2px;
}

.wpfast-card .wpfast-price-regular {
    font-size: 11.5px;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: line-through;
}

.wpfast-card .card-actions,
.wpfast-card .wpfast-card-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.wpfast-card .btn-demo {
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
    line-height: 1.4;
}

.wpfast-card .btn-demo:hover {
    background: #e2e8f0;
}

.wpfast-card .btn-buy {
    background: var(--primary-color);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: normal;
    transition: background 0.2s;
}

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

/* --- 7. FAQ ACCORDION --- */
.wpfast-faq-section {
    background-color: #e8f3fd !important;
    border-top: 1px solid #dbeafe;
    border-bottom: 1px solid #dbeafe;
}

.wpfast-faq-section .accordion-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    padding: 12px 14px;
}

/* --- 8. FOOTER THEO CHUẨN WPFAST --- */
.ss-footer-wpfast {
    background: #0f172a;
    color: #cbd5e1;
    padding: 50px 0 20px;
}

.ss-footer-wpfast h4 {
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.ss-footer-wpfast ul {
    list-style: none;
    padding: 0;
    margin: 0;
    line-height: 2;
    font-size: 13.5px;
}

.ss-footer-wpfast ul a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.ss-footer-wpfast ul a:hover {
    color: #ffffff;
}

.newsletter-box {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 40px;
    padding-bottom: 35px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.newsletter-form {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
}

.newsletter-form input[type="email"] {
    max-width: 380px;
    background: #ffffff;
    border-radius: 4px;
    height: 42px;
}

.newsletter-form button {
    background: var(--secondary-color);
    color: #ffffff;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    padding: 0 22px;
    height: 42px;
    cursor: pointer;
}

/* --- 9. MODAL POPUP ĐẶT MUA THEME & THANH TOÁN VIETQR --- */
body.wpfast-modal-open {
    overflow: hidden !important;
}

.wpfast-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
}

.wpfast-modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 520px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    max-height: 92vh;
    overflow-y: auto;
    padding: 24px;
    box-sizing: border-box;
    animation: wpfastFadeIn 0.25s ease-out;
}

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

.wpfast-modal-close-icon,
.wpfast-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: #f1f5f9 !important;
    border: none !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    aspect-ratio: 1 / 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: #64748b !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    outline: none !important;
    transition: all 0.25s ease !important;
    z-index: 10;
}

.wpfast-modal-close-icon svg,
.wpfast-modal-close svg {
    display: block !important;
    width: 12px !important;
    height: 12px !important;
    pointer-events: none !important;
    stroke: currentColor !important;
}

.wpfast-modal-close-icon:hover,
.wpfast-modal-close:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    transform: rotate(90deg);
}

.wpfast-modal-header {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.wpfast-modal-header h3 {
    color: #af1319;
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wpfast-modal-header p {
    color: #64748b;
    font-size: 12.5px;
    margin: 0;
}

.wpfast-modal-theme-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
}

.wpfast-modal-theme-preview img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.wpfast-modal-theme-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
    line-height: 1.3;
}

.wpfast-modal-theme-price {
    font-size: 15px;
    font-weight: 800;
    color: #e11515;
}

.wpfast-form-group {
    margin-bottom: 12px;
    text-align: left;
}

.wpfast-form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 4px;
}

.wpfast-form-group label .required {
    color: #e11515;
}

.wpfast-form-group input,
.wpfast-form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13.5px;
    box-sizing: border-box;
    transition: border-color 0.2s;
    background: #ffffff;
}

.wpfast-form-group input:focus,
.wpfast-form-group textarea:focus {
    outline: none;
    border-color: #0050c7;
    box-shadow: 0 0 0 3px rgba(0, 80, 199, 0.1);
}

.wpfast-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
}

.wpfast-btn-checkout {
    width: 100%;
    background: linear-gradient(90deg, #af1319 0%, #e11515 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 14px;
    padding: 12px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(225, 21, 21, 0.3);
}

.wpfast-btn-checkout:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(225, 21, 21, 0.4);
}

.wpfast-btn-checkout:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wpfast-security-note {
    font-size: 11.5px;
    color: #64748b;
    text-align: center;
    margin: 10px 0 0;
}

/* Bước 2: Thành Công & VietQR */
.wpfast-success-header {
    text-align: center;
    margin-bottom: 16px;
}

.wpfast-success-icon {
    width: 48px;
    height: 48px;
    background: #22c55e;
    color: #ffffff;
    border-radius: 50%;
    font-size: 24px;
    line-height: 48px;
    text-align: center;
    margin: 0 auto 10px;
    font-weight: 800;
}

.wpfast-success-header h3 {
    color: #15803d;
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 4px;
}

.wpfast-qr-wrapper {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

@media (min-width: 480px) {
    .wpfast-qr-wrapper {
        flex-direction: row;
        align-items: flex-start;
    }
}

.wpfast-qr-img-box {
    text-align: center;
    flex-shrink: 0;
}

.wpfast-qr-img-box img {
    width: 170px;
    height: 170px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    padding: 4px;
}

.wpfast-qr-guide {
    display: block;
    font-size: 10.5px;
    color: #64748b;
    margin-top: 6px;
}

.wpfast-bank-details {
    flex-grow: 1;
    width: 100%;
    font-size: 13px;
}

.wpfast-bank-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.wpfast-bank-row:last-child {
    border-bottom: none;
}

.wpfast-bank-row span {
    color: #64748b;
    font-size: 12px;
}

.copyable-box {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-copy {
    background: #e2e8f0;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    padding: 2px 7px;
    cursor: pointer;
    color: #1e293b;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: #cbd5e1;
}

.btn-copy.copied {
    background: #22c55e;
    color: #ffffff;
}

.wpfast-success-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.wpfast-btn-zalo {
    flex: 2;
    background: #0068ff;
    color: #ffffff !important;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    transition: background 0.2s;
}

.wpfast-btn-zalo:hover {
    background: #0050c7;
}

.wpfast-btn-done {
    flex: 1;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #334155;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    padding: 10px;
}

.wpfast-btn-done:hover {
    background: #e2e8f0;
}

/* --- 16. NEWSLETTER SUBSCRIPTION FORM --- */
.wpfast-newsletter-box {
    max-width: 520px;
    margin: 0 auto 15px auto;
    width: 100%;
}

.wpfast-newsletter-form {
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    margin: 0;
}

.wpfast-newsletter-form input {
    flex: 1;
    min-width: 0;
    background: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid #334155 !important;
    padding: 10px 16px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    outline: none !important;
    height: 44px !important;
}

.wpfast-newsletter-form input::placeholder {
    color: #94a3b8;
}

.wpfast-newsletter-form button {
    background: #e11d48 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0 24px !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    margin: 0 !important;
    font-size: 13.5px !important;
    letter-spacing: 0.5px;
    height: 44px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.wpfast-newsletter-form button:hover {
    background: #be123c !important;
}

@media (max-width: 549px) {
    .wpfast-newsletter-form {
        flex-direction: column;
    }
    .wpfast-newsletter-form button {
        width: 100%;
    }
}
