/* 前台样式 */
:root {
    --primary: #e4393c;
    --primary-dark: #c81623;
    --text: #333;
    --text-light: #666;
    --border: #e5e5e5;
    --bg: #f5f5f5;
    --white: #fff;
    --header-h: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
    background: var(--white);
}

/* 顶部：Logo + 搜索 + 购物车 */
.header-top {
    padding: 25px 0 30px;
    border-bottom: 1px solid var(--border);
}

.header-top-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
}

.site-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    min-width: 200px;
}

.site-logo:hover {
    color: var(--text);
}

.logo-img {
    max-height: 52px;
    max-width: 180px;
    object-fit: contain;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

/* 搜索区 */
.header-search {
    flex: 1;
    max-width: 560px;
}

.search-form {
    display: flex;
    height: 40px;
    border: 2px solid var(--primary);
    border-radius: 4px;
    overflow: hidden;
}

.search-input {
    flex: 1;
    border: none;
    padding: 0 14px;
    font-size: 14px;
    outline: none;
    min-width: 0;
}

.search-btn {
    width: 80px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .2s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

.hot-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
    padding-left: 2px;
}

.hot-keywords a {
    font-size: 12px;
    color: #999;
}

.hot-keywords a:hover {
    color: var(--primary);
}

/* 购物车按钮 */
.header-cart-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 0;
    transition: background .2s;
    white-space: nowrap;
}

.header-cart-btn:hover {
    background: var(--primary-dark);
    color: #fff;
}

.cart-icon {
    flex-shrink: 0;
}

/* 导航栏 */
.header-nav-bar {
    background: var(--white);
    border-bottom: 2px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.header-nav-inner {
    display: flex;
    align-items: center;
    height: 44px;
    gap: 16px;
}

.main-nav {
    flex: 1;
    display: flex;
    gap: 4px;
}

.main-nav a {
    padding: 6px 16px;
    color: var(--text);
    font-size: 15px;
    border-radius: 4px;
    transition: all .2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    background: #fff0f0;
}

.header-user {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.header-user a { color: var(--text-light); }
.header-user a:hover,
.header-user a.active { color: var(--primary); }

.user-greet {
    color: var(--text-light);
    font-size: 13px;
}

/* Main */
.site-main { flex: 1; padding: 24px 0; }
.site-main-wide { padding: 0; }

/* Banner */
.banner {
    background: linear-gradient(135deg, #e4393c, #ff6b6b);
    color: #fff;
    padding: 48px 0;
    text-align: center;
    margin-bottom: 24px;
    border-radius: 8px;
}

.banner h1 { font-size: 32px; margin-bottom: 8px; }
.banner p { font-size: 16px; opacity: .9; }

/* Product grid */
.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
    border: 1px solid var(--border);
}

.product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    transform: translateY(-2px);
}

.product-card .thumb {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f9f9f9;
}

.product-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card .info { padding: 12px; }

.product-card .title {
    font-size: 14px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
    margin-bottom: 8px;
}

.product-card .price {
    color: var(--primary);
    font-size: 18px;
    font-weight: 700;
}

.product-card .price .original {
    color: #999;
    font-size: 13px;
    text-decoration: line-through;
    font-weight: 400;
    margin-left: 6px;
}

/* Product detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    background: var(--white);
    padding: 24px;
    border-radius: 8px;
}

.product-gallery .main-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: #f9f9f9;
    border-radius: 8px;
}

.product-gallery .thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.product-gallery .thumbs img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
}

.product-gallery .thumbs img.active { border-color: var(--primary); }

.product-info h1 { font-size: 22px; margin-bottom: 12px; }
.product-info .price-box { margin: 16px 0; padding: 16px; background: #fff8f8; border-radius: 6px; }
.product-info .current-price { color: var(--primary); font-size: 28px; font-weight: 700; }
.product-info .meta { color: var(--text-light); font-size: 14px; margin: 8px 0; }
.product-content { margin-top: 24px; background: var(--white); padding: 24px; border-radius: 8px; }
.product-content h2 { font-size: 18px; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.product-content .content-body img,
.product-content .content-img img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 8px auto;
}

/* Footer */
.site-footer {
    background: #333;
    color: #bbb;
    margin-top: auto;
    font-size: 13px;
}

.footer-main {
    padding: 40px 0 32px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

.footer-col h4 {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #bbb;
}

.footer-col a:hover {
    color: #fff;
}

.footer-contact p {
    margin-bottom: 8px;
    line-height: 1.8;
    color: #bbb;
}

.footer-col > p {
    margin-bottom: 8px;
    line-height: 1.8;
    color: #bbb;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding: 20px 0;
    text-align: center;
    color: #999;
    line-height: 2;
}

.footer-bottom a {
    color: #bbb;
}

.footer-bottom a:hover {
    color: #fff;
}

/* Forms */
.auth-box {
    max-width: 400px;
    margin: 40px auto;
    background: var(--white);
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

.auth-box h2 { text-align: center; margin-bottom: 24px; font-size: 22px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--text-light); }
.form-group input {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 6px; font-size: 14px;
}
.form-group input:focus { outline: none; border-color: var(--primary); }

.btn {
    display: inline-block; padding: 10px 24px; background: var(--primary); color: #fff;
    border: none; border-radius: 6px; font-size: 15px; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn-block { width: 100%; }

.alert {
    padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px;
}
.alert-error { background: #fee; color: #c33; }
.alert-success { background: #efe; color: #363; }

.auth-links { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-light); }
.auth-agreements { margin-bottom: 20px; }
.auth-agreement-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-light);
    cursor: pointer;
    margin-bottom: 10px;
}
.auth-agreement-item:last-child { margin-bottom: 0; }
.auth-agreement-item input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
    flex-shrink: 0;
}
.auth-agreement-item a { color: var(--primary); }
.auth-agreement-item a:hover { text-decoration: underline; }
.login-notice { text-align: center; color: #666; font-size: 13px; margin-bottom: 16px; padding: 8px 12px; background: #fff8f0; border-radius: 6px; }

/* Pagination */
.pagination {
    display: flex; justify-content: center; gap: 6px; margin-top: 24px;
}
.pagination a, .pagination span {
    padding: 6px 12px; border: 1px solid var(--border); border-radius: 4px; font-size: 14px;
}
.pagination a:hover { border-color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Page content */
.page-content {
    background: var(--white);
    padding: 32px;
    border-radius: 8px;
    min-height: 300px;
}
.page-content h1 { margin-bottom: 20px; font-size: 24px; }

/* Filter bar */
.filter-bar {
    background: var(--white);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.filter-bar select, .filter-bar input {
    padding: 8px 12px; border: 1px solid var(--border); border-radius: 4px; font-size: 14px;
}

/* 产品中心布局 */
.product-center-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
    align-items: start;
}

.category-sidebar {
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
    position: sticky;
    top: 76px;
}

.category-sidebar-title {
    padding: 14px 16px;
    font-weight: 600;
    font-size: 15px;
    background: #fafafa;
    border-bottom: 1px solid var(--border);
}

.cat-nav { list-style: none; padding: 8px 0; margin: 0; }
.cat-nav-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    color: var(--text);
    font-size: 14px;
    transition: background .2s, color .2s;
}
.cat-nav-item a:hover { background: #fff8f8; color: var(--primary); }
.cat-nav-item.active > a { background: #fff0f0; color: var(--primary); font-weight: 600; }
.cat-nav-sub { list-style: none; padding: 0; margin: 0; }
.cat-nav-item.depth-1 a { padding-left: 28px; font-size: 13px; }
.cat-nav-item.depth-2 a { padding-left: 40px; font-size: 13px; }
.cat-nav-item.depth-3 a { padding-left: 52px; font-size: 13px; }
.cat-count { color: #999; font-size: 12px; }

.product-center-main { min-width: 0; }
.product-center-header { margin-bottom: 16px; }
.breadcrumb-trail { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.breadcrumb-trail a { color: var(--text-light); }
.breadcrumb-trail a:hover { color: var(--primary); }
.breadcrumb-trail .sep { margin: 0 6px; color: #ccc; }

.product-cat-tag {
    display: inline-block;
    font-size: 12px;
    color: var(--primary);
    background: #fff0f0;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 6px;
}

.no-thumb-placeholder {
    display: flex; align-items: center; justify-content: center;
    height: 100%; color: #ccc; font-size: 13px;
}

/* 首页分类 */
.home-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.home-category-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px 16px;
    text-align: center;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
}

.home-category-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(228, 57, 60, .1);
    color: var(--primary);
}

.home-cat-name { display: block; font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.home-cat-count { display: block; font-size: 13px; color: #999; }

@media (max-width: 768px) {
    .product-center-layout { grid-template-columns: 1fr; }
    .category-sidebar { position: static; }
}

/* Cart page - 旧样式保留兼容 */
.add-cart-bar { display: flex; gap: 12px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.login-tip { color: var(--text-light); font-size: 14px; width: 100%; margin-bottom: 4px; }
.login-tip a { color: var(--primary); font-weight: 600; }
.btn-add-cart { background: #ff9500; }
.btn-add-cart:hover { background: #e68600; color: #fff; }
.btn-buy-now { background: var(--primary); color: #fff; }
.btn-buy-now:hover { background: var(--primary-dark); color: #fff; }
.out-of-stock { color: #999; margin-top: 16px; font-size: 16px; }

.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.qty-btn {
    width: 32px; height: 32px; border: none; background: #f5f5f5; cursor: pointer; font-size: 16px;
}
.qty-btn:hover { background: #eee; }
.qty-input {
    width: 48px; height: 32px; border: none; border-left: 1px solid var(--border);
    border-right: 1px solid var(--border); text-align: center; font-size: 14px;
}

/* Cart page */
.cart-empty { text-align: center; padding: 60px 20px; background: var(--white); border-radius: 8px; }
.cart-empty p { color: #999; margin-bottom: 16px; font-size: 16px; }

.cart-table-wrap { background: var(--white); border-radius: 8px; overflow: hidden; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: left; }
.cart-table th { background: #fafafa; font-size: 13px; color: var(--text-light); }
.cart-table tr:last-child td { border-bottom: none; }

.cart-product-link { display: flex; align-items: center; gap: 12px; color: var(--text); }
.cart-product-link:hover { color: var(--primary); }
.cart-product-link img, .cart-product .no-thumb {
    width: 64px; height: 64px; object-fit: cover; border-radius: 4px; flex-shrink: 0;
    background: #f5f5f5;
}
.cart-product .no-thumb { display: flex; align-items: center; justify-content: center; font-size: 12px; color: #ccc; }
.cart-product-title { font-size: 14px; }
.cart-price, .cart-subtotal { color: var(--primary); font-weight: 600; }

.btn-link { background: none; border: none; color: #999; cursor: pointer; font-size: 13px; padding: 0; }
.btn-link:hover { color: var(--primary); }

.cart-footer {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--white); padding: 16px 20px; border-radius: 8px; margin-top: 16px; flex-wrap: wrap; gap: 12px;
}
.cart-footer-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cart-total-label { font-size: 14px; }
.cart-total-price { color: var(--primary); font-size: 22px; font-weight: 700; }
.btn-checkout { background: var(--primary); color: #fff; padding: 12px 32px; font-size: 16px; }
.btn-checkout:hover { background: var(--primary-dark); color: #fff; }

/* Checkout */
.checkout-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
.checkout-section { background: var(--white); border-radius: 8px; padding: 20px; margin-bottom: 16px; }
.checkout-section h3 { font-size: 16px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.checkout-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.checkout-section-head h3 { margin: 0; padding: 0; border: none; }
.checkout-address-link { font-size: 13px; color: var(--primary); }
.checkout-sidebar .checkout-summary { background: var(--white); border-radius: 8px; padding: 20px; position: sticky; top: 80px; }
.checkout-summary h3 { font-size: 16px; margin-bottom: 16px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.summary-row.total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 16px; font-size: 16px; font-weight: 600; }
.checkout-total { color: var(--primary); font-size: 22px; }

.promo-tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
    line-height: 1.6;
}
.promo-tag-flash { background: #cf1322; }
.promo-tag-group { background: #722ed1; }
.promo-hint { margin-top: 10px; font-size: 13px; color: #666; }
.promo-page-meta { margin: -8px 0 20px; color: #666; font-size: 14px; }
.product-promo-line { margin-top: 6px; }
.product-card .thumb { position: relative; }
.cart-promo-label { font-size: 12px; color: #722ed1; margin-top: 4px; }
.price-box .original-price {
    color: #999;
    text-decoration: line-through;
    margin-left: 12px;
    font-size: 16px;
}
.flash-countdown { color: #cf1322; font-weight: 600; margin-left: 8px; }

.address-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.address-card {
    display: flex; align-items: flex-start; gap: 10px;
    border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px;
    cursor: pointer; transition: border-color .2s, background .2s;
}
.address-card.is-selected { border-color: var(--primary); background: #fff8f8; }
.address-card input[type="radio"] { margin-top: 4px; flex-shrink: 0; }
.address-card-content { flex: 1; min-width: 0; }
.address-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.address-card-head strong { font-size: 15px; }
.address-card-content p { color: #666; font-size: 14px; line-height: 1.6; word-break: break-all; }
.address-badge { font-size: 12px; color: var(--primary); border: 1px solid var(--primary); padding: 0 6px; border-radius: 4px; line-height: 1.6; }
.address-card-new strong { color: var(--primary); }
.address-manual-fields.is-hidden { display: none; }
.address-save-options { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 4px; font-size: 14px; color: #666; }
.address-save-actions { display: flex; gap: 10px; margin-top: 14px; }
.btn-sm { padding: 6px 16px; font-size: 13px; }
.checkbox-label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.address-card-static { cursor: default; }
.address-card-static.is-default { border-color: #ffd6d6; background: #fffafa; }
.address-card-actions { margin-top: 10px; display: flex; gap: 12px; font-size: 13px; }
.address-card-actions a { color: var(--primary); }
.member-address-layout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; margin-top: 20px; }
.member-address-subtitle { font-size: 16px; margin-bottom: 14px; }
.member-address-form-wrap,
.member-address-list-wrap { background: var(--white); border-radius: 8px; padding: 20px; border: 1px solid var(--border); }
.member-address-form-actions { display: flex; gap: 10px; margin-top: 16px; }
.address-list-page { margin-bottom: 0; }
.text-muted { color: #999; }
.required { color: var(--primary); }
.required { color: var(--primary); }

/* Order success */
.order-success { text-align: center; background: var(--white); padding: 48px 20px; border-radius: 8px; }
.success-icon {
    width: 64px; height: 64px; line-height: 64px; border-radius: 50%;
    background: #52c41a; color: #fff; font-size: 32px; margin: 0 auto 16px;
}
.order-success h2 { margin-bottom: 12px; }
.success-amount { color: var(--primary); font-size: 20px; }
.success-tip { color: #999; margin: 12px 0 24px; }
.success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Order list */
.order-list { display: flex; flex-direction: column; gap: 16px; }
.order-card { background: var(--white); border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.order-card-header {
    display: flex; gap: 16px; padding: 12px 16px; background: #fafafa;
    font-size: 13px; color: var(--text-light); flex-wrap: wrap; align-items: center;
}
.order-card-body { padding: 12px 16px; }
.order-item-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.order-item-row img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }
.order-item-title { flex: 1; font-size: 14px; }
.order-item-qty { color: #999; font-size: 13px; }
.order-item-price { color: var(--primary); font-weight: 600; }
.order-card-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; border-top: 1px solid var(--border);
}
.btn-sm { padding: 6px 14px; font-size: 13px; }

.order-status { padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.badge-success { background: #f6ffed; color: #52c41a; }
.badge-danger { background: #fff1f0; color: #f5222d; }
.badge-warning { background: #fffbe6; color: #faad14; }
.badge-info { background: #e6f7ff; color: #1890ff; }
.badge-primary { background: #f0f5ff; color: #2f54eb; }

.order-detail { background: var(--white); padding: 24px; border-radius: 8px; }
.order-detail-info { margin-bottom: 20px; line-height: 2; }
.order-detail-total { text-align: right; font-size: 18px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.order-detail-total strong { color: var(--primary); font-size: 22px; }

@media (max-width: 768px) {
    .header-top-inner {
        flex-wrap: wrap;
        gap: 12px;
    }
    .site-logo {
        min-width: auto;
    }
    .header-search {
        order: 3;
        width: 100%;
        max-width: none;
    }
    .header-cart-btn {
        margin-left: auto;
    }
    .header-nav-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 8px 0;
    }
    .main-nav {
        order: 3;
        width: 100%;
        flex-wrap: wrap;
    }
    .product-detail { grid-template-columns: 1fr; }
    .footer-columns { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .checkout-layout { grid-template-columns: 1fr; }
    .member-address-layout { grid-template-columns: 1fr; }
    .cart-table-wrap { overflow-x: auto; }
    .cart-footer { flex-direction: column; align-items: stretch; }
    .cart-footer-right { justify-content: space-between; }
}

/* templet2 全局布局 */
.template-templet2 { --primary: #c45c3e; --primary-dark: #a84a32; --t2-bg: #faf7f2; }
.t2-body { background: var(--t2-bg); }
.t2-header { background: #fff; box-shadow: 0 1px 0 #ebe5dc; }
.t2-header-top { padding: 16px 0; }
.t2-header-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.t2-logo img { max-height: 44px; }
.t2-logo span { font-family: Georgia, serif; font-size: 22px; color: #2b2118; font-weight: 600; }
.t2-search { flex: 1; display: flex; max-width: 420px; min-width: 200px; }
.t2-search input { flex: 1; padding: 9px 14px; border: 1px solid #ddd; border-right: none; border-radius: 4px 0 0 4px; font-size: 14px; }
.t2-search button { padding: 9px 18px; background: #2b2118; color: #fff; border: none; border-radius: 0 4px 4px 0; cursor: pointer; font-size: 14px; }
.t2-header-actions { display: flex; gap: 16px; font-size: 14px; }
.t2-action-link { color: #333; }
.t2-action-link em { font-style: normal; color: #c45c3e; font-weight: 600; }
.t2-nav { background: #2b2118; }
.t2-nav .container { display: flex; gap: 0; overflow-x: auto; }
.t2-nav a { color: rgba(255,255,255,.85); padding: 12px 20px; font-size: 14px; white-space: nowrap; }
.t2-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.t2-main { min-height: 400px; }
.t2-footer { background: #2b2118; color: rgba(255,255,255,.85); padding: 40px 0 0; margin-top: 40px; margin-bottom: 0; }
.t2-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 32px; }
.t2-footer-col h4 { color: #d4a853; font-size: 15px; margin-bottom: 14px; }
.t2-footer-col ul { list-style: none; }
.t2-footer-col li { margin-bottom: 8px; font-size: 13px; }
.t2-footer-col a { color: rgba(255,255,255,.75); }
.t2-footer-bottom { margin-top: 32px; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.1); text-align: center; font-size: 12px; color: rgba(255,255,255,.5); }
.t2-mobile-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid #ebe5dc; z-index: 900; padding: 6px 0; }
.t2-mobile-item { flex: 1; text-align: center; font-size: 12px; color: #666; }
@media (max-width: 768px) {
    .template-templet2 { padding-bottom: 52px; }
    .t2-mobile-bar { display: flex; }
    .t2-search { order: 3; width: 100%; max-width: none; }
}
