/*
Theme Name: Personal Resale Studio
Theme URI: https://example.com/personal-resale
Author: Codex
Description: 面向个人主体的闲置二手交易主题，包含首页、商品页与支付页。
Version: 1.0.0
Text Domain: personal-resale
*/

:root {
  --bg: #f4efe7;
  --paper: #fbf6f0;
  --paper-strong: #fffdf9;
  --ink: #191512;
  --muted: #665d56;
  --line: rgba(25, 21, 18, 0.12);
  --accent: #c4512d;
  --accent-deep: #8f2b18;
  --sage: #536f63;
  --gold: #b7903c;
  --shadow: 0 22px 60px rgba(30, 22, 16, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --container: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(196, 81, 45, 0.12), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(83, 111, 99, 0.12), transparent 24%),
    linear-gradient(180deg, #efe7dc 0%, #f6f1ea 100%);
  line-height: 1.6;
}

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

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

.site-shell {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.site-shell::before,
.site-shell::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

.site-shell::before {
  width: 320px;
  height: 320px;
  left: -80px;
  top: 100px;
  border: 1px solid rgba(143, 43, 24, 0.12);
  border-radius: 38% 62% 58% 42% / 35% 47% 53% 65%;
}

.site-shell::after {
  width: 420px;
  height: 420px;
  right: -180px;
  bottom: -80px;
  background: radial-gradient(circle, rgba(196, 81, 45, 0.08), transparent 68%);
}

.site-header,
.site-main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  padding: 26px 20px 12px;
}

.header-inner,
.site-main,
.site-footer-inner {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 35px rgba(26, 19, 16, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent) 0%, #dd865f 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.brand-text strong,
.section-title,
.hero-kicker,
.price-number,
.detail-price,
.payment-amount,
.archive-price {
  font-family: "Bebas Neue", "Oswald", sans-serif;
  letter-spacing: 0.04em;
}

.brand-text strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1;
}

.brand-text span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.header-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.95rem;
  color: var(--muted);
  transition: 180ms ease;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  color: var(--ink);
  background: rgba(25, 21, 18, 0.06);
  outline: none;
}

.nav-cta,
.button-primary,
.button-secondary,
.pay-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.nav-cta,
.button-primary,
.pay-action {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 24px rgba(25, 21, 18, 0.18);
}

.nav-cta:hover,
.button-primary:hover,
.pay-action:hover,
.button-secondary:hover {
  transform: translateY(-2px);
}

.nav-cta {
  padding: 12px 18px;
}

.site-main {
  padding: 10px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: stretch;
}

.hero-card,
.hero-panel,
.card,
.detail-panel,
.sidebar-panel,
.payment-panel,
.payment-card,
.list-card,
.empty-card,
.page-panel {
  background: rgba(255, 253, 249, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 34px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -70px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 81, 45, 0.18), transparent 70%);
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--accent-deep);
  background: rgba(196, 81, 45, 0.08);
}

.hero-card h1,
.detail-title,
.page-title,
.archive-title {
  margin: 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", serif;
  line-height: 1.1;
}

.hero-card h1 {
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  max-width: 9ch;
}

.hero-copy,
.detail-copy,
.page-content,
.archive-subtitle {
  font-size: 1.02rem;
  color: var(--muted);
}

.hero-actions,
.detail-actions,
.payment-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button-primary,
.button-secondary,
.pay-action {
  padding: 14px 22px;
  font-size: 0.96rem;
}

.button-secondary {
  background: transparent;
  border: 1px solid var(--line);
}

.hero-stats,
.trust-row,
.detail-meta,
.payment-steps,
.footer-grid {
  display: grid;
  gap: 14px;
}

.hero-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
}

.stat {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(25, 21, 18, 0.04);
}

.stat strong {
  display: block;
  font-size: 1.4rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-panel {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.hero-art {
  min-height: 420px;
  border-radius: calc(var(--radius-xl) - 8px);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(25, 21, 18, 0.88), rgba(83, 111, 99, 0.92)),
    linear-gradient(135deg, #57453a, #2e2722);
}

.hero-art-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-art::before,
.hero-art::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  z-index: 1;
}

.hero-art::before {
  width: 220px;
  height: 220px;
  left: -40px;
  top: 24px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 68%);
}

.hero-art::after {
  width: 180px;
  height: 180px;
  right: 24px;
  bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-tag {
  position: absolute;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  color: #fff;
  z-index: 2;
}

.hero-tag.top {
  right: 24px;
  top: 24px;
}

.hero-tag.bottom {
  left: 24px;
  bottom: 24px;
}

.hero-note {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: rgba(83, 111, 99, 0.08);
}

.hero-note strong,
.payment-card strong,
.sidebar-block strong {
  display: block;
  margin-bottom: 6px;
}

.section {
  margin-top: 34px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.section-title {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.3rem);
}

.section-copy {
  max-width: 520px;
  color: var(--muted);
}

.product-grid,
.trust-row,
.story-grid,
.archive-grid,
.payment-grid,
.detail-layout {
  display: grid;
  gap: 22px;
}

.product-grid,
.archive-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  overflow: hidden;
}

.card-media,
.detail-visual {
  position: relative;
  min-height: 260px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.2), transparent 24%),
    linear-gradient(135deg, #d8c3a8, #a77d5a);
}

.card-media::after,
.detail-visual::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.36);
}

.item-media-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(25, 21, 18, 0.04), rgba(25, 21, 18, 0.18));
  z-index: 1;
}

.media-badge,
.status-chip {
  position: absolute;
  left: 18px;
  top: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.84);
  font-size: 0.88rem;
  z-index: 2;
}

.card-body,
.detail-info,
.payment-panel,
.payment-card,
.list-card,
.empty-card,
.page-panel {
  padding: 22px;
}

.card-title,
.archive-card-title,
.payment-title {
  margin: 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", serif;
  font-size: 1.45rem;
  line-height: 1.2;
}

.card-copy,
.archive-card-copy,
.payment-copy {
  color: var(--muted);
}

.price-line,
.archive-price-line {
  display: flex;
  align-items: end;
  gap: 10px;
  margin: 16px 0 14px;
}

.price-number,
.detail-price,
.payment-amount,
.archive-price {
  font-size: 2.3rem;
  line-height: 1;
}

.price-original,
.detail-original {
  color: rgba(102, 93, 86, 0.82);
  text-decoration: line-through;
}

.meta-pills,
.detail-meta,
.archive-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-pills span,
.detail-meta span,
.archive-meta span {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(25, 21, 18, 0.05);
  color: var(--muted);
  font-size: 0.88rem;
}

.card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.card-link,
.inline-link {
  color: var(--accent-deep);
  font-weight: 700;
}

.trust-row,
.story-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trust-card,
.story-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.65);
}

.trust-card strong,
.story-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.story-index {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--accent-deep);
  font-family: "Bebas Neue", "Oswald", sans-serif;
  font-size: 1.2rem;
}

.detail-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: start;
}

.detail-panel {
  padding: 26px;
}

.detail-visual {
  min-height: 460px;
  border-radius: calc(var(--radius-xl) - 6px);
  margin-bottom: 22px;
}

.archive-grid .card-media {
  min-height: 220px;
}

.detail-title {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
}

.detail-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 22px 0;
}

.detail-meta span strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.sidebar-panel {
  padding: 26px;
  position: sticky;
  top: 24px;
}

.sidebar-block + .sidebar-block {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.sidebar-heading {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.payment-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.payment-panel {
  display: grid;
  gap: 18px;
}

.payment-card {
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.92), rgba(246, 240, 232, 0.92));
}

.payment-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payment-step {
  padding: 18px;
  border-radius: 18px;
  background: rgba(25, 21, 18, 0.04);
}

.qr-shell {
  aspect-ratio: 1 / 1;
  max-width: 260px;
  border-radius: 30px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(25, 21, 18, 0.95), rgba(83, 111, 99, 0.95));
  display: grid;
  place-items: center;
}

.qr-grid {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  background:
    linear-gradient(90deg, #fff 20%, transparent 20%, transparent 40%, #fff 40%, #fff 60%, transparent 60%, transparent 80%, #fff 80%),
    linear-gradient(#fff 20%, transparent 20%, transparent 40%, #fff 40%, #fff 60%, transparent 60%, transparent 80%, #fff 80%);
  background-size: 54px 54px;
  background-position: center;
  position: relative;
}

.qr-grid::after {
  content: "个人收款码";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(25, 21, 18, 0.84);
  color: #fff;
  font-size: 0.82rem;
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
}

.seller-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.seller-line {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(25, 21, 18, 0.04);
}

.seller-line span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.seller-line strong {
  display: block;
  margin-top: 4px;
}

.payment-form {
  margin-top: 22px;
}

.payment-form .pay-action {
  width: 100%;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.payment-keyline,
.payment-note-list,
.payment-status-head {
  display: flex;
  gap: 14px;
}

.payment-keyline,
.payment-status-head {
  align-items: center;
  justify-content: space-between;
}

.payment-keyline {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(25, 21, 18, 0.04);
}

.payment-keyline span,
.payment-note-list p {
  color: var(--muted);
}

.payment-keyline strong {
  font-size: 1.4rem;
}

.payment-copy code,
.payment-note-list code {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(25, 21, 18, 0.06);
  font-family: "Bebas Neue", "Oswald", sans-serif;
  letter-spacing: 0.04em;
}

.payment-note-list {
  margin-top: 18px;
  flex-direction: column;
}

.payment-note-list p {
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(25, 21, 18, 0.04);
}

.payment-notice {
  border-color: transparent;
}

.payment-notice--success {
  background: linear-gradient(180deg, rgba(222, 244, 233, 0.96), rgba(244, 251, 246, 0.96));
}

.payment-notice--warning {
  background: linear-gradient(180deg, rgba(250, 238, 212, 0.98), rgba(255, 249, 239, 0.96));
}

.payment-notice--error {
  background: linear-gradient(180deg, rgba(248, 226, 223, 0.98), rgba(255, 246, 245, 0.96));
}

.payment-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  white-space: nowrap;
}

.payment-status-chip--success {
  background: rgba(83, 111, 99, 0.14);
  color: #335548;
}

.payment-status-chip--warning {
  background: rgba(183, 144, 60, 0.16);
  color: #7e5c19;
}

.payment-status-chip--error {
  background: rgba(196, 81, 45, 0.14);
  color: #8f2b18;
}

.payment-status-chip--muted {
  background: rgba(25, 21, 18, 0.06);
  color: var(--muted);
}

.seller-list--compact {
  margin-top: 18px;
}

.payment-code {
  font-family: "Bebas Neue", "Oswald", sans-serif;
  letter-spacing: 0.06em;
  word-break: break-all;
}

.site-footer {
  padding: 18px 0 34px;
}

.site-footer-inner {
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.72);
}

.footer-grid {
  grid-template-columns: 1.3fr 1fr 1fr;
}

.footer-title {
  margin: 0 0 8px;
  font-size: 1rem;
}

.footer-copy,
.footer-link {
  color: var(--muted);
}

.footer-link {
  display: block;
  margin-bottom: 6px;
}

.footer-meta {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-record {
  margin-bottom: 0;
}

.page-panel,
.empty-card {
  margin-top: 24px;
}

.reveal-up {
  animation: revealUp 700ms ease both;
}

.reveal-delay-1 {
  animation-delay: 90ms;
}

.reveal-delay-2 {
  animation-delay: 180ms;
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .hero,
  .detail-layout,
  .payment-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .product-grid,
  .archive-grid,
  .trust-row,
  .story-grid,
  .payment-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .header-inner,
  .section-head,
  .card-actions {
    flex-direction: column;
    align-items: start;
  }

  .hero-stats,
  .product-grid,
  .archive-grid,
  .trust-row,
  .story-grid,
  .payment-steps,
  .detail-meta {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .hero-panel,
  .detail-panel,
  .sidebar-panel,
  .payment-panel,
  .payment-card,
  .page-panel,
  .list-card,
  .empty-card {
    padding: 20px;
  }

  .hero-card h1 {
    max-width: none;
  }

  .payment-keyline,
  .payment-status-head,
  .footer-meta {
    flex-direction: column;
    align-items: start;
  }
}
