/* 自定义样式 */

/* 全局基础样式修复 */
/* 全局基础样式修复 */
html,
body {
    min-width: 320px;
    /* 移除 overflow-x: auto 以修复 sticky 定位失效问题 */
    /* overflow-x: auto; */
}

#app {
    min-width: 320px;
}



/* 浮动价格面板优化 - UI/UX 增强 */
#floating-price-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 0 0 16px 16px;
    animation: slideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition: all 0.3s ease;
}

/* 修复移动端显示问题：总价与明细单行水平，无堆叠 */
@media (max-width: 768px) {
    #floating-price-panel {
        padding: 0.5rem;
    }

    #floating-price-panel .px-4.py-3.md\:px-6.md\:py-3 {
        padding: 0.5rem;
        gap: 0.5rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    /* 左部分：总计 + 明细单行容器 */
    #floating-price-panel .w-full.md\:w-1\/2.text-left {
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    /* 价格卡片：行内布局 */
    #floating-price-panel .bg-white.rounded-lg.p-3.md\:p-4.border.border-slate-200.shadow-sm {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0.5rem;
        min-height: auto;
    }

    /* 总计块：水平左对齐，总价和货期在同一行紧挨左边 */
    #floating-price-panel .bg-gradient-to-r.from-blue-50.to-indigo-50.rounded-lg.p-2\.5.border.border-blue-200 {
        flex: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start !important;
        gap: 0.75rem;
        padding: 0.75rem !important;
        min-width: auto;
        text-align: left !important;
        background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
        border-radius: 0.75rem;
        border: 1px solid #bfdbfe;
        transition: box-shadow 0.2s ease, transform 0.2s ease;
    }

    #floating-price-panel .bg-gradient-to-r.from-blue-50.to-indigo-50.rounded-lg.p-2\.5.border.border-blue-200:hover {
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
        transform: translateY(-1px);
    }

    /* 总价行：左对齐 */
    #floating-price-panel .flex.items-center.gap-2 {
        justify-content: flex-start !important;
        align-items: center;
        gap: 0.5rem;
        font-weight: 700;
        text-align: left !important;
        flex-shrink: 0;
    }

    #floating-price-panel .text-sm.font-bold.text-slate-700 {
        font-size: 1rem;
        /* 固定字号 16px */
        color: #1e293b;
        letter-spacing: -0.025em;
        white-space: nowrap;
    }

    #floating-price-panel .text-lg.md\:text-xl.font-extrabold.text-blue-600 {
        font-size: 1.5rem;
        /* 固定总价字号 24px */
        background: linear-gradient(135deg, #3b82f6, #1d4ed8);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        font-weight: 800;
        text-shadow: 0 1px 2px rgba(59, 130, 246, 0.1);
        white-space: nowrap;
    }

    /* 货期行：紧跟总价，左对齐 */
    #floating-price-panel .flex.items-center.text-xs.text-slate-500.gap-1 {
        justify-content: flex-start !important;
        align-items: center;
        gap: 0.25rem;
        font-size: 0.875rem;
        /* 固定字号 14px */
        color: #64748b;
        letter-spacing: 0.025em;
        text-transform: uppercase;
        text-align: left !important;
        flex-shrink: 0;
        white-space: nowrap;
    }

    #floating-price-panel [data-lucide="calendar"] {
        width: 1rem;
        height: 1rem;
        color: #94a3b8;
        flex-shrink: 0;
        margin-right: 0.25rem !important;
    }

    #floating-price-panel #lead-time-desktop {
        white-space: nowrap;
        font-weight: 500;
        margin-left: 0 !important;
    }

    /* 明细块：单行，隐藏图标，缩写 */
    #floating-price-panel .flex-1.md\:w-1\/2.text-xs.md\:text-sm.text-slate-600.flex.flex-col.gap-1.h-full {
        flex: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-around;
        gap: 0.25rem;
        flex-wrap: nowrap;
        padding-left: 0.5rem;
        border-left: 1px solid #e5e7eb;
    }

    /* 统一缩小单价和毛重字号大小与颜色 */
    #floating-price-panel .text-xs.text-slate-600,
    #floating-price-panel .text-sm.text-slate-900.whitespace-nowrap.flex-shrink-0 {
        font-size: 0.875rem !important;
        /* 固定字号 14px */
        color: rgba(100, 116, 139, 1) !important;
        /* 稍微加深颜色提高对比度 */
    }

    /* 响应式字体大小：随着宽度变窄而变小，使用clamp基于视口宽度 */
    #unit-price-mobile,
    #weight-mobile,
    #unit-price,
    #weight {
        font-size: 1rem !important;
        /* 固定字号 16px */
    }

    #floating-price-panel .flex.items-center.justify-between.gap-2.md\:hidden {
        flex: 1;
        justify-content: space-around;
        gap: 0.25rem;
        flex-wrap: nowrap;
    }

    #floating-price-panel .hidden.md\:flex.flex-col.gap-1.flex-1 {
        display: none;
        /* 移动端隐藏桌面明细，使用移动版 */
    }

    /* 隐藏所有明细图标 */
    #floating-price-panel [data-lucide="tag"],
    #floating-price-panel [data-lucide="package"],
    #floating-price-panel [data-lucide="truck"] {
        display: none;
    }

    /* 明细标签缩写 */
    #floating-price-panel .span.truncate {
        font-size: 0.75rem;
        /* 固定字号 12px */
        max-width: 30px;
    }

    #floating-price-panel .flex.items-center.min-w-0.flex-1 {
        min-width: 0;
        flex: 1;
        font-size: 0.75rem;
        /* 固定字号 12px */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #floating-price-panel .text-sm.text-slate-900.whitespace-nowrap.flex-shrink-0 {
        font-size: 0.875rem;
        /* 固定字号 14px */
        flex-shrink: 0;
        white-space: nowrap;
        min-width: 50px;
        text-align: right;
    }

    #floating-price-panel .ml-2 {
        margin-left: 0.25rem;
    }
}

/* ========================================
   通用移动端响应式样式系统
   ======================================== */

/* 全局移动端基础样式 */
@media (max-width: 768px) {

    /* 容器和间距统一 */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* 标题字体响应式 - 保持较大尺寸，避免过小 */
    h1 {
        font-size: 2.25rem !important;
        /* 36px */
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 1.875rem !important;
        /* 30px */
        line-height: 1.3 !important;
    }

    h3 {
        font-size: 1.5rem !important;
        /* 24px */
        line-height: 1.4 !important;
    }

    /* 正文字体 - 保持桌面端大小 */
    p,
    .text-base {
        font-size: 1rem !important;
        /* 16px */
        line-height: 1.6 !important;
    }

    .text-lg {
        font-size: 1.125rem !important;
        /* 18px */
    }

    .text-xl {
        font-size: 1.25rem !important;
        /* 20px */
    }

    .text-2xl {
        font-size: 1.5rem !important;
        /* 24px */
    }

    /* 小字体 - 保持桌面端大小，不缩小 */
    .text-sm {
        font-size: 0.875rem !important;
        /* 14px */
    }

    .text-xs {
        font-size: 0.75rem !important;
        /* 12px */
    }

    /* 按钮和交互元素统一 */
    button,
    .btn,
    .btn-primary,
    a[class*="btn"] {
        min-height: 44px !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
        /* 14px */
        border-radius: 0.5rem !important;
        touch-action: manipulation;
    }

    /* 输入框 */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    textarea,
    select {
        min-height: 44px !important;
        padding: 0.75rem !important;
        font-size: 1rem !important;
        /* 16px */
        border-radius: 0.5rem !important;
        -webkit-appearance: none;
        appearance: none;
    }

    /* 卡片和容器 */
    .card,
    .bg-white {
        border-radius: 0.75rem !important;
        margin-bottom: 1rem !important;
    }

    /* 网格布局响应式 */
    .grid {
        gap: 1rem !important;
    }

    .grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    .grid-cols-3 {
        grid-template-columns: 1fr !important;
    }

    .grid-cols-4 {
        grid-template-columns: 1fr !important;
    }

    /* 间距统一 */
    .space-y-4>*+* {
        margin-top: 1rem !important;
    }

    .space-y-6>*+* {
        margin-top: 1.5rem !important;
    }

    .space-y-8>*+* {
        margin-top: 2rem !important;
    }

    /* 内边距 */
    .p-4,
    .px-4,
    .py-4 {
        padding: 1rem !important;
    }

    .p-6,
    .px-6,
    .py-6 {
        padding: 1.5rem !important;
    }

    .p-8,
    .px-8,
    .py-8 {
        padding: 1rem !important;
    }

    /* 导航通用样式 */
    header nav {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* 隐藏桌面端元素 - 保持 Tailwind 原生行为，移除强制 override */
    /* .hidden.md\:block,
    .hidden.md\:flex,
    .hidden.lg\:block,
    .hidden.lg\:flex {
        display: none !important;
    } */

    /* 显示移动端元素 - 保持 Tailwind 原生行为，移除强制 override */
    /* .md\:hidden {
        display: block !important;
    }

    .md\:hidden.flex {
        display: flex !important;
    } */
}

/* 移动端导航统一样式 */
@media (max-width: 1024px) {

    /* 汉堡菜单按钮样式 */
    .hamburger-icon {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 24px;
        height: 24px;
        cursor: pointer;
    }

    .hamburger-line {
        width: 20px;
        height: 2px;
        background-color: #64748b;
        border-radius: 1px;
        transition: all 0.3s ease;
        transform-origin: center;
    }

    .hamburger-line:not(:last-child) {
        margin-bottom: 4px;
    }

    .hamburger-icon.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .hamburger-icon.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .hamburger-icon.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* 移动端菜单覆盖层 */
    #mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5) !important;
        backdrop-filter: blur(4px);
        z-index: 50;
    }

    #mobile-menu {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(320px, 80vw);
        background-color: #ffffff !important;
        box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
    }

    #mobile-menu.menu-open {
        transform: translateX(0);
    }

    /* 移动端菜单项 */
    #mobile-menu nav a {
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        font-weight: 500;
        color: #334155;
        border-radius: 0.5rem;
        transition: all 0.2s ease;
        margin-bottom: 0.25rem;
    }

    #mobile-menu nav a:hover {
        background-color: #f1f5f9;
        color: #2563eb;
    }

    #mobile-menu nav a.active {
        background-color: #eff6ff;
        color: #2563eb;
        font-weight: 600;
    }

    #mobile-menu nav a i {
        width: 1.25rem;
        height: 1.25rem;
        margin-right: 0.75rem;
        flex-shrink: 0;
    }
}

/* 平板端优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }

    /* 网格布局适配 */
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    /* 字体适中调整 */
    h1 {
        font-size: clamp(2.5rem, 5vw, 3.75rem) !important;
    }

    h2 {
        font-size: clamp(2rem, 4vw, 2.25rem) !important;
    }
}

/* 超小屏幕优化 (320px - 480px) */
@media (max-width: 480px) {
    .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    /* 更紧凑的间距 */
    .space-y-8>*+* {
        margin-top: 1.5rem !important;
    }

    .space-y-6>*+* {
        margin-top: 1rem !important;
    }

    /* 卡片内边距 */
    .p-6 {
        padding: 1rem !important;
    }

    .p-8 {
        padding: 1rem !important;
    }

    /* 按钮稍小 */
    button,
    .btn {
        padding: 0.625rem 0.75rem !important;
        font-size: 0.875rem !important;
    }

    /* 标题更紧凑 */
    h1 {
        font-size: clamp(1.5rem, 8vw, 2.5rem) !important;
        margin-bottom: 0.5rem !important;
    }
}

#floating-price-panel .ml-1 {
    margin-left: 0.125rem;
}

/* 行动区：紧凑 */
#floating-price-panel .w-full.md\:w-1\/2.flex.flex-col.md\:flex-row.gap-3.md\:gap-0.items-end.md\:items-center.justify-end.mt-2.md\:mt-0 {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0;
    padding-left: 0.5rem;
    border-left: 1px solid #e5e7eb;
}

#floating-price-panel .flex.flex-col.items-start.w-full.md\:w-auto {
    flex-direction: row;
    align-items: center;
    width: auto;
}

#floating-price-panel .hidden.sm\:block.text-xs.md\:text-sm.font-bold.text-slate-700.mb-1 {
    display: none;
}

#floating-price-panel .relative.flex.items-center.w-full.md\:w-auto {
    width: auto;
}

#floating-price-panel input[type="number"] {
    width: 45px;
    height: 32px;
    font-size: 0.875rem;
}

#floating-price-panel .px-3.py-2.bg-slate-100 {
    padding: 0.25rem 0.5rem;
    height: 32px;
}

#floating-price-panel .flex-shrink-0.flex.items-center.justify-center.btn-primary {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    height: 32px;
    white-space: nowrap;
    min-width: 85px;
}

#floating-price-panel .w-4.h-4.mr-2 {
    width: 1rem;
    height: 1rem;
    margin-right: 0.25rem;
}

/* 桌面端总计块：水平左对齐，增加间距优化 */
@media (min-width: 769px) {
    #floating-price-panel .w-full.md\:w-1\/2.text-left {
        flex-direction: column;
    }

    #floating-price-panel .bg-white.rounded-lg.p-3.md\:p-4.border.border-slate-200.shadow-sm {
        flex-direction: row;
    }

    #floating-price-panel .flex-1.md\:w-1\/2.text-xs.md\:text-sm.text-slate-600.flex.flex-col.gap-1.h-full {
        flex-direction: column;
    }

    #floating-price-panel .w-full.md\:w-1\/2.flex.flex-col.md\:flex-row.gap-3.md\:gap-0.items-end.md\:items-center.justify-end.mt-2.md\:mt-0 {
        flex-direction: row;
    }

    #floating-price-panel .bg-gradient-to-r.from-blue-50.to-indigo-50.rounded-lg.p-2\.5.border.border-blue-200 {
        gap: 1.5rem;
        padding: 1rem;
    }

    #floating-price-panel .flex.items-center.gap-2 {
        justify-content: flex-start;
        gap: 0.5rem;
    }

    #floating-price-panel .flex.items-center.text-xs.text-slate-500.gap-1 {
        justify-content: flex-start;
    }

    #floating-price-panel .text-lg.md\:text-xl.font-extrabold.text-blue-600 {
        font-size: 1.25rem;
    }
}


#floating-price-panel:hover {
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.1);
}

#floating-price-panel .space-y-1>div {
    padding: 0.5rem 0;
    font-weight: 500;
    transition: color 0.2s ease;
}

#floating-price-panel .text-slate-600:hover {
    color: #475569;
}

#floating-price-panel .text-slate-600 {
    font-size: 0.8rem;
    line-height: 1.3;
    letter-spacing: 0.025em;
}

/* 桌面端单价和毛重统一调整 */
@media (min-width: 769px) {

    #floating-price-panel .text-xs.md\:text-sm.text-slate-600,
    #floating-price-panel .text-sm.text-slate-900 {
        font-size: 0.65rem !important;
        color: rgba(143, 143, 143, 1) !important;
    }

    /* 桌面端响应式调整：clamp确保在超宽屏不放大 */
    #unit-price,
    #weight {
        font-size: clamp(0.75rem, 1.2vw, 1rem) !important;
    }
}

#floating-price-panel .font-semibold {
    font-weight: 600;
}

#floating-price-panel .text-blue-600 {
    color: #3b82f6 !important;
    text-shadow: 0 1px 2px rgba(59, 130, 246, 0.1);
}

/* ========== 产品中心筛选与列表美化 ========== */
/* 左侧筛选树视觉：层级竖线与 hover/active 效果 */
.filter-tree {
    position: relative;
}

.filter-tree .filter-link {
    position: relative;
    border-radius: 8px;
}

.filter-tree .filter-link:hover {
    background: rgba(15, 23, 42, 0.04);
}

.filter-tree details {
    /* 父级组之间间距更紧凑 */
    margin-bottom: 6px;
}

/* 节点圆点 + 分叉线（所有 filter-link 通用） */
.filter-tree .filter-link {
    padding-left: 1.75rem;
    /* 为圆点与连线预留空间 */
}

.filter-tree .filter-link::before {
    /* 圆点 */
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    background: #fff;
    border: 2px solid #cbd5e1;
    /* slate-300 */
    border-radius: 9999px;
}

.filter-tree .filter-link::after {
    /* 分叉横线 */
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 10px;
    height: 2px;
    margin-top: -1px;
    background: #cbd5e1;
    /* slate-300 */
}

/* 顶级 summary 不显示分叉线与圆点（避免贴边） */
.filter-tree>details>summary.filter-link::before,
.filter-tree>details>summary.filter-link::after {
    display: none;
}

/* 激活态：圆点填充蓝色，横线变蓝 */
.filter-tree .active-filter::before {
    border-color: #3b82f6;
    background: #3b82f6;
}

.filter-tree .active-filter::after {
    background: #93c5fd;
}

/* 深度渐变：不同深度的圆点尺寸与颜色变化 */
.filter-tree .filter-link[data-depth="1"]::before {
    width: 9px;
    height: 9px;
    margin-top: -4.5px;
    border-color: #cbd5e1;
    background: #ffffff;
}

.filter-tree .filter-link[data-depth="1"]::after {
    background: #cbd5e1;
}

.filter-tree .filter-link[data-depth="2"]::before {
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-color: #93c5fd;
    background: #eff6ff;
    /* sky-300 + blue-50 */
}

.filter-tree .filter-link[data-depth="2"]::after {
    background: #93c5fd;
}

.filter-tree .filter-link[data-depth="3"]::before,
.filter-tree .filter-link[data-depth="4"]::before,
.filter-tree .filter-link[data-depth="5"]::before {
    width: 7px;
    height: 7px;
    margin-top: -3.5px;
    border-color: #60a5fa;
    background: #e0f2fe;
    /* blue-400 + sky-100 */
}

.filter-tree .filter-link[data-depth="3"]::after,
.filter-tree .filter-link[data-depth="4"]::after,
.filter-tree .filter-link[data-depth="5"]::after {
    background: #60a5fa;
}

.filter-tree .active-filter {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.02));
    border: 1px solid rgba(59, 130, 246, 0.35);
}

/* 右侧面包屑：粘性、毛玻璃、轻阴影 */
.sticky-breadcrumb {
    position: sticky;
    top: 5rem;
    /* 与顶部导航间距 */
    z-index: 30;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
}

.sticky-breadcrumb .clear-btn {
    margin-left: auto;
    font-size: 12px;
    color: #64748b;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 9999px;
    padding: 2px 8px;
    transition: all 0.2s ease;
}

.sticky-breadcrumb .clear-btn:hover {
    color: #0f172a;
    border-color: #cbd5e1;
}

/* 右侧产品卡 hover 动效进一步增强 */
.product-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.product-card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    border-color: rgba(59, 130, 246, 0.4) !important;
}

/* ========== 文本字号优化（响应式 clamp） ========== */
/* 侧栏筛选：随层级略微缩小，增强信息层次 */
.filter-tree .filter-link {
    font-size: clamp(13px, 0.95vw, 14px);
}

.filter-tree .filter-link[data-depth="1"] {
    font-size: clamp(14px, 1.05vw, 15px);
}

.filter-tree .filter-link[data-depth="2"] {
    font-size: clamp(13px, 0.95vw, 14px);
}

.filter-tree .filter-link[data-depth="3"],
.filter-tree .filter-link[data-depth="4"],
.filter-tree .filter-link[data-depth="5"] {
    font-size: clamp(12px, 0.85vw, 13px);
}

/* 面包屑：紧凑可读 */
.sticky-breadcrumb .inline-flex {
    font-size: clamp(12px, 0.9vw, 13px);
}

.sticky-breadcrumb .clear-btn {
    font-size: clamp(11px, 0.8vw, 12px);
}

/* 右侧标题：在保持层级的同时整体更紧凑 */
.product-category-section>h2 {
    font-size: clamp(20px, 1.5vw, 24px) !important;
}

.product-category-section h3 {
    font-size: clamp(16px, 1.1vw, 18px) !important;
}

/* 商品卡标题与ID字号微调，保证密度与可读性 */
.product-card h3 {
    font-size: clamp(14px, 1.0vw, 16px);
}

.product-card .text-xs {
    font-size: clamp(11px, 0.85vw, 12px);
}

#floating-price-panel input[type="number"] {
    transition: all 0.2s ease;
}

#floating-price-panel input[type="number"]:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#floating-price-panel button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#floating-price-panel button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

#floating-price-panel button:hover::before {
    left: 100%;
}

#floating-price-panel [data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 4px;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 确保主内容不被浮动面板覆盖 */
main {
    padding-bottom: 100px;
    /* 根据面板高度调整 */
}

@media (min-width: 768px) {
    main {
        padding-bottom: 120px;
    }

    #floating-price-panel .text-slate-600 {
        font-size: 0.875rem;
    }
}

body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #F8FAFC;
    color: #1E293B;
}

/* 订单状态时间轴的连接线样式 */
.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 1rem;
    top: 2.5rem;
    width: 2px;
    height: calc(100% - 1.5rem);
    background-color: #E2E8F0;
    /* slate-200 */
    z-index: -1;
}

.timeline-item.active:not(:last-child)::after {
    background-color: #3b82f6;
    /* blue-500 */
}

/* 产品卡片图片搀停效果 */
.product-card .image-container {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 0.75rem 0.75rem 0 0;
}

.product-card .img-3d,
.product-card .img-2d {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    backface-visibility: hidden;
}

.product-card .img-2d {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.product-card:hover .img-3d {
    opacity: 0;
    transform: scale(1.05);
}

.product-card:hover .img-2d {
    opacity: 1;
    transform: scale(1.05);
}

/* 产品卡片网格优化 - 使用 !important 确保优先级 */
.product-grid {
    display: grid !important;
    gap: 1.5rem !important;
    /* 响应式网格布局 */
    grid-template-columns: repeat(3, 1fr) !important;
    width: 100% !important;
}

/* 移动端优化 */
@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* 平板优化 */
@media (min-width: 641px) and (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem !important;
    }
}

/* 桌面端优化 */
@media (min-width: 1025px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.5rem !important;
    }
}

/* 超大屏幕 */
@media (min-width: 1536px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 2rem !important;
    }
}

/* 产品卡片样式优化 */
.product-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(59, 130, 246, 0.3), 0 4px 12px -4px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.product-card .image-container {
    aspect-ratio: 4 / 3;
    width: 100%;
    background: #f1f5f9;
}

.product-card .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card .p-5 {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 产品类目标题 */
.product-category-section h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 2rem;
    font-weight: 700;
    color: #0f172a;
}

.product-category-section h3 {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: #334155;
}

/* 产品展示区域 */
.product-domain-section {
    min-height: 400px;
}

/* 筛选菜单样式 */
.filter-link {
    transition: all 0.2s ease;
}

.filter-link:hover {
    background-color: #f8fafc;
    color: #3b82f6;
}

.filter-link.active-filter {
    background-color: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.filter-group summary {
    list-style: none;
}

.filter-group summary::-webkit-details-marker {
    display: none;
}

.filter-group[open] summary i {
    transform: rotate(180deg);
}

/* 空状态样式 */
.empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.empty-state i {
    opacity: 0.3;
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.3s ease-out;
}

/* 移动端筛选侧边栏 */
@media (max-width: 1023px) {
    #filter-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        background: white;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    #filter-sidebar.show {
        transform: translateX(0);
    }
}

/* 隐藏数字输入框的默认箭头 */
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type='number'] {
    -moz-appearance: textfield;
}

/* 优化输入框和选择框样式 */
.process-input {
    background-color: white !important;
    border: 2px solid #94a3b8 !important;
    /* slate-400 */
    border-radius: 0.5rem !important;
    /* rounded-lg */
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
    /* shadow-sm */
    font-weight: 500 !important;
    color: #0f172a !important;
    /* text-slate-900 */
    transition: all 0.2s ease-in-out !important;
}

.process-input:hover {
    border-color: #64748b !important;
    /* slate-500 */
}

.process-input:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    /* blue-500 */
    box-shadow: 0 0 0 2px rgb(59 130 246 / 0.5) !important;
    /* focus:ring-2 focus:ring-blue-500 */
}

/* 优化所有带有border-slate-300的输入框 */
input.border-slate-300,
select.border-slate-300,
textarea.border-slate-300 {
    background-color: white !important;
    border: 2px solid #94a3b8 !important;
    /* slate-400 */
    border-radius: 0.5rem !important;
    /* rounded-lg */
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
    /* shadow-sm */
    font-weight: 500 !important;
    color: #0f172a !important;
    /* text-slate-900 */
    transition: all 0.2s ease-in-out !important;
}

input.border-slate-300:hover,
select.border-slate-300:hover,
textarea.border-slate-300:hover {
    border-color: #64748b !important;
    /* slate-500 */
}

input.border-slate-300:focus,
select.border-slate-300:focus,
textarea.border-slate-300:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    /* blue-500 */
    box-shadow: 0 0 0 2px rgb(59 130 246 / 0.5) !important;
    /* focus:ring-2 focus:ring-blue-500 */
}

/* 导航激活状态 */
.sidebar-link.active {
    background-color: #EFF6FF;
    /* bg-blue-50 */
    color: #2563EB;
    /* text-blue-600 */
    font-weight: 600;
}

/* Tab 激活状态 */
.tab-button.active {
    border-color: #2563EB;
    color: #2563EB;
    font-weight: 600;
}

.order-tab-button.active {
    border-color: #2563EB;
    color: #2563EB;
    font-weight: 600;
}

.auth-tab-button.active {
    border-color: #2563EB;
    color: #1E293B;
}

/* 优化: 主按钮渐变效果 */
.btn-primary {
    background-image: linear-gradient(to bottom, #3B82F6, #2563EB);
}

.btn-primary:hover {
    background-image: linear-gradient(to bottom, #2563EB, #1D4ED8);
}

/* FAQ 折叠面板 */
.faq-item details>summary {
    list-style: none;
}

.faq-item details>summary::-webkit-details-marker {
    display: none;
}

.faq-item details>summary .icon {
    transition: transform 0.2s;
}

.faq-item details[open]>summary .icon {
    transform: rotate(45deg);
}

/* 新增: 购物车图标晃动动画 */
@keyframes cart-shake {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

.cart-shake-animation {
    animation: cart-shake 0.4s ease-in-out;
}

/* Tooltip for customization options */
.tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tooltip-text {
    visibility: hidden;
    width: 220px;
    background-color: #1E293B;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 10;
    bottom: 125%;
    left: 50%;
    margin-left: -110px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    line-height: 1.5;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Order experience enhancements */
.order-summary-card {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 0.9rem;
    padding: 1.25rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.order-summary-card:hover {
    box-shadow: 0 12px 32px -18px rgba(15, 23, 42, 0.25);
    transform: translateY(-2px);
}

.order-summary-card.subtle {
    background: #FFFFFF;
}

.order-card {
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.order-card:hover {
    box-shadow: 0 18px 40px -20px rgba(15, 23, 42, 0.35);
    transform: translateY(-3px);
}

.order-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: #E2E8F0;
    color: #475569;
}

.order-status-pill.status-placed {
    background: #FEF3C7;
    color: #B45309;
}

.order-status-pill.status-processing {
    background: #FDE68A;
    color: #B45309;
}

.order-status-pill.status-confirming {
    background: #FBCFE8;
    color: #BE185D;
}

.order-status-pill.status-production {
    background: #DBEAFE;
    color: #1D4ED8;
}

.order-status-pill.status-shipped {
    background: #C7D2FE;
    color: #4338CA;
}

.order-status-pill.status-completed {
    background: #DCFCE7;
    color: #166534;
}

.order-status-pill.status-refund-pending {
    background: #FCE7F3;
    color: #9D174D;
}

.order-status-pill.status-cancelled {
    background: #FEE2E2;
    color: #B91C1C;
}

.order-status-pill.status-default {
    background: #E2E8F0;
    color: #475569;
}

.order-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: #E2E8F0;
    font-size: 0.75rem;
    font-weight: 500;
    color: #475569;
    letter-spacing: 0.01em;
}

.order-chip.quantity {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #FFFFFF;
    font-weight: 600;
}

.order-chip.muted {
    background: #F1F5F9;
    color: #94A3B8;
}

.order-progress-bar {
    width: 100%;
    height: 0.4rem;
    border-radius: 9999px;
    background: #E2E8F0;
    overflow: hidden;
}

.order-progress-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #1D4ED8, #3B82F6);
    width: 0;
    transition: width 0.4s ease;
}

.order-product-card {
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    background: #F8FAFC;
}

.order-utility-btn {
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    border: 1px solid #E2E8F0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    background: #FFFFFF;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.order-utility-btn:hover {
    background: #F8FAFC;
    border-color: #CBD5F5;
}

.order-utility-btn.info {
    color: #1D4ED8;
    border-color: #BFDBFE;
    background: #EFF6FF;
}

.order-utility-btn.warning {
    color: #B45309;
    border-color: #FCD34D;
    background: #FEF3C7;
}

.order-utility-btn.danger {
    color: #B91C1C;
    border-color: #FECACA;
    background: #FEE2E2;
}

/* Distribution dashboard */
.distribution-dashboard {
    padding: 0.5rem;
}

.dist-metric-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dist-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -22px rgba(15, 23, 42, 0.35);
}

.dist-metric-card.accent {
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    border-color: #BFDBFE;
}

.dist-metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dist-metric-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748B;
}

.dist-metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.1;
}

.dist-metric-note {
    font-size: 0.75rem;
    color: #94A3B8;
}

.dist-panel {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dist-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.dist-panel-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0F172A;
}

.dist-panel-subtitle {
    font-size: 0.78rem;
    color: #94A3B8;
    margin-top: 0.25rem;
}

.dist-panel-highlight {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563EB;
    background: #EFF6FF;
    padding: 0.4rem 0.75rem;
    border-radius: 9999px;
}

.dist-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    height: 200px;
    padding: 0.75rem 0.25rem;
}

.dist-chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 32px;
}

.dist-chart-bar-fill {
    width: 100%;
    border-radius: 0.5rem 0.5rem 0 0;
    background: linear-gradient(180deg, #2563EB, #60A5FA);
    transition: height 0.3s ease;
}

.dist-chart-bar-label {
    font-size: 0.75rem;
    color: #94A3B8;
}

.dist-stats-list {
    display: grid;
    gap: 0.75rem;
}

.dist-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dist-stat dt {
    font-size: 0.85rem;
    color: #64748B;
}

.dist-stat dd {
    font-size: 1rem;
    font-weight: 600;
    color: #0F172A;
}

.dist-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.dist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.dist-table thead {
    background: #F8FAFC;
    color: #475569;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

.dist-table th,
.dist-table td {
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid #E2E8F0;
    text-align: left;
    white-space: nowrap;
}

.dist-table tbody tr:hover {
    background: #F8FAFC;
}

.dist-table-empty {
    text-align: center;
    padding: 1.5rem;
    color: #94A3B8;
}

.dist-utility-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 9999px;
    border: 1px solid #CBD5F5;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1D4ED8;
    background: #EEF2FF;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dist-utility-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -18px rgba(30, 64, 175, 0.6);
}

.dist-utility-btn.primary {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #FFFFFF;
    border-color: transparent;
}

.dist-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #CBD5F5;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    color: #1E293B;
}

.dist-input:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
}

.dist-balance-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 0.9rem;
    padding: 1rem 1.25rem;
}

.dist-add-account {
    background: #F8FAFC;
    border: 1px dashed #CBD5F5;
    border-radius: 0.9rem;
    padding: 1rem;
}

.dist-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.7rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.dist-status.success {
    background: #DCFCE7;
    color: #047857;
}

.dist-status.pending {
    background: #FEF3C7;
    color: #B45309;
}

.dist-status.info {
    background: #E0EAFF;
    color: #1D4ED8;
}

/* Address management */
.address-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.address-header p {
    max-width: 36rem;
}

.address-stats .address-stat-card {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.address-stat-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94A3B8;
}

.address-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0F172A;
    margin-top: 0.4rem;
}

.address-stat-note {
    font-size: 0.75rem;
    color: #94A3B8;
    margin-top: 0.25rem;
}

.address-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.address-section-hint {
    font-size: 0.75rem;
    color: #94A3B8;
}

.address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.address-card {
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    padding: 1.25rem;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.address-card.is-default {
    border-color: #2563EB;
    box-shadow: 0 10px 24px -20px rgba(37, 99, 235, 0.6);
}

.address-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.address-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: #0F172A;
}

.address-card-phone {
    font-size: 0.85rem;
    color: #64748B;
    margin-top: 0.35rem;
}

.address-card-line {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.6;
}

.address-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.address-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #475569;
    background: #E2E8F0;
}

.address-chip.default {
    background: #DBEAFE;
    color: #1D4ED8;
}

.address-chip.region {
    background: #F1F5F9;
}

.address-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.address-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    border: 1px solid #CBD5F5;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1D4ED8;
    background: #EEF2FF;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.address-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px -18px rgba(30, 64, 175, 0.6);
}

.address-action-btn.primary {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #FFFFFF;
    border-color: transparent;
}

.address-action-btn.danger {
    background: #FEE2E2;
    border-color: #FECACA;
    color: #B91C1C;
}

.address-empty {
    border: 1px dashed #CBD5F5;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    color: #64748B;
    background: #F8FAFC;
    display: grid;
    gap: 0.75rem;
    justify-items: center;
}

.address-empty.muted {
    background: #F1F5F9;
    color: #94A3B8;
    border-style: dashed;
}

.address-guidelines {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
}

/* After-sales management */
.after-sales-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.after-sales-header p {
    max-width: 36rem;
}

.after-sales-stats .after-sales-stat-card {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    padding: 1.4rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.after-sales-stat-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94A3B8;
}

.after-sales-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0F172A;
    margin-top: 0.4rem;
}

.after-sales-stat-note {
    font-size: 0.75rem;
    color: #94A3B8;
    margin-top: 0.2rem;
}

.after-sales-filter-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.after-sales-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 9999px;
    border: 1px solid #E2E8F0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    background: #FFFFFF;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.after-sales-filter-btn.active {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #FFFFFF;
    border-color: transparent;
    box-shadow: 0 10px 24px -18px rgba(37, 99, 235, 0.6);
}

.after-sales-filter-count {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0 0.35rem;
    border-radius: 9999px;
    background: rgba(148, 163, 184, 0.15);
    color: inherit;
}

.after-sales-filter-btn.active .after-sales-filter-count {
    background: rgba(255, 255, 255, 0.2);
}

.after-sales-filter-note {
    font-size: 0.75rem;
    color: #94A3B8;
}

.after-sales-list {
    display: grid;
    gap: 1.25rem;
}

.after-sales-card {
    border: 1px solid #E2E8F0;
    border-radius: 1.1rem;
    padding: 1.5rem;
    background: #FFFFFF;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.after-sales-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.after-sales-card-id {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563EB;
    letter-spacing: 0.02em;
}

.after-sales-card-type {
    font-size: 1rem;
    font-weight: 600;
    color: #0F172A;
    margin-top: 0.25rem;
}

.after-sales-status {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.after-sales-status.pending {
    background: #FEF3C7;
    color: #B45309;
}

.after-sales-status.processing {
    background: #DBEAFE;
    color: #1D4ED8;
}

.after-sales-status.success {
    background: #DCFCE7;
    color: #047857;
}

.after-sales-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #64748B;
}

.after-sales-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #F8FAFC;
    border-radius: 0.75rem;
    padding: 0.3rem 0.6rem;
}

.after-sales-card-meta i {
    color: #94A3B8;
}

.after-sales-card-notes {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.6;
    background: #F8FAFC;
    border-radius: 0.75rem;
    padding: 0.75rem 0.9rem;
}

.after-sales-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.after-sales-stage {
    font-size: 0.78rem;
    color: #94A3B8;
}

.after-sales-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.after-sales-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1rem;
    border-radius: 9999px;
    border: 1px solid #CBD5F5;
    font-size: 0.78rem;
    font-weight: 600;
    color: #1D4ED8;
    background: #EEF2FF;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.after-sales-action-btn.secondary {
    background: #FFFFFF;
    color: #475569;
}

.after-sales-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -18px rgba(30, 64, 175, 0.6);
}

.after-sales-empty {
    border: 1px dashed #CBD5F5;
    border-radius: 1rem;
    padding: 1.75rem;
    text-align: center;
    color: #94A3B8;
    background: #F8FAFC;
}

.after-sales-guidelines {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
}

/* Distribution apply & review */
.distribution-apply {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.distribution-apply-header p {
    max-width: 38rem;
}

.distribution-apply-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.distribution-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    background: #EEF2FF;
    color: #1D4ED8;
    font-size: 0.7rem;
    font-weight: 600;
}

.distribution-apply-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 0.5rem;
}

.distribution-apply-tab {
    padding: 0.45rem 1.1rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s ease;
}

.distribution-apply-tab:hover {
    border-color: #CBD5F5;
    background: #F1F5F9;
}

.distribution-apply-tab.active {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #FFFFFF;
    border-color: transparent;
    box-shadow: 0 12px 24px -20px rgba(37, 99, 235, 0.6);
}

.distribution-apply-highlights {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #475569;
    list-style: none;
    padding: 0;
}

.distribution-apply-highlights li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
}

.distribution-apply-highlights i {
    color: #2563EB;
}

.distribution-form-grid {
    display: grid;
    gap: 1.25rem;
}

.distribution-form {
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    padding: 1.5rem;
    background: #FFFFFF;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 1.1rem;
}

.distribution-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.distribution-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}

.distribution-field input,
.distribution-field textarea {
    border: 1px solid #CBD5F5;
    border-radius: 0.75rem;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    color: #0F172A;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.distribution-field input:focus,
.distribution-field textarea:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
}

.distribution-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.distribution-review {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    padding: 1.75rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 1.5rem;
}

.distribution-review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.distribution-review-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.distribution-review-icon i {
    width: 1.2rem;
    height: 1.2rem;
}

.distribution-review-icon.pending {
    background: #FEF3C7;
    color: #B45309;
}

.distribution-review-icon.rejected {
    background: #FEE2E2;
    color: #B91C1C;
}

.distribution-review-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.distribution-review-card {
    border: 1px solid #E2E8F0;
    border-radius: 0.9rem;
    padding: 1.25rem;
    background: #F8FAFC;
    display: grid;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #475569;
}

.distribution-review-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1E293B;
}

.distribution-review-card.secondary {
    background: #FFFFFF;
    border-style: dashed;
}

.distribution-review-card.secondary ul {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.75rem;
    list-style: none;
    padding: 0;
}

.distribution-review-card.secondary li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #475569;
}

.distribution-review-card.secondary i {
    color: #2563EB;
}

.distribution-review-card.rejection {
    background: #FEF3C7;
    border-color: #FCD34D;
    color: #B45309;
}

.distribution-summary {
    display: grid;
    gap: 0.6rem;
}

.distribution-summary div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.distribution-summary dt {
    font-size: 0.78rem;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.distribution-summary dd {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.distribution-review-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}

.distribution-review-timeline li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: #475569;
}

.distribution-review-timeline .step-index {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    background: #E2E8F0;
    color: #475569;
    flex-shrink: 0;
}

.distribution-review-timeline li.active .step-index {
    background: #1D4ED8;
    color: #FFFFFF;
}

.distribution-review-timeline li.done .step-index {
    background: #10B981;
    color: #FFFFFF;
}

.distribution-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ========== 移动端导航菜单样式 ========== */
/* 汉堡包图标样式 */
.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 18px;
    cursor: pointer;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: currentColor;
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
}

/* 汉堡包图标激活状态（变成X） */
.hamburger-icon.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-icon.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-icon.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* 移动端菜单覆盖层 */
#mobile-menu-overlay {
    background-color: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#mobile-menu-overlay.show {
    display: block !important;
    animation: fadeIn 0.3s ease-out;
}

/* 移动端菜单面板 */
#mobile-menu {
    background: #ffffff !important;
    background-color: #ffffff !important;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15) !important;
    opacity: 1 !important;
    z-index: 10000 !important;
}

/* 确保移动端菜单在Tailwind CSS之上 */
#mobile-menu.bg-white {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

/* 移动端菜单滑入动画 */
#mobile-menu.show {
    transform: translateX(0);
}

/* 移动端菜单内容区域 */
#mobile-menu .p-6,
#mobile-menu div.p-6 {
    background: #ffffff !important;
    background-color: #ffffff !important;
    height: 100vh;
    overflow-y: auto;
    opacity: 1 !important;
}

/* 移动端菜单整体背景强制覆盖 */
div#mobile-menu {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

/* 移动端菜单容器背景 */
.fixed.top-0.right-0.h-full.w-80.bg-white {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

/* 移动端菜单项样式 */
#mobile-menu nav a {
    background-color: transparent !important;
    transition: all 0.3s ease;
    border-radius: 8px;
}

/* 移动端菜单项hover效果 */
#mobile-menu nav a:hover {
    transform: translateX(4px);
    background-color: #f8fafc !important;
}

/* 移动端菜单项激活状态 */
#mobile-menu nav a.bg-blue-50 {
    background-color: #eff6ff !important;
}

/* 移动端菜单按钮悬停效果 */
#mobile-menu button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -8px rgba(59, 130, 246, 0.3);
}

/* 移动端菜单分割线 */
#mobile-menu .border-t {
    border-color: #e2e8f0 !important;
    background-color: transparent;
}

/* 确保移动端菜单在正确的层级 */
#mobile-menu-overlay {
    z-index: 9999;
}

/* 桌面端隐藏移动端元素 */
@media (min-width: 1024px) {
    #mobile-menu-overlay {
        display: none !important;
    }

    #mobile-menu-button {
        display: none !important;
    }

    #cart-badge-mobile {
        display: none !important;
    }

    #cart-badge-tablet {
        display: none !important;
    }
}

/* 导航栏响应式优化 */
@media (max-width: 1280px) {

    /* 在较小的桌面屏幕上调整导航项间距 */
    nav .space-x-6 {
        gap: 1rem;
    }

    nav .space-x-8 {
        gap: 1.5rem;
    }

    /* 调整导航容器内边距 */
    header nav {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* 中等桌面屏幕优化 */
@media (max-width: 1152px) and (min-width: 1024px) {

    /* 进一步减小导航项间距 */
    nav .space-x-6 {
        gap: 0.75rem;
    }

    /* 调整字体大小 */
    nav a {
        font-size: 0.875rem;
    }

    /* 调整按钮大小 */
    nav button {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
    }
}

/* 平板端和移动端优化 */
@media (max-width: 1023px) {

    /* 确保导航栏在小屏幕上正确显示 */
    header nav {
        position: relative;
    }

    /* 移动端菜单项的间距优化 */
    #mobile-menu nav {
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }

    /* 移动端菜单项文字大小 */
    #mobile-menu nav a {
        font-size: 16px;
        font-weight: 500;
    }

    /* 移动端菜单标题 */
    #mobile-menu h2 {
        font-size: 18px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    #mobile-menu {
        width: 100vw;
    }

    #mobile-menu nav a {
        padding: 16px 20px;
        font-size: 15px;
    }

    #mobile-menu .p-6 {
        padding: 1.5rem 1rem;
    }
}

/* 响应式调整：单价和毛重左对齐，随面板宽度变小自动调整字体和换行 */
@media (max-width: 480px) {
    #floating-price-panel .flex.items-center.justify-start {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    #floating-price-panel .text-xs.text-slate-600 {
        font-size: clamp(0.625rem, 1.8vw, 0.75rem) !important;
    }

    #floating-price-panel .text-sm.text-slate-900.font-semibold {
        font-size: clamp(0.7rem, 2vw, 0.875rem) !important;
    }

    #floating-price-panel .ml-2 {
        margin-left: 0.5rem;
    }
}

/* 移动端：货期跳转到总价下方左对齐 */
@media (max-width: 480px) {
    #floating-price-panel .bg-gradient-to-r.from-blue-50.to-indigo-50.rounded-lg.p-2\.5.border.border-blue-200 {
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        gap: 0.25rem;
        padding: 0.75rem !important;
    }

    #floating-price-panel .flex.items-start.md\:items-center.justify-between.md\:justify-start.gap-2 {
        width: 100%;
        justify-content: flex-start !important;
        align-items: center;
        margin-bottom: 0.125rem;
        gap: 0.5rem;
        text-align: left !important;
    }

    #floating-price-panel .flex.items-center.text-xs.text-slate-500.mt-1.md\:mt-0.md\:ml-4 {
        width: 100%;
        margin-top: 0 !important;
        margin-left: 0 !important;
        justify-content: flex-start !important;
        align-items: center;
        gap: 0.25rem;
        white-space: nowrap;
        font-size: 0.65rem;
        text-align: left !important;
    }

    #floating-price-panel #lead-time-desktop {
        white-space: nowrap;
        text-align: left !important;
    }

    #floating-price-panel [data-lucide="calendar"] {
        width: 0.875rem;
        height: 0.875rem;
        margin-right: 0.25rem !important;
    }

    #floating-price-panel .text-lg.md\:text-xl.font-extrabold.text-blue-600 {
        font-size: 1rem;
    }
}

/* 更窄宽度优化 */
@media (max-width: 400px) {
    #floating-price-panel .flex.items-center.text-xs.text-slate-500.mt-1.md\:mt-0.md\:ml-4 {
        font-size: 0.6rem;
    }

    #floating-price-panel [data-lucide="calendar"] {
        width: 2.5rem;
        height: 2.5rem;
        margin-right: 0.25rem;
    }

    #floating-price-panel .text-sm.font-bold.text-slate-700 {
        font-size: 0.7rem;
    }

    #floating-price-panel .text-lg.md\:text-xl.font-extrabold.text-blue-600 {
        font-size: 0.875rem;
    }
}

/* Safe Area Utilities for Mobile */
.pb-safe {
    padding-bottom: calc(0.75rem + constant(safe-area-inset-bottom));
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
}
/* Custom Animations */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-right {
    animation: fadeInRight 0.3s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.animate-highlight {
    animation: highlightPulse 1.5s infinite;
}
