/* ================================================================
   Novel System — Flatsome Child
   Primary #1435C3 · Secondary #6D5DFB · Success #16A34A · Alert #F59E0B
   ================================================================ */

/* ── Ẩn WooCommerce mặc định ─────────────────────────────── */
.woocommerce-tabs, .related.products, .up-sells,
.product_meta, .woocommerce-product-rating { display: none !important; }

/* ════════════════════════════════════════════════════════════
   HERO INFO — bên phải ảnh bìa
   ════════════════════════════════════════════════════════════ */

.nv-hero { display: flex; flex-direction: column; gap: 16px; }

.nv-hero__title {
    font-size: 28px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    color: #0f172a !important;
    margin: 0 !important;
}

/* Tags / badges */
.nv-hero__tags { display: flex; flex-wrap: wrap; gap: 7px; }

.nv-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    background: #ede9fe;
    color: #4c1d95;
    border: 1px solid #c4b5fd;
}
.nv-tag--ongoing   { background: #dcfce7; color: #15803d; border-color: #86efac; }
.nv-tag--completed { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.nv-tag--paused    { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.nv-tag--free      { background: #f0fdf4; color: #15803d; border-color: #86efac; }

/* Meta row */
.nv-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 4px;
    font-size: 14px;
    color: #475569;
}
.nv-meta-item { display: inline-flex; align-items: center; gap: 5px; }
.nv-meta-item svg { opacity: .7; }
.nv-meta-item strong { color: #1e293b; font-weight: 600; }
.nv-meta-sep { color: #cbd5e1; font-size: 16px; padding: 0 2px; }

/* Views */
.nv-hero__views {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #475569;
    background: #f8fafc;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    width: fit-content;
}
.nv-hero__views strong { color: #1e293b; font-weight: 600; }

/* Mô tả ngắn */
.nv-hero__excerpt {
    font-size: 14px;
    line-height: 1.85;
    color: #475569;
    padding: 14px 16px;
    background: #f8fafc;
    border-left: 3px solid #1435C3;
    border-radius: 0 6px 6px 0;
}

/* Nút hành động */
.nv-hero__btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.nv-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    padding: 11px 22px !important;
    border-radius: 7px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: filter .15s, transform .1s;
    white-space: nowrap;
    box-shadow: none !important;
    line-height: 1.4 !important;
}
.nv-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.nv-btn--primary {
    background: #1435C3 !important;
    color: #fff !important;
    border: 2px solid #1435C3 !important;
}
.nv-btn--outline {
    background: #fff !important;
    color: #1435C3 !important;
    border: 2px solid #1435C3 !important;
}
.nv-btn--outline:hover { background: #eff2ff !important; }
.nv-btn--ghost {
    background: #fff !important;
    color: #475569 !important;
    border: 2px solid #e2e8f0 !important;
}
.nv-btn--ghost:hover { border-color: #94a3b8 !important; color: #1e293b !important; }

.nv-buy-wrap .quantity { display: none !important; }
.nv-buy-wrap .single_add_to_cart_button {
    background: #1435C3 !important;
    padding: 11px 22px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 7px !important;
    border: none !important;
}

.nv-empty-notice { font-size: 14px; color: #94a3b8; display: flex; align-items: center; gap: 6px; }


/* ════════════════════════════════════════════════════════════
   LAYOUT — 2 cột bên dưới
   ════════════════════════════════════════════════════════════ */

.nv-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    margin-top: 32px;
    align-items: start;
}
@media (max-width: 900px) {
    .nv-layout { grid-template-columns: 1fr; }
}

/* ── Tabs ───────────────────────────────────────────────── */
.nv-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 0;
    gap: 0;
}
.nv-tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    background: none !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color .15s;
    box-shadow: none !important;
}
.nv-tab:hover { color: #1435C3; }
.nv-tab--active {
    color: #1435C3 !important;
    border-bottom-color: #1435C3 !important;
}

/* ── Panel body ────────────────────────────────────────── */
.nv-panel-body {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}
.nv-panel-body--hidden { display: none; }

/* Chapter toolbar */
.nv-ch-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}
.nv-ch-toolbar__title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nv-ch-toolbar__count {
    background: #1435C3;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
}

.nv-ch-search {
    font-size: 13px !important;
    padding: 7px 12px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #374151 !important;
    width: 170px !important;
    outline: none !important;
    box-shadow: none !important;
}
.nv-ch-search:focus { border-color: #1435C3 !important; }

/* Chapter rows */
.nv-ch-row { border-bottom: 1px solid #f1f5f9; }
.nv-ch-row:last-child { border-bottom: none; }
.nv-ch-row--alt { background: #fafbfc; }

.nv-ch-inner {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 18px !important;
    text-decoration: none !important;
    color: #334155 !important;
    transition: background .12s;
    box-shadow: none !important;
    border: none !important;
    width: 100%;
    box-sizing: border-box;
}
a.nv-ch-inner:hover { background: #eff2ff !important; color: #1435C3 !important; }
a.nv-ch-inner:hover .nv-ch-icon svg { stroke: #1435C3; }

.nv-ch-inner--locked { cursor: default; color: #94a3b8 !important; }

.nv-ch-icon { color: #94a3b8; display: flex; align-items: center; flex-shrink: 0; }
a.nv-ch-inner .nv-ch-icon { color: #6D5DFB; }

.nv-ch-name { flex: 1; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.nv-ch-inner:hover .nv-ch-name { color: #1435C3; }

.nv-ch-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}
.nv-ch-time svg { opacity: .6; }

.nv-ch-empty { padding: 24px 18px; color: #94a3b8; font-size: 14px; text-align: center; }

/* Intro panel */
.nv-intro-body { padding: 20px 20px; }
.nv-intro-desc {
    font-size: 15px;
    line-height: 1.9;
    color: #374151;
    overflow: hidden;
    transition: max-height .3s ease;
}
.nv-intro-desc--collapsed { max-height: 120px; }
.nv-intro-toggle {
    margin-top: 10px;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #1435C3 !important;
    font-size: 13px !important;
    font-weight: 600;
    cursor: pointer;
    padding: 0 !important;
}
.nv-intro-toggle:hover { text-decoration: underline; }

/* ── Sidebar ────────────────────────────────────────────── */
.nv-sidebar-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.nv-sidebar-card__title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin: 0 !important;
    padding: 13px 18px !important;
    background: #1435C3;
}

.nv-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.nv-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}
.nv-info-list li:last-child { border-bottom: none; }

.nv-info-list__icon { color: #6D5DFB; display: flex; align-items: center; flex-shrink: 0; margin-top: 1px; }
.nv-info-list__label { color: #64748b; min-width: 72px; flex-shrink: 0; }
.nv-info-list__val { color: #1e293b; font-weight: 600; flex: 1; }
.nv-info-list__val a { color: #1435C3; text-decoration: none; }
.nv-info-list__val a:hover { text-decoration: underline; }
.nv-info-list__val--ongoing   { color: #15803d; }
.nv-info-list__val--completed { color: #1e40af; }
.nv-info-list__val--paused    { color: #92400e; }



/* ════════════════════════════════════════════════════════════
   TRANG ĐỌC CHƯƠNG
   ════════════════════════════════════════════════════════════ */

.novel-chapter-read  { max-width: 780px; margin: 0 auto; padding: 24px 0 72px; }
.novel-chapter-title { font-size: 24px; font-weight: 700; margin-bottom: 28px; line-height: 1.4; color: #0f172a; }
.novel-chapter-content { font-size: 18px; line-height: 2.1; color: #1e293b; }
.novel-chapter-content p { margin-bottom: 1.5em; }

.novel-chapter-nav {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 52px; padding-top: 24px; border-top: 1px solid #e2e8f0;
    gap: 10px; flex-wrap: wrap;
}
.novel-chapter-nav__prev { flex: 1; text-align: left; }
.novel-chapter-nav__home { flex: 1; text-align: center; }
.novel-chapter-nav__next { flex: 1; text-align: right; }

.novel-chapter-locked {
    text-align: center; padding: 60px 20px;
    background: #f8fafc; border: 2px dashed #e2e8f0;
    border-radius: 12px; margin: 32px 0;
}
.novel-chapter-locked h3 { font-size: 22px; margin: 0 0 10px; }
.novel-chapter-locked p  { font-size: 15px; color: #64748b; margin: 0 0 24px; }

.novel-breadcrumb { font-size: 14px; color: #94a3b8; margin-bottom: 20px; }
.novel-breadcrumb a { color: #1435C3; text-decoration: none; }
.novel-breadcrumb a:hover { text-decoration: underline; }


/* ════════════════════════════════════════════════════════════
   HEADER — Thiết kế lại theo mẫu
   ════════════════════════════════════════════════════════════ */

/* Header wrapper — trắng, shadow nhẹ */
#header .header-main {
    background: #fff !important;
    border-bottom: 1px solid #e8edf2 !important;
    box-shadow: 0 1px 6px rgba(0,0,0,.06) !important;
}
#header .header-wrapper { background: #fff !important; }
#header { background: #fff !important; }

/* Header inner — giảm padding, căn đều */
.header-inner.container {
    max-width: 1200px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 64px !important;
    align-items: center !important;
}


/* ── Nav menu ─────────────────────────────────────────── */
.header-nav-main.nav > li > a {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    padding: 0 14px !important;
    line-height: 64px !important;
    transition: color .15s !important;
}
.header-nav-main.nav > li > a:hover {
    color: #1435C3 !important;
}

/* Active item — underline xanh */
.header-nav-main.nav > li.current-menu-item > a,
.header-nav-main.nav > li.active > a {
    color: #1435C3 !important;
    font-weight: 600 !important;
}
.nav-line-bottom .header-nav-main.nav > li.current-menu-item > a::after,
.nav-line-bottom .header-nav-main.nav > li.active > a::after,
.header-nav-main.nav-line-bottom > li.current-menu-item > a::after,
.header-nav-main.nav-line-bottom > li.active > a::after {
    background: #1435C3 !important;
    height: 2px !important;
}

/* Dropdown menu */
.header-nav-main.nav .sub-menu {
    border-top: 2px solid #1435C3 !important;
    border-radius: 0 0 8px 8px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.1) !important;
}
.header-nav-main.nav .sub-menu li a {
    font-size: 14px !important;
    color: #374151 !important;
    padding: 9px 18px !important;
}
.header-nav-main.nav .sub-menu li a:hover {
    color: #1435C3 !important;
    background: #eff2ff !important;
}

/* ── Search box ──────────────────────────────────────── */
.header-search-form .searchform-wrapper {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 24px !important;
    background: #f8fafc !important;
    overflow: hidden !important;
    transition: border-color .15s !important;
    min-width: 220px !important;
}
.header-search-form .searchform-wrapper:focus-within {
    border-color: #1435C3 !important;
    background: #fff !important;
}
.header-search-form input[type="search"],
.header-search-form .search-field {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 13px !important;
    color: #374151 !important;
    padding: 8px 14px 8px 38px !important;
    width: 100% !important;
    outline: none !important;
}
.header-search-form input[type="search"]::placeholder,
.header-search-form .search-field::placeholder {
    color: #94a3b8 !important;
}
/* Icon kính lúp bên trái */
.header-search-form .searchform-wrapper::before {
    content: "" !important;
    position: absolute !important;
    left: 13px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 16px !important;
    height: 16px !important;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center/contain no-repeat !important;
    z-index: 1 !important;
    pointer-events: none !important;
}
.header-search-form .searchform-wrapper {
    position: relative !important;
}
/* Ẩn nút submit mặc định */
.header-search-form button[type="submit"],
.header-search-form .search-submit {
    display: none !important;
}
/* Placeholder search */
.header-search-form input[type="search"]::-webkit-input-placeholder { content: "Tìm truyện, tác giả..."; }

