/* ========== Apple-inspired Design System ========== */
:root {
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
    --apple-blue-light: #e8f4fd;
    --apple-green: #34c759;
    --apple-green-light: #e5f5ea;
    --apple-orange: #ff9500;
    --apple-orange-light: #fff4e5;
    --apple-red: #ff3b30;
    --apple-red-light: #ffe5e3;
    --apple-gray: #f5f5f7;
    --apple-gray-2: #e8e8ed;
    --apple-gray-3: #d2d2d7;
    --apple-gray-4: #86868b;
    --apple-gray-5: #6e6e73;
    --apple-text: #1d1d1f;
    --apple-text-secondary: #86868b;
    --apple-white: #ffffff;
    --apple-black: #000000;

    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --radius-pill: 980px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);

    /* 别名变量 - 兼容旧代码中的短名引用 */
    --gray-400: var(--apple-gray-3);
    --gray-500: var(--apple-gray-5);
    --gray-600: var(--apple-gray-5);
    --gray-900: var(--apple-text);
    --danger: var(--apple-red);
    --primary: var(--apple-blue);
    --success: var(--apple-green);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--apple-white);
    color: var(--apple-text);
    line-height: 1.47059;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== 导航栏 - Apple风格 ========== */
.navbar {
    background: rgba(255,255,255,0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--apple-gray-3);
    color: var(--apple-text);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 56px;
}

.navbar-brand {
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--apple-text);
    letter-spacing: -0.022em;
    flex: 1;
}

.navbar-brand img {
    height: 38px;
    width: auto;
    display: block;
}

.navbar-nav {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.navbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

/* ========== 按钮 - Apple风格 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.btn-primary {
    background: var(--apple-blue);
    color: #fff;
}
.btn-primary:hover {
    background: var(--apple-blue-hover);
    transform: scale(1.02);
}
.btn-primary:active { transform: scale(0.98); }

.btn-success {
    background: var(--apple-green);
    color: #fff;
}
.btn-success:hover { opacity: 0.9; transform: scale(1.02); }

.btn-danger {
    background: var(--apple-red);
    color: #fff;
}
.btn-danger:hover { opacity: 0.9; transform: scale(1.02); }

/* 图标按钮（编辑/删除） */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--apple-gray-2);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
    vertical-align: middle;
    margin-left: 4px;
}
.btn-icon:hover { opacity: 0.85; transform: scale(1.08); }
.btn-icon-edit { border-color: var(--apple-blue); }
.btn-icon-edit:hover { background: var(--apple-blue); }
.btn-icon-delete { border-color: var(--apple-red); }
.btn-icon-delete:hover { background: var(--apple-red); }

/* 操作列 */
.action-cell {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

/* 开关组件 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--apple-gray-3);
    border-radius: 20px;
    transition: 0.3s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider {
    background: var(--apple-green);
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(16px);
}
.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 复选框标签 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-600);
}
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--apple-gray-3);
    color: var(--apple-text);
}
.btn-outline:hover {
    background: var(--apple-gray);
    border-color: var(--apple-gray-2);
}

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
}

/* ========== 容器 ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.container-narrow {
    max-width: 800px;
}

/* ========== 管理后台 ========== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-header h2 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.021em;
    color: var(--apple-text);
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    padding: 4px;
    background: var(--apple-gray);
    border-radius: var(--radius-pill);
    width: fit-content;
}

.admin-tab {
    padding: 10px 24px;
    cursor: pointer;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: 14px;
    color: var(--apple-gray-5);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    background: transparent;
}

.admin-tab.active {
    background: var(--apple-white);
    color: var(--apple-text);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.admin-tab:hover { color: var(--apple-text); }

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

/* ========== 产品卡片网格 ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--apple-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1.5px solid transparent;
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.product-card.selected {
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 3px var(--apple-blue-light), var(--shadow-md);
}

.product-card .check-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--apple-blue);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,113,227,0.3);
}

.product-card.selected .check-overlay { display: flex; }

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--apple-gray);
    display: block;
}

.product-image-placeholder {
    width: 100%;
    height: 200px;
    background: var(--apple-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--apple-gray-4);
    font-size: 48px;
}

/* 产品卡片排序控件 */
.p-sort-wrap {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(0,0,0,0.55);
    padding: 3px 5px;
    border-radius: 6px;
    z-index: 3;
}
.p-sort-num {
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
    user-select: none;
}
.p-sort-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    font-size: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s;
    padding: 0;
}
.p-sort-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.45);
}
.p-sort-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

/* 产品多图管理网格 */
.p-img-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
    flex-shrink: 0;
}
.p-img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.p-img-item .p-img-idx {
    position: absolute;
    top: 2px;
    left: 2px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 4px;
}
.p-img-item .p-img-controls {
    position: absolute;
    top: 2px;
    right: 2px;
    display: flex;
    gap: 2px;
}
.p-img-item .p-img-btn {
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 3px;
    width: 18px;
    height: 18px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}
.p-img-item .p-img-btn:hover {
    background: rgba(0,0,0,0.85);
}
.p-img-item .p-img-del {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(220,53,69,0.85);
    color: #fff;
    border: none;
    border-radius: 3px;
    width: 18px;
    height: 18px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}
.p-img-item .p-img-del:hover {
    background: rgba(220,53,69,1);
}

/* ===== SKU 编辑器（淘宝式多型号） ===== */
.sku-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}
.sku-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px;
    background: #f5f5f7;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.05);
    flex-wrap: wrap;
}
.sku-row-off {
    background: #fdf0f0;
    border-color: rgba(220,53,69,0.15);
}
.sku-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sku-cell > label {
    font-size: 11px;
    color: #86868b;
    font-weight: 500;
}
.sku-cell .form-input {
    padding: 6px 8px;
    font-size: 13px;
}
.sku-cell-img { flex: none; }
.sku-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.08);
    display: block;
}
.sku-img-empty {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #86868b;
    border: 1px dashed rgba(0,0,0,0.2);
}
.sku-img-empty:hover { border-color: #0071e3; color: #0071e3; }
.sku-cell-model { flex: 1.2; min-width: 110px; }
.sku-cell-spec { flex: 1.2; min-width: 110px; }
.sku-cell-price { flex: 0.8; min-width: 85px; }
.sku-cell-stock { flex: 0.8; min-width: 85px; }
.sku-cell-toggle { flex: none; }
.sku-cell-del { flex: none; }
/* iOS 风格上下架开关 */
.sku-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 26px;
    margin-bottom: 4px;
}
.sku-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.sku-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #d1d1d6;
    border-radius: 26px;
    transition: 0.25s;
}
.sku-slider::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.sku-switch input:checked + .sku-slider {
    background: #34c759;
}
.sku-switch input:checked + .sku-slider::before {
    transform: translateX(18px);
}
/* 产品卡片 SKU 徽章 */
.p-sku-badge {
    display: inline-block;
    font-size: 11px;
    color: #0071e3;
    background: rgba(0,113,227,0.1);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
}


.product-info {
    padding: 16px 18px 12px;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--apple-text);
    letter-spacing: -0.01em;
}

.product-model {
    font-size: 13px;
    color: var(--apple-gray-4);
    margin-bottom: 6px;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--apple-text);
    letter-spacing: -0.02em;
}

.product-actions {
    padding: 0 18px 16px;
    display: flex;
    gap: 8px;
}

/* ========== 表格 ========== */
.table-container {
    background: var(--apple-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    overflow-x: auto;
    border: 1px solid var(--apple-gray-2);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
}

table.data-table th {
    background: var(--apple-gray);
    padding: 14px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--apple-gray-5);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

table.data-table td {
    padding: 14px 20px;
    border-top: 1px solid var(--apple-gray-2);
    font-size: 14px;
    color: var(--apple-text);
}

table.data-table tr:hover { background: var(--apple-gray); }

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.status-pending { background: var(--apple-orange-light); color: #9a5b00; }
.status-submitted { background: var(--apple-green-light); color: #0a5c22; }
.status-new { background: var(--apple-blue-light); color: #004a8f; }
.status-confirmed { background: var(--apple-green-light); color: #0a5c22; }
.status-completed { background: #f0eaff; color: #5a2ea6; }

/* ========== 模态框 ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show { display: flex; }

.modal {
    background: var(--apple-white);
    border-radius: var(--radius-lg);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 20px 28px;
    border-bottom: 1px solid var(--apple-gray-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.021em;
}

.modal-body { padding: 28px; }
.modal-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--apple-gray-2);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ========== 表单 ========== */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--apple-text);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.required-star {
    color: #ff3b30;
    font-size: 15px;
    font-weight: 700;
    margin-right: 2px;
    vertical-align: middle;
}

.form-input:invalid {
    border-color: #ff3b30;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--apple-gray-3);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--apple-white);
    color: var(--apple-text);
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 4px var(--apple-blue-light);
}

.form-textarea { min-height: 100px; resize: vertical; }

/* ========== 客户报价页面 ========== */
.quote-header {
    background: var(--apple-white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
    border: 1px solid var(--apple-gray-2);
    text-align: center;
}

.quote-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.021em;
    color: var(--apple-text);
}

.quote-meta {
    color: var(--apple-gray-4);
    font-size: 15px;
    font-weight: 400;
}

/* 产品行（客户填写页） */
.quote-item {
    background: var(--apple-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    padding: 18px 24px;
    gap: 18px;
    border: 1px solid var(--apple-gray-2);
    transition: all 0.2s;
}

.quote-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--apple-gray-3);
}

.quote-item-image {
    width: 88px;
    height: 88px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--apple-gray);
    flex-shrink: 0;
}

.quote-item-image-placeholder {
    width: 88px;
    height: 88px;
    border-radius: var(--radius-sm);
    background: var(--apple-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--apple-gray-4);
    font-size: 32px;
    flex-shrink: 0;
}

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

.quote-item-name {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.quote-item-model {
    font-size: 13px;
    color: var(--apple-gray-4);
    margin-bottom: 4px;
}

.quote-item-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--apple-text);
}

.qty-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--apple-gray-3);
    background: var(--apple-white);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    color: var(--apple-text);
}

.qty-btn:hover {
    background: var(--apple-gray);
    border-color: var(--apple-gray-2);
}

.qty-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid var(--apple-gray-3);
    border-radius: var(--radius-sm);
    font-size: 17px;
    font-weight: 600;
    color: var(--apple-text);
    background: var(--apple-white);
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input:focus { outline: none; border-color: var(--apple-blue); box-shadow: 0 0 0 3px var(--apple-blue-light); }

.quote-item-subtotal {
    min-width: 110px;
    text-align: right;
    flex-shrink: 0;
}

.quote-item-subtotal-label {
    font-size: 12px;
    color: var(--apple-gray-4);
}

.quote-item-subtotal-value {
    font-size: 17px;
    font-weight: 700;
    color: var(--apple-text);
    letter-spacing: -0.02em;
}

/* 购物车删除按钮 */
.cart-remove-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    margin-left: 12px;
    border-radius: 50%;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.cart-remove-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(255,59,48,0.3);
}

/* 购物车批量操作栏 */
.cart-batch-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: var(--apple-gray);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}
.cart-select-all-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--apple-text);
}
.cart-select-all-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.cart-item-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
    flex-shrink: 0;
}

/* 订单编辑模态框商品表格 */
#order-edit-modal .data-table {
    font-size: 13px;
}
#order-edit-modal .data-table th {
    padding: 8px 10px;
}
#order-edit-modal .data-table td {
    padding: 8px 10px;
}
.oe-qty {
    border: 1px solid var(--apple-gray-3);
    border-radius: 6px;
    text-align: center;
}

/* 客户信息表单 */
.customer-form {
    background: var(--apple-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 32px;
    margin-bottom: 32px;
    border: 1px solid var(--apple-gray-2);
}

.customer-form h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.021em;
}

.customer-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* 底部汇总栏 */
.quote-summary {
    background: var(--apple-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 24px 32px;
    margin-bottom: 32px;
    position: sticky;
    bottom: 24px;
    border: 1px solid var(--apple-gray-2);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 16px;
}

.summary-total {
    border-top: 1px solid var(--apple-gray-2);
    margin-top: 12px;
    padding-top: 16px;
    font-size: 24px;
    font-weight: 700;
    color: var(--apple-text);
    letter-spacing: -0.021em;
}

/* 保存提示 */
.save-indicator {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--apple-text);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    font-weight: 500;
    z-index: 300;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.save-indicator.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ========== 订单打印页面 ========== */
.order-doc {
    background: var(--apple-white);
    max-width: 800px;
    margin: 40px auto;
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--apple-gray-2);
}

.order-doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 36px;
    border-bottom: 2px solid var(--apple-text);
    padding-bottom: 20px;
}

.order-doc-company {
    font-size: 26px;
    font-weight: 700;
    color: var(--apple-text);
    letter-spacing: -0.021em;
}

.order-doc-subtitle {
    font-size: 13px;
    color: var(--apple-gray-4);
    margin-top: 6px;
    line-height: 1.5;
}

.order-doc-meta {
    text-align: right;
    font-size: 13px;
    color: var(--apple-gray-5);
    line-height: 1.6;
}

.order-doc-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 28px;
    letter-spacing: 2px;
    color: var(--apple-text);
}

.order-doc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 28px;
}

.order-doc-table th {
    background: var(--apple-text);
    color: #fff;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    letter-spacing: 0.02em;
}

.order-doc-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--apple-gray-2);
    font-size: 14px;
    color: var(--apple-text);
}

.order-doc-table .text-right { text-align: right; }
.order-doc-table .text-center { text-align: center; }

.order-doc-total {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 36px;
}

.order-doc-total-box {
    min-width: 300px;
}

.order-doc-total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: var(--apple-gray-5);
}

.order-doc-total-final {
    border-top: 2px solid var(--apple-text);
    margin-top: 10px;
    padding-top: 12px;
    font-size: 22px;
    font-weight: 700;
    color: var(--apple-text);
    letter-spacing: -0.021em;
}

.order-doc-signature {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    font-size: 14px;
    color: var(--apple-gray-5);
}

.signature-block {
    text-align: center;
}

.signature-line {
    border-bottom: 1px solid var(--apple-gray-3);
    width: 220px;
    height: 48px;
    margin-bottom: 6px;
}

/* ========== 语言下拉菜单 ========== */
.lang-dropdown {
    position: relative;
}

.lang-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--apple-gray-3);
    background: var(--apple-white);
    color: var(--apple-text);
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.lang-dropdown-btn:hover {
    background: var(--apple-gray);
    border-color: var(--apple-gray-2);
}

.lang-btn-globe { font-size: 15px; line-height: 1; }
.lang-btn-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; }

.lang-arrow {
    font-size: 10px;
    margin-left: 2px;
    transition: transform 0.2s;
    opacity: 0.5;
}

.lang-dropdown.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--apple-white);
    border: 1px solid var(--apple-gray-2);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    max-height: 380px;
    overflow-y: auto;
    min-width: 190px;
    z-index: 200;
    animation: langDropdownIn 0.2s ease;
}

.lang-dropdown.open .lang-dropdown-menu { display: block; }

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

.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    color: var(--apple-text);
    transition: background 0.15s;
    white-space: nowrap;
}

.lang-dropdown-item:hover { background: var(--apple-gray); }

.lang-dropdown-item.active {
    background: var(--apple-blue-light);
    color: var(--apple-blue);
    font-weight: 600;
}

.lang-dropdown-item .lang-flag { font-size: 18px; line-height: 1; }

/* 滚动条美化 */
.lang-dropdown-menu::-webkit-scrollbar { width: 6px; }
.lang-dropdown-menu::-webkit-scrollbar-track { background: transparent; }
.lang-dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--apple-gray-3);
    border-radius: 3px;
}

/* ========== 翻译 Loading 遮罩 ========== */
.translate-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.translate-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--apple-gray-2);
    border-top-color: var(--apple-blue);
    border-radius: 50%;
    animation: translate-spin 0.8s linear infinite;
}

.translate-loading-text {
    font-size: 15px;
    color: var(--apple-gray-5);
    font-weight: 500;
}

@keyframes translate-spin {
    to { transform: rotate(360deg); }
}

/* ========== RTL 支持 ========== */
body.rtl { direction: rtl; }
body.rtl .navbar-actions { flex-direction: row-reverse; }
body.rtl .quote-item { flex-direction: row-reverse; }
body.rtl .order-doc-header { flex-direction: row-reverse; }
body.rtl .text-right { text-align: left !important; }

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--apple-gray-4);
}

.empty-state-icon { font-size: 56px; margin-bottom: 16px; opacity: 0.6; }
.empty-state-text { font-size: 16px; font-weight: 500; }

/* ========== Toast ========== */
.toast {
    position: fixed;
    top: 76px;
    right: 24px;
    padding: 14px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    font-weight: 500;
    z-index: 300;
    transform: translateX(400px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show { transform: translateX(0); }
.toast-success { background: var(--apple-green); color: #fff; }
.toast-error { background: var(--apple-red); color: #fff; }
.toast-info { background: var(--apple-blue); color: #fff; }

/* ========== 打印样式 ========== */
@media print {
    body { background: #fff; color: #000; }
    .navbar, .no-print, .quote-summary, .save-indicator, .toast { display: none !important; }
    .order-doc {
        box-shadow: none;
        margin: 0;
        padding: 0;
        max-width: 100%;
        border-radius: 0;
        border: none;
    }
    .order-doc-header { page-break-inside: avoid; }
    .order-doc-table { page-break-inside: auto; }
    .order-doc-table tr { page-break-inside: avoid; }
    @page {
        size: A4;
        margin: 15mm;
    }
}

/* ========== 导航链接 ========== */
.nav-link {
    color: var(--apple-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    transition: all 0.2s;
    opacity: 0.88;
}
.nav-link:hover { opacity: 1; background: var(--apple-gray); }
.nav-link.active { font-weight: 600; opacity: 1; }

/* ========== 主页 - Hero ========== */
.hero {
    background: var(--apple-gray);
    padding: 100px 24px 80px;
    text-align: center;
}
.hero-content { max-width: 800px; margin: 0 auto; }
.hero-title {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
    color: var(--apple-text);
    margin-bottom: 4px;
}
.hero-title-2 {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
    color: var(--apple-text);
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--apple-blue), #6e8eff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 19px;
    line-height: 1.5;
    color: var(--apple-gray-5);
    max-width: 640px;
    margin: 0 auto 36px;
    font-weight: 400;
}
.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== 主页 - 数据亮点 ========== */
.stats-section {
    padding: 64px 24px;
    background: var(--apple-white);
}
.stats-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}
.stat-item { text-align: center; }
.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--apple-text);
    letter-spacing: -0.03em;
    line-height: 1;
}
.stat-number span {
    color: var(--apple-blue);
}
.stat-label {
    margin-top: 8px;
    font-size: 14px;
    color: var(--apple-gray-5);
    font-weight: 500;
}

/* ========== 主页 - 产品品类 ========== */
.categories-section {
    padding: 80px 24px;
    background: var(--apple-gray);
}
.section-header {
    text-align: center;
    margin-bottom: 48px;
}
.section-title {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.022em;
    color: var(--apple-text);
    margin-bottom: 12px;
}
.section-subtitle {
    font-size: 17px;
    color: var(--apple-gray-5);
    font-weight: 400;
}
.category-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.category-card {
    background: var(--apple-white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    display: block;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.category-icon {
    font-size: 44px;
    margin-bottom: 16px;
}
.category-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--apple-text);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}
.category-desc {
    font-size: 14px;
    color: var(--apple-gray-5);
}

/* ========== 主页 - 关于我们 ========== */
.about-section {
    padding: 80px 24px;
    background: var(--apple-white);
}
.about-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    align-items: start;
}
.about-text .section-title {
    text-align: left;
    font-size: 32px;
    margin-bottom: 20px;
}
.about-desc {
    font-size: 16px;
    line-height: 1.6;
    color: var(--apple-gray-5);
    margin-bottom: 16px;
}
.about-features {
    margin-top: 24px;
    display: grid;
    gap: 12px;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--apple-text);
    font-weight: 500;
}
.feature-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--apple-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.about-contact {
    background: var(--apple-gray);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.qr-section {
    margin-bottom: 20px;
}

.qr-image {
    width: 100%;
    max-width: 280px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    background: var(--apple-white);
    display: block;
    margin: 0 auto;
}
.about-contact h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
    color: var(--apple-text);
}
.contact-item { margin-bottom: 16px; }
.contact-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--apple-gray-4);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}
.contact-value {
    font-size: 14px;
    color: var(--apple-text);
    line-height: 1.5;
}

/* ========== Storefront Section ========== */
.storefront-section {
    padding: 80px 24px;
    background: var(--apple-gray);
    position: relative;
}
.storefront-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.storefront-card {
    background: var(--apple-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.storefront-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.storefront-image-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 800px;
    margin: 0 auto;
    background: var(--apple-gray-2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.storefront-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.storefront-placeholder {
    font-size: 64px;
    color: var(--apple-gray-4);
}
.storefront-info {
    padding: 24px 28px;
}
.storefront-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--apple-text);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}
.storefront-address {
    font-size: 14px;
    color: var(--apple-gray-5);
    line-height: 1.5;
}
@media (max-width: 768px) {
    .storefront-grid { grid-template-columns: 1fr; gap: 24px; }
    .storefront-section { padding: 48px 20px; }
}

/* ========== Storefront Admin ========== */
.storefront-admin-wrap {
    max-width: 900px;
    margin: 0 auto;
}
.storefront-admin-header {
    margin-bottom: 32px;
}
.storefront-admin-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--apple-text);
    margin-bottom: 8px;
}
.storefront-admin-tip {
    font-size: 14px;
    color: var(--apple-gray-5);
    line-height: 1.5;
}
.storefront-admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
.storefront-admin-card {
    background: var(--apple-white);
    border: 1px solid var(--apple-gray-2);
    border-radius: var(--radius-md);
    padding: 24px;
}
.storefront-admin-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--apple-text);
    margin-bottom: 16px;
}
.storefront-upload-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 280px;
    margin: 0 auto;
    border: 2px dashed var(--apple-gray-3);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s;
}
.storefront-upload-box:hover {
    border-color: var(--apple-blue);
    background: var(--apple-blue-light);
}
.storefront-upload-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}
.storefront-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--apple-gray-4);
}
.storefront-upload-placeholder span:first-child {
    font-size: 36px;
}
.storefront-upload-placeholder span:nth-child(2) {
    font-size: 14px;
    font-weight: 500;
}
.storefront-upload-placeholder small {
    font-size: 12px;
    color: var(--apple-gray-4);
}
@media (max-width: 768px) {
    .storefront-admin-grid { grid-template-columns: 1fr; }
}

/* ========== Footer ========== */
.footer {
    background: var(--apple-text);
    color: #f5f5f7;
    padding: 40px 24px;
}
.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
}
.footer-brand img { height: 32px; }
.footer-links {
    display: flex;
    gap: 24px;
}
.footer-links a {
    color: #a1a1a6;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }
.footer-copy {
    font-size: 13px;
    color: #6e6e73;
}

/* ========== 产品目录页 ========== */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}
.page-title {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.022em;
    color: var(--apple-text);
    margin-bottom: 8px;
}
.page-subtitle {
    font-size: 17px;
    color: var(--apple-gray-5);
}

.filter-bar {
    background: var(--apple-white);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--apple-gray-2);
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--apple-gray-4);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.filter-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.filter-tag {
    padding: 6px 16px;
    border: 1px solid var(--apple-gray-3);
    background: var(--apple-white);
    color: var(--apple-gray-5);
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.filter-tag:hover {
    border-color: var(--apple-gray-2);
    background: var(--apple-gray);
}
.filter-tag.active {
    background: var(--apple-text);
    color: #fff;
    border-color: var(--apple-text);
}

/* 品类二级展开 */
.filter-tag-group {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
}
.filter-tag-parent {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}
.filter-tag-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 11px;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.2s;
    margin-left: 2px;
}
.filter-tag-arrow:hover {
    opacity: 1;
    background: rgba(0,0,0,0.08);
}
.filter-tag-arrow.collapsed {
    opacity: 0.6;
}
.filter-tag-children {
    display: none;
    gap: 6px;
    flex-wrap: wrap;
    padding-left: 12px;
    border-left: 2px solid var(--apple-gray-2);
    margin-left: 4px;
}
.filter-tag-children.active,
.filter-tag-children[style*="flex"] {
    display: flex;
}
.filter-tag-child {
    padding: 4px 12px;
    font-size: 13px;
    border-style: dashed;
    background: var(--apple-gray);
}
.filter-tag-child:hover {
    background: var(--apple-gray-2);
    border-color: var(--apple-gray-4);
}

.product-count {
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--apple-gray-5);
    font-weight: 500;
}

.product-catalog-card {
    cursor: default;
    border: 1px solid var(--apple-gray-2);
}
.product-catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.product-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--apple-blue-light);
    color: #004a8f;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.bottom-cta {
    margin-top: 48px;
    background: linear-gradient(135deg, var(--apple-gray), #ebedf0);
    border-radius: var(--radius-lg);
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.bottom-cta-text h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
    color: var(--apple-text);
}
.bottom-cta-text p {
    font-size: 15px;
    color: var(--apple-gray-5);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .container { padding: 20px 16px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .quote-item { flex-wrap: wrap; padding: 14px; }
    .quote-item-subtotal { width: 100%; text-align: left; margin-top: 8px; }
    .customer-form-grid { grid-template-columns: 1fr; }
    .navbar-brand { font-size: 15px; }
    .navbar-brand img { height: 30px; }
    .navbar-nav { gap: 4px; }
    .navbar-actions { gap: 4px; }
    .nav-link { padding: 4px 8px; font-size: 13px; }
    .quote-title { font-size: 28px; }
    .order-doc { padding: 24px; margin: 16px; }
    .order-doc-header { flex-direction: column; gap: 12px; }
    .order-doc-meta { text-align: left; }
    .admin-header h2 { font-size: 24px; }
    /* Homepage responsive */
    .hero { padding: 60px 20px 50px; }
    .hero-title, .hero-title-2 { font-size: 36px; }
    .hero-subtitle { font-size: 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .stat-number { font-size: 36px; }
    .categories-section, .about-section { padding: 48px 20px; }
    .category-grid { grid-template-columns: 1fr; }
    .about-container { grid-template-columns: 1fr; gap: 32px; }
    .section-title { font-size: 28px; }
    .footer-content { flex-direction: column; text-align: center; }
    /* Products page responsive */
    .filter-bar { flex-direction: column; gap: 16px; padding: 20px; }
    .page-title { font-size: 28px; }
    .bottom-cta { flex-direction: column; text-align: center; padding: 28px 20px; }
    /* Auth page responsive */
    .auth-card { padding: 28px 20px; }
    .auth-page { padding: 20px; }
    .user-dropdown-btn .user-name { display: none; }
}

/* ========== 认证页面 ========== */
.auth-page {
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--apple-gray);
    padding: 40px 20px;
}

.auth-card {
    background: var(--apple-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 48px 40px;
    max-width: 440px;
    width: 100%;
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo img {
    height: 56px;
    width: auto;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.022em;
    color: var(--apple-text);
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    font-size: 15px;
    color: var(--apple-gray-5);
    margin-bottom: 32px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.auth-submit {
    width: 100%;
    margin-top: 8px;
}

.auth-error {
    color: var(--apple-red);
    font-size: 14px;
    padding: 10px 14px;
    background: var(--apple-red-light);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--apple-gray-5);
}

.auth-footer a {
    color: var(--apple-blue);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-hint {
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
    color: var(--apple-gray-4);
    padding: 10px;
    background: var(--apple-gray);
    border-radius: var(--radius-sm);
}

/* ========== 用户区域（含购物车+用户下拉） ========== */
#user-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.rtl #user-area {
    flex-direction: row-reverse;
}

/* ========== 用户下拉菜单 ========== */
.user-dropdown {
    position: relative;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border: 1px solid var(--apple-gray-3);
    background: var(--apple-white);
    color: var(--apple-text);
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.user-dropdown-btn:hover {
    background: var(--apple-gray);
    border-color: var(--apple-gray-2);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--apple-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--apple-white);
    border: 1px solid var(--apple-gray-2);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    min-width: 180px;
    z-index: 200;
    animation: langDropdownIn 0.2s ease;
}

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

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    color: var(--apple-text);
    transition: background 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.user-dropdown-item:hover { background: var(--apple-gray); }

.user-dropdown-divider {
    height: 1px;
    background: var(--apple-gray-2);
    margin: 4px 0;
}

/* ========== 购物车图标 ========== */
.cart-link {
    position: relative;
    display: flex;
    align-items: center;
}

.cart-icon {
    font-size: 18px;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--apple-red);
    color: #fff;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ========== 产品卡片操作按钮 ========== */
.product-catalog-card .product-actions {
    padding: 0 16px 16px;
    display: flex;
    gap: 8px;
}

.product-catalog-card .product-actions .btn {
    flex: 1;
    text-align: center;
    font-size: 13px;
}

/* ========== 3D 分类树侧边栏 ========== */
.product-admin-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

/* 排线管理视图（默认隐藏，分类筛选触发显示） */
.cable-admin-view {
    grid-column: 2;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.category-sidebar {
    position: sticky;
    top: 72px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    padding-right: 4px;
}

.category-sidebar::-webkit-scrollbar { width: 5px; }
.category-sidebar::-webkit-scrollbar-track { background: transparent; }
.category-sidebar::-webkit-scrollbar-thumb { background: var(--apple-gray-3); border-radius: 3px; }

.sidebar-section {
    background: var(--apple-white);
    border: 1px solid var(--apple-gray-2);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.sidebar-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--apple-gray-2);
    background: var(--apple-gray);
}

.sidebar-section-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--apple-text);
    letter-spacing: -0.01em;
}

.category-tree-container {
    padding: 8px;
    min-height: 60px;
}

.keyword-list-container {
    padding: 8px;
    min-height: 40px;
}

/* 3D 树形按钮 */
.tree-node {
    margin-bottom: 4px;
}

.tree-node-children {
    margin-left: 18px;
    padding-left: 12px;
    border-left: 2px solid var(--apple-gray-2);
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.tree-node-children.collapsed {
    max-height: 0;
    opacity: 0;
}

.tree-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-decoration: none;
    color: var(--apple-text);
    overflow: visible;
    min-height: 44px;
}

/* Level 1 - 品牌 3D 按钮 */
.tree-btn.level-1 {
    background: linear-gradient(135deg, #1d1d1f 0%, #3a3a3c 100%);
    color: #fff;
    box-shadow: 0 3px 0 #0a0a0b, 0 4px 12px rgba(0,0,0,0.25);
    transform: perspective(400px) rotateX(0deg);
    border: 1px solid rgba(255,255,255,0.1);
}

.tree-btn.level-1:hover {
    background: linear-gradient(135deg, #0071e3 0%, #005bb5 100%);
    box-shadow: 0 5px 0 #003d7a, 0 8px 20px rgba(0,113,227,0.35);
    transform: perspective(400px) rotateX(-3deg) translateY(-1px);
}

.tree-btn.level-1:active {
    box-shadow: 0 1px 0 #0a0a0b;
    transform: perspective(400px) rotateX(0deg) translateY(2px);
}

.tree-btn.level-1.active {
    background: linear-gradient(135deg, #0071e3 0%, #005bb5 100%);
    box-shadow: 0 3px 0 #003d7a, 0 4px 16px rgba(0,113,227,0.4);
}

/* Level 2 - 系列 3D 按钮 */
.tree-btn.level-2 {
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
    color: var(--apple-text);
    box-shadow: 0 2px 0 #d2d2d7, 0 3px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--apple-gray-2);
}

.tree-btn.level-2:hover {
    background: linear-gradient(135deg, #e8f4fd 0%, #d0ebfc 100%);
    box-shadow: 0 3px 0 #a8d4f5, 0 5px 12px rgba(0,113,227,0.15);
    color: var(--apple-blue);
    transform: translateY(-1px);
}

.tree-btn.level-2:active {
    box-shadow: 0 1px 0 #d2d2d7;
    transform: translateY(1px);
}

.tree-btn.level-2.active {
    background: linear-gradient(135deg, #e8f4fd 0%, #d0ebfc 100%);
    color: var(--apple-blue);
    box-shadow: 0 2px 0 #a8d4f5, 0 3px 10px rgba(0,113,227,0.2);
    border-color: var(--apple-blue);
}

/* Level 3 - 型号 3D 按钮 */
.tree-btn.level-3 {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9fb 100%);
    color: var(--apple-gray-5);
    box-shadow: 0 1px 0 #e8e8ed, 0 2px 6px rgba(0,0,0,0.04);
    border: 1px solid var(--apple-gray-2);
    font-size: 12px;
    padding: 7px 10px;
}

.tree-btn.level-3:hover {
    background: linear-gradient(135deg, #e5f5ea 0%, #d0f0d8 100%);
    box-shadow: 0 2px 0 #a8d4b8, 0 3px 8px rgba(52,199,89,0.12);
    color: #0a5c22;
    transform: translateY(-1px);
}

.tree-btn.level-3:active {
    box-shadow: 0 0 0 #e8e8ed;
    transform: translateY(1px);
}

.tree-btn.level-3.active {
    background: linear-gradient(135deg, #e5f5ea 0%, #d0f0d8 100%);
    color: #0a5c22;
    box-shadow: 0 2px 0 #a8d4b8, 0 3px 8px rgba(52,199,89,0.15);
    border-color: var(--apple-green);
}

/* 树节点图标和展开箭头 */
.tree-icon {
    font-size: 14px;
    flex-shrink: 0;
    line-height: 1;
}

.tree-arrow {
    font-size: 10px;
    flex-shrink: 0;
    transition: transform 0.2s;
    opacity: 0.6;
    width: 14px;
    text-align: center;
}

.tree-arrow.expanded { transform: rotate(90deg); }

.tree-name {
    flex: 1;
    word-break: break-word;
    padding-right: 8px;
}

.tree-actions-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
    margin-left: auto;
}

.tree-actions-line {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.tree-btn:hover .tree-action-btn,
.tree-actions-wrap:hover .tree-action-btn {
    opacity: 1;
}

.tree-action-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.15);
    color: inherit;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, opacity 0.2s;
    padding: 0;
    opacity: 0.6;
    line-height: 1;
}

.tree-action-btn:hover { background: rgba(255,255,255,0.35); opacity: 1; }

/* Level 2 & 3 按钮深色背景适配 */
.tree-btn.level-2 .tree-action-btn,
.tree-btn.level-3 .tree-action-btn {
    background: rgba(0,0,0,0.06);
    color: var(--apple-text);
}

.tree-btn.level-2 .tree-action-btn:hover,
.tree-btn.level-3 .tree-action-btn:hover {
    background: rgba(0,0,0,0.15);
}

.tree-add-child {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    margin-left: 18px;
    border: none;
    background: transparent;
    color: var(--apple-gray-4);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s;
}

.tree-add-child:hover {
    background: var(--apple-blue-light);
    color: var(--apple-blue);
}

/* 关键字标签 */
.keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    margin: 3px;
    background: linear-gradient(135deg, #fff4e5 0%, #ffe8cc 100%);
    border: 1px solid #ffd9a8;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    color: #9a5b00;
    box-shadow: 0 1px 3px rgba(255,149,0,0.1);
    transition: all 0.2s;
}

.keyword-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(255,149,0,0.2);
}

.keyword-tag .kw-delete {
    width: 16px;
    height: 16px;
    border: none;
    background: rgba(154,91,0,0.15);
    color: #9a5b00;
    border-radius: 50%;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s;
}

.keyword-tag .kw-delete:hover {
    background: var(--apple-red);
    color: #fff;
}

.keyword-tag .kw-edit {
    cursor: pointer;
    opacity: 0.6;
    font-size: 11px;
}

.keyword-tag .kw-edit:hover { opacity: 1; }

/* 响应式 - 小屏侧边栏折叠 */
@media (max-width: 900px) {
    .product-admin-layout {
        grid-template-columns: 1fr;
    }
    .category-sidebar {
        position: relative;
        top: 0;
        max-height: none;
    }
}

/* ========== 闪烁星星动画 ========== */
.stars-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}
.star {
    position: absolute;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px 2px rgba(255, 215, 0, 0.8), 0 0 12px 4px rgba(255, 215, 0, 0.4);
    animation: twinkle var(--star-duration, 2s) ease-in-out infinite;
    animation-delay: var(--star-delay, 0s);
}
@keyframes twinkle {
    0%, 100% { opacity: 0.15; transform: scale(0.6); }
    30% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
    70% { opacity: 0.5; transform: scale(1); }
    80% { opacity: 0.3; transform: scale(0.8); }
}

/* ============ 视频管理表格 ============ */
.video-admin-table-wrap {
    overflow-x: auto;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e5ea;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.video-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.video-admin-table thead {
    background: #f5f5f7;
}
.video-admin-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #1d1d1f;
    font-size: 13px;
    white-space: nowrap;
    border-bottom: 1.5px solid #e5e5ea;
}
.video-admin-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f5;
    vertical-align: middle;
}
.video-admin-table tbody tr:hover {
    background: #fafafa;
}
.video-admin-table tbody tr:last-child td {
    border-bottom: none;
}
.video-admin-table .btn-sm {
    padding: 4px 10px;
    font-size: 13px;
    min-width: 32px;
}

/* ============ 产品中心页（亚马逊框架 + 苹果风格） ============ */

/* 面包屑 */
.az-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--apple-gray-4);
    padding: 16px 24px 0;
    max-width: 1400px;
    margin: 0 auto;
}
.az-breadcrumb a { color: var(--apple-blue); text-decoration: none; }
.az-breadcrumb a:hover { text-decoration: underline; }
.az-breadcrumb-sep { color: var(--apple-gray-3); font-size: 11px; }

/* 页面标题 */
.az-page-header {
    padding: 10px 24px 4px;
    max-width: 1400px;
    margin: 0 auto;
}
.az-page-title {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--apple-text);
}
.az-page-subtitle {
    font-size: 16px;
    color: var(--apple-gray-5);
    margin-top: 4px;
}

/* 整体两栏布局 */
.az-products-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
    padding: 16px 24px 48px;
    align-items: flex-start;
}

/* 左侧筛选栏 */
.az-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--apple-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--apple-gray-2);
    padding: 20px 0 16px;
    position: sticky;
    top: 72px;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
}

.az-sidebar-search {
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--apple-gray-2);
}
.az-search-input {
    width: 100%;
    padding: 9px 14px 9px 36px;
    border: 1.5px solid var(--apple-gray-3);
    border-radius: var(--radius-pill);
    font-size: 14px;
    background: var(--apple-gray);
    transition: all 0.2s;
}
.az-search-input:focus {
    outline: none;
    border-color: var(--apple-blue);
    background: var(--apple-white);
    box-shadow: 0 0 0 3px var(--apple-blue-light);
}
.az-search-wrap { position: relative; }
.az-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--apple-gray-4);
    pointer-events: none;
}

.az-filter-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--apple-gray-2);
}
.az-filter-section:last-child { border-bottom: none; padding-bottom: 8px; }
.az-filter-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--apple-text);
    margin-bottom: 10px;
}

.az-filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--apple-gray-5);
    transition: color 0.15s;
    user-select: none;
}
.az-filter-option:hover { color: var(--apple-text); }
.az-filter-option.active { color: var(--apple-blue); font-weight: 600; }
.az-radio-dot {
    width: 16px; height: 16px;
    border: 2px solid var(--apple-gray-3);
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.2s;
    position: relative;
}
.az-filter-option.active .az-radio-dot {
    border-color: var(--apple-blue);
}
.az-filter-option.active .az-radio-dot::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--apple-blue);
}
.az-filter-count {
    font-size: 12px;
    color: var(--apple-gray-4);
    margin-left: auto;
}

.az-clear-filters {
    display: block;
    text-align: center;
    padding: 9px;
    margin: 4px 20px 0;
    font-size: 13px;
    color: var(--apple-blue);
    cursor: pointer;
    border: 1px solid var(--apple-gray-2);
    border-radius: var(--radius-pill);
    transition: all 0.2s;
    background: var(--apple-white);
}
.az-clear-filters:hover {
    background: var(--apple-blue-light);
    border-color: var(--apple-blue);
}

/* 右侧主区域 */
.az-main {
    flex: 1;
    min-width: 0;
}

.az-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 20px;
    gap: 16px;
    flex-wrap: wrap;
}
.az-result-count {
    font-size: 15px;
    color: var(--apple-text);
    font-weight: 600;
}
.az-result-count span { color: var(--apple-gray-4); font-weight: 400; }
.az-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.az-sort-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.az-sort-label {
    font-size: 13px;
    color: var(--apple-gray-4);
    margin-right: 8px;
    white-space: nowrap;
}
.az-sort-select {
    padding: 8px 36px 8px 16px;
    border: 1.5px solid var(--apple-gray-3);
    border-radius: var(--radius-pill);
    font-size: 14px;
    background: var(--apple-white);
    color: var(--apple-text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    font-weight: 500;
    transition: border-color 0.2s;
}
.az-sort-select:focus { outline: none; border-color: var(--apple-blue); }
.az-sort-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--apple-gray-4);
    font-size: 10px;
}

.az-view-toggle {
    display: flex;
    border: 1.5px solid var(--apple-gray-3);
    border-radius: var(--radius-pill);
    overflow: hidden;
}
.az-view-btn {
    padding: 7px 12px;
    background: var(--apple-white);
    border: none;
    cursor: pointer;
    font-size: 15px;
    color: var(--apple-gray-4);
    transition: all 0.2s;
    line-height: 1;
}
.az-view-btn.active {
    background: var(--apple-text);
    color: #fff;
}

/* 移动端筛选按钮 */
.az-mobile-filter-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--apple-white);
    border: 1.5px solid var(--apple-gray-3);
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 500;
    color: var(--apple-text);
    cursor: pointer;
}

/* 产品网格 */
.az-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* 列表视图 */
.az-product-grid.az-list-view {
    grid-template-columns: 1fr;
    gap: 12px;
}
.az-product-grid.az-list-view .az-product-card {
    flex-direction: row;
    align-items: stretch;
}
.az-product-grid.az-list-view .az-product-image-wrap {
    width: 180px;
    height: auto;
    aspect-ratio: auto;
    flex-shrink: 0;
}
.az-product-grid.az-list-view .az-product-body {
    padding: 20px 24px;
    flex: 1;
}
.az-product-grid.az-list-view .az-product-actions {
    padding: 0 24px 20px;
    flex-direction: column;
    justify-content: center;
    max-width: 180px;
}

/* 产品卡片 */
.az-product-card {
    background: var(--apple-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--apple-gray-2);
    display: flex;
    flex-direction: column;
}
.az-product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--apple-gray-3);
}

.az-product-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--apple-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.az-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.az-product-card:hover .az-product-image {
    transform: scale(1.04);
}
.az-product-image-placeholder {
    font-size: 48px;
    color: var(--apple-gray-3);
}

/* 产品图片轮播箭头 */
.az-img-slider {
    cursor: default;
}
.az-img-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #1d1d1f;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s, background 0.2s;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    padding: 0;
    line-height: 1;
}
.az-img-arrow:hover {
    background: rgba(255,255,255,0.95);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.az-img-prev { left: 8px; }
.az-img-next { right: 8px; }
.az-product-card:hover .az-img-arrow {
    opacity: 1;
}

/* 轮播圆点指示器 */
.az-img-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}
.az-img-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.55);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.az-img-dot.active {
    background: rgba(255,255,255,0.95);
    transform: scale(1.25);
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.az-product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--apple-text);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
}

.az-product-body {
    padding: 16px 18px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.az-product-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--apple-text);
    letter-spacing: -0.01em;
    margin-bottom: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
a.az-product-name:hover {
    color: #0071e3;
}
/* 视频标记徽章（产品卡片上） */
.az-video-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    z-index: 4;
    pointer-events: none;
}
.az-product-model {
    font-size: 13px;
    color: var(--apple-gray-4);
    margin-bottom: 6px;
}
.az-product-brand {
    font-size: 12px;
    color: var(--apple-gray-5);
    margin-bottom: 8px;
}
.az-product-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--apple-text);
    letter-spacing: -0.02em;
    margin-top: auto;
    margin-bottom: 12px;
    white-space: nowrap;
}
.az-sku-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    color: #0071e3;
    background: rgba(0,113,227,0.1);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
}
.az-product-actions {
    display: flex;
    gap: 8px;
    padding: 0 18px 16px;
}

/* 空状态 */
.az-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--apple-gray-4);
}
.az-empty-state-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.4;
}
.az-empty-state-text {
    font-size: 17px;
    font-weight: 500;
}

/* 移动端筛选遮罩 */
.az-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 998;
}
.az-sidebar-overlay.active { display: block; }

/* 响应式 */
@media (max-width: 900px) {
    .az-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 999;
        border-radius: 0;
        max-height: 100vh;
        width: 300px;
        transform: translateX(-100%);
        transition: transform 0.3s;
        padding-top: 60px;
    }
    .az-sidebar.open { transform: translateX(0); }
    .az-mobile-filter-toggle { display: inline-flex; }
    .az-products-container { padding: 12px 16px 32px; }
    .az-product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .az-product-price { font-size: 18px; }
    .az-page-title { font-size: 26px; }
}

@media (max-width: 480px) {
    .az-product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .az-product-body { padding: 10px 12px 6px; }
    .az-product-name { font-size: 13px; }
    .az-product-price { font-size: 16px; }
    .az-product-actions { padding: 0 12px 12px; gap: 6px; flex-direction: column; }
    .az-toolbar { gap: 8px; }
    .az-sort-label { display: none; }
}

/* ===== M8排线 筛选入口 & 横幅 ===== */
.az-filter-m8 {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px dashed #d2d2d7;
    color: #0071e3;
    font-weight: 500;
}
.az-filter-m8:hover {
    background: rgba(0,113,227,0.06);
}
.az-filter-m8.active .az-radio-dot {
    background: #0071e3;
    border-color: #0071e3;
}

/* ===== 二级筛选组（排线 -> M8/M9/M3） ===== */
.az-filter-parent {
    position: relative;
    padding-right: 28px;
}
.az-expand-arrow {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #86868b;
    transition: transform 0.2s;
    cursor: pointer;
    padding: 4px 6px;
    user-select: none;
    border-radius: 4px;
}
.az-expand-arrow:hover {
    background: rgba(0,0,0,0.06);
    color: #1d1d1f;
}
.az-expand-arrow.collapsed {
    transform: translateY(-50%) rotate(-90deg);
}
.az-filter-children {
    padding-left: 20px;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease;
    max-height: 200px;
    opacity: 1;
}
.az-filter-children.collapsed {
    max-height: 0;
    opacity: 0;
}
.az-filter-child {
    font-size: 13px;
    color: var(--apple-gray-5);
    padding: 4px 0;
}
.az-filter-child:hover {
    color: var(--apple-blue);
}
.az-filter-child.active {
    color: var(--apple-blue);
    font-weight: 500;
}

.az-m8-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
    border: 1px solid #d2d2d7;
    border-radius: 20px;
    padding: 40px 36px;
    margin: 8px 0;
}
.az-m8-banner-icon {
    font-size: 52px;
    line-height: 1;
    flex-shrink: 0;
}
.az-m8-banner-body {
    flex: 1;
}
.az-m8-banner-title {
    font-size: 24px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 8px;
}
.az-m8-banner-sub {
    font-size: 14px;
    color: #6e6e73;
    line-height: 1.5;
}
.az-m8-banner-btn {
    flex-shrink: 0;
    background: #0071e3;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 980px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}
.az-m8-banner-btn:hover {
    background: #004a8f;
}
@media (max-width: 768px) {
    .az-m8-banner {
        flex-direction: column;
        text-align: center;
        padding: 28px 20px;
    }
    .az-m8-banner-icon { font-size: 40px; }
    .az-m8-banner-title { font-size: 20px; }
}

/* 用户区域加载占位动画 */
@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}
.user-area-loading {
    vertical-align: middle;
}

/* ===== 苹果风格横向筛选导航栏 ===== */
.az-nav-filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--apple-gray-2);
    margin-bottom: 16px;
    background: var(--apple-white);
    position: relative;
}
.az-nav-filter-group {
    position: relative;
}
.az-nav-filter-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--apple-gray-5);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}
.az-nav-filter-trigger:hover,
.az-nav-filter-trigger.active {
    color: var(--apple-text);
    background: var(--apple-gray);
}
.az-nav-filter-trigger.active {
    color: var(--apple-blue);
    font-weight: 600;
}
.az-nav-arrow {
    font-size: 10px;
    transition: transform 0.2s;
    margin-left: 2px;
}
.az-nav-filter-trigger.active .az-nav-arrow {
    transform: rotate(180deg);
}
.az-nav-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scale(0.96);
    transform-origin: top center;
    min-width: 220px;
    max-width: 320px;
    max-height: 420px;
    overflow-y: auto;
    background: var(--apple-white);
    border: 1px solid var(--apple-gray-2);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.25,0.46,0.45,0.94);
    z-index: 100;
}
.az-nav-dropdown.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
}
.az-nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    font-size: 14px;
    color: var(--apple-text);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.az-nav-dropdown-item:hover {
    background: var(--apple-gray);
    color: var(--apple-blue);
}
.az-nav-dropdown-item.active {
    color: var(--apple-blue);
    font-weight: 600;
    background: rgba(0,113,227,0.06);
}
.az-nav-dropdown-divider {
    height: 1px;
    background: var(--apple-gray-2);
    margin: 6px 12px;
}
.az-nav-dropdown-header {
    padding: 6px 18px 2px;
    font-size: 11px;
    font-weight: 600;
    color: var(--apple-gray-4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.az-nav-clear {
    padding: 8px 16px;
    font-size: 13px;
    color: var(--apple-blue);
    background: transparent;
    border: 1px solid var(--apple-gray-2);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 8px;
    white-space: nowrap;
}
.az-nav-clear:hover {
    background: var(--apple-blue-light);
    border-color: var(--apple-blue);
}
.az-nav-clear.hidden { display: none; }

/* 下拉面板内的 M8/M9/M3 子项 */
.az-nav-dropdown-child {
    padding-left: 36px;
    font-size: 13px;
    color: var(--apple-gray-5);
}
.az-nav-dropdown-child:hover {
    color: var(--apple-blue);
}

/* ===== 平铺类目标签导航 ===== */
.az-nav-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}
.az-nav-tab {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--apple-gray-5);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    white-space: nowrap;
    position: relative;
}
.az-nav-tab:hover {
    color: var(--apple-text);
    background: var(--apple-gray);
}
.az-nav-tab.active {
    color: var(--apple-blue);
    font-weight: 600;
    border-bottom-color: var(--apple-blue);
    background: rgba(0,113,227,0.04);
}

/* 带子菜单的标签组 */
.az-nav-tab-group {
    position: relative;
}
.az-nav-tab-group .az-nav-tab {
    padding-right: 14px;
}
.az-nav-tab-group::after {
    content: '▾';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    color: var(--apple-gray-4);
    pointer-events: none;
}

/* 子菜单 */
.az-nav-tab-submenu {
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    min-width: 160px;
    background: var(--apple-white);
    border: 1px solid var(--apple-gray-2);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.25,0.46,0.45,0.94);
    z-index: 100;
}
.az-nav-tab-group:hover .az-nav-tab-submenu,
.az-nav-tab-submenu:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.az-nav-tab-submenu-item {
    padding: 8px 18px;
    font-size: 13px;
    color: var(--apple-text);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.az-nav-tab-submenu-item:hover {
    background: var(--apple-gray);
    color: var(--apple-blue);
}
.az-nav-tab-submenu-item.active {
    color: var(--apple-blue);
    font-weight: 600;
    background: rgba(0,113,227,0.06);
}

/* 桌面端隐藏 sidebar 中的品类/品牌 */
@media (min-width: 901px) {
    .az-desktop-hidden { display: none !important; }
}

/* 移动端隐藏顶部导航栏 */
@media (max-width: 900px) {
    .az-nav-filter-bar { display: none !important; }
    .az-desktop-hidden { display: block !important; }
}

/* ========== 图标选择器 ========== */
.icon-picker-selected {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 2px solid var(--apple-gray-3);
    border-radius: var(--radius-md);
    background: var(--apple-gray);
    margin-bottom: 8px;
    cursor: default;
    transition: border-color .2s, box-shadow .2s;
}
.icon-picker-selected.has-icon {
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
}
.icon-picker-preview {
    font-size: 24px;
    line-height: 1;
}
.icon-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
    padding: 10px;
    background: var(--apple-white);
    border: 1px solid var(--apple-gray-2);
    border-radius: var(--radius-md);
}
.icon-picker-group-title {
    width: 100%;
    font-size: 11px;
    font-weight: 600;
    color: var(--apple-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 2px 2px;
    margin-top: 2px;
}
.icon-picker-item {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: all .15s;
    user-select: none;
}
.icon-picker-item:hover {
    background: var(--apple-blue-light);
    border-color: var(--apple-blue);
    transform: scale(1.12);
}
.icon-picker-item.active {
    background: var(--apple-blue);
    border-color: var(--apple-blue);
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(0,113,227,0.3);
}
.icon-picker-clear {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--apple-text-secondary);
    cursor: pointer;
    margin-top: 6px;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    transition: all .15s;
}
.icon-picker-clear:hover {
    color: var(--apple-red);
    background: var(--apple-red-light);
}
/* 窄滚动条 */
.icon-picker-grid::-webkit-scrollbar { width: 5px; }
.icon-picker-grid::-webkit-scrollbar-track { background: transparent; }
.icon-picker-grid::-webkit-scrollbar-thumb { background: var(--apple-gray-3); border-radius: 10px; }

/* ========== 密码输入框 + 眼睛切换 ========== */
.password-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.password-input-wrap .form-input {
    padding-right: 44px;
    width: 100%;
}
.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background .15s;
    padding: 0;
    color: var(--apple-gray-4);
}
.password-toggle:hover {
    background: var(--apple-gray);
    color: var(--apple-text);
}

/* 记住我 */
.remember-me-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--apple-text-secondary);
    cursor: pointer;
    user-select: none;
    margin-top: 4px;
}
.remember-me-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--apple-blue);
    cursor: pointer;
}

/* ========== 服务与支持页 ========== */
.support-hero {
    background: linear-gradient(135deg, #1d1d1f 0%, #3a3a3c 100%);
    padding: 60px 20px;
    text-align: center;
    color: #fff;
}
.support-hero-content { max-width: 600px; margin: 0 auto; }
.support-hero-icon { font-size: 56px; margin-bottom: 16px; }
.support-hero h1 { font-size: 36px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.5px; }
.support-hero p { font-size: 17px; color: rgba(255,255,255,0.7); margin: 0; }

/* Category Tabs */
.support-tabs {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin: -28px 0 24px;
    justify-content: center;
}
.support-tab {
    padding: 10px 20px; border-radius: 20px; border: 1px solid var(--apple-gray-3);
    background: #fff; font-size: 14px; font-weight: 500; cursor: pointer;
    transition: all 0.2s; color: var(--apple-gray-6); white-space: nowrap;
}
.support-tab:hover { border-color: var(--apple-blue); color: var(--apple-blue); }
.support-tab.active {
    background: var(--apple-blue); color: #fff; border-color: var(--apple-blue);
}

/* Search */
.support-search-wrap {
    position: relative; max-width: 420px; margin: 0 auto 20px;
}
.support-search {
    width: 100%; padding: 10px 16px 10px 40px;
    border-radius: 10px; font-size: 15px;
}
.support-search-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    font-size: 16px; pointer-events: none;
}
.support-info-bar {
    text-align: center; margin-bottom: 16px;
    font-size: 13px; color: var(--apple-gray-5);
}

/* Download Table */
.support-table { font-size: 14px; }
.support-table thead th { font-weight: 600; white-space: nowrap; }
.support-file-name { font-weight: 600; color: var(--apple-gray-7); margin-bottom: 2px; }
.support-file-desc { font-size: 12px; color: var(--apple-gray-5); margin-bottom: 6px; }
.support-cat-tag {
    display: inline-block; padding: 2px 8px; border-radius: 10px;
    font-size: 11px; font-weight: 600; text-transform: uppercase;
}
.support-cat-software { background: #e8f4fd; color: #0071e3; }
.support-cat-driver { background: #fff3e0; color: #e65100; }
.support-cat-manual { background: #e8f5e9; color: #2e7d32; }
.support-cat-spec { background: #fff8e1; color: #ff9500; }
.support-cat-video { background: #fce4ec; color: #c62828; }
.support-format-badge {
    display: inline-block; padding: 3px 10px; border-radius: 6px;
    background: var(--apple-gray-2); font-size: 13px; font-weight: 500;
}
.support-dl-btn {
    padding: 6px 16px; font-size: 13px; border-radius: 8px;
    transition: all 0.2s;
}
.support-dl-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,113,227,0.3); }

/* Empty State */
.support-empty { text-align: center; padding: 80px 20px; }
.support-empty-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.5; }
.support-empty-text { font-size: 17px; color: var(--apple-gray-5); }

/* CTA */
.support-cta {
    margin-top: 48px; padding: 40px; text-align: center;
    background: var(--apple-gray-1); border-radius: 16px;
}
.support-cta-icon { font-size: 40px; margin-bottom: 12px; }
.support-cta h3 { font-size: 22px; font-weight: 700; margin: 0 0 8px; color: var(--apple-gray-7); }
.support-cta p { font-size: 15px; color: var(--apple-gray-5); max-width: 480px; margin: 0 auto 20px; }
.support-cta-links { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; font-size: 14px; color: var(--apple-gray-6); }

@media (max-width: 640px) {
    .support-hero { padding: 40px 16px; }
    .support-hero h1 { font-size: 26px; }
    .support-hero p { font-size: 15px; }
    .support-tabs { margin-top: -18px; }
    .support-tab { padding: 8px 14px; font-size: 13px; }
    .support-cta { padding: 28px 20px; margin-top: 32px; }
    .support-table { font-size: 12px; }
    .support-table th:nth-child(3),
    .support-table td:nth-child(3) { display: none; }
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #d1d1d6;
    border-radius: 24px;
    transition: .3s;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-switch input:checked + .toggle-slider {
    background-color: var(--apple-green);
}
.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* 下载管理排序按钮 */
.dl-sort-btn {
    padding: 2px 6px !important;
    font-size: 11px !important;
    min-width: 24px;
    line-height: 1;
}
