/**
 * 名片展示页面样式
 * 个人名片系统 v3.1 Linktree Style
 * 
 * @author 开发团队
 * @version 3.1
 * 
 * 注意：基础样式重置已移至 common.css
 * 本文件仅包含名片展示页面特有的样式
 */

/* 名片页面特定的 body 样式 */
body {
    background: linear-gradient(189deg, #e0bbbb 0%, #6bb890 100%);
    min-height: 100vh;
    height: 100vh;
    overflow: hidden; /* 背景层固定，滚动交给内部容器 */
    color: #333;
}

/* 参考 link3：外层背景固定，内层内容滚动 */
.card-bg {
    width: 100%;
    height: 100vh;
}

.card-scroll {
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal[style*="display: block"] {
    display: flex !important;
}

.modal-content {
    background-color: #fefefe;
    margin: 0;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 20px;
    position: relative;
    text-align: center;
    animation: slideDown 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* 名片容器 - 流体布局 */
.card-container {
    max-width: 680px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 40px 20px 40px; /* 不再为悬浮按钮预留额外空间 */
    align-items: stretch;
}

/* 顶部操作区：与名片卡同宽对齐（max-width + padding 与 .card-container 一致） */
.top-actions-bar {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 10;
}

.top-actions-bar-inner {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-actions {
    display: flex;
    gap: 10px;
}

.top-actions-right {
    margin-left: auto;
}

.icon-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent; /* 移除手机端点击方块高亮 */
    backdrop-filter: blur(5px);
    transition: all 0.2s;
}

.icon-btn:focus {
    outline: none;
}

/* 仅桌面端启用 hover 放大效果 */
@media (hover: hover) and (pointer: fine) {
    .icon-btn:hover {
        background: rgba(255,255,255,0.4);
        transform: scale(1.1);
    }
}

/* 用户菜单容器 */
.user-menu-container {
    position: relative;
    display: inline-block;
}

/* 用户菜单下拉框 */
.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    padding: 8px;
    display: none;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: menuSlideDown 0.2s ease;
}

.user-menu-dropdown.show {
    display: block;
}

@keyframes menuSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 用户菜单项 */
.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #2d3748;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.user-menu-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.user-menu-item svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.user-menu-item:hover svg {
    opacity: 1;
}

.user-menu-item span {
    flex: 1;
}

/* 移动端优化 */
@media (max-width: 480px) {
    .user-menu-dropdown {
        right: 0;
        min-width: 160px;
    }
    
    .user-menu-item {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .top-actions-right {
        gap: 8px;
    }
}

/* 错误页面 */
.error-page, .password-page {
    text-align: center;
    color: white;
    margin-top: 100px;
}

.error-content, .password-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 400px;
    margin: 0 auto;
}

/* 密码表单 */
.password-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.password-form input {
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
}

/* 名片主体 */
.business-card {
    background: transparent;
    box-shadow: none;
    border: none;
    width: 100%;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 头部区域 */
.card-header {
    background: transparent;
    border: none;
    padding: 70px 0 12px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.5);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    margin-bottom: 15px;
    overflow: visible;
    position: relative;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: #fff;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 600;
}

.avatar-vip-badge {
    position: absolute;
    right: 4px;
    top: 4px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #0f172a;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
    box-shadow: 0 6px 14px rgba(249, 168, 38, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.85);
    z-index: 2;
}

.identity h1 {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.identity .title {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-weight: 400;
}

.username-link {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.username-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.12);
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.2s ease;
    flex: 1;
    min-width: 0; /* 允许文本截断 */
}

.username-link a svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

.username-link a:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

/* 内联分享按钮样式 */
.share-btn-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.share-btn-inline:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.share-btn-inline:active {
    transform: scale(0.95);
}

.share-btn-inline svg {
    width: 18px;
    height: 18px;
}

/* 移动端响应式优化 */
@media (max-width: 768px) {
    .username-link {
        flex-wrap: wrap;
    }
    
    .username-link a {
        font-size: 12px;
        padding: 5px 12px;
    }
    
    .share-btn-inline {
        width: 32px;
        height: 32px;
    }
    
    .share-btn-inline svg {
        width: 16px;
        height: 16px;
    }
}

/* 简介区域 - 毛玻璃效果 */
.about {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 15px 20px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.95);
    font-size: 14px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.about-head { display: none; }

/* 视频区域 */
.video-section {
    margin-bottom: 30px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 联系方式图标行 */
.contacts {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0 0 12px 0;
    flex-wrap: wrap;
}

.contact-item {
    text-decoration: none;
    outline: none;
    -webkit-tap-highlight-color: transparent; /* 移除手机端点击方块高亮 */
}

.contact-item:focus {
    outline: none;
}

.contact-item .icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.contact-item .icon svg {
    width: 22px;
    height: 22px;
}

/* 仅在支持 hover 的设备上启用放大效果，避免手机端图标放大后不恢复 */
@media (hover: hover) and (pointer: fine) {
    .contact-item .icon:hover {
        background: rgba(255,255,255,0.4);
        transform: scale(1.1);
    }
}

/* 点击时的轻微放大反馈，由 JS 添加/移除该类 */
.tapping {
    transform: scale(1.08);
}

.contact-item .info, .contact-item .label, .contact-item .actions, .contact-item button {
    display: none;
}

/* 电话操作弹层（拨打 / 复制） */
.phone-sheet {
    position: fixed;
    inset: 0;
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 2000;
}

.phone-sheet.show {
    display: flex;
}

.phone-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
}

.phone-sheet-content {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto 20px auto;
    background: #ffffff;
    border-radius: 16px 16px 12px 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    padding: 16px 20px 8px 20px;
    box-sizing: border-box;
}

.phone-sheet-title {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 4px;
}

.phone-sheet-number {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

.phone-sheet-btn {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.phone-sheet-btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
}

.phone-sheet-btn:not(.primary) {
    background: #f3f4f6;
    color: #111827;
}

.phone-sheet-btn:active {
    transform: scale(0.97);
}

.phone-sheet-cancel {
    width: 100%;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 14px;
    padding: 6px 0 2px 0;
    margin-top: 2px;
    cursor: pointer;
}

/* 社交链接按钮 */
.socials {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
}

/* 分类分组：分类标题（非链接样式、居中、可折叠） */
.social-category-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-category-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #fff;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.9), 0 1px 2px rgba(0, 0, 0, 0.7), 0 2px 4px rgba(0, 0, 0, 0.5);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.social-category-header:hover {
    opacity: 0.85;
}

.social-category-header__icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.social-category-header__text {
    flex: 0 0 auto;
    color: #fff;
}

.social-category-header__chevron {
    flex-shrink: 0;
    transition: transform 0.2s;
}

.social-category-block.is-collapsed .social-category-header__chevron {
    transform: rotate(-90deg);
}

.social-category-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.25s ease-out, opacity 0.2s;
}

.social-category-block.is-collapsed .social-category-links {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    gap: 0;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50px;
    color: #333;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.social-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    background: #fff;
}

.social-btn img, .social-btn svg {
    position: absolute;
    left: 20px;
    width: 24px;
    height: 24px;
}

/* 底部按钮（作为内容的一部分） */
.card-footer {
    margin-top: 16px;
}

.card-footer .footer-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
    min-width: 0;
    flex-direction: row;
}

.footer-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    border-radius: 50px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(0,0,0,0.4);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    /* 防止初始渲染重叠 */
    position: relative;
    min-width: 120px;
    width: auto;
    box-sizing: border-box;
    /* 确保按钮内容正确对齐 */
    justify-content: center;
}

.footer-btn.primary {
    background: rgba(0,0,0,0.7);
    border-color: rgba(255,255,255,0.25);
}

.footer-btn.secondary {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-color: rgba(255,255,255,0.35);
}

.footer-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.footer-btn.primary:hover {
    background: rgba(0,0,0,0.85);
}

.footer-btn.secondary:hover {
    background: rgba(255,255,255,0.3);
}

.footer-btn:active {
    transform: translateY(-2px) scale(0.98);
}

.footer-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* 底部广告区 */
.card-ad-section {
    margin-top: 24px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.card-ad-label {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.25);
    margin-bottom: 8px;
}

.card-ad-content {
    font-size: 14px;
    color: #111827;
}

.card-ad-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

.card-ad-image-link {
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.card-ad-image-link:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.card-ad-image-link:active {
    transform: scale(0.98);
}

.card-ad-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    max-height: 300px;
    object-fit: contain;
}

/* 选项卡样式（遮罩式背景虚化：无 blur，半透明遮罩保证文字可读且不卡顿） */

.card-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 4px 12px 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px 12px 0 0;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* 标签文字白色 + 阴影，弱化背景图对可读性的影响，保留透明感 */
.card-tab {
    background: transparent;
    border: none;
    color: #fff;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.9), 0 1px 2px rgba(0, 0, 0, 0.7), 0 2px 4px rgba(0, 0, 0, 0.5);
}

.card-tab:hover {
    color: #fff;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.8), 0 2px 6px rgba(0, 0, 0, 0.6);
}

.card-tab.active {
    color: #fff;
    border-bottom-color: #fff;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.8), 0 2px 6px rgba(0, 0, 0, 0.6);
}

.card-tab__icon {
    flex-shrink: 0;
    vertical-align: middle;
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.8)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

.tab-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.card-tab-content {
    display: none;
}

.card-tab-content.active {
    display: block;
}

/* 移动端 tab 栏：禁止换行 + 适度字号/内边距，避免挤占或换行 */
@media (max-width: 768px) {
    .card-tabs {
        flex-wrap: nowrap;
        gap: 4px;
        padding: 4px 8px 0;
        margin-bottom: 12px;
    }
    .card-tab {
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 14px;
        gap: 4px;
        flex-shrink: 0;
    }
    .card-tab svg,
    .card-tab__icon {
        width: 16px;
        height: 16px;
    }
    .tab-badge {
        font-size: 11px;
        padding: 1px 6px;
    }
}

/* 种草帮推：给好评 / 来帮推（图标网格，每行 4 个，参考 NFC 碰一碰营销页） */
.grass-push {
    padding: 0;
}

.grass-push__section {
    margin-bottom: 24px;
}

.grass-push__section:last-child {
    margin-bottom: 0;
}

/* 给好评 / 来帮推：遮罩式背景虚化 + 统一标题样式 */
.grass-push__title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
    padding: 10px 16px 10px 14px;
    line-height: 1.5;
    letter-spacing: 0.03em;
    border-left: 4px solid rgba(255, 255, 255, 0.5);
    display: inline-block;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 0 8px 8px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.grass-push__title--review {
    border-left-color: #059669;
    color: #047857;
}

.grass-push__title--publish {
    border-left-color: #7c3aed;
    color: #6d28d9;
}

.grass-push__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.grass-push__item {
    margin: 0;
    padding: 0;
}

.grass-push__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 8px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 12px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    min-height: 100px;
    box-sizing: border-box;
}

.grass-push__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    background: #fff;
}

.grass-push__link--action:hover {
    background: #fff;
}

.grass-push__link--disabled {
    cursor: default;
    opacity: 0.7;
}

.grass-push__link--disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.grass-push__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.grass-push__icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.grass-push__icon-svg {
    display: block;
    color: #666;
}

.grass-push__label {
    text-align: center;
    word-break: break-all;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .grass-push__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .grass-push__link {
        min-height: 90px;
        padding: 12px 6px;
    }
}

@media (max-width: 480px) {
    .grass-push__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .grass-push__link {
        min-height: 84px;
        font-size: 13px;
    }
}

/* 商品网格（参考淘宝列表：统一间距、响应式列数） */
.products-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.products-grid[data-per-row="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.products-grid[data-per-row="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.products-grid[data-per-row="4"] {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .products-grid[data-per-row="2"],
    .products-grid[data-per-row="3"],
    .products-grid[data-per-row="4"] {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .products-grid[data-per-row="2"],
    .products-grid[data-per-row="3"],
    .products-grid[data-per-row="4"] {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* 商品卡片（参考淘宝：白底、细边框感、圆角适中、hover 上浮） */
.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: #e8e8e8;
}

/* 主图区域：1:1 方图（淘宝一致），hover 轻微放大 */
.product-image {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    overflow: hidden;
    background: #f8f8f8;
    position: relative;
}

/* 首图裁切：仿淘宝，方框内居中裁切填满 */
.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* 图片数量标识（右下角，低调小标签） */
.product-image-count {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 2px;
    z-index: 2;
}

.product-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.product-image.placeholder svg {
    width: 60px;
    height: 60px;
}

/* 商品信息区（参考淘宝：标题两行、价格突出） */
.product-info {
    padding: 10px 12px 12px;
}

.product-title {
    font-size: 14px;
    font-weight: 400;
    color: #333;
    margin: 0 0 6px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #ff0036;
    margin-bottom: 0;
    letter-spacing: -0.5px;
}

.product-category {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* 商品分页 */
.products-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding: 16px;
}

.pagination-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.pagination-info {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

/* 商品详情弹窗 */
.product-detail-modal {
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding-top: 32px;
}

/* 商品详情关闭按钮，避免与图片重叠 */
.product-detail-modal .close {
    top: 10px;
    right: 16px;
    z-index: 5;
}

/* 种草素材选择弹窗（模仿选择素材 - 发布到小红书） */
.grass-material-modal {
    max-width: 520px;
    width: 92%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    background: #fff;
}

.grass-material-modal__header {
    flex-shrink: 0;
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.grass-material-modal__title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
}

.grass-material-modal__title-icon {
    width: 20px;
    height: 20px;
    opacity: 0.95;
}

.grass-material-modal__close {
    color: #fff;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    opacity: 0.9;
}

.grass-material-modal__close:hover {
    opacity: 1;
}

.grass-material-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.grass-modal__tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.grass-modal__tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.grass-modal__tab:hover {
    border-color: #c7d2fe;
    color: #4338ca;
}

.grass-modal__tab--active {
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
    border-color: transparent;
    color: #fff;
}

.grass-modal__tab svg {
    width: 18px;
    height: 18px;
}

.grass-modal__panel {
    display: none;
}

.grass-modal__panel.is-active {
    display: block;
}

.grass-modal__empty {
    margin: 0;
    padding: 16px 0;
    color: #9ca3af;
    font-size: 14px;
}

.grass-modal__section {
    margin-bottom: 18px;
}

.grass-modal__section:last-child {
    margin-bottom: 0;
}

.grass-modal__section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.grass-modal__section-header .grass-modal__section-title {
    margin-bottom: 0;
}

.grass-modal__section-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.grass-modal__section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.grass-modal__section-title svg {
    width: 18px;
    height: 18px;
    color: #6b7280;
}

.grass-modal__textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    resize: vertical;
    box-sizing: border-box;
}

.grass-modal__textarea:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.grass-modal__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.grass-modal__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.grass-modal__btn--copy {
    background: #2563eb;
    color: #fff;
}

.grass-modal__btn--copy:hover {
    background: #1d4ed8;
}

.grass-modal__btn--change {
    background: #ec4899;
    color: #fff;
}

.grass-modal__btn--change:hover {
    background: #db2777;
}

.grass-modal__btn--save {
    background: #2563eb;
    color: #fff;
}

.grass-modal__btn--save:hover {
    background: #1d4ed8;
}

.grass-modal__save-video-link {
    text-decoration: none;
}

.grass-modal__save-video-link:hover {
    text-decoration: none;
}

.grass-modal__copy-display {
    margin-top: 0;
    padding: 12px 14px;
    min-height: 60px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    background: #fafafa;
    white-space: pre-wrap;
    word-break: break-word;
}

.grass-modal__btn--change-img {
    background: #ec4899;
    color: #fff;
}

.grass-modal__btn--change-img:hover {
    background: #db2777;
}

.grass-modal__btn--change-video {
    background: #ec4899;
    color: #fff;
}

.grass-modal__btn--change-video:hover {
    background: #db2777;
}

.grass-modal__current-img-wrap {
    width: 100%;
    max-width: 200px;
    margin-bottom: 12px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #10b981;
    background: #f3f4f6;
}

.grass-modal__current-img-wrap .grass-modal__current-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.grass-modal__img-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.grass-modal__img-list--1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 10px;
}

.grass-modal__img-list--2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.grass-modal__img-list--3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.grass-modal__img-list--1 .grass-modal__img-wrap,
.grass-modal__img-list--2 .grass-modal__img-wrap,
.grass-modal__img-list--3 .grass-modal__img-wrap {
    width: 100%;
    aspect-ratio: 1;
}

.grass-modal__img-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    background: #f3f4f6;
    flex-shrink: 0;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.grass-modal__img-wrap:hover {
    border-color: #c7d2fe;
}

.grass-modal__img-wrap.is-selected {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
}

.grass-modal__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.grass-modal__img-wrap.is-selected::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    background: #7c3aed;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
}

.grass-modal__video-wrap {
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.grass-modal__video-wrap .grass-modal__video {
    width: 100%;
    max-height: 280px;
    display: block;
}

.grass-modal__footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
    border-radius: 0 0 16px 16px;
}

.grass-modal__btn--cancel {
    background: #e5e7eb;
    color: #4b5563;
}

.grass-modal__btn--cancel:hover {
    background: #d1d5db;
}

.grass-modal__btn--primary {
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
    color: #fff;
    padding: 10px 20px;
}

.grass-modal__btn--primary:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.grass-modal__videos-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.grass-modal__videos-list a {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    background: #e5e7eb;
    color: #374151;
    font-size: 13px;
    text-decoration: none;
    width: fit-content;
}

.grass-modal__videos-list a:hover {
    background: #d1d5db;
}

/* 商品详情 */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    width: 100%;
    max-width: 100%;
    overflow: hidden; /* 防止内容溢出 */
}

.product-detail-images {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    overflow: hidden; /* 防止内容溢出 */
}

/* 1:1 比例用 padding-bottom 实现，兼容 iOS Safari（避免 aspect-ratio 异常导致只显示一角） */
.product-main-image {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #f5f5f5;
    position: relative;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 单图时主图填满比例盒 */
.product-main-image > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 大图滑动容器：填满主图比例盒，overflow hidden + 内层 track 用 translateX 驱动（与淘宝一致，避免 iOS scrollLeft 不准） */
.product-main-image-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: pan-x;
    cursor: grab;
}

.product-main-image-slider:active {
    cursor: grabbing;
}

/* 内层轨道：flex 横向排列，由 JS 设置 transform: translateX(-n%) 切换 */
.product-main-image-track {
    display: flex;
    height: 100%;
    width: 100%;
    will-change: transform;
}

.product-main-image-slide {
    height: 100%;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* flex 与宽度由 JS 按张数设置：track 宽度 (n*100)%，每张 0 0 (100/n)% */
}

.product-main-image-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 大图指示器 */
.product-main-image-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.product-main-image-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(128, 128, 128, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    padding: 2px;
    box-sizing: border-box;
}

.product-main-image-indicator::before {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    margin: 0 auto;
}

.product-main-image-indicator.active {
    background-color: rgba(128, 128, 128, 0.4);
    width: 20px;
    border-radius: 4px;
}

.product-main-image-indicator.active::before {
    background: #e53e3e;
    width: 16px;
    height: 4px;
    border-radius: 2px;
}

/* PC端导航箭头按钮 */
.product-main-image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.product-main-image:hover .product-main-image-nav {
    opacity: 1;
    pointer-events: auto;
}

.product-main-image-nav:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.product-main-image-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.product-main-image-nav-prev {
    left: 12px;
}

.product-main-image-nav-next {
    right: 12px;
}

.product-main-image-nav svg {
    width: 20px;
    height: 20px;
}

/* 移动端隐藏导航箭头 */
@media (max-width: 768px) {
    .product-main-image-nav {
        display: none;
    }
}

/* 图片页码提示 */
.product-image-counter {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    z-index: 4;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

/* 缩略图数量提示（移动端） */
.product-thumbnails-count {
    display: flex;
    padding: 12px 6px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 2px;
    flex-shrink: 0;
    min-height: 80px;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    position: sticky;
    left: 0;
    z-index: 1;
}

@media (max-width: 768px) {
    .product-thumbnails-count {
        display: flex;
    }
}

/* 商品大图查看器 */
.product-image-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-image-viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(4px);
}

.product-image-viewer-container {
    position: relative;
    width: 90vw;
    height: 90vh;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 关闭按钮放在容器内，避免 overflow:hidden 裁掉（PC 端可见） */
.product-image-viewer-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10002;
}

.product-image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.product-image-viewer-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.product-image-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    transition: all 0.2s ease;
}

.product-image-viewer-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.product-image-viewer-nav-prev {
    left: 20px;
}

.product-image-viewer-nav-next {
    right: 20px;
}

.product-image-viewer-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10002;
    backdrop-filter: blur(4px);
}

@media (max-width: 768px) {
    .product-image-viewer-modal {
        padding: 10px;
    }
    
    .product-image-viewer-close {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
    }
    
    .product-image-viewer-nav {
        width: 36px;
        height: 36px;
    }
    
    .product-image-viewer-nav-prev {
        left: 10px;
    }
    
    .product-image-viewer-nav-next {
        right: 10px;
    }
    
    .product-image-viewer-counter {
        bottom: 10px;
    }
}

.product-thumbnails {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    position: relative;
    align-items: flex-start;
}

.product-thumbnails-wrapper {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    margin-left: 8px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    /* 隐藏滚动条但保持滚动功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    touch-action: pan-x; /* 优化触摸滑动 */
}

/* 隐藏Chrome/Safari/Opera的滚动条 */
.product-thumbnails-wrapper::-webkit-scrollbar {
    display: none;
}

/* 隐藏Chrome/Safari/Opera的滚动条 */
.product-thumbnails::-webkit-scrollbar {
    display: none;
}

.product-thumbnails-wrapper img {
    width: 80px;
    height: 80px;
    min-width: 80px; /* 防止图片被压缩 */
    flex-shrink: 0; /* 防止图片收缩 */
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease, border-color 0.2s ease;
    border: 2px solid transparent;
    user-select: none; /* 防止图片被选中 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.product-thumbnails-wrapper img:hover {
    opacity: 0.8;
}

.product-thumbnails-wrapper img.active {
    opacity: 1;
    border-color: #667eea;
}

.product-detail-info h2 {
    font-size: 24px;
    margin: 0 0 16px 0;
    color: #333;
}

.product-detail-price {
    font-size: 28px;
    font-weight: 700;
    color: #e53e3e;
    margin-bottom: 16px;
}

.product-detail-description {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 16px;
    white-space: pre-wrap;
}

.product-detail-category,
.product-detail-platform {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.product-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.product-tag {
    background: #f0f0f0;
    color: #666;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.product-detail-actions {
    margin-top: 24px;
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
    /* 详情弹窗在 iPhone 上避免 90vh 异常，用安全区 + 固定预留 */
    .product-detail-modal {
        max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 60px);
    }
    /* 主图区域上限高度，避免只显示一角 */
    .product-main-image {
        max-height: min(75vh, 80vw);
    }
}

.btn-primary {
    background: #333;
    color: #fff;
    border-radius: 50px;
    padding: 14px 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    font-weight: bold;
    border: 1px solid rgba(255,255,255,0.2);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #000;
}

.btn-full {
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* 提示框 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 10001;
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 底部文字链接区域 */
.card-bottom-links {
    margin-top: 24px;
    padding: 16px 0 8px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.card-bottom-link {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    margin: 0 4px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.card-bottom-link:hover {
    color: #ffffff;
}

/* 举报弹窗 */
.report-modal {
    max-width: 480px;
    width: 90%;
    padding: 24px 24px 20px;
    text-align: left;
}

.report-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1f2933;
}

.report-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}

.report-modal .form-group {
    margin-bottom: 14px;
}

.report-modal .form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #4b5563;
}

.report-type-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 13px;
    color: #4b5563;
}

.report-type-group label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.report-modal input[type="text"],
.report-modal textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}

.report-modal input[type="text"]:focus,
.report-modal textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.25);
}

.report-modal textarea {
    resize: vertical;
    min-height: 80px;
}

.report-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
    margin-bottom: 10px;
}

.report-modal .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}

.report-modal .btn-cancel {
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 14px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
}

.report-modal .btn-cancel:hover {
    background: #f3f4f6;
    color: #374151;
}

@media (max-width: 480px) {
    .report-modal {
        padding: 20px 16px 16px;
    }
}

/* VIP弹窗样式 */
/* VIP弹窗 - 成熟美观的设计 */
.vip-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: vipPopupFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes vipPopupFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.vip-popup-container {
    width: 100%;
    max-width: 520px;
    animation: vipPopupSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes vipPopupSlideUp {
    from {
        transform: translateY(40px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.vip-popup-content {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25),
                0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.vip-popup-header {
    position: relative;
    padding: 24px 28px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    gap: 16px;
}

.vip-popup-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.vip-popup-icon svg {
    color: #ffffff;
}

.vip-popup-title {
    flex: 1;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.vip-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.vip-popup-close svg {
    color: #ffffff;
    transition: transform 0.2s ease;
}

.vip-popup-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.vip-popup-close:hover svg {
    transform: rotate(90deg);
}

.vip-popup-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(85vh - 180px);
}

.vip-popup-text {
    color: #1f2937;
    font-size: 16px;
    line-height: 1.75;
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
    letter-spacing: 0.01em;
}

.vip-popup-footer {
    padding: 20px 28px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    justify-content: flex-end;
}

.vip-popup-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    letter-spacing: 0.02em;
}

.vip-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.vip-popup-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 移动端优化 */
@media (max-width: 480px) {
    .vip-popup-container {
        max-width: 100%;
    }
    
    .vip-popup-content {
        border-radius: 16px;
        max-height: 90vh;
    }
    
    .vip-popup-header {
        padding: 20px 20px 16px;
    }
    
    .vip-popup-icon {
        width: 40px;
        height: 40px;
    }
    
    .vip-popup-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .vip-popup-title {
        font-size: 18px;
    }
    
    .vip-popup-close {
        top: 16px;
        right: 16px;
        width: 32px;
        height: 32px;
    }
    
    .vip-popup-body {
        padding: 24px 20px;
        max-height: calc(90vh - 160px);
    }
    
    .vip-popup-text {
        font-size: 15px;
        line-height: 1.7;
    }
    
    .vip-popup-footer {
        padding: 16px 20px 20px;
    }
    
    .vip-popup-btn {
        width: 100%;
        padding: 14px 24px;
    }
}

/* 响应式 */
@media (max-width: 480px) {
    .card-container {
        padding: 20px 15px 100px;
    }
    
    .top-actions-bar-inner {
        padding: 0 15px;
    }
    
    .identity h1 {
        font-size: 22px;
    }
    
    .social-btn {
        padding: 14px 16px;
        font-size: 15px;
    }

    .card-footer {
        margin-top: 24px;
    }

    .card-footer .footer-actions {
        gap: 8px;
        justify-content: center;
        width: 100%;
    }

    .footer-btn {
        padding: 11px 16px;
        font-size: 13px;
        gap: 5px;
        min-width: 100px;
    }

    .footer-btn svg {
        width: 15px;
        height: 15px;
    }
}

@media (max-width: 360px) {
    .footer-btn {
        padding: 10px 14px;
        font-size: 12px;
        min-width: 90px;
    }
    
    .footer-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* 搜索弹窗样式 */
.search-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.search-modal.active {
    display: flex;
}

.search-panel {
    width: min(900px, 100%);
    max-height: 90vh;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.search-input {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f7fb;
    border-radius: 999px;
    padding: 10px 14px;
}

.search-input input {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 14px;
    outline: none;
}

.search-close {
    border: none;
    background: none;
    cursor: pointer;
    padding: 6px;
    color: #6b7280;
    transition: color 0.2s;
}

.search-close:hover {
    color: #111827;
}

.search-results {
    padding: 12px 16px;
    overflow: auto;
}

.search-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.search-card {
    border: 1px solid #edf2f7;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    gap: 10px;
    background: #fff;
    transition: all 0.15s ease;
    cursor: pointer;
}

.search-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}

.search-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #f1f5f9;
    flex-shrink: 0;
}

.search-info {
    flex: 1;
    min-width: 0;
}

.search-info h4 {
    margin: 0 0 4px;
    font-size: 15px;
    color: #111827;
    font-weight: 600;
}

.search-info p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-more {
    display: flex;
    justify-content: center;
    padding: 12px 0;
}

.search-more button {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 999px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
    transition: all 0.2s;
}

.search-more button:hover {
    background: #f5f7fb;
    border-color: #cbd5e0;
}

@media (max-width: 768px) {
    .search-panel {
        width: 100%;
    }
    
    .search-list {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}


