/**
 * 产品详情单页 — 对齐 demo/src/app/pages/ProductPage.tsx
 * 与 page_mall.html、page_*.html 共用
 */

.demo-product-page {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
    background: #fff;
    flex: 1;
    overflow-x: hidden;
}

.demo-product-page__inner {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}

@media (min-width: 768px) {
    .demo-product-page__inner {
        padding-left: 32px;
        padding-right: 32px;
    }
}

/* ========== Hero ========== */
.demo-product-hero {
    position: relative;
    padding-top: 80px;
    padding-bottom: 128px;
    background: #0a0f1c;
    overflow: hidden;
}

.demo-product-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    mix-blend-mode: luminosity;
}

.demo-product-hero__grad {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to top,
        #0a0f1c 0%,
        rgba(10, 15, 28, 0.8) 45%,
        rgba(30, 58, 138, 0.2) 100%
    );
}

.demo-product-hero__content {
    position: relative;
    z-index: 2;
}

.demo-product-hero__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(147, 197, 253, 0.75);
    text-decoration: none;
    margin-bottom: 32px;
    transition: color 0.2s;
}

.demo-product-hero__back:hover {
    color: #fff;
}

.demo-product-hero__row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 64px;
}

@media (min-width: 1024px) {
    .demo-product-hero__row {
        flex-direction: row;
        align-items: center;
        gap: 64px;
    }

    .demo-product-hero__col-text {
        flex: 1 1 50%;
        max-width: 50%;
    }

    .demo-product-hero__col-media {
        flex: 1 1 50%;
        max-width: 50%;
    }
}

.demo-product-hero__pill {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 9999px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.25);
    color: #93c5fd;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}

.demo-product-hero__title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 20px;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

@media (min-width: 768px) {
    .demo-product-hero__title {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .demo-product-hero__title {
        font-size: 3.75rem;
    }
}

.demo-product-hero__subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: #bfdbfe;
    margin: 0 0 32px;
    opacity: 0.95;
}

@media (min-width: 768px) {
    .demo-product-hero__subtitle {
        font-size: 1.5rem;
    }
}

.demo-product-hero__desc {
    font-size: 1.125rem;
    color: #9ca3af;
    line-height: 1.65;
    font-weight: 300;
    margin: 0 0 40px;
    max-width: 36rem;
}

.demo-product-hero__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
}

@media (min-width: 640px) {
    .demo-product-hero__actions {
        flex-direction: row;
        align-items: center;
    }
}

.demo-product-hero__btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 16px 32px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.demo-product-hero__btn--primary {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.4);
}

.demo-product-hero__btn--primary:hover {
    background: #3b82f6;
    color: #fff;
}

.demo-product-hero__btn--ghost {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    backdrop-filter: blur(12px);
}

.demo-product-hero__btn--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.demo-product-hero__figure {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    aspect-ratio: 4 / 3;
}

.demo-product-hero__figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: transform 0.7s ease;
}

.demo-product-hero__figure:hover img {
    transform: scale(1.05);
}

.demo-product-hero__figure-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top right, #0a0f1c, transparent, transparent);
    opacity: 0.8;
    pointer-events: none;
}

.demo-product-hero__badge {
    position: absolute;
    bottom: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(10, 15, 28, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #fff;
}

.demo-product-hero__badge-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4ade80;
    animation: demo-product-pulse 2s ease-in-out infinite;
}

@keyframes demo-product-pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.demo-product-hero__badge-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.demo-product-hero__badge-sub {
    font-size: 12px;
    color: #4ade80;
    font-family: ui-monospace, monospace;
}

/* ========== Section header ========== */
.demo-product-section-head {
    margin-bottom: 64px;
    max-width: 48rem;
}

.demo-product-section-head--center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.demo-product-section-head__row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.demo-product-section-head--center .demo-product-section-head__row {
    justify-content: center;
}

.demo-product-section-head__bar {
    width: 32px;
    height: 4px;
    background: #2563eb;
    border-radius: 9999px;
}

.demo-product-section-head__en {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #2563eb;
}

.demo-product-section-head__title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 20px;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .demo-product-section-head__title {
        font-size: 2.25rem;
    }
}

.demo-product-section-head__desc {
    font-size: 1.125rem;
    line-height: 1.65;
    color: #6b7280;
    margin: 0;
}

/* ========== Features ========== */
.demo-product-section--features {
    padding: 96px 0;
    background: rgba(249, 250, 251, 0.5);
}

.demo-product-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .demo-product-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
    }
}

@media (min-width: 1024px) {
    .demo-product-features {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.demo-product-feature {
    background: #fff;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid #f3f4f6;
    transition: border-color 0.5s, box-shadow 0.5s, transform 0.5s;
    display: flex;
    flex-direction: column;
}

.demo-product-feature:hover {
    border-color: transparent;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
}

.demo-product-feature__icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    transition: transform 0.3s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.demo-product-feature:hover .demo-product-feature__icon {
    transform: scale(1.1);
}

/* 对齐 ProductPage.tsx：每格独立色；图标必须为纯白（主题常把 .fa 设成主题蓝） */
.demo-product-page .demo-product-feature__icon i {
    color: #ffffff !important;
    opacity: 1 !important;
    font-size: inherit;
    line-height: 1;
}

.demo-product-page .demo-product-feature__icon--0 {
    background-color: #165dff !important;
}
.demo-product-page .demo-product-feature__icon--1 {
    background-color: #00b42a !important;
}
.demo-product-page .demo-product-feature__icon--2 {
    background-color: #ff7d00 !important;
}
.demo-product-page .demo-product-feature__icon--3 {
    background-color: #722ed1 !important;
}
.demo-product-page .demo-product-feature__icon--4 {
    background-color: #f5319d !important;
}
/* 第 6 格：与第 1 格区分的皇家蓝（设计稿常见双蓝） */
.demo-product-page .demo-product-feature__icon--5 {
    background-color: #2563eb !important;
}

.demo-product-feature__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
}

.demo-product-feature__desc {
    font-size: 15px;
    line-height: 1.65;
    color: #6b7280;
    margin: 0;
    font-weight: 300;
    flex: 1;
}

/* ========== Scenarios ========== */
.demo-product-section--scenarios {
    padding: 96px 0;
    background: #fff;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}

.demo-product-scenarios {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 64px;
}

@media (min-width: 768px) {
    .demo-product-scenarios {
        flex-direction: row;
        align-items: flex-start;
        gap: 96px;
    }

    .demo-product-scenarios__text {
        flex: 1 1 50%;
    }

    .demo-product-scenarios__grid {
        flex: 1 1 50%;
    }
}

.demo-product-scenarios__lead {
    font-size: 1.125rem;
    color: #4b5563;
    line-height: 1.65;
    margin: 0 0 40px;
    max-width: 32rem;
}

.demo-product-scenarios__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.demo-product-scenarios__list li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    margin-bottom: 16px;
    background: rgba(249, 250, 251, 0.8);
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    transition: background 0.2s;
}

.demo-product-scenarios__list li:last-child {
    margin-bottom: 0;
}

.demo-product-scenarios__list li:hover {
    background: rgba(239, 246, 255, 0.5);
}

.demo-product-scenarios__list i {
    color: #3b82f6;
    font-size: 22px;
    flex-shrink: 0;
}

.demo-product-scenarios__list span {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
}

.demo-product-scenarios__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
}

@media (min-width: 768px) {
    .demo-product-scenarios__grid {
        gap: 24px;
    }
}

.demo-product-scenarios__col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .demo-product-scenarios__col {
        gap: 24px;
    }
}

.demo-product-scenarios__col--offset {
    margin-top: 32px;
}

@media (min-width: 768px) {
    .demo-product-scenarios__col--offset {
        margin-top: 48px;
    }
}

.demo-product-scenarios__img {
    width: 100%;
    height: 192px;
    border-radius: 24px;
    object-fit: cover;
    border: 1px solid #f3f4f6;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
    .demo-product-scenarios__img {
        height: 256px;
    }
}

.demo-product-scenarios__stat {
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 160px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.demo-product-scenarios__stat--blue {
    background: #2563eb;
    color: #fff;
}

.demo-product-scenarios__stat--blue .demo-product-scenarios__stat-sub {
    color: #bfdbfe;
}

.demo-product-scenarios__stat--dark {
    background: #111827;
    color: #fff;
}

.demo-product-scenarios__stat--dark .demo-product-scenarios__stat-sub {
    color: #9ca3af;
}

.demo-product-scenarios__stat-num {
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 4px;
}

.demo-product-scenarios__stat-sub {
    font-size: 14px;
}

/* ========== Bottom CTA ========== */
.demo-product-cta {
    position: relative;
    padding: 96px 0;
    background: #1e3a8a;
    overflow: hidden;
}

.demo-product-cta__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    mix-blend-mode: overlay;
    opacity: 0.2;
}

.demo-product-cta__inner {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 48rem;
    margin: 0 auto;
}

.demo-product-cta__title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 24px;
}

@media (min-width: 768px) {
    .demo-product-cta__title {
        font-size: 3rem;
    }
}

.demo-product-cta__lead {
    font-size: 1.25rem;
    color: #bfdbfe;
    margin: 0 0 40px;
    font-weight: 300;
    line-height: 1.6;
}

.demo-product-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    background: #fff;
    color: #1e3a8a;
    font-weight: 700;
    font-size: 1.125rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s;
}

.demo-product-cta__btn:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(1.05);
    color: #1e3a8a;
}
