/* ============================================================
   ThemeDetail.aspx — đồng bộ shell Showroom, hero sản phẩm dạng card
   ============================================================ */

.demo-page-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
    align-items: start;
    margin-top: 0;
}
.detail-page-main {
    min-width: 0;
}
@media (max-width: 960px) {
    .demo-page-detail {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ===== Hero sản phẩm — card trắng trong demo-shell (không lặp gradient Master) ===== */
.detail-product-hero {
    position: relative;
    overflow: hidden;
    margin: 0 0 28px;
    padding: 22px 26px 26px;
    color: var(--ink);
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 10px 28px rgba(24, 40, 72, .08);
}
    .detail-product-hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient( 118deg, var(--brand-1), #83aaff);
        border-radius: 18px 18px 0 0;
    }

.detail-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: stretch;
}
.detail-hero-features {
    grid-column: 1 / -1;
    margin-top: 0;
    padding-top: 22px;
    border-top: 1px solid #e8edf5;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 0;
}
.detail-hero-features .detail-section-head {
    margin-bottom: 18px;
}
.detail-features-wrap {
    margin-top: 8px;
}
.detail-feature-block-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}
.detail-features-video-block {
    margin-bottom: 8px;
    width: 100%;
}
.detail-features-video-figure {
    position: relative;
    margin: 0 0 20px;
    width: 100%;
    max-width: none;
    border-radius: 14px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
}
.detail-features-video-open {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}
.detail-features-video-open .demo-thumb,
.detail-features-video-open .demo-thumb-video,
.detail-features-video-open .demo-thumb-video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transform: none !important;
}
.detail-features-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Ẩn ký tự ▶ (lệch quang học) — vẽ tam giác CSS căn giữa */
    font-size: 0;
    line-height: 0;
    color: transparent;
    background: rgba(37, 99, 235, .92);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .28);
    pointer-events: none;
    transition: transform .2s ease, background .2s ease;
}
.detail-features-video-play::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent #fff;
    /* Dịch nhẹ sang phải để mũi tên nhìn đúng tâm vòng tròn */
    margin-left: 4px;
}
.detail-features-video-open:hover .detail-features-video-play {
    transform: translate(-50%, -50%) scale(1.06);
    background: rgba(29, 78, 216, .96);
}
.detail-features-video-figure .content-block-item__caption {
    padding: 10px 14px 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}
.detail-hero-preview {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-self: start;
    height: auto;
}
.detail-hero-info {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px 0 0;
    align-self: stretch;
    height: 100%;
}
@media (max-width: 900px) {
    .detail-hero-grid { grid-template-columns: 1fr; gap: 22px; }
    .detail-hero-info { padding-top: 0; height: auto; }
    .detail-hero-title-row {
        align-items: flex-start;
        gap: 8px 10px;
    }
    .detail-hero-actions {
        flex-direction: column;
        align-items: stretch;
        padding: 6px;
    }
    .detail-btn-demo--hero {
        width: 100%;
        min-height: 40px;
    }
    .detail-hero-preview { height: auto; }
    .detail-browser-frame { height: auto; flex: none; }
    .detail-browser-viewport.detail-hero-media:not(.demo-card-media--video-preview) {
        flex: none;
        height: 0;
        min-height: 0;
        /* 9:16 — thấp hơn ~50px so với bản trước */
        padding-bottom: calc(177.777778% - 100px);
    }
}
@media (max-width: 640px) {
    .detail-hero-bullets { padding: 10px 12px; }
    .demo-gallery-grid--hero {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }
}
@media (max-width: 480px) {
    .demo-gallery-grid--hero {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Browser frame — khít theo viewport, không kéo trắng phía dưới */
.detail-browser-frame {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: auto;
    justify-content: flex-start;
    background: #fff;
    border-radius: 12px 12px 8px 8px;
    box-shadow: 0 20px 44px rgba(15, 23, 42, .28);
    overflow: hidden;
}
.detail-browser-bar {
    flex: 0 0 auto;
}
.detail-browser-viewport.detail-hero-media {
    flex: 0 0 auto;
    width: 100%;
    height: 0;
    min-height: 0;
    /* 9:16 — thấp hơn ~50px so với bản trước */
    padding-bottom: calc(177.777778% - 100px);
    max-width: none;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
   
    cursor: zoom-in;
    position: relative;
    overflow: hidden;
}
.detail-browser-viewport.detail-hero-media.demo-card-media--video-preview {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    padding-bottom: 0;
    aspect-ratio: 16 / 9;
    cursor: default;
}
.detail-browser-viewport.detail-hero-media .demo-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transform: translateY(0);
    will-change: transform;
}
.detail-browser-viewport.detail-hero-media.demo-card-media--can-scroll .demo-thumb {
    object-fit: unset;
    min-height: 100%;
}
.detail-browser-viewport.detail-hero-media.demo-card-media--looping .demo-thumb {
    transition: none !important;
}
.detail-browser-viewport.detail-hero-media::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    height: 52px;
    background: linear-gradient(to top, rgba(15, 23, 42, .18), transparent);
    pointer-events: none;
    transition: opacity .35s;
}
.detail-hero-preview:hover .detail-browser-viewport.detail-hero-media::after,
.detail-hero-preview:focus-within .detail-browser-viewport.detail-hero-media::after {
    opacity: 0;
}
.detail-browser-viewport.detail-hero-media.demo-card-media--no-scroll::after {
    display: none;
}
.detail-hero-gallery-open {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}
.detail-hero-gallery-open .demo-thumb {
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transform: translateY(0);
    will-change: transform;
}
.detail-browser-viewport.detail-hero-media.demo-card-media--can-scroll .detail-hero-gallery-open .demo-thumb {
    object-fit: unset;
    min-height: 100%;
}
.detail-browser-viewport.detail-hero-media.demo-card-media--looping .detail-hero-gallery-open .demo-thumb {
    transition: none !important;
}
.detail-hero-view-hint {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    z-index: 3;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: rgba(15, 23, 42, .72);
    border-radius: 999px;
    padding: 6px 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    white-space: nowrap;
}
.detail-hero-preview:hover .detail-hero-view-hint,
.detail-hero-preview:focus-within .detail-hero-view-hint {
    opacity: 1;
}
.detail-browser-viewport.detail-hero-media.demo-card-media--video-preview .detail-hero-view-hint {
    display: none;
}
.detail-browser-viewport .demo-icon-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}
.detail-browser-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}
.detail-browser-dots { display: flex; gap: 5px; }
.detail-browser-dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
}
.detail-browser-dots i:nth-child(1) { background: #ef4444; }
.detail-browser-dots i:nth-child(2) { background: #f59e0b; }
.detail-browser-dots i:nth-child(3) { background: #22c55e; }
.detail-browser-url {
    flex: 1;
    font-size: 11px;
    color: #64748b;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Giá — dưới tiêu đề, không nhét SĐT */
.detail-hero-price-line {
    margin: -4px 0 12px;
    font-size: clamp(18px, 2.4vw, 24px);
    font-weight: 800;
    color: #b45309;
    line-height: 1.1;
}
.detail-hero-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    width: 100%;
}
.detail-hero-title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: clamp(20px, 2.8vw, 24px);
    font-weight: 800;
    line-height: 1.25;
    color: var(--ink);
}
.detail-hero-title-row .detail-hero-code {
    flex: 0 0 auto;
    margin: 0;
    align-self: center;
}

.detail-hero-bullets {
    list-style: none;
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 12px;
}
.detail-hero-bullets li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 7px;
    font-size: 13.5px;
    line-height: 1.45;
    color: #334155;
}
.detail-hero-bullets li:last-child {
    margin-bottom: 0;
}
.detail-hero-bullets li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 2px;
    width: 16px;
    height: 16px;
    background: #34d399;
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
}

/* Ưu đãi tặng kèm — hero (gift + list) */
.detail-hero-promo {
    margin: 0 0 16px;
    padding: 14px 14px 12px;
    border-radius: 14px;
    background: linear-gradient(145deg, #fff7ed 0%, #fffbeb 55%, #fff 100%);
    border: 1px solid #fde68a;
    box-shadow: 0 4px 14px rgba(245, 158, 11, .08);
}
.detail-hero-promo-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.detail-hero-promo-gift {
    flex: none;
    width: 52px;
    height: 52px;
    object-fit: contain;
    display: block;
}
.detail-hero-promo-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.detail-hero-promo-label {
    font-size: 15px;
    font-weight: 800;
    color: #c2410c;
    line-height: 1.25;
}
.detail-hero-promo-buy {
    font-size: 13px;
    font-weight: 700;
    color: #9a3412;
    line-height: 1.35;
}
.detail-hero-promo .detail-promo-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.detail-hero-promo .detail-promo-list li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 7px;
    font-size: 13.5px;
    line-height: 1.45;
    color: #334155;
}
.detail-hero-promo .detail-promo-list li:last-child { margin-bottom: 0; }
.detail-hero-promo .detail-promo-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 1px;
    color: #ea580c;
    font-weight: 800;
}
.detail-hero-promo .detail-promo-list strong {
    color: #c2410c;
    font-weight: 800;
}

/* CTA — mã theme + Xem giao diện */
.detail-hero-actions {
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    margin-bottom: 4px;
    padding: 5px;
    border-radius: 14px;
    background: linear-gradient(180deg, #fafbff 0%, #f3f6fb 100%);
    border: 0px solid #e6ebf3;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 8px 20px rgba(15, 23, 42, .05);
}
.detail-hero-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: darkorange;
    border-radius: 999px;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
}
.detail-btn-demo--hero {
    /* Secondary CTA — không cạnh tranh với «Gửi yêu cầu» */
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 45px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .01em;
    white-space: nowrap;
    border-radius: 10px;
    background: #fff;
    color: var(--brand-1, #2563eb);
    border: 1.5px solid rgba(37, 99, 235, .42);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.detail-btn-demo--hero:hover {
    color: var(--brand-2, #7c3aed);
    background: #f8fafc;
    border-color: rgba(124, 58, 237, .5);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, .12);
}
.detail-btn-demo--hero:active {
    transform: translateY(0);
    background: #f1f5f9;
}
.detail-btn-demo__ico {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: none;
    color: inherit;
}
.detail-btn-demo__ico svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: currentColor;
}
.detail-btn-demo__text {
    position: relative;
    z-index: 1;
    line-height: 1;
}
@media (prefers-reduced-motion: reduce) {
    .detail-btn-demo--hero {
        transition: none;
    }
}

.detail-hotline-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    padding: 8px 12px;
    text-decoration: none;
    color: inherit;
    min-height: 52px;
    transition: background .15s;
    overflow: hidden;
}
.detail-hotline-pill:hover {
    background: #e0e7ff;
    color: inherit;
}
.detail-hotline-pill-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: linear-gradient(145deg, #60a5fa 0%, var(--brand-1) 50%, var(--brand-2) 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.detail-hotline-pill-icon svg {
    width: 18px;
    height: 18px;
}
.detail-hotline-pill-label {
    display: block;
    font-size: 10px;
    color: var(--muted);
    line-height: 1.2;
}
.detail-hotline-pill-num {
    display: block;
    font-size: clamp(14px, 2vw, 16px);
    font-weight: 800;
    letter-spacing: .01em;
    color: #1e293b;
    line-height: 1.15;
    white-space: nowrap;
}

/* Gallery — lưới 5 cột, xuống dòng; >10 ảnh: ô cuối +N tham khảo */
.detail-hero-gallery-inline {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
}
.detail-hero-features .detail-hero-mota-block {
    margin: 0 0 24px;
    padding: 0 0 24px;
    border-bottom: 1px solid #e8edf5;
}
.detail-hero-features .detail-hero-mota-block .detail-hero-block-head {
    margin-bottom: 16px;
}
.detail-hero-features .detail-hero-mota-block .detail-hero-block-title {
    font-size: 18px;
}
.detail-hero-features .detail-hero-mota-block .detail-section-bar {
    background: linear-gradient(180deg, #ef4444, #c62828);
}
.detail-hero-features .detail-hero-mota-block .detail-mota {
    font-size: 14.5px;
    line-height: 1.8;
}
/* Chỉ cột MoTa (class/data) — không áp dụng cho ContentBlocks */
.detail-features-wrap .detail-features-mota,
.detail-article-entry .content-block-item.detail-features-mota,
.detail-hero-features [data-theme-mota="1"] {
    display: block !important;
    box-sizing: border-box !important;
    margin-bottom: 1.5rem !important;
    padding: 18px 18px 16px !important;
    border-radius: 14px !important;
    background: linear-gradient(145deg, #fff7ed 0%, #fffbeb 55%, #fff 100%) !important;
    border: 1px solid #fde68a !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, .08) !important;
}
.detail-features-wrap .detail-features-mota:last-child,
.detail-article-entry .content-block-item.detail-features-mota:last-child {
    margin-bottom: 0 !important;
}
.detail-features-wrap .detail-features-mota .block-text,
.detail-article-entry .detail-features-mota .block-text {
    padding: 0 !important;
    background: transparent !important;
}
/* ContentBlocks: luôn plain, không nền kem */
.detail-features-wrap .content-block-item:not(.detail-features-mota):not(.detail-features-video-block),
.detail-article-entry .content-block-item:not(.detail-features-mota):not(.detail-features-video-block) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
.detail-hero-features .detail-hero-policy-block {
    margin: 0 0 24px;
    padding: 0 0 24px;
    border-bottom: 1px solid #e8edf5;
}
/* Không có "Các tính năng nổi bật" → bỏ khoảng trống + border dư dưới policy */
.detail-hero-features .detail-hero-policy-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.detail-hero-features .detail-hero-policy-block .detail-policy-row {
    margin-top: 0;
}
.detail-hero-features.detail-section--article {
    padding-bottom: 0;
}
.detail-hero-features .detail-features-wrap {
    margin-top: 8px;
    padding-top: 8px;
}
.detail-hero-gallery-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}
.demo-gallery-grid--hero {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    position: relative;
}
.demo-gallery-grid--hero .demo-gallery-thumb {
    display: block;
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    transition: border-color .18s, transform .18s, box-shadow .18s;
    line-height: 0;
}
.demo-gallery-grid--hero .demo-gallery-thumb:hover {
    border-color: var(--brand-1);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, .15);
}
.demo-gallery-grid--hero .demo-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.demo-gallery-thumb--more .demo-gallery-more-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background: rgba(15, 23, 42, .58);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    pointer-events: none;
}
.demo-gallery-hidden {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ===== Khối tiêu đề con trong hero/features ===== */
.detail-hero-block-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.detail-hero-block-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}
.detail-hero-mota-block .detail-mota {
    margin-top: 0;
}

/* ===== Nội dung chính ===== */
.detail-body {
    padding: 0;
}

.detail-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 26px 28px;
    margin-bottom: 28px;
    box-shadow: 0 8px 22px rgba(24, 40, 72, .06);
}
.detail-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
}
.detail-section-bar {
    width: 4px;
    height: 28px;
    background: linear-gradient(180deg, var(--brand-1), var(--brand-2));
    border-radius: 4px;
    flex-shrink: 0;
}
.detail-section-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
}

.detail-section--article {
    padding-bottom: 12px;
}
.detail-section--article .detail-article-entry {
    margin-top: 4px;
}

/* ===== Mô tả mặc định — lưới highlight kiểu Maxweb ===== */
.detail-mota-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 640px) {
    .detail-mota-highlights { grid-template-columns: 1fr; }
}
.detail-mota-hl-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 16px;
    background: #f3f4f657;
    border-radius: 10px;
    border: 1px solid #eceff3;
}
.detail-mota-hl-ico {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fde8e8;
    color: #c62828;
}
.detail-mota-hl-ico svg {
    width: 22px;
    height: 22px;
    display: block;
}
.detail-mota-hl-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.detail-mota-hl-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}
.detail-mota-hl-desc {
    font-size: 13px;
    line-height: 1.55;
    color: #64748b;
}

.detail-policy-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 640px) {
    .detail-policy-row { grid-template-columns: 1fr; }
}
.detail-policy-box {
    border-radius: 12px;
    padding: 20px 18px;
    border: 1px solid transparent;
}
.detail-policy-box--green {
    background: #edf8f0;
    border-color: #c6e9d0;
}
.detail-policy-box--blue {
    background: #eef4ff;
    border-color: #c9d9fe;
}
.detail-policy-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 14px;
}
.detail-policy-ico {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.detail-policy-ico svg {
    width: 18px;
    height: 18px;
    display: block;
}
.detail-policy-box--green .detail-policy-head { color: #166534; }
.detail-policy-box--green .detail-policy-ico {
    background: #e1efe6;
    color: #15803d;
}
.detail-policy-box--blue .detail-policy-head { color: #1e40af; }
.detail-policy-box--blue .detail-policy-ico {
    background: #dbeafe;
    color: #1d4ed8;
}
.detail-policy-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.detail-policy-list li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 9px;
    font-size: 13.5px;
    line-height: 1.5;
    color: #334155;
}
.detail-policy-list li:last-child { margin-bottom: 0; }
.detail-policy-box--green .detail-policy-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #16a34a;
    font-weight: 800;
}
.detail-policy-box--blue .detail-policy-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: 800;
}

.detail-mota {
    color: #334155;
    font-size: 14.5px;
    line-height: 1.8;
}
.detail-mota img { max-width: 100%; border-radius: 10px; }
.detail-empty-note { color: var(--muted); font-size: 14px; }

.detail-sidebar {
    position: sticky;
    top: 20px;
    min-width: 0;
    z-index: 2;
    align-self: start;
    transition: top .18s ease;
}
/* Khi thanh filter dính trên cùng — đẩy form xuống khỏi vùng bị lấp */
@media (min-width: 992px) {
    form.demo-page-detail-body.demo-filter-is-stuck .detail-sidebar {
        top: calc(var(--demo-stuck-bar-h, 56px) + 12px);
    }
}
@media (max-width: 960px) {
    .detail-sidebar {
        position: relative;
        top: auto;
        margin-top: 8px;
        transition: none;
    }
}
.detail-side-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 20px;
    margin-bottom: 18px;
    box-shadow: 0 8px 24px rgba(24, 40, 72, .08);
}

.detail-form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}
.detail-form-title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    flex: 1 1 auto;
    min-width: 0;
}
.detail-form-presence {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: none;
    padding: 5px 11px 5px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .03em;
    line-height: 1;
    white-space: nowrap;
    border: 0px solid #e2e8f0;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    color: #64748b;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.detail-form-presence__dot {
    position: relative;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #94a3b8;
    flex: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.detail-form-presence__dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid transparent;
    opacity: 0;
}
.detail-form-presence.is-online {
    background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #86efac;
    color: #047857;
    box-shadow: 0 2px 10px rgba(16, 185, 129, .18);
}
.detail-form-presence.is-online .detail-form-presence__dot {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 0 8px rgba(34, 197, 94, .55);
}
.detail-form-presence.is-online .detail-form-presence__dot::after {
    border-color: rgba(34, 197, 94, .55);
    animation: detail-form-presence-ring 1.8s ease-out infinite;
    opacity: 1;
}
.detail-form-presence.is-offline {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: #e2e8f0;
    color: #64748b;
}
@keyframes detail-form-presence-ring {
    0% {
        transform: scale(0.65);
        opacity: .85;
    }
    70% {
        transform: scale(1.55);
        opacity: 0;
    }
    100% {
        transform: scale(1.55);
        opacity: 0;
    }
}
@media (prefers-reduced-motion: reduce) {
    .detail-form-presence.is-online .detail-form-presence__dot::after {
        animation: none;
        opacity: 0;
    }
}
.detail-form-sub {
    margin: 0 0 18px;
    font-size: 13px;
    color: var(--muted);
}
.detail-form-group {
    position: relative;
    margin-bottom: 4px;
}
.detail-form-field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    opacity: .55;
    pointer-events: none;
    line-height: 1;
}
.detail-form-field {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 13px 14px 13px 40px;
    font-size: 14.5px;
    margin-bottom: 4px;
    font-family: inherit;
    background: #f8fafc;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.detail-form-field::placeholder {
    color: #94a3b8;
}
.detail-form-field:focus {
    outline: none;
    border-color: var(--brand-1);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.detail-form-field.is-invalid {
    border-color: #ef4444;
    background: #fef2f2;
}
.detail-form-field.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .14);
}
.detail-form-field--captcha {
    padding-left: 14px;
    margin-bottom: 0;
}
.detail-form-error {
    color: #ef4444;
    font-size: 12px;
    font-weight: 600;
    min-height: 0;
    margin: 0 2px 10px;
    line-height: 1.4;
}
.detail-form-error:empty {
    display: none;
}
.detail-form-captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 6px;
}
.detail-form-captcha-row:has(.is-invalid) {
    border-color: #ef4444;
    background: #fef2f2;
}
.detail-form-captcha-img-wrap {
    position: relative;
    flex-shrink: 0;
    display: block;
    line-height: 0;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.detail-form-captcha-img {
    display: block;
    width: 118px;
    height: 42px;
    object-fit: cover;
    background: #f1f5f9;
}
.detail-form-captcha-refresh {
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    background: rgba(37, 99, 235, .85);
    border-radius: 50%;
    line-height: 1;
    transition: transform .15s ease, background .15s ease;
}
.detail-form-captcha-img-wrap:hover .detail-form-captcha-refresh {
    background: var(--brand-1);
    transform: rotate(50deg);
}
.detail-form-captcha-row .detail-form-field {
    background: #fff;
    margin-bottom: 0;
    flex: 1;
    min-width: 70px;
    text-align: center;
    font-weight: 700;
    
}
.detail-form-submit {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 15px;
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: .2px;
    background: linear-gradient(135deg, var(--brand-1, #2563eb), var(--brand-2, #7c3aed));
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .28);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
    margin-top: 6px;
    animation: detail-form-submit-pulse 2.6s ease-in-out infinite;
}
.detail-form-submit::after {
    content: "";
    position: absolute;
    inset: -20% -45%;
    background: linear-gradient(
        105deg,
        transparent 36%,
        rgba(255, 255, 255, .38) 48%,
        rgba(255, 255, 255, .1) 52%,
        transparent 64%
    );
    transform: translateX(-72%) skewX(-16deg);
    animation: detail-form-submit-shimmer 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}
.detail-form-submit__label,
.detail-form-submit__spinner {
    position: relative;
    z-index: 1;
}
.detail-form-submit:hover {
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(37, 99, 235, .4);
    animation-play-state: paused;
}
.detail-form-submit:hover::after {
    animation-duration: 1.35s;
}
.detail-form-submit:active {
    transform: translateY(0);
    filter: brightness(1);
}
.detail-form-submit:disabled,
.detail-form-submit.is-loading {
    opacity: .78;
    cursor: not-allowed;
    transform: none;
    filter: none;
    animation: none;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .2);
}
.detail-form-submit:disabled::after,
.detail-form-submit.is-loading::after {
    animation: none;
    opacity: 0;
}
.detail-form-submit__spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    margin-left: 8px;
    vertical-align: -3px;
    animation: detailFormSpin .7s linear infinite;
}
.detail-form-submit.is-loading .detail-form-submit__spinner {
    display: inline-block;
}
.detail-form-submit.is-loading .detail-form-submit__label {
    opacity: .85;
}
@keyframes detailFormSpin {
    to { transform: rotate(360deg); }
}
@keyframes detail-form-submit-pulse {
    0%, 100% {
        box-shadow: 0 10px 24px rgba(37, 99, 235, .26), 0 0 0 0 rgba(37, 99, 235, .3);
    }
    50% {
        box-shadow: 0 12px 28px rgba(37, 99, 235, .38), 0 0 0 10px rgba(37, 99, 235, 0);
    }
}
@keyframes detail-form-submit-shimmer {
    0%, 20% {
        transform: translateX(-72%) skewX(-16deg);
        opacity: 0;
    }
    32% { opacity: 1; }
    58% {
        transform: translateX(72%) skewX(-16deg);
        opacity: .85;
    }
    72%, 100% {
        transform: translateX(85%) skewX(-16deg);
        opacity: 0;
    }
}
@media (prefers-reduced-motion: reduce) {
    .detail-form-submit,
    .detail-form-submit::after {
        animation: none !important;
    }
    .detail-form-submit:hover {
        transform: none;
    }
}
.detail-form-msg {
    margin-top: 10px;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 8px;
    display: none;
}
.detail-form-msg.is-ok {
    display: block;
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.detail-form-msg.is-err {
    display: block;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.detail-consult-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: opacity .18s ease, visibility 0s linear .18s;
}
.detail-consult-popup-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .18s ease, visibility 0s;
}
.detail-consult-popup {
    position: relative;
    background: #fff;
    border-radius: 18px;
    padding: 32px 28px 26px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
    transform: translate3d(0, 12px, 0);
    will-change: transform, opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: transform .18s ease;
}
.detail-consult-popup-overlay.is-open .detail-consult-popup {
    transform: translate3d(0, 0, 0);
}
.detail-consult-popup-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
}
.detail-consult-popup-close:hover {
    color: #475569;
}
.detail-consult-popup-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #f0fdf4;
}
.detail-consult-popup-overlay.is-err .detail-consult-popup-icon {
    background: #fef2f2;
}
.detail-consult-popup-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}
.detail-consult-popup-text {
    margin: 0 0 22px;
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
}
.detail-consult-popup-ok {
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    font-size: 14.5px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    transition: opacity .15s, transform .15s;
}
.detail-consult-popup-overlay.is-err .detail-consult-popup-ok {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}
.detail-consult-popup-ok:hover {
    opacity: .92;
    transform: translateY(-1px);
}

/* Related — chỉ cột trái, 3 card/hàng, không đụng sidebar phải */
.detail-section--qa {
    margin: 0 0 28px;
    padding: 22px 22px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(24, 40, 72, .08);
}
.detail-section--qa .ola-qa {
    margin: 0;
}
.detail-section--qa .ola-qa__title {
    font-size: 1.15rem;
}

.detail-section--related {
    margin-top: 28px;
    margin-bottom: 0;
}
.detail-page-main .related-grid.demo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}
@media (max-width: 900px) {
    .detail-page-main .related-grid.demo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 560px) {
    .detail-page-main .related-grid.demo-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .detail-product-hero {
        padding: 18px 16px 20px;
        border-radius: 16px;
    }
}
