/* ============================================================
   iFashionHat Amazon Theme — 主样式
   Amazon.com (中文版) 风格设计
   ============================================================ */

/* ====== CSS 变量 ====== */
:root {
    /* Amazon 颜色系统 */
    --ifh-nav-bg: #131921;
    --ifh-nav-sub-bg: #232f3e;
    --ifh-accent: #febd69;
    --ifh-accent-hover: #ffa41c;
    --ifh-accent-dark: #f3a847;
    --ifh-btn-buy: #ffd814;
    --ifh-btn-buy-hover: #f7ca00;
    --ifh-btn-checkout: #ffa41c;
    --ifh-btn-checkout-hover: #fb9a0b;
    
    --ifh-text-primary: #0f1111;
    --ifh-text-secondary: #565959;
    --ifh-text-link: #007185;
    --ifh-text-link-hover: #c7511f;
    --ifh-text-price: #b12704;
    --ifh-text-price-old: #565959;
    
    --ifh-bg-body: #eaeded;
    --ifh-bg-white: #ffffff;
    --ifh-bg-card: #ffffff;
    --ifh-bg-section: #f5f5f5;
    --ifh-border: #ddd;
    --ifh-border-light: #e7e7e7;
    --ifh-border-focus: #007185;
    
    --ifh-star-color: #de7921;
    --ifh-star-empty: #ccc;
    
    --ifh-footer-bg: #232f3e;
    --ifh-footer-bottom-bg: #131a22;
    --ifh-footer-text: #dddddd;
    --ifh-footer-link: #999;
    
    --ifh-success: #067d62;
    --ifh-error: #b12704;
    --ifh-warning: #c45500;
    
    /* 尺寸 */
    --ifh-container: 1280px;
    --ifh-gap: 16px;
    --ifh-radius: 8px;
    --ifh-radius-sm: 4px;
    --ifh-transition: .2s ease;
}

/* ====== Reset & Base ====== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ifh-text-primary);
    background: var(--ifh-bg-body);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--ifh-text-link); text-decoration: none; }
a:hover { color: var(--ifh-text-link-hover); }

img { max-width: 100%; height: auto; }
ul, ol { padding: 0; margin: 0; list-style: none; }

h1, h2, h3, h4, h5, h6 { 
    margin-top: 0; 
    font-family: 'Noto Serif SC', 'Noto Sans SC', serif;
    color: var(--ifh-text-primary);
}

.ifh-container {
    max-width: var(--ifh-container);
    margin: 0 auto;
    padding: 0 16px;
}

.ifh-container-wide {
    max-width: 100%;
    padding: 0 24px;
}

/* ====== 顶部通知栏 ====== */
.ifh-top-banner {
    background: var(--ifh-nav-bg);
    color: #999;
    font-size: 11px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
}

.ifh-top-banner .ifh-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ifh-top-banner-links a {
    color: #999;
    margin-left: 16px;
}

/* ====== 主头部 (Amazon 深蓝) ====== */
.ifh-header {
    background: var(--ifh-nav-bg);
}

.ifh-header-main .ifh-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Logo */
.ifh-header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ifh-logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.ifh-logo-text {
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    letter-spacing: -1px;
}

.ifh-logo-accent {
    color: var(--ifh-accent);
}

/* 搜索栏 (Amazon 核心) */
.ifh-header-search {
    flex: 1;
    max-width: 650px;
    margin: 0 auto;
    width: 100%;
}

.ifh-search-form {
    display: flex;
    border-radius: var(--ifh-radius-sm);
    overflow: hidden;
    background: #fff;
    border: 2px solid transparent;
    transition: border-color var(--ifh-transition);
}

.ifh-search-form:focus-within {
    border-color: var(--ifh-accent);
}

.ifh-search-category {
    width: 60px;
    border: none;
    background: #f3f3f3;
    padding: 8px 4px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    border-right: 1px solid #ddd;
    flex-shrink: 0;
}

.ifh-search-input {
    flex: 1;
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
    min-width: 0;
}

.ifh-search-btn {
    background: var(--ifh-accent);
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ifh-text-primary);
    flex-shrink: 0;
    transition: background var(--ifh-transition);
}

.ifh-search-btn:hover { 
    background: var(--ifh-accent-hover); 
}

/* 右侧操作区 */
.ifh-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.ifh-header-action {
    padding: 4px 6px;
    border: 1px solid transparent;
    border-radius: 2px;
    transition: border var(--ifh-transition);
}

.ifh-header-action:hover {
    border-color: #fff;
}

.ifh-action-link {
    display: flex;
    flex-direction: column;
    color: #fff;
    text-decoration: none;
    line-height: 1.2;
}

.ifh-action-label {
    font-size: 11px;
    color: #ccc;
}

.ifh-action-value {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.ifh-action-icon {
    display: flex;
    align-items: center;
    color: #fff;
}

.ifh-lang-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    cursor: pointer;
}

.ifh-lang-selector .ifh-action-text {
    font-size: 13px;
    font-weight: 700;
}

/* 购物车图标 */
.ifh-cart-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    text-decoration: none;
}

.ifh-cart-icon-wrap {
    position: relative;
    display: flex;
}

.ifh-cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--ifh-accent);
    color: var(--ifh-text-primary);
    font-size: 11px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ifh-cart-text {
    font-size: 13px;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.ifh-cart-total {
    font-size: 11px;
    font-weight: 400;
    color: #ccc;
}

/* ====== 次级导航 (Amazon 灰条) ====== */
.ifh-header-nav {
    background: var(--ifh-nav-sub-bg);
    color: #fff;
}

.ifh-header-nav .ifh-container {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
}

.ifh-nav-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 2px;
    flex-shrink: 0;
}

.ifh-nav-menu-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    min-width: 0;
}

.ifh-nav-menu-wrap::-webkit-scrollbar {
    display: none;
}

.ifh-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.ifh-nav-menu li a {
    display: block;
    padding: 8px 10px;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 2px;
    white-space: nowrap;
}

.ifh-nav-menu li a:hover {
    border-color: rgba(255,255,255,.4);
}

.ifh-nav-promo {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.ifh-nav-promo a {
    color: #fff;
    font-size: 13px;
    padding: 8px 10px;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 2px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ifh-nav-promo a:hover {
    border-color: rgba(255,255,255,.4);
}

/* ====== 主内容区 ====== */
.ifh-main {
    min-height: 400px;
    padding: 20px 0;
}

.ifh-front-main {
    padding: 0;
}

/* ====== 面包屑 ====== */
.ifh-breadcrumb {
    font-size: 12px;
    color: var(--ifh-text-secondary);
    padding: 8px 0;
    margin-bottom: 12px;
}

.ifh-breadcrumb a {
    color: var(--ifh-text-link);
}

/* ====== 按钮系统 (Amazon 风格) ====== */
.ifh-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    border-radius: 20px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--ifh-transition);
    text-decoration: none;
    line-height: 1.4;
}

.ifh-btn-primary {
    background: var(--ifh-accent);
    color: var(--ifh-text-primary);
    border-color: var(--ifh-accent);
}

.ifh-btn-primary:hover {
    background: var(--ifh-accent-hover);
    color: var(--ifh-text-primary);
}

.ifh-btn-secondary {
    background: transparent;
    border-color: #888;
    color: var(--ifh-text-primary);
}

.ifh-btn-secondary:hover {
    border-color: var(--ifh-text-primary);
}

.ifh-btn-hero {
    background: var(--ifh-accent);
    color: var(--ifh-text-primary);
    font-weight: 700;
    padding: 12px 32px;
    font-size: 16px;
    border-radius: 24px;
}

.ifh-btn-hero:hover {
    background: var(--ifh-accent-hover);
}

.ifh-btn-buy {
    background: var(--ifh-btn-buy);
    border-color: var(--ifh-btn-buy);
    color: var(--ifh-text-primary);
    width: 100%;
    padding: 12px;
    font-weight: 700;
    border-radius: 24px;
}

.ifh-btn-buy:hover {
    background: var(--ifh-btn-buy-hover);
}

.ifh-btn-checkout {
    background: var(--ifh-btn-checkout);
    border-color: var(--ifh-btn-checkout);
    color: #fff;
    width: 100%;
    padding: 12px;
    font-weight: 700;
    border-radius: 24px;
}

.ifh-btn-checkout:hover {
    background: var(--ifh-btn-checkout-hover);
}

.ifh-btn-large {
    padding: 16px 40px;
    font-size: 16px;
}

/* ====== 首页 — 公告栏 ====== */
.ifh-announcement-bar {
    background: var(--ifh-nav-bg);
    color: #fff;
    text-align: center;
    padding: 10px 0;
    font-size: 13px;
}

.ifh-announcement-link {
    color: var(--ifh-accent);
    margin-left: 8px;
    font-weight: 500;
}

/* ====== 首页 — 轮播 ====== */
.ifh-hero-carousel {
    background: var(--ifh-nav-bg);
    padding: 20px 0;
    position: relative;
}

.ifh-carousel-track {
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

.ifh-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity .6s ease;
    pointer-events: none;
}

.ifh-carousel-slide.active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}

.ifh-hero-card {
    border-radius: 16px;
    padding: 48px 40px;
    min-height: 280px;
    display: flex;
    align-items: center;
}

.ifh-hero-dark {
    background: linear-gradient(135deg, #1a2634 0%, #2c3e50 100%);
    color: #fff;
}

.ifh-hero-light {
    background: linear-gradient(135deg, #f5f0e8 0%, #fff 100%);
    color: var(--ifh-text-primary);
}

.ifh-hero-accent {
    background: linear-gradient(135deg, #232f3e 0%, #1a3a4a 100%);
    color: #fff;
}

.ifh-hero-content h2 {
    font-size: 32px;
    margin-bottom: 12px;
    font-weight: 700;
}

.ifh-hero-content p {
    font-size: 16px;
    opacity: .9;
    margin-bottom: 20px;
}

.ifh-hero-prices {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
}

.ifh-hero-price-label {
    font-size: 14px;
    opacity: .8;
}

.ifh-hero-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--ifh-accent);
}

/* 轮播圆点 */
.ifh-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,.3);
    cursor: pointer;
    transition: background var(--ifh-transition);
}

.dot.active {
    background: var(--ifh-accent);
}

/* ====== 通用区块 ====== */
.ifh-section {
    padding: 32px 0;
}

.ifh-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ifh-section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--ifh-text-primary);
}

.ifh-section-header .ifh-section-title {
    margin-bottom: 0;
}

.ifh-section-link {
    font-size: 14px;
    color: var(--ifh-text-link);
    font-weight: 500;
}

.ifh-section-link:hover {
    color: var(--ifh-text-link-hover);
}

/* ====== 首页 — 分类卡片 (Amazon 风格) ====== */
.ifh-category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.ifh-category-card {
    background: var(--ifh-bg-white);
    border-radius: 12px;
    padding: 20px 12px;
    text-align: center;
    text-decoration: none;
    border: 1px solid var(--ifh-border-light);
    transition: all var(--ifh-transition);
    display: block;
}

.ifh-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    text-decoration: none;
}

.ifh-cat-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--ifh-bg-body);
}

.ifh-cat-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ifh-cat-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ifh-cat-placeholder svg {
    width: 52px;
    height: 42px;
    display: block;
}

.ifh-cat-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--ifh-text-primary);
}

.ifh-cat-count {
    font-size: 11px;
    color: var(--ifh-text-secondary);
}

/* ====== 产品网格 (Amazon 4列风格) ====== */
.ifh-product-grid {
    display: grid;
    gap: 16px;
}

.ifh-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* 产品卡片 */
.ifh-product-card {
    background: var(--ifh-bg-white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--ifh-border-light);
    transition: all var(--ifh-transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.ifh-product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

.ifh-product-link {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 12px;
    flex: 1;
}

.ifh-product-image {
    position: relative;
    padding-bottom: 100%;
    background: var(--ifh-bg-body);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.ifh-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    transition: transform var(--ifh-transition);
}

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

.ifh-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 3px;
    z-index: 2;
}

.ifh-badge-sale {
    background: #b12704;
    color: #fff;
}

.ifh-badge-new {
    background: #007185;
    color: #fff;
}

.ifh-product-info {
    padding: 0;
}

.ifh-product-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--ifh-text-primary);
}

/* 评分 */
.ifh-product-rating {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.ifh-product-rating .star-rating {
    font-size: 12px;
    color: var(--ifh-star-color);
}

.ifh-rating-count {
    color: var(--ifh-text-link);
    font-size: 12px;
}

.ifh-no-rating span {
    color: var(--ifh-text-secondary);
    font-size: 12px;
}

/* 价格 */
.ifh-product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--ifh-text-price);
    margin-bottom: 4px;
}

.ifh-product-price ins {
    text-decoration: none;
    font-weight: 700;
}

.ifh-product-price del {
    font-size: 12px;
    color: var(--ifh-text-price-old);
    font-weight: 400;
    margin-left: 4px;
}

.ifh-product-variations {
    margin-top: 6px;
    font-size: 11px;
    color: var(--ifh-text-secondary);
}

.ifh-attr-pill {
    display: inline-block;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 4px;
    margin-bottom: 2px;
}

/* 加入购物车按钮 */
.ifh-product-actions {
    padding: 0 12px 12px;
}

.ifh-add-to-cart-btn {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: var(--ifh-btn-buy);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ifh-text-primary);
    text-align: center;
    text-decoration: none;
    transition: background var(--ifh-transition);
}

.ifh-add-to-cart-btn:hover {
    background: var(--ifh-btn-buy-hover);
    color: var(--ifh-text-primary);
}

/* ====== 信任标志条 ====== */
.ifh-trust-section {
    background: var(--ifh-bg-white);
    border-top: 1px solid var(--ifh-border);
    border-bottom: 1px solid var(--ifh-border);
}

.ifh-trust-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 32px 0;
}

.ifh-trust-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.ifh-trust-icon {
    font-size: 32px;
}

.ifh-trust-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--ifh-text-primary);
}

.ifh-trust-desc {
    font-size: 12px;
    color: var(--ifh-text-secondary);
}

/* ====== bbPress 论坛 - 简约设计 ====== */
.ifh-bbp-archive,
.ifh-bbp-single-forum,
.ifh-bbp-single-topic {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* ===== 搜索 ===== */
.ifh-bbp-search {
    margin-bottom: 32px;
}
.ifh-bbp-search-form {
    display: flex;
    gap: 8px;
    max-width: 480px;
    background: var(--ifh-bg-white);
    border: 1px solid var(--ifh-border);
    border-radius: 8px;
    padding: 4px 4px 4px 12px;
    align-items: center;
    transition: box-shadow .2s;
}
.ifh-bbp-search-form:focus-within {
    box-shadow: 0 0 0 3px rgba(0,113,133,.15);
    border-color: var(--ifh-link-color);
}
.ifh-bbp-search-label {
    display: flex;
    color: var(--ifh-text-muted);
    line-height: 0;
}
.ifh-bbp-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 8px 0;
    background: transparent;
    color: var(--ifh-text-primary);
}
.ifh-bbp-search-btn {
    background: var(--ifh-link-color);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.ifh-bbp-search-btn:hover {
    background: var(--ifh-link-hover);
}

/* ===== 论坛卡片列表 ===== */
.ifh-bbp-forums-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== 单个论坛卡片 ===== */
.ifh-bbp-forum-card {
    background: var(--ifh-bg-white);
    border: 1px solid var(--ifh-border);
    border-radius: 12px;
    transition: box-shadow .2s;
}
.ifh-bbp-forum-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.ifh-bbp-forum-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
}
.ifh-bbp-forum-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    color: var(--ifh-link-color);
    margin-top: 2px;
}
.ifh-bbp-forum-info {
    flex: 1;
    min-width: 0;
}
.ifh-bbp-forum-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 6px;
}
.ifh-bbp-forum-title a {
    color: var(--ifh-text-primary);
    text-decoration: none;
}
.ifh-bbp-forum-title a:hover {
    color: var(--ifh-link-color);
}
.ifh-bbp-forum-desc {
    font-size: 13px;
    color: var(--ifh-text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}
.ifh-bbp-subforums {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.ifh-bbp-subforums ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ifh-bbp-subforums li {
    margin: 0;
    padding: 0;
}
.ifh-bbp-subforums a {
    display: inline-block;
    font-size: 12px;
    padding: 3px 10px;
    background: var(--ifh-bg-body);
    border-radius: 20px;
    color: var(--ifh-link-color);
    text-decoration: none;
}
.ifh-bbp-subforums a:hover {
    background: var(--ifh-border);
}

/* ===== 统计数据列 ===== */
.ifh-bbp-forum-stats {
    display: flex;
    gap: 24px;
    flex-shrink: 0;
    padding: 0 16px;
}
.ifh-bbp-stat-item {
    text-align: center;
}
.ifh-bbp-stat-sm .ifh-bbp-stat-num {
    font-size: 15px;
}
.ifh-bbp-stat-sm .ifh-bbp-stat-label {
    font-size: 10px;
}
.ifh-bbp-stat-num {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--ifh-text-primary);
    line-height: 1.2;
}
.ifh-bbp-stat-label {
    display: block;
    font-size: 11px;
    color: var(--ifh-text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ===== 最近活动 ===== */
.ifh-bbp-forum-freshness {
    flex-shrink: 0;
    min-width: 130px;
    text-align: right;
    padding-left: 16px;
    border-left: 1px solid var(--ifh-border-light);
}
.ifh-bbp-freshness-link {
    font-size: 12px;
    color: var(--ifh-text-secondary);
    margin-bottom: 4px;
}
.ifh-bbp-freshness-link a {
    color: var(--ifh-text-primary);
    text-decoration: none;
}
.ifh-bbp-freshness-link a:hover {
    color: var(--ifh-link-color);
}
.ifh-bbp-freshness-author {
    display: flex;
    justify-content: flex-end;
}
.ifh-bbp-freshness-author .bbp-author-avatar img {
    border-radius: 50%;
    width: 24px;
    height: 24px;
}

/* ===== 话题列表行 ===== */
.ifh-bbp-topics-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--ifh-border);
    border: 1px solid var(--ifh-border);
    border-radius: 10px;
    overflow: hidden;
}
.ifh-bbp-topic-row {
    background: var(--ifh-bg-white);
}
.ifh-bbp-topic-row:hover {
    background: #fafafa;
}
.ifh-bbp-topic-row-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}
.ifh-bbp-topic-status-icon {
    flex-shrink: 0;
    width: 20px;
    display: flex;
    align-items: center;
}
.ifh-bbp-topic-content {
    flex: 1;
    min-width: 0;
}
.ifh-bbp-topic-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 3px;
}
.ifh-bbp-topic-title a {
    color: var(--ifh-text-primary);
    text-decoration: none;
}
.ifh-bbp-topic-title a:hover {
    color: var(--ifh-link-color);
}
.ifh-bbp-topic-meta {
    font-size: 12px;
    color: var(--ifh-text-muted);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.ifh-bbp-topic-meta a {
    color: var(--ifh-link-color);
    text-decoration: none;
}
.ifh-bbp-topic-meta a:hover {
    text-decoration: underline;
}
.ifh-bbp-topic-stats {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}
.ifh-bbp-topic-freshness {
    flex-shrink: 0;
    min-width: 100px;
    text-align: right;
    padding-left: 12px;
    border-left: 1px solid var(--ifh-border-light);
    font-size: 12px;
}
.ifh-bbp-topic-freshness .ifh-bbp-freshness-author {
    justify-content: flex-end;
    margin-top: 2px;
}

/* ===== 回复卡片 ===== */
.ifh-bbp-replies-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ifh-bbp-reply-card {
    background: var(--ifh-bg-white);
    border: 1px solid var(--ifh-border);
    border-radius: 12px;
    overflow: hidden;
}
.ifh-bbp-reply-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--ifh-bg-body);
    border-bottom: 1px solid var(--ifh-border-light);
}
.ifh-bbp-reply-author {
    flex-shrink: 0;
}
.ifh-bbp-reply-author .bbp-author-avatar img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}
.ifh-bbp-reply-author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ifh-text-primary);
}
.ifh-bbp-reply-date {
    font-size: 12px;
    color: var(--ifh-text-muted);
    display: block;
}
.ifh-bbp-reply-admin-links {
    margin-left: auto;
}
.ifh-bbp-reply-admin-links a {
    font-size: 12px;
    color: var(--ifh-text-muted);
    text-decoration: none;
    margin-left: 8px;
}
.ifh-bbp-reply-admin-links a:hover {
    color: var(--ifh-link-color);
}
.ifh-bbp-reply-content {
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ifh-text-primary);
}

/* ===== 表单 ===== */
.ifh-bbp-topic-form,
.ifh-bbp-reply-form {
    background: var(--ifh-bg-white);
    border: 1px solid var(--ifh-border);
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}
.ifh-bbp-form-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px;
    color: var(--ifh-text-primary);
}
.ifh-bbp-form-fieldset {
    border: none;
    padding: 0;
    margin: 0;
}
.ifh-bbp-form-fieldset legend {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--ifh-text-secondary);
}
.ifh-bbp-form-topic-title {
    color: var(--ifh-text-primary);
}
.ifh-bbp-form-group {
    margin-bottom: 16px;
}
.ifh-bbp-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--ifh-text-primary);
}
.ifh-bbp-form-label-inline {
    font-size: 13px;
    color: var(--ifh-text-secondary);
    cursor: pointer;
}
.ifh-bbp-form-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--ifh-border);
    border-radius: 6px;
    background: var(--ifh-bg-body);
    color: var(--ifh-text-primary);
    box-sizing: border-box;
}
.ifh-bbp-form-input:focus {
    outline: none;
    border-color: var(--ifh-link-color);
    box-shadow: 0 0 0 3px rgba(0,113,133,.12);
}
.ifh-bbp-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}
.ifh-bbp-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
}
.ifh-bbp-btn-primary {
    background: var(--ifh-link-color);
    color: #fff;
}
.ifh-bbp-btn-primary:hover {
    background: var(--ifh-link-hover);
}
.ifh-bbp-btn-primary:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ===== 通知/提示 ===== */
.ifh-bbp-notice {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}
.ifh-bbp-notice-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}
.ifh-bbp-notice-info {
    background: #d1ecf1;
    border: 1px solid #17a2b8;
    color: #0c5460;
}

/* ===== 话题标题区 ===== */
.ifh-bbp-topic-header {
    margin-bottom: 20px;
}
.ifh-bbp-topic-main-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--ifh-text-primary);
}
.ifh-bbp-topic-admin-tools a {
    font-size: 12px;
    color: var(--ifh-text-muted);
    text-decoration: none;
    margin-right: 12px;
}
.ifh-bbp-topic-admin-tools a:hover {
    color: var(--ifh-link-color);
}

/* ===== 板块标题 ===== */
.ifh-bbp-section {
    margin-bottom: 32px;
}
.ifh-bbp-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ifh-text-primary);
    margin: 0 0 16px;
}
.ifh-bbp-topic-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.ifh-bbp-topic-toolbar .ifh-bbp-section-title {
    margin: 0;
}

/* ===== 话题创建按钮（在话题工具栏） ===== */
.ifh-bbp-topic-toolbar a.bbp-topic-form-link,
.ifh-bbp-topic-toolbar > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--ifh-link-color);
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
}
.ifh-bbp-topic-toolbar a.bbp-topic-form-link:hover,
.ifh-bbp-topic-toolbar > a:hover {
    background: var(--ifh-link-hover);
}

/* ===== 分页 ===== */
.bbp-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin: 16px 0;
    color: var(--ifh-text-muted);
}
.bbp-pagination-count {
    flex: 1;
}
.bbp-pagination-links {
    display: flex;
    gap: 4px;
}
.bbp-pagination-links a,
.bbp-pagination-links span.current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--ifh-border);
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    color: var(--ifh-text-primary);
    background: var(--ifh-bg-white);
}
.bbp-pagination-links span.current {
    background: var(--ifh-link-color);
    color: #fff;
    border-color: var(--ifh-link-color);
}
.bbp-pagination-links a:hover {
    border-color: var(--ifh-link-color);
    color: var(--ifh-link-color);
}

/* ===== 面包屑 ===== */
.ifh-bbp-archive .bbp-breadcrumb,
.ifh-bbp-single-forum .bbp-breadcrumb,
.ifh-bbp-single-topic .bbp-breadcrumb {
    font-size: 12px;
    margin-bottom: 16px;
    color: var(--ifh-text-muted);
}
.ifh-bbp-archive .bbp-breadcrumb a,
.ifh-bbp-single-forum .bbp-breadcrumb a,
.ifh-bbp-single-topic .bbp-breadcrumb a {
    color: var(--ifh-link-color);
    text-decoration: none;
}
.ifh-bbp-archive .bbp-breadcrumb a:hover,
.ifh-bbp-single-forum .bbp-breadcrumb a:hover,
.ifh-bbp-single-topic .bbp-breadcrumb a:hover {
    text-decoration: underline;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .ifh-bbp-forum-card-inner {
        flex-wrap: wrap;
        padding: 14px;
    }
    .ifh-bbp-forum-stats {
        gap: 16px;
        padding: 0;
        margin-left: 52px;
    }
    .ifh-bbp-forum-freshness {
        width: 100%;
        text-align: left;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--ifh-border-light);
        padding-top: 12px;
        margin-top: 8px;
    }
    .ifh-bbp-forum-freshness .ifh-bbp-freshness-author {
        justify-content: flex-start;
    }
    .ifh-bbp-topic-row-inner {
        flex-wrap: wrap;
        padding: 12px;
    }
    .ifh-bbp-topic-stats {
        display: none;
    }
    .ifh-bbp-topic-freshness {
        width: 100%;
        text-align: left;
        border-left: none;
        padding-left: 32px;
        padding-top: 6px;
    }
    .ifh-bbp-topic-freshness .ifh-bbp-freshness-author {
        justify-content: flex-start;
    }
}

/* ====== 底部资讯卡片 ====== */
.ifh-info-section {
    background: var(--ifh-bg-white);
}

.ifh-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.ifh-info-card {
    background: var(--ifh-bg-section);
    border-radius: 12px;
    padding: 28px;
}

.ifh-info-card h3 {
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 700;
}

.ifh-info-card ol {
    list-style: decimal;
    padding-left: 20px;
    margin-bottom: 16px;
}

.ifh-info-card ol li {
    margin-bottom: 8px;
    color: var(--ifh-text-secondary);
    font-size: 14px;
}

.ifh-info-card p {
    color: var(--ifh-text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.ifh-info-card a {
    color: var(--ifh-text-link);
    font-weight: 500;
}

/* ====== 回到顶部 ====== */
.ifh-back-to-top {
    display: block;
    background: #37475a;
    color: #fff;
    text-align: center;
    padding: 16px;
    font-size: 13px;
    text-decoration: none;
}

.ifh-back-to-top:hover {
    background: #485769;
    color: #fff;
}

/* ====== 底部 (Amazon 风格) ====== */
.ifh-footer {
    background: var(--ifh-nav-sub-bg);
    color: var(--ifh-footer-text);
}

.ifh-footer-main {
    padding: 48px 0 32px;
}

.ifh-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.ifh-footer-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.ifh-footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ifh-footer-menu li {
    margin-bottom: 8px;
}

.ifh-footer-menu li a,
.ifh-footer-menu.default li a {
    color: var(--ifh-footer-link);
    font-size: 13px;
    text-decoration: none;
}

.ifh-footer-menu li a:hover {
    color: #fff;
    text-decoration: underline;
}

.ifh-footer-contact p {
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--ifh-footer-link);
}

.ifh-footer-contact strong {
    color: #fff;
}

.ifh-footer-contact a {
    color: var(--ifh-footer-link);
}

.ifh-footer-social {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.ifh-footer-social .ifh-social-icon {
    font-size: 20px;
    opacity: .7;
    transition: opacity var(--ifh-transition);
}

.ifh-footer-social .ifh-social-icon:hover {
    opacity: 1;
}

/* 底部版权栏 */
.ifh-footer-bottom {
    background: var(--ifh-footer-bottom-bg);
    padding: 24px 0;
    text-align: center;
}

.ifh-footer-bottom-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}

.ifh-footer-bottom-links a {
    color: var(--ifh-footer-link);
    font-size: 12px;
}

.ifh-footer-bottom-links a:hover {
    color: #fff;
}

.ifh-footer-bottom-text {
    font-size: 11px;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* ====== 404 页面 ====== */
.ifh-404 {
    text-align: center;
    padding: 80px 20px;
}

.ifh-404-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.ifh-404 h1 {
    font-size: 28px;
    margin-bottom: 12px;
}

.ifh-404 p {
    color: var(--ifh-text-secondary);
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.ifh-404-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 32px;
}

.ifh-404-search form {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
}

.ifh-404-search input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--ifh-border);
    border-radius: 4px 0 0 4px;
}

.ifh-404-search button {
    padding: 10px 20px;
    background: var(--ifh-accent);
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 500;
}

/* ====== 页面标题 ====== */
.ifh-page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ifh-border-light);
}

.entry-content {
    background: var(--ifh-bg-white);
    padding: 24px;
    border-radius: var(--ifh-radius);
    border: 1px solid var(--ifh-border-light);
}

/* ====== 侧栏 ====== */
.ifh-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.ifh-content-area {
    flex: 1;
}

.ifh-page-layout {
    display: flex;
    gap: 24px;
}

.ifh-widget {
    margin-bottom: 20px;
    background: var(--ifh-bg-white);
    padding: 16px;
    border-radius: var(--ifh-radius);
    border: 1px solid var(--ifh-border-light);
}

.ifh-widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--ifh-border-light);
}
