/**
 * Valmoriq - Modern Minimalist Styles
 * 现代简约风格设计
 */

/* ==================== Base Styles ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #ffffff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

/* ==================== Header ==================== */
.header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.2s;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.logo-text {
  display: flex;
  gap: 6px;
  font-size: 24px;
  font-weight: 700;
}

.logo-main {
  color: #1a1a1a;
}

.logo-accent {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  color: #4b5563;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover {
  color: #1a1a1a;
}

.nav-user-email {
  color: #6b7280;
  font-size: 14px;
  padding: 4px 8px;
}

.nav-logout-btn {
  padding: 6px 16px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.nav-logout-btn:hover {
  background: #dc2626;
}

.nav-auth-link {
  padding: 6px 16px;
  background: #667eea;
  color: white !important;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s;
}

.nav-auth-link:hover {
  background: #5a67d8;
  color: white !important;
}

/* Currency Selector */
.currency-selector {
  position: relative;
}

.currency-button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.currency-button:hover {
  background: #e5e7eb;
  color: #1a1a1a;
}

.currency-button svg {
  width: 16px;
  height: 16px;
}

.currency-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  width: 120px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  z-index: 1000;
}

.currency-option {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  font-size: 14px;
  color: #4b5563;
  background: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.currency-option:hover {
  background: #f3f4f6;
  color: #1a1a1a;
}

.currency-option.active {
  background: #667eea;
  color: white;
}

/* ==================== Hero Section ==================== */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  padding: 100px 0;
  text-align: center;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 20px;
  opacity: 0.95;
  margin-bottom: 32px;
  line-height: 1.5;
}

/* ==================== Features Section ==================== */
.features {
  padding: 80px 0;
  background: #f9fafb;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.feature-card {
  background: #ffffff;
  padding: 32px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #1a1a1a;
}

.feature-card p {
  color: #6b7280;
  font-size: 14px;
}

/* ==================== Products Section ==================== */
.section {
  padding: 80px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 700;
}

.link {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.link:hover {
  text-decoration: underline;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.products-grid-all {
  grid-template-columns: repeat(4, 1fr);
}

.product-card {
  display: block;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-image {
  height: 200px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-content {
  padding: 24px;
}

.product-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #1a1a1a;
  text-decoration: none;
}

.product-description {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
  text-decoration: none;
}

.product-features {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.feature-tag {
  background: #f3f4f6;
  color: #4b5563;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.product-price {
  font-size: 20px;
  font-weight: 700;
  color: #667eea;
}

/* ==================== Buttons ==================== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-size: 14px;
}

.btn-primary {
  background: #667eea;
  color: #ffffff;
}

.btn-primary:hover {
  background: #5a67d8;
}

.btn-outline {
  background: transparent;
  color: #667eea;
  border: 2px solid #667eea;
}

.btn-outline:hover {
  background: #667eea;
  color: #ffffff;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

/* ==================== Product Detail ==================== */
.product-detail {
  padding: 80px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.product-detail-image {
  background: #f3f4f6;
  border-radius: 12px;
  overflow: hidden;
  height: 500px;
}

.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  padding: 10px;
}

.product-info h1 {
  font-size: 36px;
  margin-bottom: 16px;
  color: #1a1a1a;
}

.product-info .description {
  font-size: 16px;
  color: #6b7280;
  margin-bottom: 32px;
  line-height: 1.8;
}

.features ul {
  list-style: none;
  padding: 0;
}

.features li {
  padding: 8px 0 8px 24px;
  position: relative;
  color: #4b5563;
}

.features li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
}

.price-section {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: #f9fafb;
  border-radius: 12px;
}

.price-section .price {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
}

.price.price-large {
  font-size: 36px;
  font-weight: 700;
  color: #1a1a1a;
}

.buy-button {
  padding: 16px 48px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.buy-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.buy-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ==================== Cloak Checkout (壳站支付页) ==================== */
.cloak-checkout {
  max-width: 600px;
  margin: 0 auto;
  padding: 32px 16px;
}

@media (min-width: 768px) {
  .cloak-checkout {
    padding: 48px 24px;
  }
}

.checkout-header {
  text-align: center;
  margin-bottom: 32px;
}

.checkout-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.checkout-header p {
  font-size: 16px;
  color: #6b7280;
}

.checkout-card {
  background: white;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.order-summary-section {
  padding: 16px 24px;
  border-bottom: 1px solid #f1f5f9;
}

.order-item-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.order-item-row + .order-item-row {
  margin-top: 12px;
}

.order-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.order-item-info {
  flex: 1;
  min-width: 0;
}

/* 收货地址可编辑表单 */
.shipping-address-form {
  padding: 12px 0;
  margin-bottom: 12px;
}

.shipping-address-label {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.shipping-form-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shipping-form-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  color: #334155;
  background: #fff;
  transition: border-color 0.15s;
  box-sizing: border-box;
  outline: none;
}

.shipping-form-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.shipping-form-input::placeholder {
  color: #94a3b8;
  font-size: 12px;
}

.shipping-form-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.shipping-form-row .shipping-form-input {
  flex: 1;
  min-width: 0;
}

/* 地址字段wrapper（含label + input + error提示） */
.shipping-field-wrapper {
  display: flex;
  flex-direction: column;
}

/* 字段名标签 */
.shipping-form-label {
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  margin-bottom: 4px;
  padding-left: 2px;
}

/* 必填红色星号 */
.shipping-form-required {
  color: #ef4444;
}

/* 校验错误：红色边框 */
.shipping-form-input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.15) !important;
}

/* 校验错误提示文字 */
.shipping-form-error {
  color: #ef4444;
  font-size: 11px;
  margin-top: 3px;
  padding-left: 2px;
}

/* select 下拉框样式对齐 input */
.shipping-form-select {
  appearance: auto;
  -webkit-appearance: auto;
  cursor: pointer;
}

/* 手机区号选择器 */
.phone-code-select {
  width: 72px !important;
  padding: 8px 4px;
  font-size: 13px;
  text-align: center;
  flex-shrink: 0;
}

/* 支付页信任标识条（30天退款 + 24h发货） */
.checkout-trust-strip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 0 4px;
  border-top: 1px solid #f1f5f9;
  margin-top: 8px;
}

.checkout-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
}

/* 账单地址与收货地址一致的勾选框 */
.billing-same-checkbox {
display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    margin: 12px auto -12px;
    position: relative;
    padding-left: 15px;
}
.billing-same-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  cursor: pointer;
  margin: 0;
}

.order-product-name {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  margin-bottom: 4px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.order-product-detail {
  font-size: 12px;
  color: #94a3b8;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-row .label {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.05em;
}

.price-row .price {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

/* 优惠券样式 */
.coupon-section {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.coupon-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.coupon-input:focus {
  outline: none;
  border-color: #667eea;
}

.coupon-btn {
  padding: 12px 24px;
  background: #1a1a1a;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.coupon-btn:hover {
  background: #2d2d2d;
}

.coupon-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.payment-form-section {
  padding: 24px;
  background: white;
}

/* 支付按钮区域(包含苹果支付) */
.payment-actions-wrapper {
  background: white;
  margin-top: -100px;
}

.express-section {
  padding: 16px 24px 8px;
}

.express-section-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 100%;
  padding: 8px 24px 24px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 24px 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.divider-text {
  font-size: 12px;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.05em;
}

.payment-actions {
  padding: 24px;
  background: white;
}

.pay-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.pay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.pay-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ==================== Trust Badges ==================== */
.trust-section {
  padding: 60px 0;
  background: #f9fafb;
}


.badge {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #4b5563;
}

.badge-icon {
  font-size: 24px;
  color: #667eea;
}

/* ==================== Footer ==================== */
.footer {
  background: #1a1a1a;
  color: #ffffff;
  padding: 64px 0 32px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 64px;
  margin-bottom: 48px;
}

.footer-section h3,
.footer-section h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-section p {
  color: #9ca3af;
  line-height: 1.6;
}

.footer-section a {
  display: block;
  color: #9ca3af;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: #ffffff;
}

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid #374151;
  color: #9ca3af;
}

.footer-disclaimer {
  margin-top: 12px;
  font-size: 13px;
  opacity: 0.8;
}

/* ==================== Payment Header & Footer (业务站支付页专用) ==================== */
.payment-header {
  padding: 16px 0;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.payment-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.payment-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
}

.payment-brand svg {
  width: 28px;
  height: 28px;
}

.payment-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 9999px;
  color: #16a34a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.payment-badge svg {
  width: 16px;
  height: 16px;
}

.payment-footer {
  padding: 48px 0;
  margin-top: auto;
  border-top: 1px solid #e2e8f0;
  background: white;
}

.payment-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  text-align: center;
}

@media (min-width: 768px) {
  .payment-footer-grid {
    grid-template-columns: 1fr 1fr;
    text-align: left;
    max-width: 896px;
    margin: 0 auto 48px;
  }
}

.payment-footer-section h4 {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.payment-footer-section p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  max-width: 448px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .payment-footer-section p {
    margin: 0;
  }
}

.payment-footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: space-around;
}

.payment-footer-section ul li {
  margin-bottom: 12px;
}

.payment-footer-section ul li:last-child {
  margin-bottom: 0;
}

.payment-footer-section ul span,
.payment-footer-section ul a {
  font-size: 11px;
  color: #64748b;
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: none;
}

.payment-footer-section ul span:hover,
.payment-footer-section ul a:hover {
  color: #2563eb;
}

/* ===== Payment Footer: Security & Trust Section ===== */
.payment-security-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

/* Card Brand Logos */
.payment-card-brands {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.payment-card-brand {
  width: 44px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Security Badges Grid */
.payment-security-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 24px;
  max-width: 700px;
}

.payment-security-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}

.payment-security-badge svg {
  color: #059669;
  flex-shrink: 0;
}

/* Compliance Row */
.payment-compliance-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 11px;
  color: #94a3b8;
}

.payment-compliance-row .payment-card-brand {
  width: 22px;
  border-radius: 3px;
  box-shadow: none;
}

.payment-compliance-dot {
  color: #d1d5db;
}

/* Responsive: Security Section */
@media (max-width: 640px) {
  .payment-security-badges {
    flex-direction: column;
    gap: 8px;
  }
}

.payment-footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid #e2e8f0;
  color: #94a3b8;
  font-size: 14px;
}

.payment-footer-bottom p {
  margin: 0;
}

/* ===== Payment Footer: Policy Links (6 items, 2x3 grid, on top) ===== */
.payment-policy-grid {
  grid-template-columns: 1fr;
  text-align: center;
  margin: 0 0 24px;
}

@media (min-width: 768px) {
  .payment-policy-grid {
    grid-template-columns: 1fr;
    text-align: center;
    max-width: 720px;
  }
}

.payment-policy-section ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 12px;
  justify-content: unset;
  justify-items: center;
}

.payment-policy-section ul li {
  margin-bottom: 0;
}

.payment-policy-section ul span,
.payment-policy-section ul a {
  font-size: 13px;
  color: #1e293b;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.payment-policy-section ul span:hover,
.payment-policy-section ul a:hover {
  color: #2563eb;
}

@media (max-width: 480px) {
  .payment-policy-section ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Payment Footer: Trust Items (3 rows with icon + title + desc) ===== */
.payment-trust-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto 20px;
  text-align: left;
}

.payment-trust-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.payment-trust-icon {
  flex-shrink: 0;
  color: #475569;
  margin-top: 2px;
}

.payment-trust-text {
  flex: 1;
  min-width: 0;
}

.payment-trust-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
  margin-bottom: 2px;
}

.payment-trust-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.55;
}

/* ==================== Business Checkout Wrapper (业务站支付页) ==================== */
.secure-checkout-header {
  text-align: left;
  font-size: 20px;
  font-weight: 500;
  color: #94a3b8;
  padding: 8px 16px 4px;
  letter-spacing: 0.5px;
}
.business-checkout-wrapper {
  position: relative;
  max-width: 540px;
  margin: 0 auto;
  padding: 16px 16px;
}

@media (min-width: 768px) {
  .business-checkout-wrapper {
    padding: 24px 24px;
  }
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.order-info-card {
  background: white;
  padding: 20px 24px 12px;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
}

@media (min-width: 768px) {
  .order-info-card {
    padding: 24px 32px 14px;
  }
}

.order-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #f1f5f9;
}

.order-icon {
  width: 48px;
  height: 48px;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-icon svg {
  width: 24px;
  height: 24px;
}

.order-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.order-ref {
  font-size: 16px;
  font-weight: 500;
  color: #1e293b;
  margin: 0;
}

.order-amount {
  margin-bottom: 4px;
}

.amount-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.amount-value {
  font-size: 30px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
  justify-content: right;
}

.currency-label {
  font-size: 14px;
  font-weight: 400;
  color: #94a3b8;
}

.payment-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: white;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.payment-header {
  padding: 16px 24px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.payment-header span {
  font-size: 18px;
  font-weight: 700;
  color: #334155;
}

.refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.refresh-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.payment-form {
  background: white;
}

/* ==================== 支付方式选择区（PayPal | Express | Pay with Card） ==================== */
.payment-methods-section {
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* PayPal 按钮（与 Pay with Card 统一风格） */
.paypal-btn {
  width: 100%;
  padding: 0 16px;
  height: 50px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  color: #334155;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.2s, background 0.2s, opacity 0.2s;
}

.paypal-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}
.paypal-btn.paypal-btn-unavailable {
  background: #f3f4f6;
  color: #9ca3af;
  opacity: 1;
}

/* PayPal loading 转圈 */
.paypal-spinner-ring {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 48, 135, 0.25);
  border-top-color: #003087;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* Express Checkout 新版容器 */
.express-section-new {
  position: relative;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
}

.express-section-hidden-new {
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Express Pay 真实按钮容器 —— 默认隐藏，加载/折叠态绝对定位+透明避免闪现 */
.express-real {
  width: 100%;
  transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.2s ease;
  overflow: hidden;
}
.express-real-hidden {
  position: absolute;
  top: 0;
  left: 0;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  padding: 0;
  margin: 0;
  visibility: hidden;
}
.express-real-expanded {
  position: relative;
  max-height: 200px;
  opacity: 1;
  visibility: visible;
  padding: 10px;
}

/* Express 骨架：纯转圈 */
.express-spinner-inline {
  width: 16px;
  height: 16px;
  border: 2.5px solid #e5e7eb;
  border-top-color: #64748b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* 不可用态：双 class 叠权 (> 单 class)，无视顺序 */
.express-skeleton.express-skeleton-unavailable {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: default;
}
.express-skeleton.express-skeleton-unavailable:hover {
  border-color: #e5e7eb;
  background: #f3f4f6;
}

/* Card 支付分组容器（按钮 + 表单 + 支付操作） */
.card-payment-group {
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.card-payment-group .card-toggle-btn {
  border: 1px solid transparent;
  border-radius: 0;
}
.card-payment-group .card-toggle-btn:hover {
  background: #f8fafc;
}
.card-payment-group .payment-footer-new {
  padding-bottom: 16px;
}
/* Express Pay 在 card-payment-group 内：骨架屏/按钮无独立边框，融入容器 */
.card-payment-group .express-skeleton {
  border: none;
  border-radius: 0;
  border-bottom: 1px solid #e5e7eb;
}
.card-payment-group .express-skeleton:hover {
  background: #f8fafc;
}
.card-payment-group .express-skeleton.express-skeleton-unavailable:hover {
  background: #f3f4f6;
}

/* Pay with Card 切换按钮 */
.card-toggle-btn {
  width: 100%;
  padding: 0 16px;
  height: 50px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  color: #334155;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.2s, background 0.2s;
}

.card-toggle-left {
  display: flex;
  align-items: center;
  font-weight: 600;
}

.card-brand-icon {
  width: 23px;
  height: auto;
  display: block;
  border-radius: 3px;
}

/* 信用卡表单折叠/展开（absolute + opacity:0 隐藏，保证 Whop iframe 有完整尺寸可初始化） */
.payment-form-collapsed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}
.payment-form-expanded {
  position: relative;
  opacity: 1;
  z-index: auto;
}

/* 信用卡支付按钮区（展开时显示） */
.payment-footer-wrapper-new {
  position: relative;
  z-index: 20;
  background: white;
  display: flex;
  flex-direction: column;
}
.payment-footer-new {
  padding: 8px 8px 24px;
  margin-top: -85px;
  flex: 1 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #fff;
}
@media screen and (min-width: 375px) {
  .payment-footer-new {
    margin-top: -60px;
  }
}

/* Whop 支付 Loading 遮罩 */
.payment-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: white;
  z-index: 100;
  border-radius: 16px;
}

.payment-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.payment-loading-text {
  margin-top: 16px;
  font-size: 14px;
  color: #64748b;
}

.payment-footer-wrapper {
  position: relative;
  z-index: 20;
  background: white;
  display: flex;
  flex-direction: column;
  min-height: 125px;
  margin-top: -45px;
}

.express-section {
  padding: 0 24px 8px;
}

.express-section-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 100%;
}

/* Express Checkout 骨架屏 */
.express-skeleton {
  width: 100%;
  padding: 0 16px;
  height: 50px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  color: #334155;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: default;
  transition: border-color 0.2s, background 0.2s;
}


.payment-footer {
  padding: 8px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: #f1f5f9;
}

.divider-text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.complete-payment-btn {
  width: 100%;
  padding: 16px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.complete-payment-btn:hover {
  background: #1d4ed8;
}

.complete-payment-btn:disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}

.refresh-page-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: #2563eb;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.refresh-page-btn:hover {
  background: #eff6ff;
}

.btn-icon {
  width: 20px;
  height: 20px;
}

.btn-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.business-checkout-wrapper .trust-badges {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center;
    align-items: center;
    padding: 4px 2px;
    margin-top: 8px;
    background: #f1f3f6;
    border-radius: 8px;
}

.business-checkout-wrapper .trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  flex-shrink: 0;
}

.terms {
  text-align: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
}

/* ==================== Gate Page ==================== */
.gate-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
}

.gate-loading-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid #e5e7eb;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

.gate-loading-text {
  font-size: 14px;
  color: #6b7280;
}

/* ==================== Skeleton Loader (替换 Gate/Checkout 初始 loading 文案) ==================== */
.skeleton-page {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}

.skeleton-card {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skeleton-block {
  background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 50%, #f3f4f6 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-header { height: 22px; width: 55%; }
.skeleton-row { height: 14px; width: 100%; }
.skeleton-row-mid { height: 14px; width: 70%; }
.skeleton-row-short { height: 14px; width: 40%; }
.skeleton-button { height: 44px; width: 100%; border-radius: 8px; }
.skeleton-divider { height: 1px; background: #f1f5f9; border-radius: 0; animation: none; }

.skeleton-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.skeleton-field { height: 38px; width: 100%; border-radius: 6px; }
.skeleton-field-row { display: flex; gap: 8px; }
.skeleton-field-row .skeleton-field { flex: 1; }

/* ==================== Success Page ==================== */
.success-page {
  padding: 100px 0;
  text-align: center;
}

.success-content {
  max-width: 500px;
  margin: 0 auto;
}

.success-icon {
  font-size: 64px;
  color: #10b981;
  margin-bottom: 24px;
}

.success-content h1 {
  font-size: 32px;
  margin-bottom: 16px;
  color: #1a1a1a;
}

.success-content p {
  color: #6b7280;
  margin-bottom: 32px;
}

.success-error {
  padding: 16px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  color: #92400e;
  font-size: 14px;
  margin-bottom: 24px;
  text-align: left;
}

.dashboard-link {
  display: inline-block;
  padding: 12px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
}

/* ==================== Dashboard Page ==================== */
.dashboard-page {
  padding: 60px 0;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.dashboard-header h1 {
  font-size: 32px;
  color: #1a1a1a;
}

.logout-button {
  padding: 10px 24px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.user-info {
  background: #f9fafb;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 32px;
}

.orders-list {
  display: grid;
  gap: 16px;
}

.order-item {
  background: white;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.order-item h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.order-item p {
  color: #6b7280;
  margin: 4px 0;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-grid-all {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  .mobile-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
  }

  .mobile-menu-button:hover {
    background: #e5e7eb;
  }

  .mobile-menu-button svg {
    width: 24px;
    height: 24px;
    color: #4b5563;
  }

  .mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  .mobile-menu-content {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 16px;
  }

  .mobile-menu-link {
    display: block;
    padding: 12px 16px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    background: #f9fafb;
    border-radius: 8px;
    transition: all 0.2s;
  }

  .mobile-menu-link:hover {
    background: #f3f4f6;
    color: #1a1a1a;
  }

  .mobile-menu-user {
    padding: 8px 16px;
    color: #6b7280;
    font-size: 14px;
  }

  .mobile-menu-logout {
    padding: 12px 16px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
  }

  .mobile-menu-logout:hover {
    background: #dc2626;
  }

  .mobile-menu-auth-link {
    display: block;
    padding: 12px 16px;
    background: #667eea;
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    text-align: center;
    transition: background 0.2s;
  }

  .mobile-menu-auth-link:hover {
    background: #5a67d8;
  }

  .mobile-currency-selector {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
  }

  .mobile-currency-title {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 12px;
  }

  .mobile-currency-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .mobile-currency-option {
    padding: 10px 16px;
    background: #f9fafb;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }

  .mobile-currency-option:hover {
    background: #f3f4f6;
  }

  .mobile-currency-option.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .products-grid,
  .products-grid-all {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-section {
    text-align: center;
    padding: 0 20px;
  }

  .footer-section h3,
  .footer-section h4 {
    margin-bottom: 20px;
  }

  .footer-section a {
    margin-bottom: 12px;
    font-size: 15px;
  }

}

/* 桌面端隐藏移动菜单按钮 */
@media (min-width: 769px) {
  .mobile-menu-button {
    display: none;
  }
}

/* ==================== Auth Page ==================== */
.auth-page {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  background: #f9fafb;
}

.auth-card {
  background: white;
  padding: 48px;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  max-width: 400px;
  width: 100%;
}

.auth-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 32px;
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth-error {
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.form-group input {
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-submit-btn {
  padding: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-toggle {
  margin-top: 24px;
  text-align: center;
}

.toggle-btn {
  background: none;
  border: none;
  color: #667eea;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}

.toggle-btn:hover {
  color: #5a67d8;
}

/* ==================== Legal Pages ==================== */
.legal-page {
  padding: 80px 0;
  background: #f9fafb;
  min-height: calc(100vh - 200px);
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .legal-content {
    padding: 24px;
    margin: 0 16px;
  }
}

.legal-content h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #1a1a1a;
}

.legal-updated {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 32px;
}

.legal-body {
  color: #374151;
  line-height: 1.7;
}

.legal-body h3 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 16px;
  color: #1a1a1a;
}

.legal-body h4 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
  color: #1a1a1a;
}

.legal-body p {
  margin-bottom: 16px;
}

.legal-body ul {
  margin-bottom: 16px;
  padding-left: 24px;
}

.legal-body ul li {
  margin-bottom: 8px;
}

.legal-body a {
  color: #667eea;
  text-decoration: none;
}

.legal-body a:hover {
  text-decoration: underline;
}

.legal-warning {
  padding: 20px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  margin: 24px 0;
}

.legal-warning h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #92400e;
}

.legal-warning p {
  margin: 0;
  color: #92400e;
  font-size: 14px;
}

.legal-warning-red {
  background: #fee2e2;
  border-color: #fca5a5;
}

.legal-warning-red h3,
.legal-warning-red p {
  color: #7f1d1d;
}

.legal-contact-box {
  padding: 20px;
  background: #f3f4f6;
  border-radius: 8px;
  margin: 16px 0;
}

.legal-contact-box p {
  margin: 0;
  line-height: 1.6;
}

/* ==================== Legal Modal (支付页弹窗) ==================== */
.legal-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.legal-modal {
  background: white;
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.legal-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.legal-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 6px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s;
}

.legal-modal-close:hover {
  background: #e5e7eb;
  color: #1a1a1a;
}

.legal-modal-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
}

.legal-modal-body ul li {
  margin-bottom: 4px;
}

.footer-section a,
.footer-section span {
  display: block;
  color: #9ca3af;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.2s;
  cursor: pointer;
}

.footer-section a:hover {
  color: #ffffff;
}

/* ==================== Feedback Modal ==================== */
.feedback-trigger-btn {
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: #3c9ada;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    padding: 8px 12px 12px;
    text-align: center;
    font-size: 12px;
}


.feedback-trigger-btn:hover {
  color: #4b5563;
  text-decoration: underline;
}

.feedback-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.feedback-modal {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.feedback-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
}

.feedback-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.feedback-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.feedback-modal-close:hover {
  background: #f3f4f6;
  color: #4b5563;
}

/* PayPal 暂不可用弹窗专用样式（复用 feedback-modal-overlay / feedback-modal 容器） */
.paypal-modal-desc {
  padding: 16px 20px 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
  margin: 0;
}

.paypal-modal-actions {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.paypal-modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  outline: none;
}

.paypal-modal-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.paypal-modal-btn-primary {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}
.paypal-modal-btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.paypal-modal-btn-express {
  background: #ffffff;
  color: #1e293b;
  border-color: #e5e7eb;
}
.paypal-modal-btn-express:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.paypal-modal-btn-close {
  background: transparent;
  color: #6b7280;
  border-color: #e5e7eb;
}
.paypal-modal-btn-close:hover:not(:disabled) {
  background: #f3f4f6;
  color: #374151;
}

/* Radio Group */
.feedback-radio-group {
  padding: 16px 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feedback-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  color: #374151;
}

.feedback-radio:hover {
  border-color: #2563eb;
  background: #f8fafc;
}

.feedback-radio.selected {
  border-color: #2563eb;
  background: #eff6ff;
}

.feedback-radio input[type="radio"] {
  display: none;
}

.feedback-radio-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.feedback-radio.selected .feedback-radio-dot {
  border-color: #2563eb;
  background: #2563eb;
  box-shadow: inset 0 0 0 3px #ffffff;
}

/* Textarea */
.feedback-textarea {
  display: block;
  width: calc(100% - 40px);
  margin: 8px 20px 0;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #374151;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}

.feedback-textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.feedback-textarea::placeholder {
  color: #9ca3af;
}

/* Upload Section */
.feedback-upload-section {
  padding: 12px 20px 0;
}

.feedback-upload-label {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 8px;
}

.feedback-upload-preview-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.feedback-upload-preview {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.feedback-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feedback-upload-preview.uploading {
  opacity: 0.6;
}

.feedback-upload-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
}

.feedback-upload-spinner::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: feedback-spin 0.6s linear infinite;
}

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

.feedback-upload-check {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #ffffff;
  border-radius: 50%;
  padding: 2px;
}

.feedback-upload-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.feedback-upload-preview:hover .feedback-upload-remove {
  opacity: 1;
}

.feedback-upload-add {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
}

.feedback-upload-add:hover {
  border-color: #2563eb;
  color: #2563eb;
}

/* Error */
.feedback-error {
  margin: 12px 20px 0;
  font-size: 13px;
  color: #ef4444;
}

/* Submit Button */
.feedback-submit-btn {
  display: block;
  width: calc(100% - 40px);
  margin: 16px 20px 20px;
  padding: 12px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.feedback-submit-btn:hover:not(:disabled) {
  background: #1d4ed8;
}

.feedback-submit-btn:disabled {
  background: #93c5fd;
  cursor: not-allowed;
}

/* Done State */
.feedback-modal-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px;
  gap: 12px;
}

.feedback-done-text {
  font-size: 15px;
  color: #374151;
}

.feedback-modal-done .feedback-submit-btn {
  width: auto;
  min-width: 120px;
  margin: 0;
}