:root {
  --blue: #2196f3;
  --deep-blue: #1976d2;
  --text: #616161;
  --line: #e0e0e0;
  --surface: rgba(255, 255, 255, 0.9);
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  margin: 0;
  min-width: 320px;
  padding-top: 69px;
  color: var(--text);
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }

.container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding-right: 15px;
  padding-left: 15px;
}

.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  min-height: 69px;
  border: 0;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.nav-container {
  width: 100%;
  max-width: 1300px;
  min-height: 69px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  height: 50px;
  display: flex;
  align-items: center;
  padding: 7.5px 0;
  text-decoration: none;
}

.navbar-brand img {
  width: 35px;
  height: 35px;
  display: block;
  object-fit: cover;
}

.nav-menu { display: flex; align-items: center; gap: 0; }

.nav-menu > a,
.member-menu > summary {
  display: block;
  margin: 4px 2px;
  border-radius: 6px;
  padding: 12px 16px;
  color: #424242;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  list-style: none;
  transition: color .2s, background .2s;
}

.nav-menu > a:hover,
.member-menu > summary:hover { color: var(--blue); background: #f5f5f5; }
.member-menu > summary::-webkit-details-marker { display: none; }
.caret { display: inline-block; margin-left: 3px; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(3px); }
.member-menu { position: relative; }
.member-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  min-width: 110px;
  display: none;
  padding: 6px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 5px 12px rgba(0, 0, 0, .15);
}
.member-menu[open] .member-dropdown { display: block; }
.member-dropdown a { display: block; padding: 8px 20px; color: #424242; text-decoration: none; white-space: nowrap; }
.member-dropdown a:hover { background: #f5f5f5; color: var(--blue); }

.navbar-toggle {
  width: 42px;
  height: 38px;
  display: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px 9px;
  background: #fff;
}
.navbar-toggle span { display: block; height: 2px; margin: 4px 0; background: #666; }

.content { min-height: calc(100vh - 197px); padding-top: 7px; padding-bottom: 30px; }
.home-columns { display: flex; margin: 0 -15px; }
.home-primary { width: 75%; padding: 0 15px; }
.surface {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.notice-card { margin-bottom: 30px; padding: 20px; }
.notice-card h1,
.category-card h2 {
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8e8e8;
  color: #42a5f5;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 600;
}
.notice-card h1 span,
.category-card h2 span { margin-right: 7px; }
.notice-list { display: grid; gap: 10px; }
.notice-item {
  display: flex;
  gap: 5px;
  min-height: 46px;
  align-items: center;
  padding: 10px 14px;
  border-left: 3px solid #4fc3f7;
  border-radius: 3px;
  background: rgba(245, 249, 252, .86);
}
.notice-item strong { flex: 0 0 auto; color: #42a5f5; }
.notice-item b { color: #ef6c6c; }

.support-card {
  margin-top: 20px;
  padding: 16px;
  border-radius: 5px;
  background: #f8d34d;
  color: #795b20;
}
.support-card > strong { display: block; margin-bottom: 8px; }
.support-card p { margin: 0 0 12px; }
.telegram-label { border: 0; border-radius: 4px; padding: 6px 12px; color: #fff; background: #2196f3; font-weight: 700; cursor: default; }
.support-warning { padding: 8px 12px; border-left: 3px solid #ff6f61; color: #ef6c57; background: rgba(255, 193, 7, .22); font-size: 13px; font-weight: 600; }

.category-card { margin-bottom: 30px; padding: 20px; }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.category-link {
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 10px 16px;
  color: #616161;
  background: #f5f5f5;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition: border-color .2s, background .2s, color .2s;
}
.category-link:hover,
.category-link.selected { border-color: #64b5f6; color: #1976d2; background: #e3f2fd; }
.show-more { width: 100%; margin-top: 13px; border: 0; padding: 6px; color: #757575; background: transparent; cursor: pointer; }

.products-panel { overflow: hidden; margin: 0 -15px 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.panel-heading { min-height: 43px; display: flex; align-items: center; padding: 12px 20px; color: #fff; background: #2196f3; }
.panel-heading h2 { margin: 0; font-size: 16px; line-height: 1.1; font-weight: 500; }
.panel-body { padding: 20px; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.product-card {
  position: relative;
  min-height: 116px;
  display: block;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  color: #616161;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
  transition: transform .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(0, 0, 0, .12); }
.product-card > img { position: absolute; left: 15px; top: 20px; width: 75px; height: 75px; border-radius: 10px; object-fit: cover; }
.product-info { min-width: 0; margin-left: 92px; }
.product-info h3 { min-height: 43px; margin: 0 0 5px; color: #424242; font-size: 14px; line-height: 1.55; font-weight: 600; }
.product-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 5px; }
.tag { border-radius: 3px; padding: 1px 5px; font-size: 11px; }
.tag.auto { color: #388e3c; background: #e8f5e9; }
.tag.stock { color: #d84315; background: #fbe9e7; }
.tag.sales { color: #ef6c00; background: #fff3e0; }
.price { display: block; color: #f44336; font-size: 16px; }
.empty-products { padding: 70px 20px; color: #90a4ae; text-align: center; }

.site-footer { min-height: 128px; padding: 25px 0; border-top: 1px solid #e0e0e0; background: #fff; box-shadow: 0 -2px 8px rgba(0, 0, 0, .05); }
.footer-inner { min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #757575; }
.footer-link { border: 0; padding: 0; color: #42a5f5; background: transparent; cursor: default; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 20px; color: #78909c; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: #1976d2; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(265px, 1fr); gap: 30px; }
.goods-card { min-height: 340px; display: grid; grid-template-columns: 300px 1fr; gap: 22px; padding: 20px; border-radius: 8px; background: rgba(255, 255, 255, .76); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.goods-card > img { width: 300px; height: 300px; border-radius: 16px; object-fit: cover; }
.goods-options h1 { margin: 2px 0 28px; color: #42a5f5; font-size: 22px; line-height: 1.35; }
.option-row { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 10px 14px; border: 1px solid #e0e0e0; }
.count-control { display: flex; }
.count-control button, .count-control input { width: 42px; height: 32px; border: 1px solid #90caf9; text-align: center; }
.count-control button { color: #fff; background: #42a5f5; cursor: pointer; }
.count-control input { width: 62px; border-right: 0; border-left: 0; background: #fff; }
.payment-box { margin-top: 6px; padding: 10px 14px 17px; border: 1px solid #e0e0e0; }
.payment-box p { margin: 0 0 9px; }
.payment-choice { border: 0; border-radius: 4px; padding: 7px 14px; color: #fff; background: #42a5f5; font-weight: 600; }
.usdt-icon { margin-right: 6px; }
.description-card { margin-top: 20px; border-radius: 8px; padding: 15px; background: rgba(255, 255, 255, .76); }
.description-card h2 { margin: 0; border-radius: 4px 4px 0 0; padding: 12px 20px; color: #fff; background: #42a5f5; font-size: 18px; }
.description-body { min-height: 24px; background: #fff; }
.purchase-card { align-self: start; border-radius: 8px; padding: 18px; background: rgba(255, 255, 255, .8); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.purchase-price { display: block; margin-bottom: 8px; color: #2196f3; font-size: 25px; }
.purchase-card label { display: block; margin-bottom: 6px; }
.purchase-card > input { width: 100%; border: 1px solid #e0e0e0; border-radius: 3px; padding: 10px 12px; outline: none; }
.purchase-card > p { color: #9e9e9e; font-size: 12px; }
.buy-button, .form-button { border: 0; border-radius: 3px; padding: 10px 15px; color: #fff; background: #2196f3; cursor: pointer; }
.buy-button { width: 100%; }
.purchase-card h2 { margin: 18px -18px 5px; border-top: 1px solid #e0e0e0; padding: 14px 18px 8px; color: #42a5f5; font-size: 14px; }
.purchase-card dl { margin: 0; }
.purchase-card dl > div { padding: 9px 0; border-bottom: 1px solid #eee; }
.purchase-card dt { color: #78909c; }
.purchase-card dd { margin: 2px 0 0 25px; color: #42a5f5; }
.contact-tip { margin-top: 14px; padding: 10px; color: #78909c; background: #f5f5f5; font-size: 12px; }

.narrow-page { width: min(520px, 100%); margin: 44px auto; padding: 28px; background: rgba(255, 255, 255, .92); }
.narrow-page h1 { margin: 0 0 8px; color: #42a5f5; font-size: 24px; }
.narrow-page > p { margin: 0 0 22px; color: #90a4ae; }
.narrow-page label { display: block; margin: 13px 0 5px; color: #616161; font-weight: 600; }
.narrow-page input { width: 100%; border: 1px solid #d8dfe3; border-radius: 4px; padding: 10px 12px; outline: none; }
.narrow-page input:focus { border-color: #42a5f5; box-shadow: 0 0 0 3px rgba(66, 165, 245, .12); }
.narrow-page .form-button { width: 100%; margin-top: 20px; }
.form-result { min-height: 40px; margin-top: 14px; color: #ef6c57; text-align: center; }
.account-switch { text-align: center; }
.account-switch a { color: #1976d2; text-decoration: none; }
.inline-button { width: auto !important; display: inline-block; text-decoration: none; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 2000; transform: translate(-50%, 15px); border-radius: 4px; padding: 10px 18px; color: #fff; background: rgba(38, 50, 56, .94); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 991px) {
  .home-primary { width: 100%; }
  .detail-layout { grid-template-columns: 1fr; }
  .purchase-card { width: 100%; }
}

@media (max-width: 767px) {
  body { padding-top: 50px; }
  .navbar, .nav-container { min-height: 50px; }
  .nav-container { flex-wrap: wrap; }
  .navbar-brand { height: 50px; }
  .navbar-toggle { display: block; }
  .nav-menu { width: calc(100% + 30px); display: none; flex-direction: column; align-items: stretch; margin: 0 -15px; border-top: 1px solid #eee; padding: 6px 12px 10px; background: #fff; }
  .nav-menu.open { display: flex; }
  .nav-menu > a, .member-menu > summary { margin: 0; padding: 9px 12px; }
  .member-dropdown { position: static; border: 0; box-shadow: none; padding-left: 14px; }
  .content { padding-top: 10px; }
  .home-columns { margin: 0; }
  .home-primary { padding: 0; }
  .notice-card, .category-card { margin-bottom: 16px; padding: 14px; }
  .notice-item { align-items: flex-start; flex-direction: column; gap: 2px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .category-link { min-height: 40px; border-radius: 20px; padding: 8px 10px; font-size: 12px; }
  .products-panel { margin: 0 0 16px; }
  .panel-body { padding: 12px; }
  .product-grid { grid-template-columns: 1fr; gap: 10px; }
  .product-card { min-height: 110px; padding: 12px; }
  .product-card > img { left: 12px; top: 17px; }
  .product-info { margin-left: 88px; }
  .goods-card { grid-template-columns: 1fr; }
  .goods-card > img { width: min(300px, 100%); height: auto; aspect-ratio: 1; margin: 0 auto; }
  .goods-options h1 { font-size: 19px; }
  .breadcrumb { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
