/*
Theme Name: 日本百草 Yanchao
Theme URI: https://ribenbaicao.com
Author: RiBenBaiCao
Author URI: https://ribenbaicao.com
Description: 日本百草电商主题 - 精选烟丝、斗草及相关配料
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yanchao
Tags: e-commerce, custom-menu, custom-logo
*/

/* ========== 基础样式 ========== */
body {
    background-color: #f0f0f0;
    min-height: 100vh;
    position: relative;
}

/* ========== 导航菜单 ========== */
.active-menu {
    background-color: #525252;
    color: #f5f5f5;
}
.cart-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    background-color: #525252;
    color: #fff;
    border-radius: 9999px;
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
    line-height: 1;
    font-weight: bold;
}
.nav-item-wrapper:hover .dropdown-arrow,
.more-menu-container:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* 导航下拉菜单 */
.yanchao-dropdown {
    pointer-events: none;
}
.group:hover > .yanchao-dropdown,
.nav-item-wrapper:hover > .yanchao-dropdown,
.more-menu-container:hover > .yanchao-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
}
.yanchao-dropdown a:hover {
    padding-left: 20px;
}

/* ========== 公告栏上下轮播 ========== */
.notice-ticker {
    height: 1.5em;
    line-height: 1.5em;
    position: relative;
}
.notice-ticker-track {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.notice-ticker-item {
    height: 1.5em;
    line-height: 1.5em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== 手机端侧边栏抽屉 ========== */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}
.mobile-menu-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background-color: rgba(58, 42, 30, 0.98);
    backdrop-filter: blur(12px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
}
.mobile-menu-drawer.active {
    transform: translateX(0);
}
.mobile-menu-group {
    border-bottom: 1px solid rgba(210, 180, 140, 0.1);
}
.mobile-menu-group:last-child {
    border-bottom: none;
}
.mobile-submenu-toggle.expanded i {
    transform: rotate(180deg);
}

/* ========== 首页轮播图 ========== */
.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    display: inline-block;
    margin: 0 4px;
    cursor: pointer;
}
.carousel-indicator.active {
    background-color: white;
}

/* ========== 分类卡片渐变 ========== */
.category-gradient {
    background: linear-gradient(to top, rgba(23, 23, 23, 0.9) 0%, rgba(23, 23, 23, 0.2) 100%);
}

/* ========== 标题下划线 ========== */
.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: #525252;
    margin-top: 8px;
}

/* ========== 缺货遮罩 ========== */
.out-of-stock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}
.out-of-stock-stamp {
    background-color: #e53e3e;
    color: white;
    padding: 4px 16px;
    transform: rotate(-15deg);
    font-weight: bold;
    border: 2px solid white;
    border-radius: 4px;
    letter-spacing: 2px;
}

/* ========== 右侧浮动按钮 ========== */
.floating-btn {
    width: 48px;
    height: 48px;
    background-color: #525252;
    color: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}
.floating-btn:hover {
    background-color: #262626;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}
.floating-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid #f0f0f0;
}

/* ========== 购物车晃动动画 ========== */
@keyframes cartShake {
    0%   { transform: rotate(0deg); }
    15%  { transform: rotate(12deg) scale(1.15); }
    30%  { transform: rotate(-10deg) scale(1.15); }
    45%  { transform: rotate(8deg) scale(1.1); }
    60%  { transform: rotate(-6deg) scale(1.05); }
    75%  { transform: rotate(3deg); }
    100% { transform: rotate(0deg); }
}
.cart-shake {
    animation: cartShake 0.6s ease-in-out;
}

/* ========== 加入购物车 Toast ========== */
.cart-toast {
    position: fixed;
    top: 80px;
    right: 24px;
    background: #171717;
    color: #f5f5f5;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ========== 加入购物车按钮加载态 ========== */
.js-add-to-cart.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* ========== 客服弹窗 ========== */
.chat-window {
    position: fixed;
    bottom: 24px;
    right: 80px;
    width: 320px;
    height: 450px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
    transform-origin: bottom right;
    transition: all 0.3s ease;
}
.chat-window.show {
    display: flex;
    animation: slideUpFade 0.3s ease forwards;
}
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-header {
    background: linear-gradient(to right, #525252, #737373);
    color: #f5f5f5;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.chat-header-icon {
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}
.chat-action-btn {
    width: 24px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    color: white;
}
.chat-action-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}
.chat-body {
    flex: 1;
    background-color: #ffffff;
    padding: 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.chat-footer {
    border-top: 1px solid #f0f0f0;
    padding: 12px 16px;
    background-color: #ffffff;
}
.chat-welcome {
    text-align: center;
    padding: 24px 0 16px;
}
.chat-msg-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}
.chat-bubble {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}
.chat-bubble.user {
    align-self: flex-end;
    background-color: #525252;
    color: #f5f5f5;
    border-bottom-right-radius: 4px;
}
.chat-bubble.admin {
    align-self: flex-start;
    background-color: #f0f0f0;
    color: #333;
    border-bottom-left-radius: 4px;
}
.chat-bubble-time {
    font-size: 10px;
    color: #aaa;
    margin-top: 3px;
    padding: 0 4px;
}
.chat-bubble.user + .chat-bubble-time { text-align: right; }
.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-input-wrapper input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    outline: none;
    padding: 8px 14px;
    font-size: 13px;
    color: #333;
    background: #f9f9f9;
}
.chat-input-wrapper input::placeholder {
    color: #bbb;
}
.chat-send-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #525252;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}
.chat-send-btn:hover { background-color: #262626; }

/* ========== 购物车页面 ========== */
.cart-item {
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid transparent;
    transition: all 0.2s;
}
.cart-item:hover {
    border-color: rgba(210, 180, 140, 0.25);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.cart-item.removing {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.3s ease;
}
.cart-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #525252;
    cursor: pointer;
    flex-shrink: 0;
}
.cart-qty-input {
    width: 40px;
    height: 28px;
    border: 1px solid #a3a3a3;
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
    outline: none;
    color: #171717;
    -moz-appearance: textfield;
    appearance: textfield;
}
.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.cart-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #a3a3a3;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #525252;
    font-size: 12px;
    transition: all 0.2s;
}
.cart-qty-btn:hover {
    background-color: #525252;
    color: white;
    border-color: #525252;
}
.order-summary {
    background: white;
    border-radius: 8px;
    padding: 24px;
    position: sticky;
    top: 80px;
}
.checkout-btn {
    width: 100%;
    background-color: #525252;
    color: #f5f5f5;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    text-decoration: none;
}
.checkout-btn:hover {
    background-color: #262626;
}

/* ========== 分类页面 ========== */
.filter-tag {
    display: inline-block;
    border: 1px solid #a3a3a3;
    color: #525252;
    background-color: transparent;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
}
.filter-tag:hover {
    background-color: #525252;
    color: #f5f5f5;
}
.filter-tag.active {
    background-color: #525252;
    color: #f5f5f5;
    border-color: #525252;
}
.price-input {
    width: 70px;
    border: 1px solid #a3a3a3;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    outline: none;
    background-color: white;
    text-align: center;
    appearance: textfield;
    -moz-appearance: textfield;
}
.price-input::-webkit-outer-spin-button,
.price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qty-controls {
    display: flex;
    align-items: center;
    background-color: #fef0f0;
    border-radius: 9999px;
    padding: 2px 4px;
}
.qty-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    color: white;
    border: none;
}
.qty-minus {
    background-color: #fca5a5;
}
.qty-plus {
    background-color: #b45309;
}
.qty-val {
    font-size: 12px;
    width: 20px;
    text-align: center;
    font-weight: bold;
    color: #525252;
}
.pagination-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    color: #525252;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
}
.pagination-btn:hover {
    background-color: #fef3c7;
}
.pagination-btn.active {
    background-color: #525252;
    color: white;
}

/* ========== 个人中心 ========== */
.profile-card {
    background: white;
    border-radius: 8px;
    padding: 20px 24px;
}
.order-status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 12px 24px;
    border-radius: 8px;
    transition: background 0.2s;
    text-decoration: none;
}
.order-status-item:hover {
    background-color: #faf8f2;
}
.order-status-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #525252;
    font-size: 18px;
}
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    cursor: pointer;
    transition: color 0.2s;
    text-decoration: none;
    color: inherit;
}
.settings-row:hover {
    color: #525252;
}

/* ========== 收货地址页面 ========== */
.addr-tag-btn {
    display: inline-flex;
    align-items: center;
    border: 1px solid #a3a3a3;
    color: #525252;
    background: transparent;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}
.addr-tag-btn:hover,
.addr-tag-btn.active {
    background-color: #525252;
    color: #f5f5f5;
    border-color: #525252;
}
.addr-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 8px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.addr-card:hover {
    border-left-color: #a3a3a3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.addr-tag-label {
    display: inline-flex;
    align-items: center;
    background-color: #faf8f2;
    color: #525252;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
}
.addr-default-label {
    display: inline-flex;
    align-items: center;
    background-color: #525252;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
}
.addr-action-btn {
    border: none;
    background: none;
    color: #525252;
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    white-space: nowrap;
}
.addr-action-btn:hover {
    background-color: #faf8f2;
}
.addr-action-del {
    color: #ef4444;
}
.addr-action-del:hover {
    background-color: #fef2f2;
}
.addr-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}
.addr-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}
.addr-modal {
    background: #fdfbf7;
    border-radius: 12px;
    width: 520px;
    max-width: 94vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    animation: slideUpFade 0.25s ease;
    display: flex;
    flex-direction: column;
}
.addr-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #171717;
    margin-bottom: 8px;
}
.addr-input {
    width: 100%;
    border: 1px solid #a3a3a3;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    outline: none;
    background: white;
    color: #333;
    transition: border-color 0.2s;
}
.addr-input:focus {
    border-color: #525252;
}
.addr-select {
    width: 100%;
    border: 1px solid #a3a3a3;
    border-radius: 6px;
    padding: 10px 36px 10px 14px;
    font-size: 13px;
    outline: none;
    background: #f5f5f5;
    color: #171717;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s;
}
.addr-select:focus {
    border-color: #525252;
}
.addr-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.addr-tag-radio {
    display: inline-flex;
    align-items: center;
    border: none;
    color: #525252;
    background: rgba(163,163,163,0.3);
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.addr-tag-radio:hover {
    background: rgba(163,163,163,0.5);
}
.addr-tag-radio.active {
    background-color: #525252;
    color: #f5f5f5;
}

/* ========== 结账页 ========== */
.checkout-card {
    background: white;
    border-radius: 8px;
    padding: 20px 24px;
}
.add-address-btn {
    background-color: #525252;
    color: #f5f5f5;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    text-decoration: none;
}
.add-address-btn:hover {
    background-color: #262626;
}
.order-note-input {
    width: 100%;
    border: 1px solid #e8e2d8;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    outline: none;
    color: #171717;
    background-color: #fdfcf9;
    transition: border-color 0.2s;
    resize: none;
}
.order-note-input:focus {
    border-color: #525252;
    box-shadow: 0 0 0 3px rgba(82, 82, 82, 0.08);
}
.order-note-input::placeholder {
    color: #c4b9a8;
}
.summary-sticky {
    position: sticky;
    top: 80px;
}
.order-status-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
    padding: 0 4px;
    border-radius: 8px;
    background: #e74c3c;
    color: #fff;
}

/* ========== 订单页 ========== */
.order-tab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    font-size: 13px;
    color: #525252;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    background: transparent;
}
.order-tab:hover {
    background: rgba(163,163,163,0.2);
}
.order-tab.active {
    background: #525252;
    color: #f5f5f5;
}
.order-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 9px;
    padding: 0 5px;
    background: rgba(163,163,163,0.3);
    color: #525252;
}
.order-tab.active .order-tab-badge {
    background: rgba(255,255,255,0.25);
    color: #f5f5f5;
}
.order-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}
.order-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.order-pay-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #525252;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
}
.order-pay-btn:hover {
    background: #262626;
    color: #fff;
}
.order-pay-btn.disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    pointer-events: none;
}
.order-pay-countdown {
    font-variant-numeric: tabular-nums;
    opacity: 0.85;
}

/* ========== 支付页 ========== */
.pay-page-card {
    background: white;
    border-radius: 10px;
    padding: 20px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.pay-method-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1.5px solid #e5e5e5;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.pay-method-item.active {
    border-color: #525252;
    background: #fdfbf7;
}
.pay-method-check {
    opacity: 0;
    transition: opacity 0.2s;
}
.pay-method-item.active .pay-method-check {
    opacity: 1;
}


/* ============================================= */
/*  登录 / 注册 Modal                              */
/* ============================================= */
.yanchao-auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(23, 23, 23, 0.55);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.yanchao-auth-overlay.is-open {
    display: flex;
    animation: yanchaoAuthFade 0.2s ease;
}
@keyframes yanchaoAuthFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.yanchao-auth-dialog {
    position: relative;
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 400px;
    padding: 28px 28px 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    animation: yanchaoAuthSlide 0.25s ease;
}
@keyframes yanchaoAuthSlide {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}
.yanchao-auth-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #a3a3a3;
    cursor: pointer;
    font-size: 16px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}
.yanchao-auth-close:hover {
    background: #f5f5f5;
    color: #171717;
}
.yanchao-auth-header {
    text-align: center;
    margin-bottom: 18px;
}
.yanchao-auth-logo {
    width: 52px;
    height: 52px;
    background: #171717;
    color: #f5f5f5;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 12px;
}
.yanchao-auth-title {
    font-size: 20px;
    font-weight: 500;
    color: #171717;
    margin: 0 0 4px;
}
.yanchao-auth-sub {
    font-size: 12px;
    color: #b5a48e;
    margin: 0;
}
.yanchao-auth-tabs {
    display: flex;
    gap: 4px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 18px;
}
.yanchao-auth-tab {
    flex: 1;
    padding: 8px 0;
    border: none;
    background: transparent;
    color: #525252;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.yanchao-auth-tab.is-active {
    background: #fff;
    color: #171717;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.yanchao-auth-form { display: block; }
.yanchao-auth-form[hidden] { display: none; }
.yanchao-auth-field { margin-bottom: 14px; }
.yanchao-auth-field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #171717;
    margin-bottom: 6px;
}
.yanchao-auth-field label .req { color: #ef4444; }
.yanchao-auth-input-wrap {
    position: relative;
}
.yanchao-auth-input-wrap > i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #c4b9a8;
    font-size: 12px;
}
.yanchao-auth-input-wrap input {
    width: 100%;
    border: 1px solid #e0d9cf;
    border-radius: 6px;
    padding: 10px 12px 10px 36px;
    font-size: 13px;
    color: #171717;
    background: #fdfcf9;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.yanchao-auth-input-wrap input:focus {
    border-color: #525252;
    box-shadow: 0 0 0 3px rgba(82,82,82,0.08);
}
.yanchao-auth-remember {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #525252;
    margin-bottom: 12px;
    cursor: pointer;
}
.yanchao-auth-msg {
    min-height: 18px;
    font-size: 12px;
    color: #ef4444;
    margin-bottom: 6px;
}
.yanchao-auth-msg.is-success { color: #16a34a; }
.yanchao-auth-btn {
    width: 100%;
    background: #525252;
    color: #f5f5f5;
    padding: 11px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}
.yanchao-auth-btn:hover { background: #262626; }
.yanchao-auth-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.yanchao-auth-switch {
    text-align: center;
    font-size: 12px;
    color: #b5a48e;
    margin: 14px 0 0;
}
.yanchao-auth-switch a {
    color: #525252;
    font-weight: 500;
    text-decoration: none;
}
.yanchao-auth-switch a:hover { text-decoration: underline; }

/* ========== 产品详情页 ========== */
.product-content h1,
.product-content h2,
.product-content h3,
.product-content h4 {
    color: #171717;
    font-weight: 600;
    margin-top: 1.25em;
    margin-bottom: 0.5em;
}
.product-content h2 { font-size: 1.15rem; }
.product-content h3 { font-size: 1rem; }
.product-content p  { margin-bottom: 0.85em; line-height: 1.75; }
.product-content ul,
.product-content ol {
    padding-left: 1.4em;
    margin-bottom: 0.85em;
}
.product-content ul { list-style: disc; }
.product-content ol { list-style: decimal; }
.product-content li { margin-bottom: 0.3em; }
.product-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1em 0;
}
.product-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
    font-size: 0.875rem;
}
.product-content table th,
.product-content table td {
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    text-align: left;
}
.product-content table th { background-color: #f9f7f2; font-weight: 600; }
.product-content blockquote {
    border-left: 3px solid #a3a3a3;
    padding-left: 1em;
    color: #6b7280;
    font-style: italic;
    margin: 1em 0;
}

/* line-clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
