/* Trang chủ Eboshop — tách từ home/index */
body { margin:0; font-family: Inter, Arial, sans-serif; background:#ffffff; color:#1a1a1a; }
.ad-banner { width:100%; border-radius:14px; overflow:hidden; margin-top:18px; display:block; }
.ad-banner img { width:100%; max-height:220px; object-fit:cover; display:block; }
.wrap { max-width:1920px; margin:0 auto; padding:0 16px 30px; }
/* Header trang chủ: sticky + nền khi dính (giống trang CMS) */
.header-main-bleed {
    position:sticky;
    top:0;
    z-index:1000;
    width:100vw;
    margin-left:calc(50% - 50vw);
    margin-right:calc(50% - 50vw);
    background:transparent;
    transition:background-color .22s ease;
}
.header-main-bleed.is-scrolled {
    background-color:rgba(18, 18, 20, .8);
}
.hero {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    border-radius: 0;
    overflow: hidden;
    background: #121c35;
}
.hero-slider { position:relative; width:100%; }
.hero-slide {
    position: relative;
    display: none;
}
.hero-slide.is-active { display: block; }
.hero-slide img { width:100%; height:auto; display:block; border-radius:0; }
.hero-empty {
    width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#cdd5ff;
    background:linear-gradient(140deg, #182447, #0e1730);
}
.header-main {
    position:relative;
    display:flex;
    align-items:center;
    justify-content:space-between;
    max-width:1920px;
    margin:0 auto;
    padding:14px 18px;
    gap:12px;
    background:transparent;
}
.logo { font-weight:800; font-size:36px; }
.logo img { height:58px; width:auto; max-width:280px; object-fit:contain; }
.menu { display:flex; gap:30px; flex-wrap:wrap; align-items:center; }
.menu a { color:#eef2ff; text-decoration:none; font-size:20px; text-shadow:0 1px 1px rgba(0,0,0,.45); }
.menu-item { position:relative; }
.menu-item > a { display:inline-block; padding:4px 0; }
.menu-item.has-children > a::after { content:' ▾'; font-size:10px; opacity:.75; }
.menu-item.has-children::before {
    content:''; position:absolute; left:0; right:0; top:100%; height:10px; z-index:19;
}
.submenu {
    display:none;
    position:absolute;
    top:100%;
    left:0;
    /* ~ 3 mục menu chính: kích chữ 20px, gap 30px — ước lượng qua rem */
    min-width:min(100vw - 24px, calc(3 * 9.5rem + 2 * 1.875rem));
    width:max-content;
    max-width:min(100vw - 24px, 40rem);
    padding:8px 0;
    margin-top:0;
    padding-top:10px;
    background:#151a2e;
    border:1px solid #2d355f;
    border-radius:10px;
    flex-direction:column;
    gap:0;
    z-index:20;
    box-shadow:0 12px 28px rgba(0,0,0,.35);
}
.submenu-link {
    display:flex;
    align-items:center;
    gap:12px;
    padding:10px 14px;
    font-size:13px;
    line-height:1.35;
    color:#eef2ff;
    text-decoration:none;
    border-radius:0;
}
.submenu-link:hover { background:rgba(255,255,255,.06); }
.submenu-link__label {
    flex:1;
    min-width:0;
}
.submenu-link__label--only { flex:none; }
.submenu-cover {
    flex-shrink:0;
    width:40px;
    height:60px;
    border-radius:4px;
    overflow:hidden;
    background:rgba(0,0,0,.25);
    border:1px solid rgba(255,255,255,.12);
}
.submenu-cover img {
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.submenu-cover__ph {
    display:block;
    width:100%;
    height:100%;
    background:rgba(255,255,255,.08);
}
.menu-item:hover .submenu { display:flex; }
.actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.header-search {
    display:flex;
    align-items:stretch;
    flex:1 1 140px;
    min-width:0;
    max-width:min(260px, 42vw);
}
.header-search__input {
    flex:1;
    min-width:0;
    height:44px;
    padding:0 12px;
    border:1px solid rgba(255,255,255,.22);
    border-radius:10px 0 0 10px;
    border-right:0;
    background:rgba(9,13,28,.45);
    color:#eef2ff;
    font-size:14px;
    box-sizing:border-box;
}
.header-search__input::placeholder { color:rgba(238,242,255,.45); }
.header-search__submit {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:44px;
    height:44px;
    flex-shrink:0;
    margin:0;
    padding:0;
    border:1px solid rgba(255,255,255,.22);
    border-radius:0 10px 10px 0;
    background:rgba(9,13,28,.5);
    color:#eef2ff;
    cursor:pointer;
    font-size:18px;
    line-height:1;
    box-sizing:border-box;
}
.header-cart-link {
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:44px;
    padding:0 14px;
    width:auto;
    flex-shrink:0;
    color:#eef2ff;
    text-decoration:none;
    border-radius:10px;
    background:rgba(9,13,28,.34);
    box-sizing:border-box;
    -webkit-tap-highlight-color:transparent;
}
.header-cart-link--guest {
    cursor:pointer;
    padding:0;
    margin:0;
    font:inherit;
}
.header-cart-icon-wrap {
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
}
.header-cart-icon {
    display:inline-flex;
    pointer-events:none;
}
.header-cart-label {
    font-size:14px;
    font-weight:700;
    white-space:nowrap;
    letter-spacing:0.02em;
}
.header-cart-badge {
    position:absolute;
    top:-4px;
    right:-6px;
    min-width:18px;
    height:18px;
    padding:0 5px;
    border-radius:999px;
    background:#dc2626;
    color:#fff;
    font-size:11px;
    font-weight:800;
    line-height:18px;
    text-align:center;
    box-sizing:border-box;
    pointer-events:none;
}

/* Hamburger + panel menu trái (≤960px) */
.nav-backdrop {
    display:none;
}
.nav-toggle {
    display:none;
    flex-shrink:0;
    align-items:center;
    justify-content:center;
    width:44px;
    height:44px;
    margin:0;
    padding:0;
    border:1px solid rgba(255,255,255,.35);
    border-radius:10px;
    background:rgba(9,13,28,.55);
    color:#eef2ff;
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
}
.nav-toggle__bars {
    display:flex;
    flex-direction:column;
    gap:5px;
    width:20px;
}
.nav-toggle__bar {
    display:block;
    height:2px;
    background:currentColor;
    border-radius:1px;
}
@media (max-width: 520px) {
    .header-search { max-width:min(200px, 34vw); }
    .header-search__input { font-size:13px; padding:0 8px; }
}
@media (max-width: 400px) {
    .header-cart-label { display:none; }
    .header-cart-link { padding:0 10px; }
}
@media (max-width: 960px) {
    .header-main-bleed,
    .internal-header-bleed {
        overflow:visible;
    }
    body.storefront-nav-open {
        overflow:hidden;
    }
    .nav-backdrop {
        display:block;
        position:fixed;
        inset:0;
        z-index:1001;
        background:rgba(6,8,18,.58);
        opacity:0;
        visibility:hidden;
        pointer-events:none;
        transition:opacity .28s ease, visibility .28s ease;
    }
    .nav-backdrop.is-open {
        opacity:1;
        visibility:visible;
        pointer-events:auto;
    }
    .storefront-header {
        flex-wrap:nowrap;
        align-items:center;
        gap:10px;
        overflow:visible;
    }
    .storefront-header .nav-toggle {
        display:inline-flex;
        order:1;
    }
    .storefront-header .logo {
        flex:1;
        min-width:0;
        order:2;
    }
    .storefront-header .actions {
        order:3;
        flex-shrink:0;
        gap:6px;
        max-width:none;
        overflow:visible;
    }
    .storefront-header .actions .btn {
        flex-shrink:0;
        white-space:nowrap;
    }
    .storefront-header .actions .header-action--mobile-hide {
        display:none !important;
    }
    .storefront-header .menu {
        order:99;
        position:fixed;
        top:0;
        left:0;
        bottom:0;
        width:min(300px, 86vw);
        max-width:100%;
        margin:0;
        padding:calc(16px + env(safe-area-inset-top, 0px)) 16px 28px calc(14px + env(safe-area-inset-left, 0px));
        flex-direction:column;
        flex-wrap:nowrap;
        align-items:stretch;
        align-content:flex-start;
        gap:0;
        background:#151a2e;
        border-right:1px solid #2d355f;
        box-shadow:12px 0 36px rgba(0,0,0,.4);
        z-index:1002;
        overflow-y:auto;
        overflow-x:hidden;
        -webkit-overflow-scrolling:touch;
        transform:translateX(-100%);
        transition:transform .3s cubic-bezier(.22, 1, .36, 1);
    }
    .storefront-header .menu.is-open {
        transform:translateX(0);
    }
    .storefront-header .menu a {
        font-size:17px;
        text-shadow:none;
    }
    .storefront-header .menu-item > a {
        display:block;
        padding:12px 6px;
        border-bottom:1px solid rgba(255,255,255,.08);
    }
    .storefront-header .menu .menu-item.has-children::before {
        display:none;
    }
    .storefront-header .menu .menu-item.has-children > a::after {
        content:'';
    }
    .storefront-header .menu .submenu {
        display:flex !important;
        position:static;
        min-width:0;
        max-width:none;
        width:100%;
        padding:4px 4px 12px 10px;
        margin:0 0 4px;
        border:none;
        box-shadow:none;
        background:rgba(0,0,0,.22);
        border-radius:8px;
        flex-direction:column;
    }
    .storefront-header .menu .submenu-link {
        font-size:13px;
        padding:8px 8px;
    }
}
.btn { padding:8px 12px; border-radius:10px; border:1px solid rgba(255,255,255,.28); color:#fff; text-decoration:none; background:rgba(9,13,28,.34); }
.btn.primary { background:#2cc7a6; border-color:#2cc7a6; color:#0c1328; font-weight:700; }
.hero-controls {
    position:absolute; right:18px; bottom:16px; z-index:5; display:flex; align-items:center; gap:10px;
}
.hero-btn {
    width:34px; height:34px; border-radius:999px; border:1px solid rgba(255,255,255,.45);
    background:rgba(11,16,32,.45); color:#fff; cursor:pointer;
}
.hero-dots { display:flex; gap:6px; align-items:center; }
.hero-dot {
    width:9px; height:9px; border-radius:999px; border:none; cursor:pointer; background:rgba(255,255,255,.45);
}
.hero-dot.is-active { width:24px; background:#2cc7a6; }
.section { margin-top:20px; }
.section h2 { margin:0 0 10px; }
.slider {
    display:flex; overflow-x:auto; overflow-y:visible; gap:12px; scroll-behavior:smooth;
    padding:10px 4px 20px; -webkit-overflow-scrolling:touch;
}
.card-wrap {
    flex-shrink:0; width:220px; position:relative; z-index:1; align-self:flex-start;
}
.card {
    width:100%; margin:0; padding:0; position:relative; overflow:visible;
}
.card-face {
    position:relative;
    border:1px solid #ececec;
    padding:10px;
    border-radius:10px;
}
.card-face img {
    width:100%; display:block; border-radius:12px; aspect-ratio:2/3; object-fit:cover;
}
.card-cover-placeholder {
    width:100%; aspect-ratio:2/3; border-radius:12px; background:rgba(255,255,255,.1);
}
.card .title {
    margin:10px 0 4px; font-weight:700; font-size:15px; color:#8b92b0; line-height:1.25;
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2;
    overflow:hidden; text-overflow:ellipsis;
    min-height:calc(1.25em * 2);
}
.author-line { color:#6d7390; font-size:13px; line-height:1.3; }
.card-face-price {
    margin-top:8px;
    display:flex;
    align-items:baseline;
    flex-wrap:wrap;
    gap:6px 8px;
    font-weight:700;
    font-size:14px;
    line-height:1.3;
}
.card-face-price__prefix {
    font-size:12px;
    font-weight:600;
    color:#8b92b0;
    text-transform:none;
}
.card-face-price__current { color:#62c4aa; }
.card-face-price__sale { color:#62c4aa; }
.card-face-price__old {
    color:#6d7390;
    font-size:12px;
    font-weight:600;
    text-decoration:line-through;
}
.slide-main { min-width:320px; max-width:320px; }

/* Footer storefront (thiết lập website + menu footer) */
.site-footer {
    --footer-accent: #2dd4bf;
    --footer-bg: #000000;
    background: var(--footer-bg);
    color: #fff;
    margin-top: 48px;
    padding: 48px 20px 36px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
}
.site-footer__inner {
    max-width: 1920px;
    margin: 0 auto;
}
.site-footer__grid {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) repeat(auto-fit, minmax(148px, 1fr));
    gap: 40px 28px;
    align-items: start;
}
.site-footer__logo-link {
    display: inline-block;
    text-decoration: none;
    margin-bottom: 12px;
}
.site-footer__logo-img {
    max-width: 200px;
    height: auto;
    display: block;
    filter: brightness(1.05);
}
.site-footer__logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--footer-accent);
}
.site-footer__company {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255,255,255,.92);
    max-width: 320px;
}
.site-footer__contacts {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: grid;
    gap: 10px;
    font-size: 14px;
}
.site-footer__contacts li {
    display: flex;
    align-items: center;
    gap: 10px;
}
.site-footer__contact-icon {
    flex-shrink: 0;
    color: var(--footer-accent);
    display: inline-flex;
}
.site-footer__contacts a {
    color: #fff;
    text-decoration: none;
}
.site-footer__contacts a:hover {
    color: var(--footer-accent);
}
.site-footer__apps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.site-footer__qr {
    width: 104px;
    height: 104px;
    border: 2px solid var(--footer-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.45);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.site-footer__store-badges {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.site-footer__store-link {
    display: block;
    line-height: 0;
    opacity: 0.95;
}
.site-footer__store-link:hover { opacity: 1; }
.site-footer__store-img {
    height: 36px;
    width: auto;
    display: block;
}
.site-footer__social {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
}
.site-footer__social a {
    color: rgba(255,255,255,.75);
    text-decoration: none;
}
.site-footer__social a:hover { color: var(--footer-accent); }
.site-footer__heading {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}
.site-footer__heading a {
    color: inherit;
    text-decoration: none;
}
.site-footer__heading a:hover { color: var(--footer-accent); }
.site-footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
    font-size: 14px;
}
.site-footer__list a {
    color: rgba(255,255,255,.88);
    text-decoration: none;
}
.site-footer__list a:hover { color: var(--footer-accent); }
.site-footer__widgets {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 28px;
    align-items: flex-start;
    margin-top: 28px;
}
.site-footer__widget {
    flex: 1 1 220px;
    min-width: 0;
}
.site-footer__widget .sidebar-card,
.site-footer__widget .products-filter-block {
    background: rgba(255,255,255,.06);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 0;
    border: 1px solid rgba(255,255,255,.08);
}
.site-footer__widget .products-filter-block__title,
.site-footer__widget .sidebar-card__title {
    color: #fff;
}
.footer-widget--nav__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-widget--nav__list a {
    color: rgba(255,255,255,.9);
    text-decoration: none;
    font-size: 14px;
}
.footer-widget--nav__list a:hover {
    color: var(--footer-accent);
    text-decoration: underline;
}
.footer-widget--text {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255,255,255,.88);
}
.footer-widget--text p:last-child { margin-bottom: 0; }
.site-footer__legal {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid rgba(255,255,255,.12);
    font-size: 12px;
    line-height: 1.65;
    color: rgba(255,255,255,.65);
}
.site-footer__legal p { margin: 0 0 10px; }
.site-footer__legal p:last-child { margin-bottom: 0; }
.site-footer__legal a {
    color: rgba(255,255,255,.85);
    text-decoration: none;
}
.site-footer__legal a:hover { color: var(--footer-accent); }
.site-footer__legal-meta { max-width: 900px; }
.site-footer__legal-meta.footer-widget--text { margin-top: 0; }
.site-footer__col-nav { margin: 0; }

@media (max-width: 640px) {
    .site-footer { padding: 36px 16px 28px; }
    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}
@media (max-width: 900px) {
    .actions .btn { padding:6px 10px; font-size:12px; }
    .menu { gap:10px; }
}

/* Trang chi tiết (CMS page) — header sticky: dính top khi cuộn + nền */
.internal-header-bleed {
    position:sticky;
    top:0;
    z-index:1000;
    width:100vw;
    margin-left:calc(50% - 50vw);
    margin-right:calc(50% - 50vw);
    margin-bottom:22px;
    background:transparent;
    transition:background-color .22s ease;
}
.internal-header-bleed.is-scrolled {
    background-color:rgba(18, 18, 20, .8);
}
.internal-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    max-width:1920px;
    margin:0 auto;
    padding:14px 18px;
    gap:12px;
    background:transparent;
    border:none;
    box-shadow:none;
    border-radius:0;
}
.internal-header .menu a {
    text-shadow:0 1px 1px rgba(0,0,0,.45);
    font-size:17px;
}
.wrap--page { padding-top:18px; }

.page-detail-grid {
    display:grid;
    grid-template-columns:minmax(0, 1fr) 360px;
    gap:28px;
    align-items:start;
}
.page-detail-main.card-page {
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.14);
    border-radius:14px;
    padding:28px 26px 32px;
}
.page-detail-title {
    margin:0 0 12px;
    font-size:clamp(26px, 3.2vw, 38px);
    font-weight:800;
    line-height:1.2;
    letter-spacing:-0.02em;
}
.page-detail-meta {
    display:flex;
    align-items:center;
    gap:10px;
    color:#9aa3c4;
    font-size:15px;
    margin-bottom:26px;
    padding-bottom:20px;
    border-bottom:1px solid rgba(255,255,255,.1);
}
.page-detail-meta__icon {
    display:inline-flex;
    color:#62c4aa;
    flex-shrink:0;
}

.page-detail-body {
    font-size:16px;
    line-height:1.7;
    color:#e4e8ff;
}
.page-detail-body p { margin:0 0 1em; }
.page-detail-body h2, .page-detail-body h3 {
    margin:1.4em 0 0.6em;
    line-height:1.3;
    color:#fff;
}
.page-detail-body h2 { font-size:1.45em; }
.page-detail-body h3 { font-size:1.2em; }
.page-detail-body a { color:#9fe7d8; text-decoration:underline; text-underline-offset:3px; }
.page-detail-body a:hover { color:#b8f0e0; }
.page-detail-body ul, .page-detail-body ol { margin:0 0 1em 1.2em; padding:0; }
.page-detail-body img {
    max-width:100%;
    height:auto;
    border-radius:10px;
    margin:1em 0;
}
.page-detail-body blockquote {
    margin:1em 0;
    padding:12px 18px;
    border-left:4px solid #50b498;
    background:rgba(80,180,152,.08);
    border-radius:0 10px 10px 0;
    color:#c9d4ff;
}

.sidebar-card {
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.14);
    border-radius:14px;
    padding:18px 16px 8px;
    margin-bottom:20px;
}
.sidebar-card__title {
    margin:0 0 12px;
    font-size:17px;
    font-weight:800;
    letter-spacing:-0.02em;
}
.sidebar-empty {
    margin:0 0 12px;
    color:#8b92b0;
    font-size:14px;
}

.related-row {
    display:flex;
    gap:12px;
    align-items:center;
    text-decoration:none;
    color:inherit;
    padding:10px 0;
    border-bottom:1px solid rgba(255,255,255,.08);
    transition:opacity .15s ease;
}
.related-row:last-of-type { border-bottom:none; }
.related-row:hover { opacity:.92; }
.related-row:hover .related-title { color:#9fe7d8; }
.related-row:hover .related-row__arrow { color:#9fe7d8; }

.related-row__arrow {
    flex-shrink:0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:28px;
    height:28px;
    color:#62c4aa;
}
.related-row__arrow svg { display:block; }
.related-row__text { flex:1; min-width:0; }
.related-title {
    font-weight:600;
    font-size:14px;
    color:#e8ecff;
    line-height:1.4;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
}

.sidebar-books {
    list-style:none;
    margin:0;
    padding:0;
}
.sidebar-books li { border-bottom:1px solid rgba(255,255,255,.08); }
.sidebar-books li:last-child { border-bottom:none; }

.book-row-sidebar {
    display:flex;
    gap:12px;
    align-items:center;
    padding:10px 0;
    text-decoration:none;
    color:inherit;
}
.book-row-sidebar:hover .book-row-sidebar__title { color:#9fe7d8; }
.book-thumb-sm {
    width:46px;
    height:62px;
    flex-shrink:0;
    border-radius:6px;
    overflow:hidden;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.1);
}
.book-thumb-sm img {
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.book-thumb-sm__ph {
    display:block;
    width:100%;
    height:100%;
    background:rgba(255,255,255,.06);
}
.book-row-sidebar__body {
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:4px;
}
.book-row-sidebar__title {
    font-weight:600;
    font-size:13px;
    line-height:1.35;
    color:#e8ecff;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
}
.book-row-sidebar__price {
    font-size:12px;
    font-weight:700;
    color:#62c4aa;
}

@media (max-width: 960px) {
    .page-detail-grid { grid-template-columns:1fr; }
}

/* Trang /san-pham — hai cột: bộ lọc + lưới sách */
.products-layout {
    display:grid;
    grid-template-columns:minmax(0, 260px) minmax(0, 1fr);
    gap:28px;
    align-items:start;
}
.products-sidebar {
    position:sticky;
    top:64px;
    display:flex;
    flex-direction:column;
    gap:22px;
}
.sidebar-widget--books .sidebar-books {
    max-height:min(70vh, 520px);
    overflow-y:auto;
}
.related-row.is-current {
    background:rgba(80,180,152,.12);
    border-radius:8px;
    margin:0 -6px;
    padding-left:6px;
    padding-right:6px;
}

/* Thẻ sách — ảnh bìa & tiêu đề dẫn tới chi tiết */
.card-face-cover-link {
    display:block;
    text-decoration:none;
    color:inherit;
}
.card-face-cover-link img {
    width:100%;
    display:block;
    border-radius:12px;
    aspect-ratio:2/3;
    object-fit:cover;
}
.card-face-cover-link .card-cover-placeholder { border-radius:12px; }
.card-face-title-link {
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
    margin:10px 0 4px;
    font-weight:700;
    font-size:15px;
    color:#8b92b0;
    line-height:1.25;
    text-decoration:none;
    min-height:calc(1.25em * 2);
}
.card-face-title-link:hover { color:#9fe7d8; }

/* Trang chi tiết sách — 3 cột */
.book-show-layout {
    display:grid;
    grid-template-columns:minmax(200px, 260px) minmax(0, 1fr) minmax(260px, 300px);
    gap:28px;
    align-items:start;
    min-width:0;
}
.book-show-cover { position:sticky; top:64px; }
.book-show-cover__inner {
    border-radius:14px;
    overflow:hidden;
    background:rgba(0,0,0,.28);
    border:1px solid rgba(255,255,255,.12);
    box-shadow:0 12px 40px rgba(0,0,0,.35);
}
.book-show-cover__inner img {
    width:100%;
    display:block;
    aspect-ratio:2/3;
    object-fit:cover;
}
.book-show-cover__ph {
    aspect-ratio:2/3;
    background:rgba(255,255,255,.08);
}
.book-show-main.card-page {
    padding:26px 24px 30px;
    min-width:0;
}
.book-show-title {
    margin:0 0 16px;
    font-size:clamp(24px, 3vw, 34px);
    font-weight:800;
    line-height:1.2;
    letter-spacing:-0.02em;
    color:#fff;
    word-break:break-word;
    overflow-wrap:anywhere;
    max-width:100%;
}
.book-show-meta-row {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:16px 22px;
    margin-bottom:22px;
    padding-bottom:18px;
    border-bottom:1px solid rgba(255,255,255,.1);
}
.book-show-meta-item {
    display:flex;
    align-items:center;
    gap:8px;
    font-size:14px;
    color:#9aa3c4;
}
.book-show-meta-item--rating { flex-wrap:wrap; }
.book-show-meta-icon {
    display:inline-flex;
    color:#62c4aa;
    flex-shrink:0;
}
.book-show-stars {
    display:inline-flex;
    gap:3px;
    align-items:center;
}
.book-show-star--empty {
    color:rgba(255,255,255,.32);
    flex-shrink:0;
}
.book-show-meta-text {
    color:#b8c0df;
    word-break:break-word;
    overflow-wrap:anywhere;
}
.book-show-facts {
    margin:0 0 22px;
    padding:0 0 6px;
    display:flex;
    flex-direction:row;
    flex-wrap:nowrap;
    align-items:flex-start;
    gap:clamp(16px, 4vw, 40px);
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
}
.book-show-facts::-webkit-scrollbar { height:6px; }
.book-show-facts::-webkit-scrollbar-thumb {
    background:rgba(255,255,255,.18);
    border-radius:999px;
}
.book-show-fact {
    margin:0;
    padding:0;
    border:0;
    flex:0 0 auto;
    min-width:min(140px, 28vw);
    max-width:220px;
}
.book-show-fact dt {
    margin:0 0 4px;
    font-size:12px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.06em;
    color:#6d7390;
}
.book-show-fact dd {
    margin:0;
    font-size:16px;
    font-weight:600;
    color:#e4e8ff;
    line-height:1.4;
    word-break:break-word;
    overflow-wrap:anywhere;
}
.book-show-actions {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:12px;
    margin-bottom:18px;
}
.book-show-btn-read {
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:12px 22px;
    border-radius:999px;
    background:#50b498;
    color:#0d1f1a;
    font-weight:700;
    font-size:14px;
    font-family:inherit;
    text-decoration:none;
    border:none;
    cursor:pointer;
    box-shadow:0 2px 10px rgba(80,180,152,.3);
}
.book-show-btn-read:hover { filter:brightness(1.06); color:#0d1f1a; }
.book-show-btn-icon {
    width:48px;
    height:48px;
    border-radius:50%;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.38);
    color:#fff;
    cursor:pointer;
    padding:0;
    transition:background .15s ease, border-color .15s ease;
}
.book-show-btn-icon:hover {
    background:rgba(255,255,255,.14);
    border-color:rgba(255,255,255,.5);
}
.book-show-btn-icon.is-active {
    background:rgba(239,68,68,.2);
    border-color:rgba(248,113,113,.65);
    color:#fecaca;
}
.book-show-price-block {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:12px;
    margin-bottom:24px;
}
.book-show-price {
    font-size:24px;
    font-weight:800;
    color:#62c4aa;
}
.book-show-price--sale { color:#62c4aa; }
.book-show-price--old {
    font-size:15px;
    font-weight:600;
    color:#6d7390;
    text-decoration:line-through;
}
.book-show-type-pill {
    font-size:12px;
    font-weight:700;
    padding:4px 10px;
    border-radius:999px;
    background:rgba(80,180,152,.15);
    color:#9fe7d8;
    border:1px solid rgba(80,180,152,.35);
}
.book-show-desc-section { margin-top:4px; }
.book-show-desc-heading {
    margin:0 0 12px;
    font-size:15px;
    font-weight:800;
    color:#c9d4ff;
    letter-spacing:-0.02em;
}
.book-desc-shell { position:relative; }
.book-desc-rich {
    font-size:15px;
    line-height:1.65;
    color:#c9d4ff;
}
.book-desc-rich:not(.is-expanded) {
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:4;
    overflow:hidden;
}
.book-desc-rich.is-expanded {
    display:block;
    -webkit-line-clamp:unset;
    overflow:visible;
}
.book-desc-rich p { margin:0 0 .75em; }
.book-desc-rich p:last-child { margin-bottom:0; }
.book-desc-rich a { color:#9fe7d8; }
.book-desc-more {
    margin-top:8px;
    padding:0;
    border:none;
    background:none;
    font:inherit;
    font-weight:700;
    font-size:14px;
    color:#50b498;
    cursor:pointer;
    text-decoration:underline;
    text-underline-offset:3px;
}
.book-desc-more:hover { color:#62c4aa; }
.book-show-desc-empty { margin:0; color:#8b92b0; font-size:15px; }
.book-show-sidebar {
    position:sticky;
    top:64px;
    align-self:start;
}
@media (max-width:1100px) {
    .book-show-layout {
        grid-template-columns:minmax(0, 220px) minmax(0, 1fr);
    }
    .book-show-cover { position:static; }
    .book-show-sidebar {
        grid-column:1 / -1;
        position:static;
        min-width:0;
    }
}
@media (max-width:960px) {
    .book-show-layout {
        gap:20px;
    }
    .book-show-cover {
        min-width:0;
    }
    .book-show-main.card-page {
        padding:18px 16px 22px;
    }
    .book-show-title {
        font-size:clamp(1.2rem, 5.2vw, 1.65rem);
    }
    .book-show-meta-row {
        flex-direction:column;
        align-items:flex-start;
        gap:12px;
    }
    .book-show-meta-item {
        max-width:100%;
        min-width:0;
    }
    .book-show-facts {
        flex-direction:column;
        flex-wrap:nowrap;
        align-items:stretch;
        overflow-x:visible;
        gap:14px 0;
        padding-bottom:0;
    }
    .book-show-fact {
        flex:none;
        width:100%;
        min-width:0;
        max-width:none;
    }
    .book-show-actions {
        width:100%;
    }
    .book-show-btn-read {
        flex:1 1 auto;
        min-width:0;
    }
    .book-show-price-block {
        gap:10px 14px;
    }
    .book-show-price {
        font-size:clamp(1.15rem, 4.5vw, 1.4rem);
    }
}

/* Trang giỏ hàng */
.cart-page-header {
    margin-bottom:18px;
}
.cart-page-title {
    margin:0 0 6px;
    font-size:clamp(22px, 2.8vw, 30px);
    font-weight:800;
    letter-spacing:-0.02em;
    color:#fff;
}
.cart-page-meta {
    margin:0;
    font-size:14px;
    color:#8b92b0;
}
.cart-page-empty {
    margin:0 0 8px;
    padding:20px 16px;
    text-align:center;
    color:#8b92b0;
    font-size:15px;
    background:rgba(255,255,255,.04);
    border:1px dashed rgba(255,255,255,.12);
    border-radius:12px;
}
.cart-page-empty-hint {
    margin:0;
    text-align:center;
}
.cart-page-link {
    color:#9fe7d8;
    font-weight:600;
    text-decoration:underline;
    text-underline-offset:3px;
}
.cart-page-list {
    list-style:none;
    margin:0;
    padding:0;
    display:flex;
    flex-direction:column;
    gap:14px;
}
.cart-page-row {
    display:flex;
    gap:14px;
    align-items:flex-start;
    padding:14px;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.12);
    border-radius:14px;
    min-width:0;
}
.cart-page-row__cover {
    flex-shrink:0;
    width:56px;
    border-radius:8px;
    overflow:hidden;
    background:rgba(0,0,0,.25);
    border:1px solid rgba(255,255,255,.1);
    align-self:flex-start;
}
.cart-page-row__cover img {
    width:100%;
    height:auto;
    display:block;
    aspect-ratio:2/3;
    object-fit:cover;
}
.cart-page-row__cover-ph {
    display:block;
    width:100%;
    aspect-ratio:2/3;
    background:rgba(255,255,255,.08);
}
.cart-page-row__body {
    min-width:0;
    flex:1;
}
.cart-page-row__title {
    display:block;
    font-size:15px;
    font-weight:700;
    color:#e4e8ff;
    text-decoration:none;
    line-height:1.35;
    word-break:break-word;
    overflow-wrap:anywhere;
}
.cart-page-row__title:hover {
    color:#9fe7d8;
}
.cart-page-row__author {
    margin:6px 0 0;
    font-size:13px;
    color:#8b92b0;
}
.cart-page-row__tier {
    margin:6px 0 0;
    font-size:12px;
    color:#62c4aa;
}
.cart-page-row__qty {
    margin:10px 0 0;
    font-size:13px;
    color:#9aa3c4;
}
.cart-page-sub {
    margin:0 0 12px;
    font-size:15px;
    font-weight:800;
    color:#c9d4ff;
    letter-spacing:-0.02em;
}
.cart-page-sub--spaced {
    margin-top:28px;
}
.cart-page-row--pending {
    border-color:rgba(80,180,152,.28);
    background:rgba(80,180,152,.08);
}
.cart-page-row__order-meta {
    margin:10px 0 0;
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px 12px;
    font-size:13px;
}
.cart-page-row__order-badge {
    display:inline-block;
    padding:3px 8px;
    border-radius:6px;
    font-weight:700;
    font-size:12px;
    background:rgba(234,179,8,.2);
    color:#fde68a;
    border:1px solid rgba(234,179,8,.35);
}
.cart-page-row__order-code {
    color:#9aa3c4;
}
.cart-page-row__actions {
    margin-top:10px;
}
.cart-page-pay-btn {
    min-width:132px;
}

@media (max-width:720px) {
    .book-show-layout {
        grid-template-columns:minmax(0, 1fr);
    }
    .book-show-cover__inner {
        max-width:min(260px, 86vw);
        margin:0 auto;
    }
    .book-show-cover__inner img {
        max-height:none;
    }
}
@media (max-width:480px) {
    .book-show-actions {
        flex-wrap:wrap;
    }
    .book-show-btn-read {
        flex:1 1 100%;
        width:100%;
        justify-content:center;
    }
}

.book-detail-main .book-detail-top {
    display:grid;
    grid-template-columns:minmax(0, 220px) minmax(0, 1fr);
    gap:24px;
    align-items:start;
    margin-bottom:28px;
    padding-bottom:24px;
    border-bottom:1px solid rgba(255,255,255,.1);
}
.book-detail-cover {
    border-radius:12px;
    overflow:hidden;
    background:rgba(0,0,0,.25);
    border:1px solid rgba(255,255,255,.1);
}
.book-detail-cover img {
    width:100%;
    display:block;
    aspect-ratio:2/3;
    object-fit:cover;
}
.book-detail-cover__ph {
    aspect-ratio:2/3;
    background:rgba(255,255,255,.08);
}
.book-detail-title { margin-bottom:8px; }
.book-detail-author {
    margin:0 0 16px;
    font-size:17px;
    color:#9aa3c4;
}
.book-detail-facts {
    list-style:none;
    margin:0 0 18px;
    padding:0;
    display:grid;
    gap:8px;
    font-size:14px;
    color:#c9d4ff;
}
.book-detail-facts li span {
    display:inline-block;
    min-width:118px;
    color:#8b92b0;
    font-weight:600;
}
.book-detail-price-row {
    display:flex;
    align-items:baseline;
    gap:12px;
    flex-wrap:wrap;
}
.book-detail-price {
    font-size:26px;
    font-weight:800;
    color:#62c4aa;
}
.book-detail-price--old {
    font-size:16px;
    font-weight:600;
    color:#6d7390;
    text-decoration:line-through;
}
.book-detail-body { margin-top:0; }
@media (max-width: 640px) {
    .book-detail-main .book-detail-top {
        grid-template-columns:1fr;
    }
    .book-detail-cover { max-width:220px; margin:0 auto; }
}
.products-filter-block {
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.14);
    border-radius:14px;
    padding:16px 14px 18px;
}
.products-filter-block__title {
    margin:0 0 12px;
    font-size:16px;
    font-weight:800;
    letter-spacing:-0.02em;
    color:#f4f6ff;
}
.products-genre-nav {
    display:flex;
    flex-direction:column;
    gap:4px;
    max-height:min(52vh, 420px);
    overflow-y:auto;
    padding-right:4px;
}
.products-genre-link {
    display:block;
    padding:8px 10px;
    border-radius:8px;
    font-size:14px;
    color:#c9cff0;
    text-decoration:none;
    line-height:1.35;
    transition:background .15s ease, color .15s ease;
}
.products-genre-link:hover {
    background:rgba(255,255,255,.08);
    color:#eef2ff;
}
.products-genre-link.is-active {
    background:rgba(80,180,152,.18);
    color:#9fe7d8;
    font-weight:600;
}
.products-price-list {
    list-style:none;
    margin:0 0 14px;
    padding:0;
    display:flex;
    flex-direction:column;
    gap:10px;
}
.products-price-label {
    display:flex;
    align-items:flex-start;
    gap:10px;
    font-size:13px;
    color:#c9cff0;
    line-height:1.4;
    cursor:pointer;
}
.products-price-label input {
    margin-top:3px;
    flex-shrink:0;
    width:16px;
    height:16px;
    accent-color:#50b498;
    cursor:pointer;
}
.products-filter-submit {
    width:100%;
    padding:10px 14px;
    border-radius:10px;
    border:1px solid #50b498;
    background:rgba(80,180,152,.2);
    color:#9fe7d8;
    font-weight:700;
    font-size:14px;
    cursor:pointer;
}
.products-filter-submit:hover {
    background:rgba(80,180,152,.32);
}
.products-main__header {
    margin-bottom:14px;
}
.products-main__header-top {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
}
.products-main__titles {
    min-width:0;
}
.products-main__title {
    margin:0 0 6px;
    font-size:clamp(22px, 2.8vw, 30px);
    font-weight:800;
    letter-spacing:-0.02em;
}
.products-main__meta {
    margin:0;
    font-size:14px;
    color:#8b92b0;
}
.products-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
    gap:16px 12px;
    padding:6px 0 28px;
    align-items:start;
}
.products-grid .card-wrap {
    width:100%;
    max-width:280px;
    justify-self:center;
}
.products-empty {
    grid-column:1 / -1;
    margin:0;
    padding:28px 16px;
    text-align:center;
    color:#8b92b0;
    font-size:15px;
    background:rgba(255,255,255,.04);
    border:1px dashed rgba(255,255,255,.12);
    border-radius:12px;
}
.products-filter-backdrop {
    display:none;
}
.products-filter-toggle {
    display:none;
    align-items:center;
    gap:8px;
    flex-shrink:0;
    white-space:nowrap;
    padding:8px 12px;
    border-radius:10px;
    border:1px solid rgba(255,255,255,.28);
    color:#fff;
    background:rgba(9,13,28,.34);
    font:inherit;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
}
.products-filter-toggle__icon {
    display:inline-flex;
    flex-shrink:0;
    opacity:.9;
}
.products-sidebar__drawer-head {
    display:none;
}
@media (max-width: 900px) {
    body.products-filter-drawer-open {
        overflow:hidden;
    }
    .products-filter-backdrop {
        display:block;
        position:fixed;
        inset:0;
        z-index:1003;
        background:rgba(6,8,18,.58);
        opacity:0;
        visibility:hidden;
        pointer-events:none;
        transition:opacity .28s ease, visibility .28s ease;
    }
    .products-filter-backdrop.is-open {
        opacity:1;
        visibility:visible;
        pointer-events:auto;
    }
    .products-layout {
        grid-template-columns:1fr;
    }
    .products-sidebar {
        position:fixed;
        top:0;
        left:0;
        bottom:0;
        width:min(300px, 88vw);
        max-width:100%;
        margin:0;
        padding:calc(12px + env(safe-area-inset-top, 0px)) 16px 28px calc(14px + env(safe-area-inset-left, 0px));
        flex-direction:column;
        gap:18px;
        background:#151a2e;
        border-right:1px solid #2d355f;
        box-shadow:12px 0 36px rgba(0,0,0,.4);
        z-index:1004;
        overflow-y:auto;
        overflow-x:hidden;
        -webkit-overflow-scrolling:touch;
        transform:translateX(-100%);
        transition:transform .3s cubic-bezier(.22, 1, .36, 1);
        align-items:stretch;
    }
    .products-sidebar.is-open {
        transform:translateX(0);
    }
    .products-sidebar__drawer-head {
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
        padding-bottom:12px;
        margin-bottom:2px;
        border-bottom:1px solid rgba(255,255,255,.12);
        flex-shrink:0;
    }
    .products-sidebar__drawer-title {
        font-size:17px;
        font-weight:800;
        letter-spacing:-0.02em;
        color:#f4f6ff;
    }
    .products-sidebar__drawer-close {
        width:40px;
        height:40px;
        padding:0;
        border:1px solid rgba(255,255,255,.3);
        border-radius:10px;
        background:rgba(9,13,28,.55);
        color:#eef2ff;
        font-size:24px;
        line-height:1;
        cursor:pointer;
        display:inline-flex;
        align-items:center;
        justify-content:center;
        -webkit-tap-highlight-color:transparent;
    }
    .products-genre-nav {
        max-height:none;
    }
    .products-main__header-top {
        align-items:center;
    }
    .products-filter-toggle {
        display:inline-flex;
    }
    .products-grid {
        grid-template-columns:repeat(2, minmax(0, 1fr));
        gap:12px 10px;
    }
    .products-grid .card-wrap {
        max-width:none;
        justify-self:stretch;
    }
}

/* Auth modals + profile */
.header-inline-form {
    display:inline;
    margin:0;
    padding:0;
    vertical-align:middle;
}
.header-inline-form .btn {
    cursor:pointer;
    font:inherit;
}

.header-user-menu {
    position:relative;
    flex-shrink:0;
}
.header-user-menu__toggle {
    display:inline-flex;
    align-items:center;
    gap:8px;
    max-width:min(220px, 52vw);
    text-align:left;
}
.header-user-menu__name {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    min-width:0;
}
.header-user-menu__caret {
    flex-shrink:0;
    display:inline-flex;
    opacity:.85;
    transition:transform .2s ease;
}
.header-user-menu.is-open .header-user-menu__caret {
    transform:rotate(180deg);
}
.header-user-menu__dropdown {
    position:absolute;
    top:calc(100% + 8px);
    right:0;
    min-width:min(220px, calc(100vw - 32px));
    padding:6px 0;
    margin:0;
    background:#151a2e;
    border:1px solid #2d355f;
    border-radius:10px;
    box-shadow:0 12px 28px rgba(0,0,0,.35);
    z-index:1100;
}
.header-user-menu__dropdown[hidden] {
    display:none !important;
}
.header-user-menu__item {
    display:block;
    width:100%;
    box-sizing:border-box;
    padding:10px 14px;
    text-align:left;
    color:#eef2ff;
    text-decoration:none;
    font-size:14px;
    line-height:1.35;
    background:transparent;
    border:none;
    cursor:pointer;
    font-family:inherit;
}
.header-user-menu__item:hover,
.header-user-menu__item:focus-visible {
    background:rgba(255,255,255,.08);
    outline:none;
}
.header-user-menu__form {
    margin:0;
    padding:0;
    border-top:1px solid rgba(255,255,255,.1);
    margin-top:4px;
    padding-top:4px;
}
.header-user-menu__item--submit {
    color:#f0b4b4;
}
.header-user-menu__item--submit:hover,
.header-user-menu__item--submit:focus-visible {
    background:rgba(240,180,180,.12);
}
.site-modal-open { overflow:hidden; }
.site-modal-backdrop {
    position:fixed;
    inset:0;
    background:rgba(4,8,20,.72);
    z-index:2000;
}
.site-modal {
    position:fixed;
    inset:0;
    z-index:2010;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    box-sizing:border-box;
}
.site-modal[hidden] { display:none !important; }
.site-modal__panel {
    width:100%;
    max-width:420px;
    max-height:min(92vh, 900px);
    overflow:auto;
    background:#141a33;
    border:1px solid #2d355f;
    border-radius:16px;
    box-shadow:0 24px 60px rgba(0,0,0,.45);
    color:#e8ecff;
    padding:22px 22px 18px;
}
.site-modal__panel--wide { max-width:520px; }
.site-modal__head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:16px;
}
.site-modal__title { margin:0; font-size:20px; font-weight:800; }
.site-modal__close {
    background:none;
    border:0;
    color:#8b92b0;
    font-size:26px;
    line-height:1;
    cursor:pointer;
    padding:4px 8px;
}
.site-modal__close:hover { color:#fff; }
.site-modal__form { display:grid; gap:14px; }
.site-modal__grid2 {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}
@media (max-width: 540px) {
    .site-modal__grid2 { grid-template-columns:1fr; }
}
.site-field { display:grid; gap:6px; }
.site-field__label { font-size:13px; color:#a8afcc; }
.site-field__label .req { color:#f472b6; }
.site-field__input {
    width:100%;
    box-sizing:border-box;
    padding:10px 12px;
    border-radius:10px;
    border:1px solid #3d4666;
    background:#0b1020;
    color:#f4f6ff;
    font-size:15px;
}
.site-field-error { margin:0; font-size:13px; color:#fca5a5; }
.site-check {
    display:flex;
    align-items:center;
    gap:8px;
    font-size:14px;
    color:#c6cbde;
}
.site-modal__submit {
    margin-top:4px;
    padding:12px 16px;
    border-radius:999px;
    border:none;
    background:#2cc7a6;
    color:#0c1328;
    font-weight:800;
    font-size:15px;
    cursor:pointer;
    font-family:inherit;
}
.site-modal__submit:hover { filter:brightness(1.05); }
.site-modal__foot {
    margin:14px 0 0;
    font-size:14px;
    color:#8b92b0;
    text-align:center;
}
.site-link-btn {
    background:none;
    border:0;
    padding:0;
    color:#62c4aa;
    font-weight:700;
    cursor:pointer;
    font-size:inherit;
    text-decoration:underline;
}
.site-alert {
    padding:12px 14px;
    border-radius:10px;
    font-size:14px;
}
.site-alert--error {
    background:rgba(127,29,29,.35);
    border:1px solid rgba(248,113,113,.35);
    color:#fecaca;
}
.site-alert--error p { margin:0 0 6px; }
.site-alert--error p:last-child { margin-bottom:0; }
.site-alert--ok {
    background:rgba(6,95,70,.35);
    border:1px solid rgba(52,211,153,.35);
    color:#a7f3d0;
    margin-bottom:14px;
}
.site-toast {
    position:fixed;
    bottom:24px;
    left:50%;
    transform:translateX(-50%);
    z-index:2100;
    max-width:min(92vw, 420px);
    padding:12px 18px;
    border-radius:12px;
    background:#1e293b;
    border:1px solid #334155;
    color:#f1f5f9;
    font-size:14px;
    box-shadow:0 12px 32px rgba(0,0,0,.4);
}
.site-toast[hidden] { display:none !important; }

.profile-layout {
    display:grid;
    grid-template-columns:260px minmax(0, 1fr);
    gap:28px;
    align-items:start;
    padding:8px 0 40px;
}
@media (max-width: 900px) {
    .profile-layout {
        grid-template-columns:1fr;
    }
}
.profile-nav {
    padding:18px 16px;
}
.profile-nav__list {
    display:grid;
    gap:6px;
}
.profile-nav__link {
    display:block;
    padding:10px 14px;
    border-radius:10px;
    color:#c6cbde;
    text-decoration:none;
    font-size:15px;
    font-weight:600;
}
.profile-nav__link:hover { background:rgba(255,255,255,.06); color:#fff; }
.profile-nav__link.is-active {
    background:rgba(44,199,166,.18);
    color:#62c4aa;
}
.profile-main { padding:22px 24px 28px; }
.profile-main__title {
    margin:0 0 18px;
    font-size:clamp(22px, 2.6vw, 28px);
    font-weight:800;
}
.profile-facts {
    margin:0;
    display:grid;
    gap:14px;
}
.profile-fact {
    display:grid;
    grid-template-columns:160px 1fr;
    gap:12px;
    font-size:15px;
    border-bottom:1px solid rgba(255,255,255,.08);
    padding-bottom:12px;
}
.profile-fact dt {
    margin:0;
    color:#8b92b0;
    font-weight:600;
}
.profile-fact dd { margin:0; color:#e8ecff; }
@media (max-width: 600px) {
    .profile-fact {
        grid-template-columns:1fr;
    }
}
.profile-empty {
    margin:0;
    color:#8b92b0;
    font-size:15px;
}
.profile-table-wrap { overflow-x:auto; }
.profile-table {
    width:100%;
    border-collapse:collapse;
    font-size:14px;
}
.profile-table th,
.profile-table td {
    text-align:left;
    padding:12px 10px;
    border-bottom:1px solid rgba(255,255,255,.1);
}
.profile-table th {
    color:#8b92b0;
    font-weight:700;
    white-space:nowrap;
}
.profile-mono { font-family:ui-monospace,monospace; color:#a5b4fc; }
.profile-hint {
    margin:0 0 16px;
    font-size:14px;
    color:#8b92b0;
    line-height:1.5;
}
.profile-inline-form { margin-bottom:20px; }
.profile-send-code-btn { width:auto; }
.profile-password-form {
    display:grid;
    gap:14px;
    max-width:420px;
    padding-top:8px;
    border-top:1px solid rgba(255,255,255,.08);
}

/* Modal mua sách (chi tiết) */
.purchase-modal[hidden] { display:none !important; }
.purchase-modal {
    position:fixed;
    inset:0;
    z-index:2000;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    box-sizing:border-box;
}
.purchase-modal__backdrop {
    position:absolute;
    inset:0;
    background:rgba(5,8,20,.72);
    cursor:pointer;
}
.purchase-modal__dialog {
    position:relative;
    z-index:1;
    width:100%;
    max-width:420px;
    border-radius:18px;
    padding:22px 20px 20px;
    background:linear-gradient(145deg, #e85d2c 0%, #f4a13c 45%, #e85d2c 100%);
    box-shadow:0 20px 50px rgba(0,0,0,.45);
    color:#fff;
}
.purchase-modal__x {
    position:absolute;
    top:10px;
    right:12px;
    width:36px;
    height:36px;
    border:none;
    border-radius:50%;
    background:rgba(255,255,255,.2);
    color:#fff;
    font-size:22px;
    line-height:1;
    cursor:pointer;
}
.purchase-modal__heading {
    margin:0 0 8px;
    text-align:center;
    font-size:18px;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.purchase-modal__lead {
    margin:0 0 14px;
    font-size:14px;
    line-height:1.45;
    text-align:center;
    color:rgba(255,255,255,.95);
}
.purchase-modal__empty {
    margin:0 0 12px;
    font-size:14px;
    text-align:center;
    color:rgba(255,255,255,.9);
}
.purchase-tier-sheet {
    background:#fff;
    border-radius:14px;
    padding:12px 14px;
    margin-bottom:14px;
    display:flex;
    flex-direction:column;
    gap:4px;
}
.purchase-tier-sheet--physical { gap:8px; }
.purchase-tier-row {
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 4px;
    border-radius:10px;
    cursor:pointer;
    color:#1a1d2e;
    font-size:15px;
    font-weight:600;
}
.purchase-tier-row:hover { background:rgba(232,93,44,.08); }
.purchase-tier-row input { accent-color:#e85d2c; width:18px; height:18px; flex:0 0 auto; }
.purchase-tier-row__label { flex:1; min-width:0; }
.purchase-tier-row__price {
    font-weight:800;
    color:#e85d2c;
    white-space:nowrap;
}
.purchase-radio-row {
    display:flex;
    flex-wrap:wrap;
    align-items:flex-start;
    gap:4px 10px;
    padding:12px 6px;
    border-radius:10px;
    cursor:pointer;
    color:#1a1d2e;
}
.purchase-radio-row:hover { background:rgba(232,93,44,.06); }
.purchase-radio-row input { accent-color:#e85d2c; margin-top:3px; flex:0 0 auto; }
.purchase-radio-row__main { font-weight:700; font-size:15px; flex:1; min-width:160px; }
.purchase-radio-row__sub { flex:0 0 100%; font-size:12px; color:#5c6074; margin-left:28px; }
.purchase-modal__cta-row {
    display:flex;
    flex-direction:column;
    gap:10px;
}
.purchase-modal__cta-row--single { margin-top:4px; }
.purchase-btn {
    display:block;
    width:100%;
    padding:14px 16px;
    border-radius:999px;
    border:none;
    font:inherit;
    font-weight:800;
    font-size:14px;
    letter-spacing:.04em;
    text-transform:uppercase;
    cursor:pointer;
    transition:filter .15s ease, opacity .15s ease;
}
.purchase-btn:disabled { opacity:.45; cursor:not-allowed; }
.purchase-btn--light {
    background:#fff;
    color:#e85d2c;
    box-shadow:0 4px 14px rgba(0,0,0,.12);
}
.purchase-btn--light:hover:not(:disabled) { filter:brightness(1.03); }
.purchase-btn--ghost {
    background:rgba(255,255,255,.22);
    color:#fff;
    border:1px solid rgba(255,255,255,.45);
}
.purchase-btn--ghost:hover:not(:disabled) { background:rgba(255,255,255,.3); }
.purchase-qr-block {
    margin-top:14px;
    padding:12px;
    border-radius:12px;
    background:rgba(255,255,255,.16);
    text-align:center;
}
.purchase-qr-block__label {
    margin:0 0 8px;
    font-size:13px;
    font-weight:700;
}
.purchase-qr-mount {
    display:flex;
    justify-content:center;
    margin:8px 0;
    min-height:120px;
    align-items:center;
}
.purchase-qr-mount img { display:block; margin:0 auto; }
.purchase-qr-link {
    color:#fff;
    font-weight:700;
    font-size:13px;
    word-break:break-all;
}
.purchase-cod-msg {
    margin:12px 0 0;
    padding:12px;
    border-radius:12px;
    background:rgba(255,255,255,.2);
    font-size:14px;
    line-height:1.4;
    text-align:center;
}

/* Đọc ebook dạng flipbook toàn màn hình */
.ebook-flip-reader[hidden] { display:none !important; }
.ebook-flip-reader {
    position:fixed;
    inset:0;
    z-index:5000;
    min-height:100vh;
    min-height:100dvh;
    display:flex;
    flex-direction:column;
    background-color:#c45c24;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,.08) 0%, transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(0,0,0,.06) 0%, transparent 40%),
        repeating-linear-gradient(
            -12deg,
            rgba(0,0,0,.03) 0 2px,
            transparent 2px 14px
        );
    color:#f4f0e8;
    font-family:inherit;
}
.ebook-flip-reader__bar {
    flex:0 0 auto;
    display:flex;
    align-items:center;
    gap:12px;
    padding:8px 12px 10px;
    background:rgba(18,14,12,.78);
    border-bottom:1px solid rgba(255,255,255,.12);
    flex-wrap:wrap;
}
.ebook-flip-reader__back {
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:8px 12px;
    border:none;
    border-radius:8px;
    background:rgba(255,255,255,.1);
    color:#fff;
    font:inherit;
    font-weight:700;
    font-size:12px;
    letter-spacing:.04em;
    cursor:pointer;
    flex-shrink:0;
}
.ebook-flip-reader__back:hover { background:rgba(255,255,255,.18); }
.ebook-flip-reader__back-icon { font-size:16px; line-height:1; opacity:.9; }
.ebook-flip-reader__title {
    flex:1;
    min-width:140px;
    margin:0;
    font-size:13px;
    font-weight:600;
    line-height:1.35;
    text-align:center;
    color:#faf6ef;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}
.ebook-flip-reader__tools {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:flex-end;
    gap:4px;
    flex-shrink:0;
}
.ebook-flip-reader__pager {
    display:inline-flex;
    align-items:center;
    gap:4px;
    margin-right:6px;
    padding:2px 8px;
    border-radius:8px;
    background:rgba(255,255,255,.08);
}
.ebook-flip-reader__page-label {
    font-size:12px;
    font-weight:700;
    font-variant-numeric:tabular-nums;
    min-width:4.5em;
    text-align:center;
}
.ebook-flip-reader__icon-btn {
    width:34px;
    height:34px;
    border:none;
    border-radius:8px;
    background:rgba(255,255,255,.1);
    color:#fff;
    font-size:15px;
    line-height:1;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0;
}
.ebook-flip-reader__icon-btn:hover:not(:disabled) { background:rgba(255,255,255,.2); }
.ebook-flip-reader__icon-btn:disabled { opacity:.35; cursor:not-allowed; }
.ebook-flip-reader__main {
    flex:1;
    display:flex;
    align-items:stretch;
    min-height:0;
    position:relative;
    background:transparent;
}
.ebook-flip-reader__stage {
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    padding:6px 2px 10px;
    min-width:0;
    min-height:0;
    overflow:hidden;
    background:transparent;
}
.ebook-flip-reader__scale {
    transform-origin:center center;
    transition:transform .2s ease;
    flex:1 1 auto;
    align-self:stretch;
    width:100%;
    min-width:0;
    min-height:0;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    background:transparent;
}
.ebook-flip-reader__book-root {
    flex:1 1 auto;
    align-self:stretch;
    width:100%;
    min-width:0;
    min-height:0;
    margin:0;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    background:transparent;
    box-shadow:none;
}
.ebook-flip-page__img {
    display:block;
    width:100%;
    height:auto;
    vertical-align:top;
    user-select:none;
    pointer-events:none;
}
.ebook-flip-spread-frame {
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    height:100%;
    min-height:0;
}
.ebook-flip-spread-frame__img {
    display:block;
    max-width:100%;
    max-height:min(92vh, 92dvh);
    width:auto;
    height:auto;
    object-fit:contain;
    box-shadow:0 18px 50px rgba(0,0,0,.45);
    user-select:none;
}
/* Ẩn flipbook lúc mở đầu tới khi layout + resize xong */
.ebook-flip-reader__stage .ebook-flip-st-root.ebook-flip-st--booting {
    opacity:0;
    pointer-events:none;
}
.ebook-flip-reader__stage .ebook-flip-st-root:not(.ebook-flip-st--booting) {
    opacity:1;
    transition:opacity .14s ease;
}
/* St.PageFlip: toàn bộ cây DOM trong stage lấp đầy khung (override padding tỷ lệ của thư viện) */
.ebook-flip-reader__stage .ebook-flip-st-root.stf__parent,
.ebook-flip-reader__stage .ebook-flip-st-root {
    flex:1 1 auto;
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
    max-width:none !important;
    max-height:none !important;
    margin:0;
    box-sizing:border-box;
    background:transparent;
}
.ebook-flip-reader__stage .stf__wrapper {
    position:relative !important;
    width:100% !important;
    height:100% !important;
    min-height:100% !important;
    flex:1 1 auto;
    box-sizing:border-box;
    overflow:hidden;
    background:transparent;
}
.ebook-flip-reader__stage .stf__wrapper.--portrait,
.ebook-flip-reader__stage .stf__wrapper.--landscape {
    padding-bottom:0 !important;
    height:100% !important;
}
.ebook-flip-reader__stage canvas.stf__canvas {
    position:absolute;
    inset:0;
    left:0;
    top:0;
    width:100% !important;
    height:100% !important;
    max-width:none;
    max-height:none;
}
.ebook-flip-reader__edge {
    flex:0 0 44px;
    width:44px;
    border:none;
    background:rgba(18,14,12,.35);
    color:rgba(255,255,255,.65);
    cursor:pointer;
    position:relative;
    z-index:2;
    transition:background .15s ease, color .15s ease;
}
.ebook-flip-reader__edge:hover {
    background:rgba(18,14,12,.55);
    color:#fff;
}
.ebook-flip-reader__edge--prev::after,
.ebook-flip-reader__edge--next::after {
    content:'';
    position:absolute;
    inset:0;
    margin:auto;
    width:14px;
    height:14px;
    border:solid currentColor;
    border-width:0 3px 3px 0;
    display:block;
}
.ebook-flip-reader__edge--prev::after {
    transform:rotate(135deg);
    left:4px;
}
.ebook-flip-reader__edge--next::after {
    transform:rotate(-45deg);
    right:4px;
}
.ebook-flip-reader__loading {
    position:absolute;
    inset:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:12px;
    background:rgba(18,14,12,.72);
    z-index:10;
    font-weight:600;
}
.ebook-flip-reader__loading[hidden] { display:none !important; }
.ebook-flip-reader__spinner {
    width:44px;
    height:44px;
    border-radius:50%;
    border:3px solid rgba(255,255,255,.25);
    border-top-color:#fff;
    animation:ebookFlipSpin .8s linear infinite;
}
@keyframes ebookFlipSpin { to { transform:rotate(360deg); } }
@media (max-width:768px) {
    .ebook-flip-reader__edge { flex-basis:36px; width:36px; }
    .ebook-flip-reader__title { text-align:left; font-size:12px; -webkit-line-clamp:3; }
}
