* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    padding-bottom: 140px;
}

.shop-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.shop-banner {
    position: relative;
    overflow: hidden;
}

.shop-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.shop-info {
    padding: 16px;
    background: #fff;
}

.shop-title-row {
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.shop-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    flex: 1;
}

.shop-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #999;
}

.shop-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.shop-contact {
    padding: 12px;
    background: #fafafa;
    border-radius: 8px;
    margin-bottom: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item i {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fe8400;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
}

.shop-actions {
    display: flex;
    gap: 12px;
}

.shop-actions .btn {
    flex: 1;
    border-radius: 20px;
    font-size: 14px;
}

.nav-tabs-custom {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 90;
}

.nav-tabs-custom .nav-link {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    padding: 14px 16px;
    border: none;
    border-radius: 0;
    position: relative;
}

.nav-tabs-custom .nav-link.active {
    color: #fe8400;
    background: transparent;
}

.nav-tabs-custom .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: #fe8400;
    border-radius: 2px;
}

.category-scroll {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 12px;
    background: #fff;
    gap: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.category-item {
    flex-shrink: 0;
    padding: 8px 20px;
    background: #f8f8f8;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.category-item.active {
    background: #fe8400;
    color: #fff;
}

.goods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 12px;
}

.goods-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.goods-image {
    width: 100%;
    height: 120px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.goods-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.goods-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(254, 132, 0, 0.9);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
}

.goods-info {
    padding: 10px;
}

.goods-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 6px;
}

.goods-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.goods-price {
    font-size: 16px;
    font-weight: 700;
    color: #f52020;
}

.goods-old-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    margin-left: 6px;
}

.goods-stock {
    font-size: 12px;
    color: #999;
}

.cart-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.cart-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-btn:hover {
    background: #f5f5f5;
}

.cart-btn.plus {
    border-color: #fe8400;
    color: #fe8400;
}

.cart-btn.minus {
    color: #999;
}

.cart-count {
    font-size: 14px;
    color: #333;
    min-width: 24px;
    text-align: center;
}

.guige-btn {
    flex: 1;
    background: #fff;
    border: 1px solid #fe8400;
    color: #fe8400;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    cursor: pointer;
}

.coupon-list {
    padding: 12px;
}

.coupon-card {
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8d8 100%);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid #fe8400;
}

.coupon-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.coupon-title {
    font-size: 16px;
    font-weight: 700;
    color: #c40000;
}

.coupon-type {
    font-size: 12px;
    color: #fe8400;
    background: #fff;
    padding: 2px 8px;
    border-radius: 4px;
}

.coupon-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.coupon-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.coupon-status {
    font-size: 12px;
    color: #999;
}

.coupon-action {
    background: #fe8400;
    color: #fff;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
}

.news-content {
    padding: 16px;
    background: #fff;
    line-height: 1.8;
    color: #333;
}

.news-content img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

.bottom-nav {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 1000;
}

.goods-link {
    cursor: pointer;
}

.cart-icon {
    position: relative;
    font-size: 24px;
    color: #666;
    cursor: pointer;
}

.cart-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #f52020;
    color: #fff;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-summary {
    flex: 1;
}

.cart-price {
    font-size: 16px;
    font-weight: 700;
    color: #f52020;
}

.cart-old-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.cart-checkout {
    background: #fe8400;
    color: #fff;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.main-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    padding: 8px 0;
    z-index: 1000;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    z-index: 1000;
}

.nav-item.active {
    color: #fe8400;
}

.nav-item i {
    font-size: 18px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    align-items: flex-end;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 16px 16px 0 0;
    padding: 16px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.cart-list {
    margin-bottom: 16px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 14px;
    color: #f52020;
}

.cart-item-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-item-qty {
    font-size: 14px;
    color: #333;
    min-width: 24px;
    text-align: center;
}

.cart-empty {
    text-align: center;
    padding: 40px 0;
    color: #999;
}

.cart-empty i {
    font-size: 48px;
    margin-bottom: 12px;
}

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 2000;
    display: none;
}

.toast.show {
    display: block;
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
        margin: 0 auto;
    }
}

/* ===== Meituan-style goods menu: left category nav + right single-column goods ===== */
.mt-wrap {
    display: flex;
    align-items: flex-start;
}

.mt-nav {
    width: 88px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    background: #f5f5f5;
    -webkit-overflow-scrolling: touch;
}

.mt-nav .category-item {
    display: block;
    width: 100%;
    padding: 14px 6px;
    background: transparent;
    border-radius: 0;
    font-size: 13px;
    line-height: 18px;
    color: #666;
    text-align: center;
    word-break: break-all;
    transition: none;
    position: relative;
}

.mt-nav .category-item.active {
    background: #fff;
    color: #333;
    font-weight: 700;
}

.mt-nav .category-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: #fe8400;
    border-radius: 0 2px 2px 0;
}

.mt-main {
    flex: 1;
    min-width: 0;
    background: #f5f5f5;
}

.mt-promo {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    background: #fff;
    margin-bottom: 8px;
}

.mt-promo-tag {
    display: inline-block;
    background: #fff2e8;
    color: #fe5c00;
    border: 1px solid #ffd9b3;
    font-size: 11px;
    line-height: 16px;
    padding: 0 6px;
    border-radius: 3px;
    white-space: nowrap;
}

.goods-list {
    padding: 0 8px 10px;
}

.goods-list .goods-card {
    display: flex;
    gap: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: none;
    padding: 10px;
    margin-bottom: 8px;
    overflow: hidden;
}

.goods-list .goods-card:last-child {
    margin-bottom: 0;
}

.goods-loading,
.goods-list-end,
.goods-empty {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding: 14px 0;
    line-height: 18px;
}

.goods-loading .spinner-border {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    vertical-align: -2px;
}

.mt-main .goods-image {
    width: 84px;
    height: 84px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.mt-main .goods-info {
    flex: 1;
    min-width: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.mt-main .goods-name {
    font-size: 14px;
    line-height: 19px;
    color: #333;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 4px;
}

.mt-main .goods-price-row {
    margin-top: auto;
}

.mt-main .goods-price {
    font-size: 16px;
}

.mt-main .cart-control {
    margin-top: 6px;
    justify-content: flex-end;
    gap: 10px;
}

.mt-main .guige-btn {
    flex: none;
    padding: 5px 16px;
}

/* Goods spec (guige) modal */
.guige-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.guige-row:last-child {
    border-bottom: none;
}

.guige-info {
    flex: 1;
    min-width: 0;
    padding-right: 10px;
}

.guige-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
}

.guige-ops {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
