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

body {
  font-family: 'Segoe UI', Arial, sans-serif;
background-color: #ffffff;
  color: #2d2d2d;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: 54px;
  padding-bottom: 20px;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.navbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 54px;
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.nav-categories {
  display: flex;
  flex: 1;
  overflow-x: auto;
  gap: 6px;
  scrollbar-width: none;
  padding: 0 4px;
}

.nav-categories::-webkit-scrollbar {
  display: none;
}

.nav-item {
  flex-shrink: 0;
  padding: 7px 14px;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s;
  border: 1px solid rgba(255,255,255,0.1);
}

.nav-item:hover,
.nav-item.active {
  background: #e63946;
  color: #fff;
  border-color: #e63946;
  box-shadow: 0 2px 8px rgba(230,57,70,0.4);
}

.nav-profile {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  margin-left: 8px;
  padding: 2px 6px;
}

.nav-profile-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.3s;
}

.nav-profile:hover .nav-profile-icon {
  background: #e63946;
}

.nav-profile-text {
  font-size: 7px;
  color: #e63946;
  font-weight: bold;
  margin-top: 1px;
  white-space: nowrap;
}

.banner {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 8px;
}

.banner-inner {
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.banner-inner img {
  width: 100%;
  display: block;
}

.banner-text {
  position: absolute;
  bottom: 10px;
  left: 10px;
  color: #ffd700;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
  line-height: 1.4;
}


.section-title {
  display: flex;
  align-items: center;
  padding: 14px 16px 8px;
  gap: 8px;
}

.section-title .icon {
  font-size: 22px;
}

.section-title .text {
  font-size: 16px;
  font-weight: bold;
  color: #1b4332;
}

.section-title .badge {
  background: #e63946;
  color: #fff;
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: bold;
}

.vip-card {
  margin: 0 16px 14px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid #ffd700;
  cursor: pointer;
  transition: transform 0.3s;
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

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

.vip-badge {
  background: linear-gradient(90deg, #ffd700, #ffaa00);
  color: #1a1a1a;
  text-align: center;
  padding: 6px;
  font-size: 12px;
  font-weight: bold;
}

.vip-card .product-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.vip-card .product-info {
  padding: 14px;
}

.vip-card .product-name {
  font-size: 15px;
  font-weight: bold;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.vip-card .vip-price {
  font-size: 22px;
  font-weight: bold;
  color: #d62828;
}

.vip-card .vip-price-label {
  font-size: 11px;
  color: #888;
  margin-bottom: 2px;
}

.vip-card .limit-text {
  font-size: 11px;
  color: #e63946;
  margin-top: 6px;
  font-weight: 600;
}

.hot-card {
  margin: 0 16px 14px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid #e63946;
  cursor: pointer;
  transition: transform 0.3s;
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

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

.hot-badge {
  background: linear-gradient(90deg, #e63946, #d62828);
  color: #fff;
  text-align: center;
  padding: 6px;
  font-size: 12px;
  font-weight: bold;
}

.hot-card .product-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.hot-card .product-info {
  padding: 14px;
}

.hot-card .product-name {
  font-size: 15px;
  font-weight: bold;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.hot-card .pre-order-count {
  font-size: 12px;
  color: #e63946;
  margin-bottom: 8px;
  font-weight: 600;
}

.hot-card .price-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-original {
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
}

.price-vip {
  font-size: 18px;
  font-weight: bold;
  color: #e63946;
}

.product-list {
  padding: 0 16px 14px;
}

.product-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  margin-bottom: 12px;
  border: 2px solid #e0e0e0;
}
.product-card:active {
  transform: scale(0.98);
}

.product-card .product-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.product-card .product-info {
  padding: 12px 14px;
}

.product-card .product-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 8px;
  line-height: 1.4;
}

.product-card .price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.product-card .price-original {
  font-size: 12px;
}

.product-card .price-vip {
  font-size: 16px;
}

.product-card .stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #999;
}

.detail-page {
  display: none;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 100vh;
  background: #f5f0eb;
  z-index: 2000;
  overflow-y: auto;
}

.detail-page.active {
  display: block;
}

.detail-media {
  width: 100%;
  background: #fff;
}

.detail-media video,
.detail-media iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
}

.detail-media img {
  width: 100%;
}

.detail-info {
  padding: 16px;
  background: #fff;
  margin-top: 2px;
}

.detail-info .product-name {
  font-size: 18px;
  font-weight: bold;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.detail-info .product-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 16px;
}

.detail-info .price-section {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  background: #fdf6f0;
  padding: 12px;
  border-radius: 10px;
}

.detail-info .price-original {
  font-size: 16px;
}

.detail-info .price-vip {
  font-size: 24px;
  color: #e63946;
}

.detail-info .stats-section {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: #999;
}

.fab-container {
  position: fixed;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2500;
}

.fab-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s;
  border: none;
  position: relative;
}

.fab-btn:active {
  transform: scale(0.9);
}

.fab-like {
  background: #fff;
  color: #ccc;
  border: 1px solid #eee;
}

.fab-like.liked {
  background: #fef0f0;
  color: #e63946;
  border-color: #e63946;
}

.fab-buy {
  background: #e63946;
  color: #fff;
  font-size: 24px;
}

.fab-commission {
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #1a1a1a;
  font-size: 9px;
  font-weight: bold;
  width: 54px;
  height: 54px;
  border-radius: 27px;
  flex-direction: column;
  line-height: 1.1;
  text-align: center;
  padding: 3px;
}

.commission-tooltip {
  display: none;
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: #ffd700;
  color: #1a1a1a;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  white-space: normal;
  max-width: 200px;
  line-height: 1.4;
  box-shadow: 0 3px 12px rgba(0,0,0,0.15);
  font-weight: 600;
}

.commission-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid #ffd700;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.fab-commission:hover .commission-tooltip,
.fab-commission:active .commission-tooltip,
.fab-commission.show-tip .commission-tooltip {
  display: block;
}

.fab-share {
  background: #1b4332;
  color: #fff;
  font-size: 8px;
  line-height: 1.1;
  flex-direction: column;
  width: 50px;
  height: 50px;
}
.fab-back {
  background: #fff;
  color: #666;
  border: 1px solid #ddd;
}

.share-modal {
  display: none;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 24px 20px;
  z-index: 3000;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

.share-modal.active {
  display: block;
}

.share-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 2999;
}

.share-modal-overlay.active {
  display: block;
}

.share-modal-title {
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #1a1a1a;
}

.share-options {
  display: flex;
  justify-content: space-around;
  margin-bottom: 16px;
}

.share-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 10px;
}

.share-option .share-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.share-option .share-label {
  font-size: 11px;
  color: #666;
  font-weight: 600;
}

.share-wa { background: #25d366; color: #fff; }
.share-tiktok { background: #1a1a1a; color: #fff; }
.share-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
.share-copy { background: #eee; color: #333; }

.share-cancel {
  width: 100%;
  padding: 14px;
  background: #f5f0eb;
  border: none;
  border-radius: 12px;
  color: #666;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.profile-page {
  display: none;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 100vh;
  background: #f5f0eb;
  z-index: 2000;
  overflow-y: auto;
  padding: 16px;
}

.profile-page.active {
  display: block;
}

.profile-header {
  text-align: center;
  padding: 20px 0;
  background: #fff;
  border-radius: 14px;
  margin-bottom: 12px;
}

.profile-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

.profile-phone {
  font-size: 16px;
  color: #1a1a1a;
  font-weight: bold;
  margin-bottom: 4px;
}

.profile-since {
  font-size: 12px;
  color: #999;
}

.commission-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.commission-box {
  background: #fff;
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.commission-box .amount {
  font-size: 16px;
  font-weight: bold;
  color: #e63946;
}

.commission-box .label {
  font-size: 10px;
  color: #999;
  margin-top: 4px;
}

.commission-list {
  margin-top: 12px;
}

.commission-list-title {
  font-size: 14px;
  font-weight: bold;
  color: #1a1a1a;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.commission-item {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.commission-item .item-left { flex: 1; }
.commission-item .item-phone { font-size: 13px; color: #1a1a1a; }
.commission-item .item-time { font-size: 11px; color: #999; margin-top: 2px; }
.commission-item .item-amount { font-size: 11px; color: #666; margin-top: 2px; }
.commission-item .item-right { text-align: right; }
.commission-item .item-commission { font-size: 16px; font-weight: bold; color: #e63946; }

.commission-item .item-status {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 4px;
  display: inline-block;
}

.status-pending { background: #fff8e1; color: #f59e0b; }
.status-paid { background: #ecfdf5; color: #10b981; }

.login-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 5000;
  justify-content: center;
  align-items: center;
}

.login-modal.active { display: flex; }

.login-box {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  width: 90%;
  max-width: 360px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.login-title {
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #1a1a1a;
}

.login-input {
  width: 100%;
  padding: 14px;
  background: #f5f0eb;
  border: 2px solid #eee;
  border-radius: 12px;
  color: #1a1a1a;
  font-size: 16px;
  margin-bottom: 10px;
  outline: none;
}

.login-input:focus { border-color: #1b4332; }
.login-input::placeholder { color: #aaa; }

.login-warning {
  font-size: 11px;
  color: #e63946;
  margin-bottom: 16px;
  line-height: 1.4;
  font-weight: 600;
}

.login-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.login-btn-green { background: #25d366; color: #fff; }
.login-btn-gray { background: #eee; color: #aaa; cursor: not-allowed; }
.login-btn-red { background: #e63946; color: #fff; margin-top: 8px; }

.login-close {
  width: 100%;
  padding: 10px;
  background: none;
  border: none;
  color: #999;
  font-size: 13px;
  cursor: pointer;
  margin-top: 8px;
}

.admin-page {
  display: none;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 100vh;
  background: #f5f0eb;
  z-index: 6000;
  overflow-y: auto;
  padding: 16px;
}

.admin-page.active { display: block; }

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

.admin-title { font-size: 18px; font-weight: bold; color: #e63946; }

.admin-close {
  background: #eee;
  border: none;
  color: #666;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.admin-tab {
  padding: 8px 14px;
  background: #fff;
  border-radius: 8px;
  font-size: 12px;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid #eee;
  font-weight: 600;
}

.admin-tab.active {
  background: #e63946;
  color: #fff;
  border-color: #e63946;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.admin-stat-box {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.admin-stat-box .stat-value { font-size: 22px; font-weight: bold; color: #e63946; }
.admin-stat-box .stat-label { font-size: 11px; color: #999; margin-top: 4px; }

.loading {
  text-align: center;
  padding: 40px;
  color: #999;
}

.loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #eee;
  border-top-color: #e63946;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin { to { transform: rotate(360deg); } }

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

.empty-state .empty-icon { font-size: 40px; margin-bottom: 10px; }

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
}

.btn:active { opacity: 0.8; }
.btn-primary { background: #e63946; color: #fff; }
.btn-success { background: #25d366; color: #fff; }