* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f5f5f5;
    padding-bottom: 60px;
}

.app {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.header {
    background: #fff;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.location {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.search-input input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #eee;
    background: #f8f8f8;
    font-size: 14px;
}

.banner {
    position: relative;
    margin: 12px;
    border-radius: 12px;
    overflow: hidden;
}

.banner img {
    width: 100%;
    display: block;
}

.banner-text {
    position: absolute;
    bottom: 12px;
    left: 16px;
    color: white;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.categories {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 16px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
}

.category-item {
    flex-shrink: 0;
    font-size: 14px;
    padding: 6px 12px;
    background: #f8f8f8;
    border-radius: 20px;
    cursor: pointer;
}

.category-item.active {
    background: #4caf50;
    color: white;
}

.product-list {
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.product-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.product-info {
    padding: 10px;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.product-desc {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.price {
    color: #ff6b00;
    font-weight: bold;
    font-size: 16px;
}

.original-price {
    font-size: 12px;
    color: #bbb;
    text-decoration: line-through;
    margin-left: 6px;
}

.add-cart, .login-to-buy {
    background: #4caf50;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-top: 8px;
    width: 100%;
    cursor: pointer;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid #eee;
    z-index: 100;
}

.nav-item {
    text-align: center;
    font-size: 12px;
    color: #999;
    cursor: pointer;
}

.nav-item.active {
    color: #4caf50;
}

.cart-list {
    padding: 12px;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: white;
    margin-bottom: 10px;
    border-radius: 12px;
    align-items: center;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 500;
}

.cart-item-price {
    color: #ff6b00;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

.cart-footer {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: white;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.checkout-btn {
    background: #4caf50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    width: 80%;
    max-width: 320px;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.modal-content button {
    margin: 8px 4px;
    padding: 8px 16px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

.user-info {
    padding: 20px;
    background: #f9f9f9;
    margin: 12px;
    border-radius: 12px;
}

.order-section {
    padding: 12px;
}

.order-card {
    background: white;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 收藏按钮样式 */
.favorite-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #ccc;
  transition: color 0.2s;
  padding: 0;
  margin: 0;
}
.favorite-btn.active {
  color: #ff4444;
}

.favorite-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #ccc;
}
.favorite-btn.active {
  color: #ff4444;
}

.cart-item-subtotal {
  font-size: 13px;
  color: #ff6b00;
  margin-top: 4px;
}