:root {
    --xq-blue: #3688fc;
    --xq-blue-dark: #246bd1;
    --xq-text: #1f2937;
    --xq-muted: #64748b;
    --xq-border: #e2e8f0;
    --xq-bg: #f5f7fb;
    --xq-card: #ffffff;
    --xq-shadow: 0 10px 30px rgba(31, 41, 55, .07);
}
* { box-sizing: border-box; }
body.xq-p2-body { margin: 0; background: var(--xq-bg); color: var(--xq-text); font-family: Nunito, "Microsoft YaHei", Arial, sans-serif; }
a { color: var(--xq-blue); }
.xq-p2-main { min-height: 62vh; padding-top: 20px; padding-bottom: 36px; }
.xq-p2-topbar { background: #14213d; color: #cbd5e1; font-size: 13px; }
.xq-p2-topbar__inner { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.xq-p2-top-actions { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.xq-p2-top-actions a, .xq-link-button { color: #e2e8f0; text-decoration: none; }
.xq-link-button { border: 0; background: transparent; padding: 0; cursor: pointer; font: inherit; }
.xq-p2-brand-row { display: flex; align-items: center; gap: 28px; min-height: 92px; }
.xq-p2-brand { display: flex; align-items: center; gap: 12px; min-width: 250px; color: #111827; text-decoration: none; font-weight: 800; font-size: 22px; }
.xq-p2-brand img { object-fit: contain; border-radius: 12px; background: #fff; }
.xq-p2-search { flex: 1; display: grid; grid-template-columns: minmax(150px, 220px) 1fr auto; border: 1px solid #cbd5e1; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }
.xq-p2-search select, .xq-p2-search input { height: 46px; border: 0; outline: 0; padding: 0 14px; background: #fff; }
.xq-p2-search select { border-right: 1px solid var(--xq-border); }
.xq-p2-search button { border: 0; padding: 0 24px; color: #fff; background: var(--xq-blue); font-weight: 700; cursor: pointer; }
.xq-p2-menu-toggle { display: none; border: 0; border-radius: 8px; padding: 8px 12px; background: var(--xq-blue); color: #fff; font-size: 20px; }
.xq-p2-nav { background: var(--xq-blue); box-shadow: 0 5px 14px rgba(54, 136, 252, .18); }
.xq-p2-nav__inner { min-height: 48px; display: flex; align-items: stretch; overflow-x: auto; }
.xq-p2-nav a { color: #fff; text-decoration: none; padding: 14px 18px; white-space: nowrap; font-weight: 700; }
.xq-p2-nav a:hover, .xq-p2-nav a.active { background: rgba(0, 0, 0, .15); }
.xq-p2-notice { background: #fff8e1; color: #725400; border-bottom: 1px solid #f4dc8b; padding: 8px 0; font-size: 14px; }
.xq-p2-hero { background: linear-gradient(135deg, #ffffff, #edf4ff); border: 1px solid #dce8fb; border-radius: 18px; padding: 34px; box-shadow: var(--xq-shadow); display: grid; grid-template-columns: 1fr 330px; gap: 32px; align-items: center; }
.xq-p2-hero h1, .xq-page-hero h1 { color: #102a56; font-size: clamp(28px, 4vw, 42px); font-weight: 800; line-height: 1.2; margin: 8px 0 14px; }
.xq-p2-hero p, .xq-page-hero p { color: var(--xq-muted); font-size: 16px; line-height: 1.8; margin: 0; }
.xq-p2-eyebrow { color: var(--xq-blue); font-weight: 800; letter-spacing: .06em; }
.xq-p2-hero__actions { display: flex; gap: 12px; margin-top: 22px; }
.xq-p2-hero__note { padding: 24px; border-radius: 16px; background: #14213d; color: #e2e8f0; display: flex; flex-direction: column; gap: 10px; line-height: 1.7; }
.xq-p2-hero__note strong { color: #fff; font-size: 18px; }
.xq-section, .xq-content-page { background: var(--xq-card); border: 1px solid var(--xq-border); border-radius: 16px; box-shadow: var(--xq-shadow); padding: 24px; margin-top: 20px; }
.xq-section__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.xq-section__head h1, .xq-section__head h2, .xq-section h2 { margin: 0; font-weight: 800; color: #1e3a5f; font-size: 22px; }
.xq-section__head p { margin: 6px 0 0; color: var(--xq-muted); }
.xq-section__head > a { white-space: nowrap; }
.xq-product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.xq-product-card { border: 1px solid var(--xq-border); border-radius: 14px; background: #fff; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; display: flex; flex-direction: column; min-width: 0; }
.xq-product-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(15, 23, 42, .12); }
.xq-product-card__image { display: block; aspect-ratio: 16 / 10; background: #f8fafc; overflow: hidden; }
.xq-product-card__image img { width: 100%; height: 100%; object-fit: cover; }
.xq-product-card__body { padding: 15px; display: flex; flex-direction: column; flex: 1; }
.xq-product-card__title { color: #172554; font-weight: 800; font-size: 16px; line-height: 1.45; text-decoration: none; min-height: 46px; }
.xq-product-card__body p { color: var(--xq-muted); margin: 8px 0 10px; line-height: 1.55; min-height: 42px; }
.xq-product-card__badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.xq-product-card__bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.xq-product-card__bottom strong { color: #e11d48; font-size: 20px; }
.xq-page-hero { background: linear-gradient(135deg, #fff, #eef5ff); border: 1px solid #dce8fb; border-radius: 16px; padding: 28px; box-shadow: var(--xq-shadow); }
.xq-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--xq-muted); font-size: 14px; }
.xq-breadcrumb--page { margin-bottom: 16px; }
.xq-topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.xq-topic-grid--large { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.xq-topic-card { background: #fff; border: 1px solid var(--xq-border); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--xq-text); display: grid; grid-template-columns: 110px 1fr; min-height: 110px; }
.xq-topic-card img { width: 110px; height: 100%; object-fit: cover; background: #f8fafc; }
.xq-topic-card div { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.xq-topic-card strong { color: #173c72; line-height: 1.45; }
.xq-topic-card span { color: var(--xq-muted); line-height: 1.55; }
.xq-article-list-compact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; }
.xq-article-list-compact a { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--xq-border); text-decoration: none; }
.xq-article-list-compact span { color: var(--xq-muted); white-space: nowrap; }
.xq-product-detail { display: grid; grid-template-columns: minmax(300px, 44%) 1fr; gap: 28px; background: #fff; border: 1px solid var(--xq-border); border-radius: 18px; padding: 28px; box-shadow: var(--xq-shadow); }
.xq-product-detail__image img { width: 100%; max-height: 520px; object-fit: contain; border-radius: 14px; background: #f8fafc; }
.xq-product-detail__info h1 { color: #172554; font-size: 30px; font-weight: 800; line-height: 1.35; }
.xq-product-detail__desc { color: var(--xq-muted); line-height: 1.75; }
.xq-product-detail__meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.xq-product-detail__meta span { border-radius: 999px; padding: 7px 12px; background: #eef5ff; color: #245a9b; }
.xq-product-detail__price { font-size: 34px; color: #e11d48; font-weight: 800; margin: 14px 0; }
.xq-spec-list { border-top: 1px solid var(--xq-border); border-bottom: 1px solid var(--xq-border); padding: 14px 0; margin: 12px 0 18px; }
.xq-spec-list h2 { font-size: 18px; margin-bottom: 10px; }
.xq-spec-row { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--xq-border); }
.xq-spec-row:last-child { border-bottom: 0; }
.xq-spec-row em { color: var(--xq-muted); font-style: normal; }
.xq-p2-readonly-alert { line-height: 1.65; }
.xq-richtext { line-height: 1.85; overflow-wrap: anywhere; }
.xq-richtext img { max-width: 100%; height: auto; }
.xq-richtext table { max-width: 100%; display: block; overflow-x: auto; }
.xq-faq-list details { border: 1px solid var(--xq-border); border-radius: 10px; padding: 13px 16px; margin-bottom: 10px; }
.xq-faq-list summary { font-weight: 800; cursor: pointer; }
.xq-faq-list details div { padding-top: 10px; line-height: 1.7; color: #475569; }
.xq-content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.xq-content-layout__main { min-width: 0; }
.xq-content-layout__side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 8px; }
.xq-content-layout__side h2 { font-size: 18px; margin-bottom: 6px; }
.xq-content-layout__side a { color: #334155; padding: 8px 10px; border-radius: 8px; text-decoration: none; }
.xq-content-layout__side a:hover, .xq-content-layout__side a.active { background: #eef5ff; color: var(--xq-blue); }
.xq-article-search { display: flex; gap: 10px; margin-bottom: 18px; }
.xq-article-search input { flex: 1; border: 1px solid #cbd5e1; border-radius: 8px; padding: 9px 12px; }
.xq-article-grid { display: grid; gap: 14px; }
.xq-article-card { border: 1px solid var(--xq-border); border-radius: 13px; overflow: hidden; display: grid; grid-template-columns: 190px 1fr; min-height: 140px; }
.xq-article-card__image img { width: 190px; height: 100%; object-fit: cover; }
.xq-article-card > div { padding: 16px; }
.xq-article-card__title { color: #173c72; font-size: 18px; font-weight: 800; text-decoration: none; }
.xq-article-card p { color: var(--xq-muted); line-height: 1.6; margin: 8px 0; }
.xq-article-card span, .xq-content-page__updated { color: #94a3b8; font-size: 13px; }
.xq-content-page h1 { font-size: 32px; font-weight: 800; color: #172554; }
.xq-content-page__updated { margin: 10px 0 22px; }
.xq-article-hero-image { width: 100%; max-height: 480px; object-fit: cover; border-radius: 12px; margin-bottom: 22px; }
.xq-auth-shell { max-width: 500px; margin: 30px auto; }
.xq-auth-card { background: #fff; border: 1px solid var(--xq-border); border-radius: 18px; box-shadow: var(--xq-shadow); padding: 30px; }
.xq-auth-card h1 { color: #172554; font-weight: 800; }
.xq-auth-card > p { color: var(--xq-muted); line-height: 1.65; }
.xq-check { display: block; margin: 6px 0 15px; }
.xq-auth-links { display: flex; justify-content: space-between; margin-top: 16px; }
.xq-user-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.xq-user-summary > div { background: #fff; border: 1px solid var(--xq-border); border-radius: 14px; padding: 18px; box-shadow: var(--xq-shadow); display: flex; flex-direction: column; gap: 8px; }
.xq-user-summary span { color: var(--xq-muted); }
.xq-user-summary strong { color: #172554; font-size: 18px; overflow-wrap: anywhere; }
.xq-user-table { min-width: 900px; }
.xq-pagination { margin: 22px 0 2px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.xq-pagination a, .xq-pagination span { border: 1px solid var(--xq-border); background: #fff; border-radius: 8px; padding: 7px 12px; text-decoration: none; }
.xq-pagination .disabled { color: #94a3b8; background: #f8fafc; }
.xq-empty { grid-column: 1 / -1; padding: 34px; border: 1px dashed #cbd5e1; border-radius: 12px; text-align: center; color: var(--xq-muted); background: #f8fafc; }
.xq-sitemap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.xq-sitemap-grid section { display: flex; flex-direction: column; gap: 8px; }
.xq-p2-footer { background: #14213d; color: #cbd5e1; margin-top: 38px; padding: 42px 0 18px; }
.xq-p2-footer__grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 34px; }
.xq-p2-footer h3 { color: #fff; font-size: 16px; font-weight: 800; }
.xq-p2-footer a, .xq-p2-footer span { display: block; color: #cbd5e1; text-decoration: none; margin: 8px 0; }
.xq-p2-footer__brand { color: #fff; font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.xq-p2-footer p { line-height: 1.7; }
.xq-p2-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding-top: 16px; text-align: center; font-size: 13px; }
@media (max-width: 1199.98px) {
    .xq-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .xq-p2-hero { grid-template-columns: 1fr 280px; }
}
@media (max-width: 991.98px) {
    .xq-p2-brand-row { min-height: 76px; }
    .xq-p2-brand { min-width: 0; font-size: 18px; }
    .xq-p2-brand img { width: 44px; height: 44px; }
    .xq-p2-search { display: none; }
    .xq-p2-menu-toggle { display: block; margin-left: auto; }
    .xq-p2-nav { display: none; }
    .xq-p2-nav.is-open { display: block; }
    .xq-p2-nav__inner { flex-direction: column; padding: 6px 15px; }
    .xq-p2-nav a { padding: 11px 12px; }
    .xq-p2-hero { grid-template-columns: 1fr; }
    .xq-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .xq-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .xq-content-layout { grid-template-columns: 1fr; }
    .xq-content-layout__side { position: static; }
    .xq-product-detail { grid-template-columns: 1fr; }
    .xq-user-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .xq-p2-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .xq-p2-topbar__inner { align-items: flex-start; padding-top: 8px; padding-bottom: 8px; }
    .xq-p2-topbar__inner > span { display: none; }
    .xq-p2-top-actions { width: 100%; justify-content: flex-end; gap: 12px; }
    .xq-p2-main { padding-top: 12px; }
    .xq-p2-hero, .xq-page-hero, .xq-section, .xq-content-page, .xq-product-detail { padding: 18px; border-radius: 13px; }
    .xq-p2-hero h1, .xq-page-hero h1 { font-size: 27px; }
    .xq-p2-hero__actions { flex-direction: column; }
    .xq-product-grid { grid-template-columns: 1fr; }
    .xq-topic-grid, .xq-topic-grid--large, .xq-sitemap-grid { grid-template-columns: 1fr; }
    .xq-topic-card { grid-template-columns: 90px 1fr; }
    .xq-topic-card img { width: 90px; }
    .xq-article-list-compact { grid-template-columns: 1fr; }
    .xq-article-card { grid-template-columns: 1fr; }
    .xq-article-card__image img { width: 100%; height: 190px; }
    .xq-user-summary { grid-template-columns: 1fr; }
    .xq-p2-footer__grid { grid-template-columns: 1fr; }
    .xq-auth-links { flex-direction: column; gap: 10px; }
    .xq-spec-row { grid-template-columns: 1fr auto; }
    .xq-spec-row em { grid-column: 1 / -1; }
}


/* P3 checkout, cart and order */
.xq-checkout-form { margin-top: 22px; }
.xq-form-block { margin-bottom: 18px; }
.xq-spec-options { display: grid; gap: 10px; }
.xq-spec-option { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 10px; align-items: center; border: 1px solid #dbe3ef; border-radius: 10px; padding: 12px; cursor: pointer; }
.xq-spec-option:has(input:checked) { border-color: #2563eb; background: #eff6ff; }
.xq-spec-option em { color: #64748b; font-style: normal; font-size: 13px; }
.xq-payment-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; padding: 12px; background: #f8fafc; border-radius: 10px; }
.xq-payment-preview span { background: #fff; border: 1px solid #dbe3ef; border-radius: 999px; padding: 5px 10px; }
.xq-payment-preview em { color: #b45309; }
.xq-cart-badge { display: inline-flex; min-width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 999px; background: #ef4444; color: white; font-size: 12px; }
.xq-cart-list { display: grid; gap: 12px; }
.xq-cart-row { display: grid; grid-template-columns: 72px minmax(220px,1fr) 180px 130px auto; gap: 14px; align-items: center; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; }
.xq-cart-row img { width: 72px; height: 72px; object-fit: cover; border-radius: 9px; }
.xq-cart-row small, .xq-cart-row span, .xq-cart-price small { display: block; color: #64748b; margin-top: 4px; }
.xq-cart-qty { display: flex; gap: 6px; }.xq-cart-qty input { width: 80px; }
.xq-cart-price { font-weight: 800; color: #dc2626; }
.xq-cart-checkout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; margin-top: 24px; }
.xq-cart-summary { background: #f8fafc; border-radius: 12px; padding: 18px; }.xq-cart-summary span { display: flex; justify-content: space-between; margin-bottom: 10px; }.xq-cart-summary .total { border-top: 1px solid #cbd5e1; padding-top: 12px; font-size: 18px; }
.xq-order-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }.xq-order-grid div { background: #f8fafc; padding: 14px; border-radius: 10px; }.xq-order-grid dt { color: #64748b; font-size: 13px; }.xq-order-grid dd { margin: 5px 0 0; font-weight: 700; word-break: break-all; }
@media(max-width:991.98px){.xq-cart-row{grid-template-columns:60px 1fr}.xq-cart-row img{width:60px;height:60px}.xq-cart-qty,.xq-cart-price,.xq-cart-row>form:last-child{grid-column:2}.xq-cart-checkout{grid-template-columns:1fr}.xq-order-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:575.98px){.xq-spec-option{grid-template-columns:20px 1fr auto}.xq-spec-option em{grid-column:2/-1}.xq-order-grid{grid-template-columns:1fr}}
