/* ============================================================
   科技感 + 圆润扫光 标题样式
   用途：「自定义描述」大标题 / 小标题的前后台显示效果
   ------------------------------------------------------------
   大标题   → .tech-big-title （内含 .tech-text / .tech-big-logo）
   小标题① → .tech-sub-special  （特卖类标签）
   小标题② → .tech-sub-flagship （旗舰店类标签）
   小标题③ → .tech-sub-product  （商品名称）
   列表小号 → 追加 .tech-sm
   ============================================================ */

/* 让动画统一走同一套关键帧：圆润扫光（横向掠过 + 带弧度） */
@keyframes tech-title-sweep {
    0%   { transform: translateX(-230%) skewX(-18deg); }
    60%  { transform: translateX(330%) skewX(-18deg); }
    100% { transform: translateX(330%) skewX(-18deg); }
}

/* ---------------- 大标题：深空蓝渐变药丸 + 科技蓝光 + 圆润扫光 ---------------- */
.tech-big-title {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
    padding: 10px 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #071a33 0%, #123a63 48%, #071a33 100%);
    border: 1px solid rgba(56, 220, 255, 0.45);
    box-shadow:
        0 6px 18px rgba(8, 26, 51, 0.32),
        0 0 0 4px rgba(56, 220, 255, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    color: #d8f6ff;
    line-height: 1.35;
    text-align: center;
    vertical-align: middle;
    overflow: hidden;
    isolation: isolate;
    box-sizing: border-box;
}

/* 科技网格纹理（在文字下方） */
.tech-big-title::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.16;
    background-image:
        linear-gradient(rgba(120, 235, 255, 0.6) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 235, 255, 0.6) 1px, transparent 1px);
    background-size: 14px 14px;
    pointer-events: none;
}

/* 圆润扫光（在文字上方掠过） */
.tech-big-title::before {
    content: '';
    position: absolute;
    top: -60%;
    left: 0;
    width: 55%;
    height: 220%;
    z-index: 3;
    background: linear-gradient(100deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.5) 44%,
        rgba(200, 248, 255, 0.95) 50%,
        rgba(255, 255, 255, 0.5) 56%,
        rgba(255, 255, 255, 0) 100%);
    mix-blend-mode: screen;
    animation: tech-title-sweep 2.8s cubic-bezier(0.45, 0.05, 0.35, 1) infinite;
    pointer-events: none;
}

.tech-big-title .tech-text {
    position: relative;
    z-index: 1;
    display: inline-block;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #d8f6ff;
    text-shadow: 0 0 10px rgba(56, 220, 255, 0.6), 0 0 22px rgba(56, 220, 255, 0.3);
}

/* !important：防止全局样式（如 .glass-card img）把 Logo 拉伸成正方形大图 */
.tech-big-title .tech-big-logo {
    position: relative;
    z-index: 1;
    display: block;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px;
    max-width: 22px !important;
    aspect-ratio: auto !important;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(56, 220, 255, 0.6);
    box-shadow: 0 0 8px rgba(56, 220, 255, 0.45);
}

/* ---------------- 小标题容器 ---------------- */
.tech-sub-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

/* ---------------- 小标题①②：圆润药丸 + 扫光 ---------------- */
.tech-sub-special,
.tech-sub-flagship {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1.5;
    overflow: hidden;
    isolation: isolate;
    box-sizing: border-box;
}

.tech-sub-special::before,
.tech-sub-flagship::before,
.tech-sub-product::before {
    content: '';
    position: absolute;
    top: -60%;
    left: 0;
    width: 55%;
    height: 220%;
    z-index: 3;
    background: linear-gradient(100deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.45) 44%,
        rgba(200, 248, 255, 0.92) 50%,
        rgba(255, 255, 255, 0.45) 56%,
        rgba(255, 255, 255, 0) 100%);
    mix-blend-mode: screen;
    animation: tech-title-sweep 2.6s cubic-bezier(0.45, 0.05, 0.35, 1) infinite;
    pointer-events: none;
}

/* ① 特卖标签：橙金科技感 */
.tech-sub-special {
    background: linear-gradient(135deg, #071a33 0%, #0f4c6e 50%, #071a33 100%);
    border: 1px solid rgba(255, 152, 74, 0.6);
    color: #ffd9a8;
    box-shadow: 0 3px 12px rgba(8, 26, 51, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    text-shadow: 0 0 9px rgba(255, 146, 64, 0.75);
}

/* ② 旗舰店标签：冰蓝科技感 */
.tech-sub-flagship {
    background: linear-gradient(135deg, #071a33 0%, #103a63 50%, #071a33 100%);
    border: 1px solid rgba(56, 220, 255, 0.5);
    color: #cdeeff;
    box-shadow: 0 3px 12px rgba(8, 26, 51, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    text-shadow: 0 0 9px rgba(56, 220, 255, 0.65);
}

/* ③ 商品名称：圆润面板 + 左侧光线 + 扫光 */
.tech-sub-product {
    position: relative;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 5px 14px 5px 16px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
    color: #dff6ff;
    background: linear-gradient(135deg, rgba(7, 26, 51, 0.94) 0%, rgba(18, 66, 104, 0.94) 100%);
    border: 1px solid rgba(56, 220, 255, 0.36);
    border-left: 3px solid #38dcff;
    box-shadow: 0 4px 14px rgba(8, 26, 51, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    text-shadow: 0 0 10px rgba(56, 220, 255, 0.5);
    overflow: hidden;
    isolation: isolate;
    box-sizing: border-box;
}

.tech-sub-product::before {
    width: 45%;
    animation-name: tech-title-sweep;
    animation-duration: 3.2s;
}

/* ---------------- 列表 / 商品卡片小号 ---------------- */
.tech-big-title.tech-sm {
    padding: 6px 14px;
    gap: 5px;
    box-shadow:
        0 3px 10px rgba(8, 26, 51, 0.28),
        0 0 0 3px rgba(56, 220, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.tech-big-title.tech-sm::after { background-size: 10px 10px; }
.tech-big-title.tech-sm .tech-text { font-size: 12px; letter-spacing: 0.4px; }
.tech-big-title.tech-sm .tech-big-logo {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px;
    max-width: 16px !important;
}

.tech-sub-special.tech-sm,
.tech-sub-flagship.tech-sm {
    padding: 2px 9px;
    font-size: 10.5px;
    letter-spacing: 0.3px;
}
.tech-sub-product.tech-sm {
    padding: 3px 10px 3px 12px;
    border-radius: 12px;
    font-size: 11.5px;
}

/* ---------------- 后台添加商品页：预览底板 ---------------- */
.tech-preview-box {
    margin-top: 10px;
    padding: 16px 12px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background:
        radial-gradient(ellipse at 25% 15%, rgba(56, 220, 255, 0.16), transparent 60%),
        radial-gradient(ellipse at 80% 85%, rgba(255, 152, 74, 0.1), transparent 55%),
        linear-gradient(135deg, #0a1526 0%, #0f2137 100%);
    border: 1px solid rgba(56, 220, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.tech-preview-box .tech-preview-hint {
    color: #7fa8c9;
    font-size: 11px;
    letter-spacing: 0.5px;
}

/* 无动画偏好 / 老设备降级 */
@media (prefers-reduced-motion: reduce) {
    .tech-big-title::before,
    .tech-sub-special::before,
    .tech-sub-flagship::before,
    .tech-sub-product::before {
        animation: none;
        opacity: 0.35;
    }
}
