:root {
  --points-bg: #f5f7fb;
  --points-card: #ffffff;
  --points-line: #e7ecf5;
  --points-text: #1f2a44;
  --points-muted: #6b7280;
  --points-primary: #ef4444;
  --points-primary-soft: #fff1f2;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--points-bg);
  color: var(--points-text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

.points-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--points-line);
  background: #fff;
}

.points-topbar-inner {
  width: min(1180px, calc(100% - 24px));
  min-height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.points-brand {
  font-size: 22px;
  font-weight: 700;
}

.points-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #4b5563;
  font-size: 13px;
}

.points-wrap {
  width: min(1180px, calc(100% - 24px));
  margin: 18px auto 28px;
}

/* 积分页顶栏与用户中心对齐（uc-top-links 在窄屏可横向滚动） */
.uc-topbar .uc-top-links {
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 560px) {
  .uc-topbar-inner {
    flex-wrap: wrap;
    padding: 8px 0;
  }
  .uc-topbar .uc-top-links {
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
    row-gap: 8px;
  }
}

.points-hero {
  border-radius: 18px;
  padding: 28px;
  background: linear-gradient(135deg, #111827, #7f1d1d);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}

.points-hero h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.points-hero p {
  margin: 0;
  color: #fecaca;
}

.points-balance {
  min-width: 220px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.1);
}

.points-balance strong {
  display: block;
  margin-top: 6px;
  font-size: 30px;
}

.points-balance small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #fecaca;
}

.points-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.points-filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--points-muted);
}

.points-filter-grid input,
.points-filter-grid select {
  height: 38px;
  border: 1px solid var(--points-line);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px;
}

.points-redeem-hint {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
}

.points-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.points-card {
  border: 1px solid var(--points-line);
  border-radius: 14px;
  background: var(--points-card);
  overflow: hidden;
}

.points-card-img {
  height: 150px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  position: relative;
}

.points-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.points-image-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.points-card-img.is-empty .points-image-fallback,
.points-detail-img.is-empty .points-image-fallback,
.points-gd-img-wrap.is-empty .points-image-fallback {
  display: inline-flex;
}

.points-card-body {
  padding: 14px;
}

.points-card-title {
  margin: 0 0 8px;
  font-size: 16px;
}

.points-card-sku {
  margin: -4px 0 8px;
  font-size: 12px;
  color: var(--points-muted);
  letter-spacing: 0.02em;
}

.points-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--points-muted);
  font-size: 13px;
}

.points-price {
  color: #b91c1c;
  font-weight: 700;
}

.points-btn {
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--points-primary);
  color: #fff;
  padding: 0 16px;
  cursor: pointer;
}

.points-btn.secondary {
  border: 1px solid var(--points-line);
  background: #fff;
  color: #334155;
}

.points-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.points-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.points-panel {
  margin-top: 16px;
  border: 1px solid var(--points-line);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
}

.points-detail {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 20px;
}

.points-detail-img {
  min-height: 300px;
  border-radius: 14px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #94a3b8;
  position: relative;
}

.points-detail-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.points-detail-images {
  margin-top: 20px;
  border-top: 1px solid var(--points-line);
  padding-top: 18px;
}

.points-detail-images h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.points-detail-images img {
  width: 100%;
  max-width: 920px;
  display: block;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: #f1f5f9;
}

.points-form {
  display: grid;
  gap: 10px;
}

.points-form label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
}

.points-form input,
.points-form textarea {
  border: 1px solid var(--points-line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

.points-form textarea {
  min-height: 70px;
  resize: vertical;
}

.points-status {
  margin-top: 10px;
  min-height: 20px;
  color: #b91c1c;
  font-size: 13px;
}

.points-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.points-table th,
.points-table td {
  border-bottom: 1px solid var(--points-line);
  padding: 10px;
  text-align: left;
}

.points-table th {
  color: #64748b;
  background: #f8fafc;
}

/* —— 积分礼品详情（电商化布局） —— */
.points-gd-root {
  padding: 0;
  border: 0;
  background: transparent;
}

.points-gd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--points-muted);
}

.points-gd-breadcrumb a:hover {
  color: var(--points-primary);
}

.points-gd-breadcrumb-sep {
  color: #cbd5e1;
}

.points-gd-sheet {
  border: 1px solid var(--points-line);
  border-radius: 16px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.points-gd-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.points-gd-gallery {
  position: sticky;
  top: 74px;
}

.points-gd-img-wrap {
  aspect-ratio: 1;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--points-line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.points-gd-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
}

.points-gd-buybox {
  min-width: 0;
}

.points-gd-buybox-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.points-gd-type-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--points-primary-soft);
  color: #be123c;
  font-size: 12px;
  font-weight: 600;
}

.points-gd-stock {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.points-gd-stock--ok {
  background: #ecfdf5;
  color: #047857;
}

.points-gd-stock--low {
  background: #fff7ed;
  color: #c2410c;
}

.points-gd-stock--out {
  background: #f1f5f9;
  color: #64748b;
}

.points-gd-title {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 700;
  color: #111827;
}

.points-gd-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
}

.points-gd-price-num {
  font-size: 36px;
  line-height: 1;
  font-weight: 800;
  color: var(--points-primary);
}

.points-gd-price-unit {
  font-size: 16px;
  font-weight: 600;
  color: var(--points-primary);
}

.points-gd-account-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 13px;
  color: var(--points-muted);
}

.points-gd-account-strip strong {
  color: var(--points-text);
  font-weight: 700;
}

.points-gd-service {
  border: 1px solid var(--points-line);
  border-radius: 12px;
  padding: 4px 0;
  margin-bottom: 14px;
  background: #fff;
}

.points-gd-service-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
}

.points-gd-service-row:last-child {
  border-bottom: 0;
}

.points-gd-service-label {
  color: var(--points-muted);
}

.points-gd-service-value {
  color: var(--points-text);
}

.points-gd-lead {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
}

.points-gd-redeem-hint {
  margin-bottom: 12px;
}

.points-gd-form {
  margin: 14px 0;
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed #e2e8f0;
  background: #fafbfc;
}

.points-gd-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
}

.points-gd-form-link {
  font-size: 13px;
  color: #2563eb;
}

.points-gd-form-tip {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--points-muted);
}

.points-gd-field {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #475569;
}

.points-gd-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.points-gd-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--points-line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

.points-gd-input:focus {
  outline: none;
  border-color: #fca5a5;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.points-gd-addr-empty {
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--points-muted);
}

.points-gd-addr-empty a {
  color: #2563eb;
}

.points-gd-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.points-gd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.points-gd-btn.primary {
  flex: 1 1 200px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.28);
}

.points-gd-btn.primary:hover:not(:disabled) {
  filter: brightness(1.03);
}

.points-gd-btn.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.points-gd-btn.ghost {
  border-color: var(--points-line);
  background: #fff;
  color: #334155;
}

.points-gd-cta-tip {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--points-muted);
}

.points-gd-detail {
  margin-top: 18px;
  border: 1px solid var(--points-line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.points-gd-detail-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--points-line);
  background: #f8fafc;
}

.points-gd-detail-head h2 {
  margin: 0;
  font-size: 16px;
}

.points-gd-detail-body {
  padding: 18px;
}

.points-gd-detail-desc {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.7;
  color: #475569;
}

.points-gd-detail-images img {
  width: 100%;
  max-width: 920px;
  display: block;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: #f8fafc;
}

.points-gd-loading {
  padding: 48px 16px;
  text-align: center;
  color: var(--points-muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .points-hero,
  .points-detail,
  .points-gd-layout {
    grid-template-columns: 1fr;
  }
  .points-gd-gallery {
    position: static;
  }
  .points-gd-sheet {
    padding: 14px;
  }
  .points-gd-form-grid {
    grid-template-columns: 1fr;
  }
  .points-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .points-grid {
    grid-template-columns: 1fr;
  }
  .points-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
