/* === Baotian Lighting - 极简风 (Novaluce/Flos inspired) === */

:root {
  --bg: #ffffff;
  --fg: #111111;
  --fg-soft: #555555;
  --fg-mute: #888888;
  --line: #e5e5e5;
  --line-soft: #f0f0f0;
  --accent: #111111;
  --accent-hover: #000000;
  --error: #c1272d;
  --success: #2d7a3a;
  --warn: #b45309;
  --max-w: 1280px;
  --pad-x: 32px;
  --gap: 24px;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .65; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 48px; }
h2 { font-size: 32px; }
h3 { font-size: 22px; }
p { color: var(--fg-soft); }

/* === Layout === */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad-x); }
.section { padding: 96px 0; }
.section-sm { padding: 56px 0; }

/* === Top Bar === */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;     /* 左 | 中(logo) | 右 */
  align-items: center;
  height: 88px;                            /* 加高,从 72 → 88,容纳大 logo */
  max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad-x);
  gap: 24px;
}
/* 左:导航链接(贴左)*/
.topbar .nav { justify-self: start; }
/* 右:用户 + GET QUOTE 按钮(贴右)*/
.topbar .right-cluster { justify-self: end; display: flex; align-items: center; }
/* 中:logo(完美居中)*/
.topbar .brand { justify-self: center; display: flex; align-items: center; }
.topbar .brand img {
  height: 56px; width: auto; display: block;    /* 从 36 → 56px,显著更大 */
}

.brand {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.08em;
  font-weight: 500;
  text-transform: uppercase;
}
.brand small {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--fg-mute);
  margin-top: 2px;
}
.nav { display: flex; gap: 36px; }
.nav a {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg);
  position: relative;
  padding: 4px 0;
}
.nav a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--fg);
}
.nav a:hover { opacity: 1; }
.nav a:hover::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--fg);
}
.user-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-soft);
}
.user-pill .dot { width: 6px; height: 6px; background: var(--success); border-radius: 50%; }

/* === Hero (banner slider) === */
.hero {
  height: 78vh; min-height: 520px;
  background: #000;
  color: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-slider {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
  transform: scale(1.02);
}
.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}
.hero-slide:nth-child(1) { animation: heroFade 18s infinite 0s; }
.hero-slide:nth-child(2) { animation: heroFade 18s infinite 6s; }
.hero-slide:nth-child(3) { animation: heroFade 18s infinite 12s; }
@keyframes heroFade {
  0%   { opacity: 0; transform: scale(1.02); }
  4%   { opacity: 1; transform: scale(1); }
  33%  { opacity: 1; transform: scale(1.06); }
  37%  { opacity: 0; transform: scale(1.08); }
  100% { opacity: 0; transform: scale(1.08); }
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.55) 100%);
  z-index: 1;
}
.hero-inner { position: relative; z-index: 2; }
.hero h1 {
  font-family: var(--serif);
  font-size: 80px;
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  max-width: 760px;
}
.hero p {
  color: rgba(255,255,255,0.85);
  font-size: 16px;
  max-width: 520px;
  margin-bottom: 36px;
}
.hero .cta { display: inline-flex; gap: 16px; }
@media (max-width: 700px) {
  .hero h1 { font-size: 44px; }
  .hero { height: 60vh; }
}

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 28px;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  border: 1px solid currentColor;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: all .2s;
}
.btn:hover { background: var(--fg); color: #fff; opacity: 1; }
.btn-primary { background: var(--fg); color: #fff; }
.btn-primary:hover { background: #000; color: #fff; }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-ghost:hover { background: #fff; color: #000; }
.btn-sm { height: 34px; padding: 0 16px; font-size: 10px; }
.btn-danger { color: var(--error); border-color: var(--error); }
.btn-danger:hover { background: var(--error); color: #fff; }

/* === Section heading === */
.section-title {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 56px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.section-title h2 {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.section-title .meta {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

/* === Product grid === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .product-grid { grid-template-columns: 1fr; } }
.product-card { position: relative; }
.product-card .img-wrap {
  aspect-ratio: 1 / 1;
  background: var(--line-soft);
  overflow: hidden;
  margin-bottom: 16px;
}
.product-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.product-card:hover img { transform: scale(1.03); }
.product-card .cat {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg-mute); margin-bottom: 4px;
}
.product-card h3 {
  font-family: var(--mono);
  font-size: 18px; font-weight: 400; line-height: 1.3;
  margin-bottom: 4px;
}
.product-card .sku {
  font-size: 11px; color: var(--fg-mute); letter-spacing: 0.05em;
}

/* === Filter Tabs === */
.filter-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-tabs a {
  padding: 8px 18px;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--fg-soft);
  transition: all .2s;
}
.filter-tabs a:hover { opacity: 1; border-color: var(--fg); color: var(--fg); }
.filter-tabs a.active { background: var(--fg); color: #fff; border-color: var(--fg); }

/* === Forms === */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-soft);
  margin-bottom: 6px;
}
.field input, .field textarea, .field select {
  display: block; width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  transition: border-color .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--fg);
}
.field textarea {
  min-height: 320px;
  height: auto;            /* 默认根据内容自适应,内容少时也是 320px(由 min-height 保证) */
  resize: none;            /* 不需要手动拉 */
  font-family: inherit;
  overflow: auto;          /* 内容超出才出滚动条 */
}
/* 前台联系页/登录页的 textarea 默认小一些,不要 320 浪费空间 */
.contact-form textarea,
.auth-card textarea {
  min-height: 160px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.checkbox-row { display: flex; align-items: center; gap: 8px; }

/* === Tables === */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th, .table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.table th {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-mute);
  font-weight: 500;
  background: var(--line-soft);
}
.table tr:hover { background: var(--line-soft); }
.table .actions { display: flex; gap: 8px; }

/* === Flash === */
.flash {
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 14px;
  border-left: 3px solid var(--fg);
  background: var(--line-soft);
}
.flash-error { border-left-color: var(--error); background: #fdf2f2; color: var(--error); }
.flash-success { border-left-color: var(--success); background: #f2fdf4; color: var(--success); }

/* === Footer === */
.footer {
  background: #0a0a0a; color: #999;
  padding: 64px 0 24px;
  margin-top: 96px;
}
.footer .grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 700px) { .footer .grid { grid-template-columns: 1fr 1fr; } }
.footer h4 {
  color: #fff; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 20px;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; font-size: 13px; }
.footer a { color: #999; }
.footer a:hover { color: #fff; opacity: 1; }
.footer .bottom {
  border-top: 1px solid #222;
  padding-top: 24px;
  display: flex; justify-content: space-between;
  font-size: 12px;
  color: #666;
}
.footer .brand-line { color: #fff; font-family: var(--serif); font-size: 18px; letter-spacing: 0.08em; }

/* === Stat cards === */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  margin-bottom: 32px;
}
@media (max-width: 700px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: #fff;
  padding: 24px;
}
.stat-card .label {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 8px;
}
.stat-card .value {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 300;
  color: var(--fg);
}

/* === Login Page === */
.auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--line-soft);
  padding: 40px 20px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: #fff;
  padding: 48px 40px;
  border: 1px solid var(--line);
}
.auth-card h1 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 300;
  margin-bottom: 8px;
  text-align: center;
}
.auth-card .sub {
  text-align: center;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 32px;
}

/* === Badge === */
.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--line-soft);
  color: var(--fg-soft);
}
.badge-success { background: #e8f5ec; color: var(--success); }
.badge-warn { background: #fdf3e0; color: var(--warn); }
.badge-error { background: #fde8ea; color: var(--error); }
.badge-admin { background: #0a0a0a; color: #fff; }
.badge-editor { background: #ddd; color: #000; }
.badge-temp { background: #b45309; color: #fff; }

/* === Admin table (Users / Inquiries / etc) === */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
  font-weight: 500;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.admin-table tr:hover td { background: #fafafa; }

/* === Download list === */
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 700px) { .download-grid { grid-template-columns: 1fr; } }
.download-card {
  border: 1px solid var(--line);
  padding: 32px;
  display: flex; gap: 20px; align-items: start;
  transition: border-color .2s;
}
.download-card:hover { border-color: var(--fg); }
.download-card .icon {
  width: 48px; height: 48px;
  background: var(--line-soft);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: var(--serif); font-size: 18px;
}
.download-card h3 { font-size: 18px; margin-bottom: 8px; }
.download-card .meta { font-size: 12px; color: var(--fg-mute); margin-bottom: 12px; }
.download-card .desc { font-size: 13px; color: var(--fg-soft); margin-bottom: 16px; line-height: 1.5; }

/* === Empty state === */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--fg-mute);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.empty .icon { font-size: 48px; font-family: var(--serif); margin-bottom: 16px; }
