@import url("theme.css");

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(
      1200px 600px at 8% -8%,
      color-mix(in srgb, var(--brand-primary) 22%, transparent) 0%,
      transparent 55%
    ),
    radial-gradient(900px 500px at 100% 0%, color-mix(in srgb, var(--glow-secondary-hex, #3d1508) 35%, transparent) 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: var(--header-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  height: 42px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.lang-select,
select.input {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.4rem 0.55rem;
  font: inherit;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-mid));
  color: var(--brand-on-primary);
  box-shadow: 0 10px 28px var(--brand-glow);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

main.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem 1.1rem 3rem;
}

.hero {
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
  align-items: center;
}

.search {
  flex: 1 1 240px;
  max-width: 400px;
}

.search input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand-primary) 45%, transparent);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px color-mix(in srgb, var(--brand-primary) 15%, transparent);
}

.card-img {
  aspect-ratio: 4 / 3;
  position: relative;
  background: var(--surface-2);
  overflow: hidden;
}

.card-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent 42%);
  pointer-events: none;
}

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

.card-body {
  padding: 0.9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.card-title {
  margin: 0;
  font-size: 0.98rem;
}

.card-desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: auto;
}

.price-iqd {
  font-weight: 700;
}

.price-cny {
  font-size: 0.78rem;
  color: var(--muted);
}

.muted {
  color: var(--muted);
  font-size: 0.86rem;
}

.form-grid {
  display: grid;
  gap: 0.65rem;
}

label.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--muted);
}

label.field input,
label.field select,
label.field textarea {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

label.field textarea {
  min-height: 72px;
  resize: vertical;
}

.panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  margin-bottom: 1rem;
}

.panel h2 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}

.timeline {
  border-left: 2px solid color-mix(in srgb, var(--brand-primary) 45%, transparent);
  margin: 0.5rem 0 0 0.45rem;
  padding-left: 1rem;
}

.timeline-item {
  position: relative;
  padding-bottom: 1rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.21rem;
  top: 0.2rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 25%, transparent);
}

.timeline-item time {
  font-size: 0.75rem;
  color: var(--muted);
}

.split {
  display: grid;
  gap: 1rem;
}

@media (min-width: 880px) {
  .split-2 {
    grid-template-columns: 1fr 1fr;
  }
}

#toast {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: #14100e;
  color: color-mix(in srgb, var(--brand-primary) 45%, white);
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 40%, transparent);
  z-index: 80;
  opacity: 0;
  transition: 0.25s ease;
  max-width: min(520px, calc(100% - 2rem));
  text-align: center;
  font-size: 0.88rem;
}

#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}

footer.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.1rem 2.5rem;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--brand-primary) 18%, var(--surface));
  color: var(--brand-primary);
}

/* —— Homepage: compact hero, Taobao teaser, store block —— */
.hero-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.25rem;
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(
      135deg,
      color-mix(in srgb, var(--brand-primary) 14%, var(--surface)) 0%,
      var(--surface) 48%,
      color-mix(in srgb, var(--glow-secondary-hex, #3d1508) 35%, var(--surface)) 100%
    ),
    var(--surface);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 22%, transparent);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.hero-compact h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.2rem, 3.2vw, 1.75rem);
  letter-spacing: -0.03em;
  font-weight: 700;
}

.hero-compact p {
  margin: 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-compact-meta {
  font-size: 0.82rem;
  white-space: nowrap;
}

.taobao-teaser {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 8px);
  margin-bottom: 2rem;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 35%, transparent);
  background: radial-gradient(
      800px 400px at 0% 0%,
      color-mix(in srgb, var(--brand-primary) 28%, transparent),
      transparent 55%
    ),
    linear-gradient(165deg, #0d0a08 0%, #16110d 40%, #0a0908 100%);
}

.taobao-teaser-glow {
  position: absolute;
  inset: -40% -20% auto auto;
  width: 55%;
  height: 120%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand-primary) 45%, transparent) 0%, transparent 65%);
  pointer-events: none;
  opacity: 0.55;
}

.taobao-teaser-inner {
  position: relative;
  padding: 1.35rem 1.4rem 1.5rem;
  max-width: 52ch;
}

.taobao-teaser-title {
  margin: 0.65rem 0 0.5rem;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  letter-spacing: -0.02em;
}

.taobao-teaser-body {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pill-taobao {
  background: linear-gradient(90deg, #ff6a00, #ff3c00);
  color: #1a0a00;
  box-shadow: 0 6px 20px color-mix(in srgb, #ff6a00 35%, transparent);
}

.taobao-soon-pill {
  display: inline-flex;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.store-block {
  margin-top: 0.25rem;
}

.section-head {
  margin-bottom: 1rem;
}

.section-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 0;
  max-width: 62ch;
}
