/* templet4 — 时尚商城模板（原创样式，与其他模板隔离） */
:root {
    --t4-accent: #ff5a1f;
    --t4-accent-dark: #e04812;
    --t4-ink: #1c1c1c;
    --t4-muted: #6b6b6b;
    --t4-line: #ececec;
    --t4-canvas: #f7f7f7;
    --t4-cream: #f3eee8;
    --primary: #ff5a1f;
    --primary-dark: #e04812;
    --text: #1c1c1c;
    --text-light: #6b6b6b;
    --border: #ececec;
    --bg: #f7f7f7;
    --white: #fff;
    --header-h: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body,
.t4-body {
    font-family: "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--t4-ink);
    background: var(--t4-canvas);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--t4-accent); text-decoration: none; }
a:hover { color: var(--t4-accent-dark); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* —— templet4 顶栏 / 页头 / 页脚 —— */
.t4-topbar {
    background: var(--t4-accent);
    color: #fff;
    font-size: 12px;
}
.t4-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    gap: 12px;
}
.t4-topbar-left,
.t4-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.t4-top-item { opacity: .95; }
.t4-topbar a { color: #fff; }
.t4-topbar a:hover { opacity: .85; color: #fff; }

.t4-header {
    background: #fff;
    border-bottom: 1px solid var(--t4-line);
    position: sticky;
    top: 0;
    z-index: 100;
}
.t4-header-row {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 72px;
}
.t4-logo {
    flex-shrink: 0;
    color: var(--t4-ink);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.t4-logo:hover { color: var(--t4-ink); }
.t4-logo img { max-height: 48px; max-width: 160px; object-fit: contain; }

.t4-nav {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    justify-content: center;
}
.t4-nav a {
    color: var(--t4-ink);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .5px;
    padding: 8px 0;
    text-transform: uppercase;
}
.t4-nav a:hover,
.t4-nav a.is-active { color: var(--t4-accent); }

.t4-header-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.t4-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: var(--t4-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
}
.t4-icon-btn:hover { background: #f5f5f5; color: var(--t4-accent); }
.t4-cart-btn em {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--t4-accent);
    color: #fff;
    font-size: 10px;
    font-style: normal;
    line-height: 16px;
    text-align: center;
}
.t4-menu-btn { display: none; flex-direction: column; gap: 4px; }
.t4-menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
}

.t4-search-panel {
    border-top: 1px solid var(--t4-line);
    background: #fff;
    padding: 12px 0;
}
.t4-search-form {
    display: flex;
    height: 42px;
    border: 1px solid var(--t4-ink);
}
.t4-search-form input {
    flex: 1;
    border: 0;
    outline: 0;
    padding: 0 14px;
    font-size: 14px;
    min-width: 0;
}
.t4-search-form button {
    width: 88px;
    border: 0;
    background: var(--t4-accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.t4-search-form button:hover { background: var(--t4-accent-dark); }

.t4-main { flex: 1; padding: 24px 0 40px; }
.t4-main-wide { padding: 0; }
.t4-page { min-height: 280px; }

.t4-service {
    background: #fff;
    border-top: 1px solid var(--t4-line);
    padding: 28px 0;
}
.t4-service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.t4-service-item strong {
    display: block;
    font-size: 16px;
    margin-bottom: 6px;
}
.t4-service-item p { font-size: 13px; color: var(--t4-muted); margin: 0; }

.t4-footer {
    background: #1a1a1a;
    color: #aaa;
    padding-top: 48px;
    margin-top: auto;
}
.t4-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, 1fr);
    gap: 28px;
    padding-bottom: 36px;
}
.t4-footer-brand h3 {
    color: #fff;
    font-size: 22px;
    margin-bottom: 12px;
    letter-spacing: 1px;
}
.t4-footer-brand p { font-size: 13px; line-height: 1.7; max-width: 260px; }
.t4-footer-col h4 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 14px;
}
.t4-footer-col ul { list-style: none; }
.t4-footer-col li { margin-bottom: 8px; font-size: 13px; }
.t4-footer-col a,
.t4-footer-col span { color: #999; }
.t4-footer-col a:hover { color: #fff; }
.t4-footer-bottom {
    border-top: 1px solid #2e2e2e;
    padding: 16px 0;
    text-align: center;
    font-size: 12px;
    color: #777;
}
.t4-footer-bottom a { color: #999; }

.t4-mobile-bar {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 200;
    background: #fff;
    border-top: 1px solid var(--t4-line);
    grid-template-columns: repeat(4, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
}
.t4-mobile-bar a {
    text-align: center;
    padding: 10px 4px;
    font-size: 12px;
    color: var(--t4-muted);
}
.t4-mobile-bar a:hover { color: var(--t4-accent); }

.t4-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 42px;
    padding: 0 22px;
    background: var(--t4-accent);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 0;
}
.t4-btn:hover { background: var(--t4-accent-dark); }
.t4-btn-light {
    background: #fff;
    color: var(--t4-ink) !important;
}
.t4-btn-light:hover { background: #f0f0f0; }

@media (max-width: 960px) {
    .t4-nav {
        display: none;
        position: absolute;
        left: 0; right: 0;
        top: 100%;
        background: #fff;
        border-bottom: 1px solid var(--t4-line);
        flex-direction: column;
        padding: 12px 16px;
        gap: 0;
    }
    .t4-header.is-nav-open .t4-nav { display: flex; }
    .t4-nav a { padding: 12px 0; border-bottom: 1px solid #f3f3f3; }
    .t4-menu-btn { display: inline-flex; }
    .t4-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .t4-topbar { display: none; }
    .t4-service-grid { grid-template-columns: 1fr; }
    .t4-footer-grid { grid-template-columns: 1fr; }
    .t4-mobile-bar { display: grid; }
    .t4-body { padding-bottom: 56px; }
}

/* 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; }
}
