* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, sans-serif;
}
body {
    background: #f7f7f7;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 70px;
}
a { text-decoration: none; color: inherit; }
img { display: block; }

/* 顶部搜索栏 */
.top-bar {
    background: #ffe8ef;
    padding: 12px 15px;
}
.top-title {
    color: #ff6688;
    font-size: 16px;
    margin-bottom: 8px;
}
.search-box {
    background: #fff;
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.search-box input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 14px;
    background: transparent;
}

/* 分类标签 */
.tabs {
    display: flex;
    gap: 10px;
    padding: 8px 15px;
    background: #fff;
    overflow-x: auto;
    white-space: nowrap;
}
.tabs a {
    font-size: 14px;
    color: #666;
    padding: 4px 8px;
    flex-shrink: 0;
}
.tabs a.active {
    color: #ff4466;
    border-bottom: 2px solid #ff4466;
}

/* 轮播大图 */
.banner {
    height: 200px;
    background: #eee;
    overflow: hidden;
    border-radius: 8px;
    margin: 10px 15px 0;
    position: relative;
}
.banner-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease;
}
.banner-slide {
    min-width: 100%;
    height: 100%;
}
.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.banner-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}
.banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s;
}
.banner-dot.active {
    background: #fff;
    width: 18px;
    border-radius: 3px;
}

/* 限时活动条 */
.flash-tip {
    background: #fff0f3;
    padding: 10px 15px;
    font-size: 13px;
    color: #d63344;
    margin-top: 10px;
}

/* 搜索结果提示 */
.search-result-bar {
    padding: 10px 15px;
    font-size: 13px;
    color: #666;
    background: #fff;
}
.search-result-bar .clear-search {
    color: #ff4466;
    margin-left: 8px;
}

/* 商品网格 */
.goods-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 10px 15px;
}
.goods-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.goods-img {
    width: 100%;
    aspect-ratio: 4/3;
    background: #f5f5f5;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
.goods-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.discount-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #ff4466;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
}
.goods-info {
    padding: 8px;
}
.goods-name {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
}
.goods-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}
.goods-price {
    color: #f33;
    font-size: 16px;
    font-weight: bold;
}
.goods-sales {
    font-size: 11px;
    color: #999;
}
.add-cart-btn {
    width: 100%;
    background: #ff5577;
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

/* 页面通用头部 */
.page-header {
    background: #ff5577;
    color: #fff;
    text-align: center;
    padding: 14px;
    font-size: 17px;
    font-weight: bold;
}
.detail-header {
    background: #fff;
    padding: 14px 15px;
    text-align: center;
    font-size: 17px;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 10;
}
.back-btn {
    position: absolute;
    left: 15px;
    color: #333;
    font-size: 20px;
}

/* 底部导航 */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: #fff;
    display: flex;
    border-top: 1px solid #eee;
    z-index: 100;
}
.footer-nav a {
    flex: 1;
    text-align: center;
    padding: 8px 0 8px;
    color: #666;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    position: relative;
}
.footer-nav a img {
    width: 20px;
    height: 20px;
    opacity: 0.5;
}
.footer-nav a.active {
    color: #ff4466;
}
.footer-nav a.active img {
    opacity: 1;
}
.cart-badge {
    position: absolute;
    top: 2px;
    right: 50%;
    margin-right: -22px;
    background: #ff4466;
    color: #fff;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    border-radius: 8px;
    padding: 0 4px;
    display: none;
}

/* 分类页侧边栏 */
.category-wrap {
    display: flex;
    min-height: calc(100vh - 120px);
}
.left-menu {
    width: 100px;
    background: #f0f0f0;
}
.left-menu a {
    display: block;
    padding: 16px 8px;
    text-align: center;
    font-size: 14px;
    color: #666;
}
.left-menu a.active {
    background: #fff;
    color: #ff4466;
    font-weight: bold;
    border-left: 3px solid #ff4466;
}
.right-list {
    flex: 1;
    padding: 10px;
}
.category-goods {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    background: #fff;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
}
.category-goods .img {
    width: 80px;
    height: 80px;
    background: #eee;
    overflow: hidden;
    border-radius: 6px;
    flex-shrink: 0;
}
.category-goods .img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.category-goods .info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2px 0;
}
.cate-name {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cate-sales {
    font-size: 11px;
    color: #999;
}
.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cat-price {
    color: #ff6688;
    font-size: 15px;
    font-weight: bold;
}
.add-cart-small {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ff5577, #ff3355);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 2px 6px rgba(255, 85, 119, 0.4);
    transition: transform 0.2s;
}
.add-cart-small:active {
    transform: scale(0.9);
}

/* 详情页 */
.detail-img {
    width: 100%;
    height: 360px;
    background: #f5f5f5;
    overflow: hidden;
}
.detail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.detail-info {
    padding: 15px;
    background: #fff;
}
.detail-price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 10px;
}
.detail-price {
    font-size: 26px;
    color: #f33;
    font-weight: bold;
}
.detail-original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}
.detail-sales {
    font-size: 12px;
    color: #999;
}
.detail-name {
    font-size: 17px;
    margin-bottom: 12px;
    line-height: 1.5;
    color: #333;
}
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 5px;
}
.tag {
    font-size: 11px;
    color: #ff4466;
    border: 1px solid #ffcccc;
    padding: 2px 6px;
    border-radius: 3px;
    background: #fff5f7;
}
.num-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 0;
}
.num-box span {
    font-size: 14px;
    color: #666;
}
.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
}
.num-box input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    padding: 5px;
    font-size: 14px;
    border-radius: 4px;
}

/* 详情描述 */
.detail-desc-section {
    margin-top: 10px;
    background: #fff;
    padding: 15px;
}
.detail-desc-title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 10px;
    padding-left: 8px;
    border-left: 3px solid #ff4466;
}
.detail-desc-content {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

/* 详情底部按钮 */
.bottom-btns {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    padding: 8px 12px;
    gap: 8px;
    background: #fff;
    border-top: 1px solid #eee;
    z-index: 100;
    align-items: center;
}
.btn-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    color: #666;
    padding: 4px 10px;
    position: relative;
}
.btn-icon .cart-badge {
    position: absolute;
    top: 0;
    right: 4px;
    margin: 0;
}
.add-cart-bottom {
    flex: 1;
    padding: 12px;
    border-radius: 24px;
    border: 1px solid #ff5577;
    color: #ff5577;
    background: #fff;
    font-size: 15px;
    cursor: pointer;
}
.buy-now {
    flex: 1;
    padding: 12px;
    border-radius: 24px;
    background: #ff5577;
    color: #fff;
    border: none;
    font-size: 15px;
    cursor: pointer;
}

/* 购物车 */
.cart-toolbar {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    background: #fff;
    font-size: 14px;
}
#manageBtn {
    color: #ff6688;
    cursor: pointer;
}
.cart-item {
    padding: 15px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #fff;
}
.cart-check {
    margin-top: 30px;
    width: 18px;
    height: 18px;
    accent-color: #ff4466;
}
.cart-img {
    width: 80px;
    height: 80px;
    background: #f5f5f5;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}
.cart-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cart-info {
    flex: 1;
    min-width: 0;
}
.cart-name {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cart-price {
    color: #f33;
    font-size: 16px;
    font-weight: bold;
}
.cart-num {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 8px;
}
.cart-num button {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
}
.cart-num span {
    min-width: 30px;
    text-align: center;
    font-size: 14px;
}
.cart-settle {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: #fff;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    z-index: 99;
}
.cart-select-all {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}
.cart-select-all input {
    accent-color: #ff4466;
}
.cart-total-box {
    flex: 1;
    text-align: right;
    margin-right: 10px;
    font-size: 13px;
}
.cart-total-price {
    color: #f33;
    font-size: 18px;
    font-weight: bold;
}
.settle-btn {
    background: #ff4466;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}
.cart-empty {
    text-align: center;
    padding: 80px 0;
    color: #999;
}
.empty-tip {
    text-align: center;
    color: #999;
    padding: 40px 0;
}
.empty-icon {
    font-size: 48px;
    margin-bottom: 10px;
}
.go-shopping {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 24px;
    background: #ff4466;
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
}

/* Toast 提示 */
.cart-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
}
.cart-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ========== 结算页 ========== */
.section-card {
    background: #fff;
    margin: 10px 15px;
    border-radius: 10px;
    padding: 15px;
}
.section-title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 12px;
}
.address-form .form-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}
.address-form label {
    width: 65px;
    font-size: 14px;
    color: #666;
    padding-top: 8px;
    flex-shrink: 0;
}
.address-form input,
.address-form textarea {
    flex: 1;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
    outline: none;
    resize: none;
    font-family: inherit;
}
.address-form input:focus,
.address-form textarea:focus {
    border-color: #ff4466;
}

/* 商品清单 */
.order-goods-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    align-items: center;
}
.order-goods-img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
}
.order-goods-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.order-goods-info {
    flex: 1;
    min-width: 0;
}
.order-goods-name {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.order-goods-price {
    color: #f33;
    font-size: 14px;
    margin-top: 4px;
}
.order-goods-qty {
    font-size: 13px;
    color: #999;
    flex-shrink: 0;
}

/* 配送/支付 */
.option-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 6px 0;
}
.option-value {
    color: #999;
}
.pay-methods {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.pay-option {
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}
.pay-option.active {
    border-color: #ff4466;
    background: #fff5f7;
    color: #ff4466;
}
.pay-option input {
    display: none;
}
.remark-input {
    width: 100%;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

/* 价格汇总 */
.price-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: #666;
}
.price-summary .summary-row.total {
    border-top: 1px solid #eee;
    margin-top: 6px;
    padding-top: 12px;
    font-size: 16px;
    color: #333;
    font-weight: bold;
}
.free-ship {
    color: #ff4466;
}
.pay-amount {
    color: #f33;
    font-weight: bold;
}

/* 结算底部栏 */
.checkout-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: #fff;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    z-index: 100;
}
.checkout-total {
    font-size: 14px;
}
.submit-order-btn {
    background: linear-gradient(135deg, #ff5577, #ff3355);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

/* ========== 订单成功页 ========== */
.success-page {
    text-align: center;
    padding: 40px 15px;
}
.success-icon {
    font-size: 64px;
    margin-bottom: 15px;
}
.success-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}
.success-desc {
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
}
.success-card {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    text-align: left;
    margin: 0 0 20px;
}
.order-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
}
.order-info-row:last-child {
    border-bottom: none;
}
.order-info-row span:first-child {
    color: #999;
}
.success-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}
.btn-order-list, .btn-continue {
    padding: 10px 28px;
    border-radius: 25px;
    font-size: 14px;
}
.btn-order-list {
    border: 1px solid #ff4466;
    color: #ff4466;
    background: #fff;
}
.btn-continue {
    background: #ff4466;
    color: #fff;
}

/* ========== 订单列表页 ========== */
#ordersList {
    padding: 10px 15px;
}
.order-card {
    background: #fff;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}
.order-card-head {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
}
.order-no {
    color: #999;
}
.order-status {
    color: #ff4466;
    font-weight: bold;
}
.order-card-body {
    padding: 10px 15px;
}
.order-item-row {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 6px 0;
}
.order-item-img {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    background: #f5f5f5;
}
.order-item-name {
    flex: 1;
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.order-item-price {
    font-size: 13px;
    color: #666;
}
.order-card-foot {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    border-top: 1px solid #f5f5f5;
    font-size: 12px;
    color: #999;
}
.order-card-foot em {
    font-style: normal;
    font-size: 15px;
}

/* ========== 登录注册页 ========== */
.auth-page {
    padding: 30px 25px;
}
.auth-logo {
    font-size: 60px;
    text-align: center;
    margin-bottom: 25px;
}
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 25px;
}
.auth-tabs span {
    flex: 1;
    text-align: center;
    padding: 12px;
    font-size: 15px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
.auth-tabs span.active {
    color: #ff4466;
    border-bottom-color: #ff4466;
}
.auth-input-wrap {
    margin-bottom: 18px;
}
.auth-input-wrap input {
    width: 100%;
    border: 1px solid #eee;
    border-radius: 25px;
    padding: 13px 18px;
    font-size: 15px;
    outline: none;
}
.auth-input-wrap input:focus {
    border-color: #ff4466;
}
.auth-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff5577, #ff3355);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}
.auth-tip {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 18px;
}

/* ========== 个人中心页 ========== */
.profile-header {
    background: linear-gradient(135deg, #ff5577, #ff8855);
    padding: 40px 20px 30px;
    text-align: center;
    color: #fff;
}
.profile-avatar {
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    margin: 0 auto 12px;
    line-height: 70px;
    font-size: 36px;
}
.profile-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 6px;
}
.profile-login-link {
    display: inline-block;
    color: #fff;
    font-size: 13px;
    background: rgba(255,255,255,0.2);
    padding: 4px 16px;
    border-radius: 12px;
}
.profile-menu {
    margin: 10px 15px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}
.menu-item {
    display: flex;
    align-items: center;
    padding: 16px 15px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    color: #333;
    font-size: 15px;
}
.menu-item:last-child {
    border-bottom: none;
}
.menu-icon {
    margin-right: 12px;
    font-size: 20px;
}
.menu-arrow {
    margin-left: auto;
    color: #ccc;
    font-size: 18px;
}

/* ========== 收货地址页 ========== */
.address-card {
    background: #fff;
    margin: 10px 15px;
    border-radius: 10px;
    padding: 15px;
}
.address-info-block {
    margin-bottom: 10px;
}
.address-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.addr-name {
    font-size: 15px;
    font-weight: bold;
}
.addr-phone {
    font-size: 13px;
    color: #666;
}
.addr-default-tag {
    font-size: 11px;
    color: #fff;
    background: #ff4466;
    padding: 1px 6px;
    border-radius: 3px;
}
.addr-detail {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}
.address-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #f5f5f5;
    padding-top: 10px;
}
.address-actions button {
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    padding: 5px 16px;
    border-radius: 15px;
    font-size: 13px;
    cursor: pointer;
}
.address-actions button:hover {
    border-color: #ff4466;
    color: #ff4466;
}
