@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=ZCOOL+XiaoWei&display=swap");

:root {
  --brand: #0f6b5c;
  --brand-dark: #0a4d42;
  --brand-soft: #e6f4f1;
  --accent: #d97706;
  --accent-soft: #fff7ed;
  --ink: #1c2430;
  --muted: #5c6b7a;
  --line: #d9e2ec;
  --bg: #f3f6f8;
  --surface: #ffffff;
  --danger: #c2410c;
  --shadow: 0 10px 30px rgba(15, 40, 50, 0.08);
  --radius: 14px;
  --container: 1180px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "ZCOOL XiaoWei", "Noto Sans SC", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #d9efe9 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #ffe8c8 0%, transparent 45%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

/* topbar / header */
.topbar {
  background: var(--brand-dark);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  gap: 16px;
}

.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15, 107, 92, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #128a76, #0a4d42);
  color: #fff;
  font-weight: 900;
  font-size: 22px;
  box-shadow: 0 8px 18px rgba(15, 107, 92, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  gap: 4px;
  flex: 1;
}

.main-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-user {
  color: var(--muted);
  font-size: 14px;
}

.nav-link {
  color: var(--brand);
  font-weight: 500;
}

.nav-link.active {
  font-weight: 700;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  transition: 0.2s ease;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 14px;
}

.btn-primary {
  background: linear-gradient(135deg, #128a76, #0f6b5c);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 107, 92, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-accent {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 8px 18px rgba(217, 119, 6, 0.25);
}

.btn-accent:hover {
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--brand);
  color: var(--brand);
}

.btn-outline:hover {
  background: var(--brand-soft);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* section */
.section {
  padding: 48px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.section-head .more {
  color: var(--brand);
  font-weight: 600;
  white-space: nowrap;
}

.page-hero {
  padding: 36px 0 10px;
}

.page-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 40px;
  font-weight: 400;
}

.page-hero p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 640px;
}

/* cards grids */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.item-card,
.product-card,
.cat-card {
  background: var(--surface);
  border: 1px solid rgba(15, 107, 92, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
}

.item-card:hover,
.product-card:hover,
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(15, 40, 50, 0.12);
}

.item-cover,
.product-cover,
.cat-cover {
  height: 170px;
  background-size: cover;
  background-position: center;
}

.item-body,
.product-body,
.cat-body {
  padding: 16px;
}

.item-body h3,
.product-body h3,
.cat-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-body p,
.cat-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-meta,
.product-meta,
.item-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.item-meta {
  margin-bottom: 8px;
}

.item-foot {
  margin-top: 12px;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}

.price {
  color: var(--accent);
  font-size: 18px;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0;
}

.product-price strong {
  color: var(--accent);
  font-size: 22px;
}

.product-price del {
  color: #9aa7b5;
  font-size: 13px;
}

.cat-card .cat-cover {
  height: 120px;
  position: relative;
}

.cat-card .cat-icon {
  position: absolute;
  left: 14px;
  bottom: -16px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: var(--shadow);
}

.cat-body {
  padding-top: 26px;
}

/* forms */
.form-panel {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(15, 107, 92, 0.08);
  box-shadow: var(--shadow);
  padding: 28px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 107, 92, 0.12);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin: 12px 0 18px;
}

.form-check input {
  margin-top: 3px;
}

.form-tip,
.msg {
  font-size: 14px;
  margin-top: 12px;
}

.msg-ok {
  color: var(--brand);
}

.msg-err {
  color: var(--danger);
}

/* footer */
.site-footer {
  margin-top: 60px;
  background: linear-gradient(180deg, #123a34 0%, #0b2622 100%);
  color: rgba(255, 255, 255, 0.86);
  padding: 48px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 32px;
  padding-bottom: 28px;
}

.footer-brand h3,
.site-footer h4 {
  margin: 0 0 12px;
  color: #fff;
  font-family: var(--display);
  font-weight: 400;
}

.footer-brand p,
.site-footer li {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.8;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.8);
}

.empty {
  padding: 48px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px dashed var(--line);
}

.lock-box {
  background: var(--accent-soft);
  border: 1px solid #fcd34d;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lock-box p {
  margin: 0;
  color: #92400e;
}

.panel {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(15, 107, 92, 0.08);
  box-shadow: var(--shadow);
  padding: 24px;
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .main-nav {
    display: none;
  }
}

@media (max-width: 720px) {
  .container {
    width: calc(100% - 28px);
  }
  .grid-4,
  .grid-3,
  .grid-2,
  .form-row,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .topbar-inner {
    flex-direction: column;
    gap: 4px;
  }
  .page-hero h1 {
    font-size: 30px;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
