* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f5f5f5;
  color: #222;
  padding-top: 70px;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ===== Top Nav ===== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: #fff;
  border-bottom: 1px solid #eee;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.top-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-size: 20px;
  font-weight: 600;
  color: #222;
  white-space: nowrap;
}

.nav-logo span {
  color: #FF6A00;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-links li a {
  display: block;
  padding: 0 18px;
  height: 70px;
  line-height: 70px;
  font-size: 15px;
  color: #333;
  transition: color 0.2s;
  position: relative;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: #FF6A00;
}

.nav-links li a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 3px;
  background: #FF6A00;
  border-radius: 2px 2px 0 0;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 70px;
  left: 0;
  background: #fff;
  min-width: 160px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  z-index: 100;
}

.dropdown-menu a {
  display: block;
  padding: 12px 20px;
  font-size: 14px;
  color: #333;
  height: auto !important;
  line-height: 1.4 !important;
  transition: background 0.2s;
}

.dropdown-menu a:hover {
  background: #fff5eb;
  color: #FF6A00;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

/* ===== Footer ===== */
.site-footer {
  background: #222;
  color: #ccc;
  padding: 40px 0 30px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-col h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-col p,
.footer-col a {
  font-size: 14px;
  line-height: 2;
  color: #aaa;
  display: block;
}

.footer-col a:hover {
  color: #FF6A00;
}

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: #888;
}

.footer-bottom a {
  color: #aaa;
}

.footer-bottom a:hover {
  color: #FF6A00;
}

/* ===== Page Hero Banner ===== */
.page-hero {
  background: linear-gradient(135deg, #FF6A00, #FF8C38, #FF6A00);
  padding: 50px 0;
  text-align: center;
  color: #fff;
  margin-bottom: 40px;
}

.page-hero h1 {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 10px;
}

.page-hero p {
  font-size: 16px;
  opacity: 0.9;
}

/* ===== Section Title ===== */
.section-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  color: #222;
  position: relative;
  padding-left: 16px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: #FF6A00;
  border-radius: 2px;
}

/* ===== Product Card ===== */
.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.product-card .thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #f9f9f9;
}

.product-card .info {
  padding: 14px;
}

.product-card .title {
  font-size: 14px;
  font-weight: 500;
  color: #222;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
  height: 42px;
}

.product-card .price {
  font-size: 18px;
  font-weight: 700;
  color: #e4393c;
}

.product-card .price::before {
  content: '¥';
  font-size: 12px;
}

.product-card .cart-btn {
  display: block;
  width: 100%;
  padding: 8px 0;
  margin-top: 10px;
  background: #FF6A00;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.product-card .cart-btn:hover {
  background: #e65c00;
}

/* ===== Product Grid ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Home Banner ===== */
.home-banner {
  position: relative;
  height: 420px;
  background: linear-gradient(135deg, #FF6A00, #FF8C38, #FFB347);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-banner .banner-text {
  text-align: center;
  color: #fff;
  z-index: 2;
  position: relative;
  padding: 40px;
}

.home-banner .banner-text h2 {
  font-size: 42px;
  font-weight: 600;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.home-banner .banner-text p {
  font-size: 18px;
  opacity: 0.95;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.home-banner .banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.15);
  z-index: 1;
}

/* ===== Category Entry ===== */
.category-entry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.category-entry a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  padding: 24px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.category-entry a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255,106,0,0.15);
  color: #FF6A00;
}

.category-entry .cat-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

/* ===== All Categories Page ===== */
.category-layout {
  display: flex;
  gap: 24px;
}

.category-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  align-self: flex-start;
  position: sticky;
  top: 90px;
}

.category-sidebar a {
  display: block;
  padding: 14px 20px;
  font-size: 15px;
  color: #333;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.category-sidebar a:hover,
.category-sidebar a.active {
  background: #fff5eb;
  color: #FF6A00;
  border-left-color: #FF6A00;
  font-weight: 600;
}

.category-main {
  flex: 1;
}

/* ===== Detail Page ===== */
.detail-wrap {
  display: flex;
  gap: 40px;
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  margin-bottom: 40px;
}

.detail-gallery {
  width: 480px;
  flex-shrink: 0;
}

.detail-gallery .main-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  background: #f9f9f9;
}

.detail-info {
  flex: 1;
}

.detail-info h1 {
  font-size: 22px;
  font-weight: 600;
  color: #222;
  line-height: 1.5;
  margin-bottom: 16px;
}

.detail-info .price-box {
  background: #fff5eb;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.detail-info .price-box .price {
  font-size: 28px;
  font-weight: 700;
  color: #e4393c;
}

.detail-info .price-box .price::before {
  content: '¥';
  font-size: 16px;
}

.detail-info .price-box .label {
  font-size: 13px;
  color: #999;
  margin-right: 8px;
}

.detail-info .params {
  margin-bottom: 24px;
}

.detail-info .params .param-row {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
  font-size: 14px;
}

.detail-info .params .param-row .param-label {
  width: 100px;
  color: #999;
}

.detail-info .params .param-row .param-val {
  flex: 1;
  color: #333;
}

.detail-info .buy-actions {
  display: flex;
  gap: 16px;
}

.detail-info .buy-actions button {
  padding: 12px 40px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.detail-info .buy-actions .btn-buy {
  background: #FF6A00;
  color: #fff;
}

.detail-info .buy-actions .btn-cart {
  background: #222;
  color: #fff;
}

.detail-info .buy-actions button:hover {
  opacity: 0.85;
}

.detail-imgs-section {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  margin-bottom: 40px;
}

.detail-imgs-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #FF6A00;
}

.detail-imgs-section .detail-img {
  width: 100%;
  display: block;
  margin-bottom: 0;
}

/* ===== Hot Sale ===== */
.hot-sale-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hot-sale-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
  transition: transform 0.2s;
  cursor: pointer;
}

.hot-sale-item:hover {
  transform: translateX(4px);
}

.hot-sale-item .rank {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #999;
  flex-shrink: 0;
}

.hot-sale-item .rank.top3 {
  background: #FF6A00;
  color: #fff;
}

.hot-sale-item .thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #f5f5f5;
}

.hot-sale-item .hot-title {
  flex: 1;
  font-size: 14px;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hot-sale-item .hot-price {
  font-size: 16px;
  font-weight: 700;
  color: #e4393c;
  white-space: nowrap;
}

.hot-sale-item .hot-price::before {
  content: '¥';
  font-size: 12px;
}

/* ===== Merchant Page - Style A ===== */
.merchant-advantages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.advantage-card {
  background: #fff;
  border-radius: 12px;
  padding: 30px 24px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: transform 0.2s;
}

.advantage-card:hover {
  transform: translateY(-2px);
}

.advantage-card .icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.advantage-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.advantage-card p {
  font-size: 14px;
  color: #999;
}

.merchant-conditions {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  margin-bottom: 40px;
}

.merchant-conditions h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-left: 16px;
  position: relative;
}

.merchant-conditions h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: #FF6A00;
  border-radius: 2px;
}

.merchant-conditions ul li {
  padding: 10px 0;
  font-size: 15px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 10px;
}

.merchant-conditions ul li::before {
  content: '✓';
  color: #FF6A00;
  font-weight: 700;
  font-size: 16px;
}

.fee-table-wrap {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  margin-bottom: 40px;
}

.fee-table-wrap h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-left: 16px;
  position: relative;
}

.fee-table-wrap h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: #FF6A00;
  border-radius: 2px;
}

.fee-table {
  width: 100%;
  border-collapse: collapse;
}

.fee-table th,
.fee-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.fee-table th {
  background: #fafafa;
  font-weight: 600;
  color: #333;
}

.fee-table td {
  color: #666;
}

.merchant-form-wrap {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  margin-bottom: 40px;
}

.merchant-form-wrap h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-left: 16px;
  position: relative;
}

.merchant-form-wrap h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: #FF6A00;
  border-radius: 2px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
  outline: none;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #FF6A00;
}

.form-group textarea {
  height: 100px;
  resize: vertical;
}

.btn-submit {
  padding: 12px 48px;
  background: #FF6A00;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-submit:hover {
  background: #e65c00;
}

/* ===== News Page ===== */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-card {
  display: flex;
  gap: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.2s;
  cursor: pointer;
}

.news-card:hover {
  transform: translateX(4px);
}

.news-card .news-thumb {
  width: 200px;
  height: 130px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f0f0f0;
}

.news-card .news-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-card .news-title {
  font-size: 17px;
  font-weight: 600;
  color: #222;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-card .news-title .fee-tag {
  display: inline-block;
  background: #e4393c;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.news-card .news-summary {
  font-size: 14px;
  color: #888;
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .news-meta {
  font-size: 13px;
  color: #bbb;
}

/* ===== Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  width: 380px;
  max-width: 90vw;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.modal-box .modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  border: none;
  background: none;
  line-height: 1;
}

.modal-box .modal-close:hover {
  color: #333;
}

.modal-box h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

.modal-box .qrcode-img {
  width: 200px;
  height: 200px;
  margin: 16px auto;
  display: block;
  border-radius: 8px;
}

.modal-box .modal-tip {
  font-size: 14px;
  color: #e4393c;
  font-weight: 500;
}

/* ===== Login Page ===== */
.login-wrap {
  max-width: 420px;
  margin: 40px auto;
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.login-tabs {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 2px solid #eee;
}

.login-tabs .tab {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #999;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.login-tabs .tab.active {
  color: #FF6A00;
  border-bottom-color: #FF6A00;
}

.login-form .form-group {
  margin-bottom: 18px;
}

.login-form .form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  margin-bottom: 6px;
}

.login-form .form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.login-form .form-group input:focus {
  border-color: #FF6A00;
}

.login-form .btn-login {
  width: 100%;
  padding: 12px;
  background: #FF6A00;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.login-form .btn-login:hover {
  background: #e65c00;
}

.login-form .error-msg {
  color: #e4393c;
  font-size: 13px;
  margin-top: 4px;
  display: none;
}

/* ===== About Page ===== */
.about-content {
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.about-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  margin-top: 32px;
  color: #222;
}

.about-content h3:first-child {
  margin-top: 0;
}

.about-content p {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 12px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links li a {
    padding: 0 10px;
    font-size: 13px;
  }
  .detail-wrap {
    flex-direction: column;
  }
  .detail-gallery {
    width: 100%;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .merchant-advantages {
    grid-template-columns: 1fr;
  }
  .category-layout {
    flex-direction: column;
  }
  .category-sidebar {
    width: 100%;
    position: static;
    display: flex;
    flex-wrap: wrap;
  }
  .category-sidebar a {
    flex: 1;
    min-width: 100px;
    text-align: center;
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  .category-sidebar a:hover,
  .category-sidebar a.active {
    border-left-color: transparent;
    border-bottom-color: #FF6A00;
  }
  .news-card {
    flex-direction: column;
  }
  .news-card .news-thumb {
    width: 100%;
    height: 180px;
  }
}
