/**
 * 商城商品详情 — 对齐 demo/src/app/pages/ProductPage.tsx
 * template/pc/demo/home/store/show.html
 */

.demo-store-product {
    position: relative;
    width: 100%;
    min-height: 60vh;
    background: #f4f7fc;
    color: #0f172a;
    box-sizing: border-box;
}

/* ProductPage: selection:bg-blue-200 selection:text-blue-900 */
.demo-store-product ::selection {
    background: #bfdbfe;
    color: #1e3a8a;
}

.demo-store-product--fullbleed {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.demo-store-product__ambient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 800px;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.demo-store-product__ambient-b1 {
    position: absolute;
    top: -10%;
    left: -5%;
    width: 800px;
    height: 800px;
    background: rgba(219, 234, 254, 0.4);
    border-radius: 50%;
    filter: blur(120px);
    mix-blend-mode: multiply;
}

.demo-store-product__ambient-b2 {
    position: absolute;
    top: 5%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: rgba(238, 242, 255, 0.5);
    border-radius: 50%;
    filter: blur(120px);
    mix-blend-mode: multiply;
}

.demo-store-product__main-wrap {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    /* ProductPage: pt-28 pb-32 px-6 md:px-8 */
    padding: 112px 24px 128px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .demo-store-product__main-wrap {
        padding-left: 32px;
        padding-right: 32px;
    }
}

/* Breadcrumb */
.demo-store-product__crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 24px;
}

.demo-store-product__crumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.demo-store-product__crumb a:hover {
    color: #2563eb;
}

.demo-store-product__crumb-sep {
    font-size: 12px;
    color: #cbd5e1;
}

.demo-store-product__crumb-current {
    color: #0f172a;
}

/* Two-column layout */
.demo-store-product__cols {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
}

@media (min-width: 1024px) {
    .demo-store-product__cols {
        flex-direction: row;
        gap: 32px;
    }
}

.demo-store-product__left {
    flex: 1;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.demo-store-product__aside {
    width: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 1024px) {
    .demo-store-product__aside {
        width: 320px;
        position: sticky;
        top: 100px;
        align-self: flex-start;
    }
}

@media (min-width: 1280px) {
    .demo-store-product__aside {
        width: 340px;
    }
}

/* Hero card */
.demo-store-product__hero {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 32px;
    border: 1px solid #fff;
    box-shadow: 0 8px 40px -12px rgba(0, 0, 0, 0.06);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (min-width: 768px) {
    .demo-store-product__hero {
        padding: 32px 40px;
        flex-direction: row;
        gap: 40px;
    }
}

/* ProductPage: lg:gap-12 lg:p-10 */
@media (min-width: 1024px) {
    .demo-store-product__hero {
        padding: 40px;
        gap: 48px;
    }
}

.demo-store-product__gallery {
    width: 100%;
    max-width: 380px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.demo-store-product__main-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 24px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid rgba(241, 245, 249, 0.8);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02);
}

.demo-store-product__main-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease-out, opacity 0.28s ease;
}

.demo-store-product__main-img-wrap:hover img {
    transform: scale(1.05);
}

.demo-store-product__thumbs {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.demo-store-product__thumbs::-webkit-scrollbar {
    display: none;
}

.demo-store-product__thumbs .thubm-caro {
    display: flex;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.demo-store-product__thumbs .thubm-caro li {
    flex-shrink: 0;
}

.demo-store-product__thumbs .thubm-caro a {
    display: block;
    width: 88px;
    height: 88px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    opacity: 0.65;
    transition: opacity 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.demo-store-product__thumbs .thubm-caro a:hover,
.demo-store-product__thumbs .thubm-caro a.active {
    opacity: 1;
    border: 2px solid #2563eb;
    /* 对齐 ProductPage：ring-4 ring-blue-50 + shadow */
    box-shadow:
        0 0 0 4px #eff6ff,
        0 8px 16px -6px rgba(37, 99, 235, 0.3);
}

.demo-store-product__thumbs .thubm-caro img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Summary */
.demo-store-product__summary {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.demo-store-product__title {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #0f172a;
}

@media (min-width: 768px) {
    .demo-store-product__title {
        font-size: 28px;
    }
}

.demo-store-product__lead {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.65;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Price board */
.demo-store-product__price-board {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.demo-store-product__price-label {
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 6px;
}

.demo-store-product__price-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    color: #ef4444;
}

.demo-store-product__price-y {
    font-size: 18px;
    font-weight: 700;
}

.demo-store-product__price-num {
    font-size: 38px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
}

.demo-store-product__promotion {
    margin-top: 8px;
    font-size: 14px;
    color: #16a34a;
}

/* 隐藏商品编号节点，仍供脚本更新 */
.demo-store-product__visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* SKU / 规格区 — 对齐 ProductPage：无外层灰盒，仅价格区为 #F8FAFC；版本 + 数量（步进器 + 库存） */
/* 覆盖商城 style.css 中 .spmsxx { background:#f5f3ef }，避免整块米色底 */
.demo-store-product__sku-wrap .form-option.spmsxx {
    margin: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.demo-store-product__variants {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.demo-store-product__variant-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.demo-store-product__variant-row--qty {
    align-items: center;
}

.demo-store-product__variant-label {
    flex: 0 0 40px;
    width: 40px;
    font-size: 14px;
    font-weight: 400;
    color: #64748b;
    line-height: 36px;
    text-align: left;
    flex-shrink: 0;
}

.demo-store-product__variant-body {
    flex: 1;
    min-width: 0;
}

.demo-store-product__variant-row--sku .demo-store-product__variant-body {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    overflow: visible;
}

.demo-store-product__sku-sn {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: 0.02em;
}

/* 数量行：步进器 + 「库存 n 件」与 ProductPage 一致 */
.demo-store-product__qty-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.demo-store-product__stock-inline {
    font-size: 13px;
    color: #94a3b8;
}

#dr_sku_quantity {
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
}

/* SKU  pill — 对齐 ProductPage：浅灰边 / 选中蓝边 + 白底角标对勾 */
.demo-store-product__sku-wrap .fc-sku-value {
    position: relative !important;
    overflow: visible !important;
    border-radius: 9999px !important;
    margin: 0 !important;
    padding: 0 16px !important;
    min-height: 36px;
    height: 36px;
    font-size: 13px !important;
    font-weight: 500 !important;
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    color: #475569 !important;
    line-height: 34px !important;
}

.demo-store-product__sku-wrap .fc-sku-value.red {
    background: rgba(239, 246, 255, 0.5) !important;
    border-color: #3b82f6 !important;
    color: #2563eb !important;
    box-shadow: none !important;
}

.demo-store-product__sku-wrap .fc-sku-value.red::after {
    content: "";
    position: absolute;
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
    z-index: 1;
}

.demo-store-product__sku-wrap .fc-sku-value.red::before {
    content: "\2713";
    position: absolute;
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    color: #3b82f6;
    z-index: 2;
}

/* 自定义步进器（与 ProductPage：− | 数字 | +），不依赖 TouchSpin */
.demo-store-product__qty-stepper {
    display: inline-flex;
    align-items: stretch;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s;
}

.demo-store-product__qty-stepper:hover {
    border-color: #cbd5e1;
}

.demo-store-product__step-btn {
    width: 40px;
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}

.demo-store-product__step-btn:hover:not(:disabled) {
    background: #f8fafc;
    color: #475569;
}

.demo-store-product__step-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.demo-store-product__qty-field {
    width: 48px !important;
    min-width: 48px;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-left: 1px solid #f1f5f9 !important;
    border-right: 1px solid #f1f5f9 !important;
    border-radius: 0 !important;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    background: transparent !important;
    box-shadow: none !important;
    cursor: default;
}

@media (max-width: 480px) {
    .demo-store-product__variant-label {
        flex: 0 0 36px;
        width: 36px;
        font-size: 13px;
    }
}

/* Actions */
.demo-store-product__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.demo-store-product__btn {
    flex: 1;
    min-width: 120px;
    height: 46px;
    border-radius: 9999px;
    font-size: 15px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.demo-store-product__btn--buy {
    background: #3b82f6;
    color: #fff;
    box-shadow: 0 4px 12px -4px rgba(59, 130, 246, 0.5);
}

.demo-store-product__btn--buy:hover {
    background: #2563eb;
    color: #fff;
}

.demo-store-product__btn--cart {
    background: #0f172a;
    color: #fff;
    box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.3);
}

.demo-store-product__btn--cart:hover {
    background: #1e293b;
    color: #fff;
}

.demo-store-product__btn--fav {
    flex: 0 0 46px;
    width: 46px;
    min-width: 46px;
    padding: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.demo-store-product__btn--fav:hover {
    color: #0f172a;
    border-color: #cbd5e1;
}

/* Tabs */
.demo-store-product__tabs-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(24px);
    border-radius: 32px;
    border: 1px solid #fff;
    box-shadow: 0 8px 40px -12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    min-height: 500px;
}

.demo-store-product__tab-head {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid rgba(241, 245, 249, 0.8);
    background: rgba(248, 250, 252, 0.5);
    padding: 8px 32px 0;
}

.demo-store-product__tab-btn {
    position: relative;
    /* ProductPage: px-6 py-6 */
    padding: 24px;
    font-size: 16px;
    font-weight: 700;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.demo-store-product__tab-btn:hover {
    color: #0f172a;
}

.demo-store-product__tab-btn.is-active {
    color: #2563eb;
}

.demo-store-product__tab-btn.is-active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #2563eb;
    border-radius: 9999px 9999px 0 0;
}

.demo-store-product__tab-panel {
    display: none;
    /* ProductPage: p-8 md:p-12 lg:p-14 */
    padding: 32px 32px 40px;
}

@media (min-width: 768px) {
    .demo-store-product__tab-panel {
        padding: 48px 48px 48px;
    }
}

@media (min-width: 1024px) {
    .demo-store-product__tab-panel {
        padding: 56px 56px 56px;
    }
}

.demo-store-product__tab-panel.is-active {
    display: block;
}

.demo-store-product__tab-panel .demo-store-product__content {
    font-size: 16px;
    line-height: 1.85;
    color: #475569;
}

.demo-store-product__tab-panel .demo-store-product__content img {
    max-width: 100%;
    height: auto;
}

.demo-store-product__attr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.demo-store-product__attr-table th,
.demo-store-product__attr-table td {
    padding: 18px 22px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.demo-store-product__attr-table th {
    width: 33%;
    background: rgba(248, 250, 252, 0.9);
    font-weight: 700;
    color: #475569;
    border-right: 1px solid #f1f5f9;
}

.demo-store-product__attr-table tr:last-child th,
.demo-store-product__attr-table tr:last-child td {
    border-bottom: none;
}

.demo-store-product__attr-table tr:hover td {
    background: rgba(248, 250, 252, 0.35);
}

/* Sidebar dark CTA */
.demo-store-product__side-dark {
    position: relative;
    background: #1c1f2e;
    border-radius: 24px;
    padding: 32px;
    overflow: hidden;
    box-shadow: 0 12px 40px -12px rgba(28, 31, 46, 0.3);
}

.demo-store-product__side-dark-glow {
    position: absolute;
    top: -48px;
    right: -48px;
    width: 192px;
    height: 192px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

.demo-store-product__side-dark-title {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #60a5fa;
    font-weight: 500;
    font-size: 15px;
    margin-bottom: 28px;
}

.demo-store-product__side-dark-list {
    position: relative;
    z-index: 1;
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.demo-store-product__side-dark-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e2e8f0;
    font-size: 14px;
}

.demo-store-product__side-dark-list .fa {
    color: #60a5fa;
}

.demo-store-product__side-dark-cta {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 52px;
    line-height: 52px;
    text-align: center;
    border-radius: 9999px;
    background: #2563eb;
    color: #fff !important;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 8px 24px -6px rgba(37, 99, 235, 0.4);
    transition: background 0.2s, transform 0.15s;
}

.demo-store-product__side-dark-cta:hover {
    background: #3b82f6;
    color: #fff !important;
}

.demo-store-product__side-dark-note {
    position: relative;
    z-index: 1;
    text-align: center;
    font-size: 12px;
    color: #64748b;
    margin-top: 18px;
}

/* Sidebar light */
.demo-store-product__side-light {
    background: #fff;
    border-radius: 24px;
    border: 1px solid #f1f5f9;
    padding: 32px;
    box-shadow: 0 8px 30px -12px rgba(0, 0, 0, 0.06);
}

.demo-store-product__side-light-h {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.demo-store-product__side-light-bar {
    width: 6px;
    height: 20px;
    background: #2563eb;
    border-radius: 9999px;
}

.demo-store-product__side-light-h h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.demo-store-product__side-item {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
}

.demo-store-product__side-item:last-child {
    margin-bottom: 0;
}

.demo-store-product__side-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #2563eb;
    font-size: 22px;
}

.demo-store-product__side-item h4 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.demo-store-product__side-item p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #64748b;
}
