:root {
    --mall-bg: #f5efe6;
    --mall-page: #fff7ec;
    --mall-page-soft: #fffaf4;
    --mall-text: #3d2b1f;
    --mall-muted: #8a7765;
    --mall-line: #eadfce;
    --mall-orange: #ff6b00;
    --mall-orange-2: #ff922b;
    --mall-green: #31a148;
    --mall-red: #e82d1f;
    --mall-shadow: 0 8px 20px rgba(97, 57, 28, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    padding-bottom: 92px;
    background: var(--mall-bg);
    color: var(--mall-text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.phone {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    background: linear-gradient(180deg, #fff7ec 0%, #fffaf4 45%, #fff6ea 100%);
    position: relative;
    overflow: hidden;
}

.page {
    min-height: 100vh;
    padding: 18px 16px 24px;
}

.status-bar {
    height: 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 800;
    color: #111;
    margin-bottom: 10px;
}

.signal {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
}

.header {
    position: relative;
    min-height: 108px;
    margin-bottom: 12px;
}

.home-btn,
.cart-btn,
.round-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: #5c371d;
    box-shadow: 0 8px 20px rgba(82, 46, 20, 0.1);
    font-size: 20px;
    cursor: pointer;
}

.home-btn {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.cart-btn {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 2px;
    padding-left: 48px;
    padding-right: 54px;
}

.paw {
    font-size: 28px;
    color: #ff7a1a;
}

.title {
    margin: 0;
    font-size: 32px;
    line-height: 1;
    font-weight: 900;
    color: #4b2c17;
    letter-spacing: 0;
}

.subtitle {
    margin: 10px 0 0;
    font-size: 13px;
    color: #6c4d38;
    padding-right: 108px;
    line-height: 1.4;
}

.pets {
    position: absolute;
    right: 0;
    bottom: -2px;
    width: 100px;
    height: 56px;
    pointer-events: none;
}

.dog,
.cat {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 6px 14px rgba(109, 67, 29, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.dog {
    right: 44px;
    bottom: 4px;
    background: #ffe3bd;
}

.cat {
    right: 0;
    bottom: 0;
    background: #eee9e2;
    font-size: 26px;
}

.search {
    height: 48px;
    background: #fff;
    border-radius: 26px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    box-shadow: var(--mall-shadow);
    margin-bottom: 14px;
}

.search span {
    font-size: 21px;
    color: #8b8b8b;
    margin-right: 8px;
}

.search input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 15px;
    background: transparent;
    color: #4b3b2e;
}

.balance-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 22px;
    padding: 18px;
    box-shadow: var(--mall-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
}

.balance-item {
    display: block;
    min-width: 0;
}

.balance-item:first-child {
    border-right: 1px solid var(--mall-line);
}

.balance-item:last-child {
    padding-left: 18px;
}

.balance-label {
    font-size: 14px;
    color: #4b3527;
    margin-bottom: 4px;
}

.balance-number {
    min-height: 38px;
    font-size: 30px;
    font-weight: 900;
    color: #4a2a17;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.balance-note {
    margin-top: 7px;
    color: var(--mall-muted);
    font-size: 11px;
    font-weight: 700;
}

.coin {
    width: 26px;
    height: 26px;
    display: inline-block;
    vertical-align: -5px;
    filter: drop-shadow(0 2px 4px rgba(255, 122, 26, 0.3));
}

.coin img {
    width: 100%;
    height: 100%;
    display: block;
}

.wallet {
    color: #4b8c4b;
    font-size: 24px;
}

.category-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 20px;
    padding: 14px 8px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    box-shadow: var(--mall-shadow);
    margin-bottom: 15px;
}

.category {
    text-align: center;
    font-size: 12px;
    color: #3f3026;
    font-weight: 700;
}

.category-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: #fff0dc;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 2px;
}

.section-title h2 {
    margin: 0;
    font-size: 18px;
    color: #38291f;
    font-weight: 900;
}

.section-title a,
.section-title span {
    font-size: 13px;
    color: #8a7765;
    font-weight: 700;
}

.products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.product-card {
    background: #fff;
    border-radius: 18px;
    padding: 10px;
    box-shadow: var(--mall-shadow);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-card:active {
    transform: scale(0.98);
}

.product-img {
    width: 100%;
    height: 112px;
    border-radius: 15px;
    background: #f7f1e8 center/cover no-repeat;
    display: block;
    margin-bottom: 8px;
    position: relative;
}

.stock-pill {
    position: absolute;
    left: 8px;
    top: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #5c371d;
    font-size: 11px;
    font-weight: 800;
}

.product-name {
    min-height: 40px;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 900;
    color: #2f241d;
    margin-bottom: 5px;
}

.product-tagline {
    min-height: 34px;
    color: #8a7765;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 6px;
}

.price {
    font-size: 18px;
    font-weight: 900;
    color: var(--mall-red);
    margin-bottom: 2px;
}

.points {
    font-size: 13px;
    color: #4d4036;
    margin-bottom: 7px;
}

.product-actions {
    display: flex;
    gap: 6px;
}

.product-actions form {
    flex: 1;
    min-width: 0;
}

.btn {
    flex: 1;
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 7px 0;
    font-size: 12px;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.buy {
    background: linear-gradient(180deg, #ff922b, #ff6b00);
}

.exchange {
    background: linear-gradient(180deg, #5fc16a, #31a148);
}

.btn:disabled,
.btn.disabled {
    background: #d8d0c4;
    cursor: not-allowed;
}

.service-strip {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 18px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    padding: 12px 6px;
    box-shadow: var(--mall-shadow);
    margin-bottom: 16px;
}

.service {
    text-align: center;
    border-right: 1px solid #f0e5d6;
}

.service:last-child {
    border-right: none;
}

.service-icon {
    font-size: 24px;
    margin-bottom: 3px;
}

.service strong {
    display: block;
    font-size: 12px;
    color: #37281e;
    margin-bottom: 2px;
}

.service span {
    font-size: 10px;
    color: #8a7765;
}

.catalog-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0 -2px 12px;
    padding: 2px 2px 6px;
    scrollbar-width: none;
}

.catalog-tabs::-webkit-scrollbar {
    display: none;
}

.catalog-tab {
    flex: 0 0 auto;
    min-width: 70px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    color: #5f5650;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(97, 57, 28, 0.06);
}

.catalog-tab.active {
    background: linear-gradient(180deg, #ff922b, #ff6b00);
    color: #fff;
}

.catalog-banner {
    background: linear-gradient(135deg, #fff5e5, #ffe0b5);
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--mall-shadow);
}

.catalog-banner-emoji {
    font-size: 36px;
}

.catalog-banner-text strong {
    display: block;
    font-size: 15px;
    color: #4b2c17;
    font-weight: 900;
    margin-bottom: 2px;
}

.catalog-banner-text span {
    font-size: 12px;
    color: #6d5140;
}

.catalog-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 900;
    color: #38291f;
    margin: 4px 2px 10px;
}

.catalog-section-title small {
    color: #8a7765;
    font-size: 11px;
    font-weight: 700;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 14px;
    width: calc(100% - 28px);
    max-width: 452px;
    height: 70px;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.96);
    border-radius: 26px;
    box-shadow: 0 -6px 24px rgba(97, 57, 28, 0.12);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 8px 0;
    z-index: 50;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #5f5650;
    font-size: 12px;
    font-weight: 700;
}

.nav-icon {
    font-size: 24px;
    line-height: 1;
}

.nav-item.active {
    color: var(--mall-orange);
}

.toast-alert {
    border: none;
    border-radius: 18px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 800;
    box-shadow: var(--mall-shadow);
}

.toast-alert.success {
    background: #effaf0;
    color: #267c35;
}

.toast-alert.danger {
    background: #fff1ee;
    color: #b83a22;
}

.detail-header,
.cart-header {
    height: 56px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 247, 236, 0.95);
    border-bottom: 1px solid rgba(234, 223, 206, 0.5);
    position: sticky;
    top: 0;
    z-index: 5;
}

.detail-back,
.detail-share {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 4px 12px rgba(82, 46, 20, 0.1);
    color: #5c371d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.detail-title,
.cart-title {
    font-size: 16px;
    font-weight: 900;
    color: #38291f;
    text-align: center;
}

.gallery {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f7f1e8;
    overflow-x: auto;
    display: flex;
    scroll-snap-type: x mandatory;
}

.gallery-slide {
    flex: 0 0 100%;
    width: 100%;
    background-size: cover;
    background-position: center;
    scroll-snap-align: center;
}

.detail-info,
.detail-section,
.cart-coupon,
.cart-item,
.empty-card,
.summary-card,
.log-card,
.order-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--mall-shadow);
}

.detail-info {
    margin: -16px 12px 12px;
    padding: 16px;
    position: relative;
    z-index: 1;
}

.detail-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.detail-price {
    font-size: 28px;
    font-weight: 900;
    color: var(--mall-red);
}

.detail-points {
    font-size: 13px;
    color: #4d4036;
}

.detail-name {
    font-size: 19px;
    font-weight: 900;
    color: #2f241d;
    margin-bottom: 6px;
    line-height: 1.3;
}

.detail-tagline {
    font-size: 13px;
    color: #8a7765;
    margin-bottom: 10px;
}

.detail-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #8a7765;
    padding-top: 10px;
    border-top: 1px dashed #eadfce;
}

.detail-meta strong {
    color: #4b3527;
    font-weight: 800;
}

.detail-section {
    margin: 0 12px 12px;
    padding: 16px;
}

.detail-section h3 {
    margin: 0 0 10px;
    font-size: 15px;
    color: #38291f;
    font-weight: 900;
}

.detail-section p {
    margin: 0;
    font-size: 13px;
    color: #5d4a3c;
    line-height: 1.7;
}

.spec-grid,
.highlight-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.spec-item {
    display: flex;
    gap: 6px;
    font-size: 13px;
}

.spec-item .label {
    color: #8a7765;
    flex-shrink: 0;
}

.spec-item .value {
    color: #38291f;
    font-weight: 800;
}

.highlight {
    background: #fff8ec;
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.highlight-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.highlight-text strong {
    display: block;
    font-size: 13px;
    color: #38291f;
    margin-bottom: 2px;
}

.highlight-text span {
    font-size: 11px;
    color: #8a7765;
}

.review {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed #f0e5d6;
}

.review:last-child {
    border-bottom: none;
}

.review-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ffe3bd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.review-body {
    flex: 1;
}

.review-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.review-name {
    font-size: 13px;
    font-weight: 800;
    color: #38291f;
}

.review-stars {
    color: #ffb020;
    font-size: 11px;
}

.review-text {
    font-size: 12px;
    color: #5d4a3c;
    line-height: 1.5;
}

.detail-actions,
.cart-bar {
    position: fixed;
    left: 50%;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    transform: translateX(-50%);
    padding: 10px 14px 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -6px 20px rgba(97, 57, 28, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 60;
}

.icon-action {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #fff5e5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    border: none;
    color: #6c4d38;
}

.icon-action .ico {
    font-size: 16px;
    line-height: 1;
}

.icon-action .lbl {
    font-size: 9px;
}

.cart-coupon {
    background: linear-gradient(135deg, #fff5e5, #ffe0b5);
    padding: 12px 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-coupon-icon {
    font-size: 26px;
}

.cart-coupon-text {
    flex: 1;
}

.cart-coupon-title {
    font-size: 13px;
    font-weight: 900;
    color: var(--mall-orange);
    margin-bottom: 2px;
}

.cart-coupon-sub {
    font-size: 11px;
    color: #6d5140;
}

.cart-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-item {
    display: flex;
    gap: 10px;
    padding: 10px;
}

.cart-item-img,
.order-cover {
    width: 78px;
    height: 78px;
    border-radius: 14px;
    background: #f7f1e8 center/cover no-repeat;
    flex-shrink: 0;
}

.cart-item-body,
.order-body {
    flex: 1;
    min-width: 0;
}

.cart-item-name,
.order-name {
    font-size: 14px;
    font-weight: 900;
    color: #2f241d;
    margin-bottom: 5px;
}

.cart-item-spec,
.pill {
    display: inline-flex;
    align-items: center;
    background: #f6efe2;
    color: #8a7765;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 800;
}

.cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    gap: 8px;
}

.cart-item-price {
    display: block;
    font-size: 16px;
    font-weight: 900;
    color: var(--mall-red);
}

.cart-item-points {
    display: block;
    font-size: 11px;
    color: #8a7765;
    margin-top: 2px;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 4px;
}

.qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: #fff0df;
    color: var(--mall-orange);
    font-weight: 900;
}

.qty-num {
    min-width: 22px;
    text-align: center;
    font-size: 13px;
    font-weight: 900;
}

.cart-bar {
    justify-content: space-between;
}

.cart-bar-total {
    flex: 1;
    min-width: 0;
}

.cart-bar-total small {
    display: block;
    color: #8a7765;
    font-size: 11px;
}

.cart-bar-total strong {
    display: block;
    color: var(--mall-red);
    font-size: 18px;
    line-height: 1.2;
}

.cart-bar-total em {
    display: block;
    color: #4d4036;
    font-size: 11px;
    font-style: normal;
}

.cart-checkout {
    min-width: 92px;
    height: 46px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(180deg, #ff922b, #ff6b00);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.empty-card {
    padding: 32px 18px;
    text-align: center;
}

.empty-card .ico {
    font-size: 38px;
    margin-bottom: 10px;
}

.empty-card h2 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 900;
}

.empty-card p {
    margin: 0 0 16px;
    color: #8a7765;
    font-size: 13px;
}

.summary-card {
    padding: 18px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #fff5e5, #ffffff);
}

.summary-label {
    margin: 0 0 6px;
    color: #8a7765;
    font-size: 13px;
    font-weight: 800;
}

.summary-value {
    margin: 0;
    color: var(--mall-orange);
    font-size: 34px;
    line-height: 1;
    font-weight: 900;
}

.log-list,
.order-list {
    display: grid;
    gap: 10px;
}

.log-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
}

.log-title {
    margin: 0 0 5px;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 900;
}

.log-time,
.order-time {
    margin: 0;
    color: #8a7765;
    font-size: 12px;
    font-weight: 700;
}

.log-points {
    flex: 0 0 auto;
    min-width: 76px;
    text-align: right;
    color: var(--mall-green);
    font-size: 18px;
    font-weight: 900;
}

.log-points.minus {
    color: var(--mall-orange);
}

.order-card {
    display: flex;
    gap: 10px;
    padding: 10px;
}

.order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0;
}

.pill.primary {
    background: #fff0df;
    color: var(--mall-orange);
}

.pill.green {
    background: #eef9ef;
    color: var(--mall-green);
}

.page-spacer {
    height: 92px;
}

@media (min-width: 520px) {
    body {
        padding: 18px 0 110px;
    }

    .phone {
        min-height: calc(100vh - 36px);
        border-radius: 36px;
        box-shadow: 0 18px 50px rgba(91, 54, 23, 0.18);
    }

    .bottom-nav {
        bottom: 28px;
    }
}

@media (max-width: 380px) {
    .page {
        padding-left: 12px;
        padding-right: 12px;
    }

    .category-card {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-actions {
        flex-direction: column;
    }

    .title {
        font-size: 28px;
    }
}
