/* ===== 睿贝 H5 商城 - 自适应样式 ===== */
:root {
  --primary: #fe2c55;
  --primary-dark: #e01e45;
  --primary-light: #fff0f3;
  --accent: #25f4ee;
  --text: #161823;
  --text-secondary: #666;
  --text-muted: #999;
  --bg: #f5f6f8;
  --bg-white: #fff;
  --border: #e8e8e8;
  --success: #07c160;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --header-h: 56px;
  --max-w: 1100px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Header ===== */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  height: var(--header-h);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

.logo svg {
  color: var(--primary);
  flex-shrink: 0;
}

.logo span {
  white-space: nowrap;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
}

.mobile-menu-btn span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-menu a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  border-radius: 20px;
  transition: 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
  background: var(--primary-light);
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #161823 0%, #2d1f3d 50%, #1a0a14 100%);
  color: #fff;
  padding: 48px 0 56px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(254, 44, 85, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(37, 244, 238, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(22px, 5vw, 36px);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: clamp(14px, 3vw, 16px);
  color: rgba(255, 255, 255, 0.75);
  max-width: 560px;
  line-height: 1.7;
}

/* ===== Sections ===== */
.section {
  padding: 48px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 28px;
}

.section-header h2 {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700;
  margin-bottom: 6px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

/* ===== Filter ===== */
.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 20px;
  white-space: nowrap;
  transition: 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

/* ===== Products Table ===== */
.products-table-wrapper {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
}

.products-table thead {
  background: #fafafa;
}

.products-table th {
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.products-table th:nth-child(2),
.products-table th:nth-child(3),
.products-table th:nth-child(4) {
  text-align: center;
  white-space: nowrap;
}

.products-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.product-row:last-child td {
  border-bottom: none;
}

.product-row.hidden {
  display: none;
}

.product-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
}

.stock-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--success);
  background: rgba(7, 193, 96, 0.1);
  border-radius: 4px;
  white-space: nowrap;
}

.price {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  text-align: center;
}

.buy-link {
  display: inline-block;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border-radius: 20px;
  white-space: nowrap;
  transition: 0.2s;
}

.buy-link:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: 50%;
  color: var(--primary);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== Process ===== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.process-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
}

.process-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), #ff6b8a);
  border-radius: 50%;
}

.process-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.process-card p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== Guarantee ===== */
.guarantee-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.guarantee-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--primary);
}

.guarantee-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.guarantee-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: 0.2s;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-question .arrow {
  flex-shrink: 0;
  font-size: 10px;
  color: var(--text-muted);
  transition: 0.3s;
}

.faq-item.open .arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding: 0 18px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== Footer ===== */
.main-footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.6);
  padding: 28px 0;
  text-align: center;
  font-size: 12px;
}

.main-footer a {
  color: rgba(255, 255, 255, 0.8);
}

.main-footer a:hover {
  color: var(--accent);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 16px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb > span:last-child {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

/* ===== Product Detail ===== */
.product-d-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.product-d-info {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  grid-column: 1;
  grid-row: 1 / 3;
}

.product-d-title {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
}

.product-d-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 24px;
}

.product-d-specs {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-label {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.spec-value {
  font-weight: 600;
}

.spec-value.highlight {
  color: var(--success);
}

/* Purchase Options */
.purchase-options {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.option-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.required {
  color: var(--primary);
}

.email-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: 0.2s;
  background: var(--bg);
}

.email-input:focus {
  border-color: var(--primary);
  background: #fff;
}

.email-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.quantity-selector {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.quantity-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--bg);
  transition: 0.2s;
  font-size: 14px;
}

.quantity-btn:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.quantity-input {
  width: 60px;
  height: 44px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  outline: none;
  -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.payment-section {
  margin-bottom: 18px;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.payment-method {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: 0.2s;
  background: var(--bg);
}

.payment-method:hover {
  border-color: var(--primary);
}

.payment-method.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}

.payment-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-icon svg,
.payment-icon img {
  width: 36px;
  height: 36px;
}

.payment-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.payment-method.selected .payment-text {
  color: var(--primary);
}

.total-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px dashed var(--border);
  margin-bottom: 16px;
}

.total-label {
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.total-amount {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

.action-buttons {
  display: flex;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  border-radius: 28px;
  transition: 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  flex: 1;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #ff6b8a);
  box-shadow: 0 4px 16px rgba(254, 44, 85, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(254, 44, 85, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Description */
.product-d-description {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  grid-column: 1 / -1;
}

.description-d-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.description-d-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.description-d-content p {
  margin-bottom: 12px;
}

.description-d-content p:last-child {
  margin-bottom: 0;
}

/* Related Products */
.related-products {
  padding: 40px 0 56px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.ks-product-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: 0.25s;
}

.ks-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.ks-product-card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ks-product-card-description {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ks-product-card-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
}

.ks-product-card-action .btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
}

/* Toast */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(22, 24, 35, 0.9);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 900px) {
  .features-grid,
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-d-detail {
    grid-template-columns: 1fr;
  }

  .product-d-info {
    grid-column: 1;
    grid-row: auto;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Responsive: Mobile H5 ===== */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    border-bottom: 1px solid var(--border);
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-menu a {
    padding: 14px 20px;
    border-radius: 0;
    font-size: 15px;
  }

  .hero {
    padding: 36px 0 44px;
  }

  .section {
    padding: 36px 0;
  }

  /* 产品表格 → 卡片列表 */
  .products-table thead {
    display: none;
  }

  .products-table,
  .products-table tbody,
  .products-table tr,
  .products-table td {
    display: block;
    width: 100%;
  }

  .product-row {
    padding: 16px;
    border-bottom: 1px solid var(--border);
  }

  .product-row:last-child {
    border-bottom: none;
  }

  .products-table td {
    padding: 0;
    border: none;
  }

  .products-table td.product-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.5;
  }

  .products-table td.product-title::before {
    display: none;
  }

  .products-table td[data-label="库存"],
  .products-table td[data-label="价格"],
  .products-table td[data-label="购买"] {
    display: inline-flex;
    align-items: center;
    margin-right: 12px;
    margin-top: 4px;
  }

  .products-table td[data-label="购买"] {
    float: right;
    margin-right: 0;
  }

  .products-table td[data-label="库存"]::before,
  .products-table td[data-label="价格"]::before {
    display: none;
  }

  .price {
    font-size: 18px;
    text-align: left;
  }

  .features-grid,
  .process-grid,
  .guarantee-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .feature-card,
  .process-card {
    padding: 20px 14px;
  }

  .feature-card h3,
  .process-card h3 {
    font-size: 14px;
  }

  .guarantee-card {
    padding: 16px;
  }

  .product-d-info,
  .purchase-options,
  .product-d-description {
    padding: 20px;
  }

  .product-d-price {
    font-size: 24px;
  }

  .payment-methods {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .breadcrumb > span:last-child {
    max-width: 140px;
  }

  .logo span {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .features-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .guarantee-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 28px 0 36px;
  }

  .buy-link {
    padding: 7px 14px;
    font-size: 12px;
  }

  .products-table td[data-label="购买"] {
    float: none;
    display: block;
    margin-top: 12px;
  }

  .buy-link {
    display: block;
    text-align: center;
  }
}

/* ===== 账号类型说明 ===== */
.spec-row-type {
  flex-wrap: wrap;
  gap: 10px;
}

.spec-type-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.type-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.type-tag.active {
  color: var(--primary);
  background: var(--primary-light);
  border-color: var(--primary);
}

.spec-type-hint {
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-muted);
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: -4px 0 8px;
}

.spec-type-hint strong {
  color: var(--text-secondary);
}

/* ===== 确认订单弹窗 ===== */
.order-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(22, 24, 35, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: 0.25s;
}

.order-modal-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.form-error {
  display: none;
  margin-top: 6px;
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}

.form-error.show {
  display: block;
}

.email-input.error {
  border-color: var(--primary);
  background: #fff5f7;
}

.order-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 820px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  transform: translateY(16px) scale(0.98);
  transition: 0.25s;
}

.order-modal-overlay.show .order-modal {
  transform: translateY(0) scale(1);
}

.order-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
  border-radius: 16px 16px 0 0;
}

.order-modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-modal-header h2 i {
  color: var(--primary);
}

.order-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.order-modal-close:hover {
  color: var(--primary);
  background: #ffe0e8;
}

.order-modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px 24px 28px;
}

.order-countdown-box {
  background: #fff0f3;
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  margin-bottom: 14px;
}

.countdown-tip {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.countdown-timer {
  font-size: 42px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}

.countdown-note {
  font-size: 12px;
  color: var(--primary);
  margin-top: 8px;
  opacity: 0.85;
}

.order-detail-box {
  background: #f5f6f8;
  border-radius: 12px;
  padding: 18px 16px;
}

.order-box-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.order-box-title i {
  color: var(--text-secondary);
}

.order-product-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.order-info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e8e8e8;
  font-size: 13px;
}

.order-info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.order-info-label {
  color: var(--text-muted);
  flex-shrink: 0;
}

.order-info-value {
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

.order-amount {
  color: var(--primary);
  font-size: 16px;
  font-weight: 800;
}

.pay-address-card {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 20px;
  background: #fafafa;
}

.pay-address-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pay-address-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pay-address-text {
  flex: 1;
  font-size: 12px;
  font-family: "SF Mono", "Consolas", "Menlo", monospace;
  word-break: break-all;
  line-height: 1.5;
  color: var(--text);
  background: none;
}

.pay-copy-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: #07c160;
  border-radius: 8px;
  transition: 0.2s;
}

.pay-copy-btn:hover {
  background: #06ad56;
}

.pay-copy-btn.copied {
  background: #161823;
}

.pay-qr-wrap {
  text-align: center;
}

.pay-qr-box {
  position: relative;
  display: inline-block;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  line-height: 0;
}

.pay-qr-box img {
  width: 200px;
  height: 200px;
}

.pay-qr-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.pay-qr-tip {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .order-modal-body {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }

  .order-modal-header {
    padding: 14px 16px;
  }

  .countdown-timer {
    font-size: 36px;
  }

  .pay-address-row {
    flex-direction: column;
    align-items: stretch;
  }

  .pay-copy-btn {
    justify-content: center;
  }

  .pay-qr-box img {
    width: 180px;
    height: 180px;
  }

  .spec-type-list {
    justify-content: flex-start;
    width: 100%;
  }

  .spec-row-type {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 安全区适配 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .main-footer {
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
  }
}
