:root {
  color-scheme: dark;
  --bg: #070707;
  --ink: #f8f1df;
  --muted: #a99f8a;
  --gold: #f7cd69;
  --gold-2: #b9852f;
  --panel: #11100d;
  --line: rgba(247, 205, 105, 0.16);
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  font-family: Manrope, "Noto Sans TC", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #11100c 0, var(--bg) 220px);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button,
a,
.card {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 54px;
  padding: 0.56rem 0.72rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(7, 7, 7, 0.92);
  backdrop-filter: blur(14px);
}

.brand-title {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  min-width: 0;
  max-width: min(68vw, 520px);
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  letter-spacing: 0;
}

.brand-logo {
  flex: 0 0 auto;
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(247, 205, 105, 0.18));
}

.brand-title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-cta,
.ask-button,
.buy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #171006;
  font-weight: 900;
  text-decoration: none;
}

.header-cta {
  flex: 0 0 auto;
  gap: 0.36rem;
  min-height: 34px;
  padding: 0 0.82rem;
  font-size: 0.82rem;
}

.fb-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: #1877f2;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1;
}

.shop-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 0.36rem 0.5rem 4rem;
}

.all-section {
  margin: 0 0 1rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  margin-bottom: 0.36rem;
}

.filter-panel {
  display: grid;
  gap: 0.42rem;
  width: 100%;
  padding: 0.58rem;
  border: 1px solid #333;
  border-radius: 6px;
  background: #121212;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.filter-toprow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.42rem;
}

h2 {
  margin: 0;
  color: var(--gold);
  font-family: Rajdhani, "Noto Sans TC", sans-serif;
  font-size: 1.2rem;
  line-height: 1;
  letter-spacing: 0;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.56rem;
}

.sort-row::-webkit-scrollbar {
  display: none;
}

.card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(247, 205, 105, 0.14);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.card-image {
  position: relative;
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(135deg, rgba(247, 205, 105, 0.12), rgba(255, 255, 255, 0.02)),
    #0d0c09;
  overflow: hidden;
}

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

.card-body {
  display: grid;
  gap: 0.26rem;
  padding: 0.3rem;
}

.card-id {
  color: var(--muted);
  font-family: Rajdhani, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-id span {
  color: var(--gold);
  margin-right: 0.16rem;
}

.price {
  color: var(--gold);
  font-family: Rajdhani, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.metrics {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.86fr) minmax(0, 0.86fr);
  gap: 0.24rem;
}

.metrics span {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
  align-content: center;
  padding: 0.3rem 0.08rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #a0a0a0;
  font-size: 0.46rem;
  font-weight: 700;
  line-height: 1.08;
  text-align: center;
}

.metrics strong {
  display: block;
  color: var(--gold);
  font-family: Rajdhani, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ask-button {
  min-height: 24px;
  font-size: 0.58rem;
}

.note {
  display: none;
}

.search-bar {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 0 0.72rem;
  border: 1px solid #333;
  border-radius: 6px;
  background: #1e1e1e;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.search-bar input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-bar input::placeholder {
  color: #a1a1a1;
}

.search-bar:focus-within,
.price-range:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(247, 205, 105, 0.14), 0 4px 12px rgba(0, 0, 0, 0.32);
}

.price-range {
  display: flex;
  align-items: center;
  gap: 0.34rem;
  min-height: 38px;
  padding: 0 0.72rem;
  border: 1px solid #333;
  border-radius: 6px;
  background: #1e1e1e;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.price-range span {
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

.price-range input {
  width: 100%;
  min-width: 0;
  max-width: 88px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.price-range input::placeholder {
  color: #a1a1a1;
}

.price-range b {
  color: var(--muted);
}

.sort-row {
  display: flex;
  gap: 0.34rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.05rem;
}

.sort-pill {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 0.72rem;
  border: 1px solid #333;
  border-radius: 6px;
  background: #1e1e1e;
  color: #a1a1a1;
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.sort-pill:hover {
  border-color: rgba(247, 205, 105, 0.48);
  color: var(--gold);
}

.sort-pill.active,
.sort-pill[aria-pressed="true"] {
  border-color: transparent;
  background: var(--gold);
  color: #050505;
}

.sort-pill.active:hover,
.sort-pill[aria-pressed="true"]:hover {
  color: #050505;
}

.status-strip {
  margin: 0.1rem 0 0.48rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.status-strip[hidden] {
  display: none;
}

.skeleton {
  min-height: 134px;
  background:
    linear-gradient(90deg, transparent, rgba(247, 205, 105, 0.07), transparent),
    #11100c;
  background-size: 220% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  align-items: end;
}

.drawer[hidden] {
  display: none;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
}

.drawer-panel {
  position: relative;
  z-index: 1;
  overflow: auto;
  width: 100%;
  min-width: 0;
  max-height: 92dvh;
  border: 1px solid rgba(247, 205, 105, 0.18);
  border-radius: 18px 18px 0 0;
  background: #0d0c09;
  box-shadow: var(--shadow);
}

.drawer-panel img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: contain;
  background: #090908;
  cursor: zoom-in;
}

.close-button {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
}

.drawer-content {
  display: grid;
  gap: 0.88rem;
  padding: 1rem;
}

.drawer-content h2 {
  margin: 0;
  font-family: Rajdhani, "Noto Sans TC", sans-serif;
  font-size: 1.55rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.drawer-content h2 span {
  margin-right: 0.35rem;
  color: #a0a0a0;
  font-size: 0.78em;
}

.kicker {
  margin: 0 0 0.18rem;
  color: var(--gold);
  font-family: Rajdhani, "Noto Sans TC", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-price {
  color: var(--gold);
  font-family: Rajdhani, sans-serif;
  font-size: 1.72rem;
  font-weight: 700;
}

.detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}

.summary-chip,
.detail-metrics span,
.spec-row {
  min-width: 0;
  border: 1px solid rgba(247, 205, 105, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(247, 205, 105, 0.06), rgba(255, 255, 255, 0.02)),
    #12110e;
}

.summary-chip {
  display: grid;
  gap: 0.16rem;
  justify-items: center;
  padding: 0.58rem 0.2rem;
}

.summary-chip span,
.detail-metrics span,
.spec-label {
  color: #a0a0a0;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.18;
}

.summary-chip strong,
.detail-metrics strong,
.spec-row strong {
  color: var(--gold);
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  line-height: 1;
}

.summary-chip strong {
  font-size: 1.34rem;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.44rem;
}

.detail-metrics span {
  display: grid;
  gap: 0.18rem;
  align-content: center;
  min-height: 66px;
  padding: 0.58rem 0.38rem;
  text-align: center;
}

.detail-metrics strong {
  display: block;
  font-size: 1.28rem;
}

.detail-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.58rem 0.66rem;
}

.spec-row strong {
  flex: 0 0 auto;
  font-size: 1.05rem;
}

.spec-row-wide {
  grid-column: 1 / -1;
  border-color: rgba(247, 205, 105, 0.28);
  background:
    linear-gradient(135deg, rgba(247, 205, 105, 0.12), rgba(185, 133, 47, 0.06)),
    #15120c;
}

.detail-note {
  margin: 0;
  padding: 0.78rem 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: #c7bca5;
  line-height: 1.75;
  white-space: pre-line;
}

.buy-button {
  min-height: 52px;
  padding: 0 1.25rem;
}

.card:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(247, 205, 105, 0.46);
  outline-offset: 3px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.86);
}

.lightbox img {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 1180px);
  height: auto;
  max-height: 92dvh;
  object-fit: contain;
  border: 1px solid rgba(247, 205, 105, 0.28);
  border-radius: 6px;
  background: #050505;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
}

@media (min-width: 700px) {
  .shop-shell {
    padding-inline: 1.2rem;
  }

  .account-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.72rem;
  }

  .card-body {
    gap: 0.58rem;
    padding: 0.68rem;
  }

  .card-id {
    font-size: 1rem;
  }

  .price {
    font-size: 1.34rem;
  }

  .metrics span {
    padding: 0.48rem 0.14rem;
    border-radius: 10px;
    font-size: 0.64rem;
  }

  .metrics strong {
    font-size: 0.88rem;
  }

  .ask-button {
    min-height: 34px;
    font-size: 0.82rem;
  }

  .note {
    display: -webkit-box;
    min-height: 2.72rem;
    margin: 0;
    color: #bcb19a;
    font-size: 0.84rem;
    line-height: 1.6;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .drawer {
    align-items: center;
    justify-items: center;
    padding: 1.4rem;
  }

  .drawer-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
    width: min(1120px, 100%);
    max-height: 84dvh;
    border-radius: 18px;
  }

  .drawer-panel img {
    height: 100%;
  }

  .drawer-content {
    gap: 0.82rem;
    padding: 1rem;
  }

  .detail-price {
    font-size: 2rem;
  }

  .summary-chip strong {
    font-size: 1.46rem;
  }

  .detail-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.38rem;
  }

  .detail-metrics span {
    min-height: 74px;
    padding-inline: 0.24rem;
  }

  .detail-metrics strong {
    font-size: 1.22rem;
  }

  .detail-specs {
    gap: 0.38rem;
  }
}

@media (min-width: 480px) and (max-width: 699px) {
  .filter-toprow {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }

  .account-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.48rem;
  }
}

@media (min-width: 1080px) {
  .account-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .filter-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .filter-toprow {
    grid-template-columns: minmax(360px, 1fr) minmax(320px, 0.8fr);
  }

  .sort-row {
    justify-content: flex-start;
  }
}

@media (max-width: 430px) {
  .price-range input {
    max-width: none;
  }

  .brand-title {
    font-size: 0.9rem;
  }

  .brand-logo {
    width: 30px;
    height: 30px;
  }

  .header-cta {
    min-height: 32px;
    padding-inline: 0.65rem;
    font-size: 0.76rem;
  }
}

@media (max-width: 360px) {
  .shop-shell {
    padding-inline: 0.4rem;
  }

  .account-grid {
    gap: 0.42rem;
  }

  .metrics {
    gap: 0.16rem;
  }

  .metrics span {
    padding-inline: 0.06rem;
  }

  .metrics strong {
    font-size: 0.78rem;
  }

  .drawer-content {
    padding-inline: 0.76rem;
  }

  .summary-chip strong,
  .detail-metrics strong {
    font-size: 1.08rem;
  }

  .detail-metrics,
  .detail-specs {
    gap: 0.32rem;
  }

  .spec-row {
    padding-inline: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
