:root {
    --pink: #ff5a79;
    --pink-dark: #ff3f67;
    --orange: #ff8a00;
    --text: #333;
    --muted: #999;
    --bg: #f5f5f5;
}
* { box-sizing: border-box; }
body.mall-body {
    margin: 0;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
}
.mall-page {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 62px;
    background: var(--bg);
}
.detail-swiper { position: relative; }
.page-back {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    width: 32px;
    height: 32px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #333;
    text-decoration: none;
    font-size: 22px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.page-back-preview {
    position: fixed;
    top: 8px;
    left: 50%;
    margin-left: calc(-215px + 8px);
    z-index: 15;
}
@media (max-width: 430px) {
    .page-back-preview {
        left: 8px;
        margin-left: 0;
    }
}
.banner-wrap { background: #fff; }
.banner-item {
    height: 180px;
    background-size: cover;
    background-position: center;
}
.banner-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.banner-placeholder {
    background: linear-gradient(135deg, #ffb347, #ff5a79);
}
.headline-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #fff;
    margin-top: 8px;
}
.headline-title {
    font-weight: 700;
    padding-right: 8px;
    border-right: 2px solid var(--pink);
}
.headline-content { flex: 1; display: flex; gap: 8px; align-items: center; }
.headline-content .tag {
    border: 1px solid var(--pink);
    color: var(--pink);
    border-radius: 12px;
    padding: 0 8px;
    font-size: 12px;
}
.new-section {
    margin-top: 8px;
    background: linear-gradient(180deg, var(--pink) 0%, #ff7b93 100%);
    padding: 12px;
}
.new-head {
    display: flex;
    justify-content: space-between;
    color: #fff;
    margin-bottom: 10px;
}
.new-title { font-size: 18px; font-weight: 700; }
.new-sub { font-size: 12px; opacity: .9; }
.more-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    text-decoration: none;
    flex-shrink: 0;
}
.more-icon-link svg {
    width: 26px;
    height: 26px;
    display: block;
}
.headline-bar .arrow,
.detail-row .arrow {
    color: #c8c8c8;
    width: 18px;
    height: 18px;
}
.ui-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ui-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}
.ui-icon-chevron svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.goods-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.goods-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    padding-bottom: 10px;
}
.goods-img {
    height: 150px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #fafafa;
}
.goods-name {
    font-size: 13px;
    padding: 8px 10px 4px;
    line-height: 1.4;
    min-height: 44px;
}
.goods-price {
    color: var(--pink-dark);
    font-weight: 700;
    padding: 0 10px;
}
.mall-tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    max-width: 430px;
    margin: 0 auto;
    height: 56px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    z-index: 20;
}
.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #666;
    text-decoration: none;
}
.tab-item.active { color: var(--pink-dark); font-weight: 500; }
.tab-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border-radius: 0;
}
.tab-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}
.tab-icon svg path {
    fill: #b0b0b0;
    transition: fill 0.2s ease;
}
.tab-item.active .tab-icon svg path {
    fill: var(--pink-dark);
}

.detail-swiper img { width: 100%; display: block; background: #fff; }
.detail-price-box { background: #fff; padding: 12px; margin-top: 8px; }
.detail-price-box .price { color: var(--pink-dark); font-size: 24px; font-weight: 700; }
.spec-head .price { color: var(--pink-dark); font-size: 20px; font-weight: 700; }
.detail-price-box .title { margin-top: 8px; font-size: 15px; line-height: 1.5; }
.detail-price-box .meta {
    margin-top: 10px;
    display: flex;
    gap: 16px;
    color: var(--muted);
    font-size: 12px;
}
.detail-row {
    margin-top: 8px;
    background: #fff;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.detail-row .label { color: var(--muted); width: 40px; }
.detail-row .value { flex: 1; font-size: 13px; }
.detail-bottom {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    max-width: 430px;
    margin: 0 auto;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 12px;
}
.mini-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    flex-shrink: 0;
    color: #666;
    text-decoration: none;
    font-size: 11px;
    line-height: 1.2;
    gap: 2px;
}
.mini-link-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mini-link-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}
.mini-link-icon path {
    fill: #888;
}
.buy-btn {
    flex: 1;
    border: none;
    background: linear-gradient(90deg, #ffb347, #ff8a00);
    color: #fff;
    height: 42px;
    border-radius: 21px;
    font-size: 16px;
}
.buy-btn.block { width: 100%; margin-top: 12px; }
.spec-mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 30;
}
.spec-mask.show { display: block; }
.spec-panel {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    max-width: 430px;
    margin: 0 auto;
    background: #fff;
    border-radius: 14px 14px 0 0;
    padding: 14px;
    max-height: 80vh;
    overflow: auto;
}
.spec-head { display: flex; gap: 10px; position: relative; }
.spec-head img { width: 88px; height: 88px; object-fit: contain; border-radius: 8px; background: #fafafa; }
.close-spec {
    position: absolute; right: 0; top: 0;
    border: none; background: transparent; font-size: 24px;
}
.spec-label { margin: 12px 0 8px; font-size: 13px; color: #666; }
.spec-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.spec-tags .tag {
    border: 1px solid #eee;
    background: #f7f7f7;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 12px;
}
.spec-tags .tag.active {
    border-color: var(--orange);
    color: var(--orange);
    background: #fff7ec;
}
.spec-qty {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.qty-box { display: flex; align-items: center; gap: 8px; }
.qty-box button {
    width: 28px; height: 28px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
}
.qty-box input {
    width: 36px; text-align: center; border: none;
}

.preview-page { padding-bottom: 20px; }
.preview-card {
    background: #fff;
    margin: 8px 12px;
    border-radius: 10px;
    padding: 12px;
}
.goods-card-row { display: flex; gap: 10px; }
.goods-card-row img { width: 72px; height: 72px; object-fit: contain; }
.goods-card-row .name { font-size: 14px; font-weight: 600; }
.goods-card-row .spec { color: var(--muted); font-size: 12px; margin-top: 4px; }
.goods-card-row .price-line { margin-top: 8px; display: flex; justify-content: space-between; }
.goods-card-row .price { color: var(--pink-dark); font-weight: 700; }

.installment-card {
    background: #fff;
    margin: 10px 12px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    overflow: hidden;
}
.installment-title {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    padding: 14px 12px;
    border-bottom: 1px solid #f0f0f0;
}
.installment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #f5f5f5;
    min-height: 52px;
}
.installment-row:last-of-type {
    border-bottom: none;
}
.installment-label {
    flex-shrink: 0;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}
.installment-label .req {
    color: #ff4d4f;
    margin-left: 2px;
}
.installment-value {
    font-size: 15px;
    color: #333;
    text-align: right;
    flex: 1;
    min-width: 0;
}
.installment-input {
    border: none;
    background: transparent;
    text-align: right;
    width: 100%;
    max-width: 180px;
    min-width: 120px;
    font-size: 16px;
    color: #333;
    -webkit-text-fill-color: #333;
    opacity: 1;
    outline: none;
    -moz-appearance: textfield;
}
.installment-input::placeholder {
    color: #999;
    opacity: 1;
}
.installment-card .installment-value {
    display: flex;
    justify-content: flex-end;
}
.installment-card .installment-value .installment-input {
    flex: 1;
    max-width: none;
    min-width: 0;
}
.installment-input::-webkit-outer-spin-button,
.installment-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.installment-row .segment-group {
    flex: 1;
    max-width: 260px;
    min-width: 0;
    border-radius: 9px;
    padding: 3px;
}
.segment-group {
    display: flex;
    align-items: stretch;
    background: #f2f2f2;
    border-radius: 8px;
    padding: 3px;
    max-width: 220px;
}
.segment-group .chip {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    line-height: 1.2;
    color: #666;
    white-space: nowrap;
}
.installment-row .segment-group .chip {
    padding: 8px 10px;
    font-size: 14px;
    line-height: 1.25;
    min-height: 36px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.segment-group .chip.active {
    background: #fff;
    color: #c17a4a;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.installment-summary {
    padding: 4px 16px 16px;
    text-align: right;
    font-size: 13px;
    color: #999;
    line-height: 1.5;
}
.installment-summary-hint {
    color: #bbb;
    font-size: 12px;
}

.accessory-card {
    background: #fff;
    margin: 10px 12px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    overflow: hidden;
}
.accessory-empty {
    padding: 16px;
    color: #999;
    font-size: 13px;
    text-align: center;
}
.accessory-list {
    padding: 0 12px 8px;
}
.accessory-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
}
.accessory-option:last-child {
    border-bottom: none;
}
.accessory-option input {
    margin-top: 4px;
    flex-shrink: 0;
}
.accessory-option-body {
    flex: 1;
    min-width: 0;
}
.accessory-name {
    display: block;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}
.accessory-spec {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #999;
    line-height: 1.4;
}
.accessory-price {
    flex-shrink: 0;
    color: var(--pink-dark);
    font-weight: 700;
    font-size: 14px;
}
.accessory-total-line {
    padding: 10px 16px 14px;
    text-align: right;
    font-size: 13px;
    color: #666;
    border-top: 1px solid #f5f5f5;
}
.accessory-total-line b {
    color: var(--pink-dark);
    font-size: 15px;
}
.buyer-card {
    margin: 12px;
    background: #fff;
    border-radius: 12px;
    padding-bottom: 8px;
}
.buyer-card .installment-row {
    align-items: flex-start;
    flex-wrap: wrap;
}
.buyer-card .installment-label {
    width: 72px;
}
.buyer-card .installment-value {
    flex: 1;
    min-width: 0;
    text-align: left;
}
.buyer-card .installment-input,
.buyer-card .installment-textarea {
    width: 100%;
    max-width: none;
    text-align: left;
    box-sizing: border-box;
    color: #333;
    -webkit-text-fill-color: #333;
}
.buyer-card .installment-input::placeholder,
.buyer-card .installment-textarea::placeholder {
    color: #999;
    opacity: 1;
}
.buyer-address-row {
    align-items: flex-start;
}
.installment-textarea {
    min-height: 72px;
    resize: vertical;
    line-height: 1.45;
    padding-top: 8px;
    padding-bottom: 8px;
}
.contract-submit-btn {
    display: block;
    width: calc(100% - 32px);
    margin: 8px 16px 16px;
    padding: 12px 16px;
    border: none;
    border-radius: 24px;
    background: linear-gradient(90deg, #ff8a00, #ff5a79);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}
.contract-submit-btn:active {
    opacity: 0.92;
}
.mine-card {
    margin: 20px 12px;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}
.mine-card .avatar {
    width: 64px; height: 64px; border-radius: 50%;
    background: #ffd6de; margin: 0 auto 10px;
}
.mine-card .tip { color: #999; font-size: 12px; }

.category-page {
    background: #fff;
    min-height: calc(100vh - 62px);
    display: flex;
    flex-direction: column;
}
.category-layout {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 62px);
    align-items: stretch;
}
.category-left {
    width: 92px;
    background: #f7f7f7;
    flex-shrink: 0;
    align-self: stretch;
}
.cate-l1 {
    display: block;
    padding: 14px 8px;
    text-align: center;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    border-left: 3px solid transparent;
}
.cate-l1.active {
    background: #fff;
    color: var(--pink-dark);
    font-weight: 600;
    border-left-color: var(--pink-dark);
}
.category-right {
    flex: 1;
    background: #fff;
    padding: 10px;
    min-width: 0;
}
.cate-l2-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.cate-l2 {
    padding: 6px 12px;
    border-radius: 16px;
    background: #f5f5f5;
    color: #666;
    font-size: 12px;
    text-decoration: none;
}
.cate-l2.active {
    background: #ffe8ee;
    color: var(--pink-dark);
}
.category-goods { padding: 0; }
.cate-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    padding: 40px 10px;
    font-size: 13px;
}
