/* 湖南金晖 · 站点主题 */

:root {
  --navy: #12263a;
  --navy-2: #1b3a57;
  --ink: #1a2330;
  --gold: #c4a35a;
  --gold-2: #d8b56b;
  --gold-deep: #9a7b32;
  --cream: #f4f0e8;
  --paper: #fffdf8;
  --line: #e6dfd2;
  --muted: #6d7380;
  --danger: #b42318;
  --shadow: 0 10px 30px rgba(18, 38, 58, 0.08);
  --radius: 12px;
  --wrap: 1180px;
}

html {
  scroll-behavior: smooth;
}

body.home-page {
  background: var(--cream);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

body.home-page div,
.header div,
.footer div,
.foot div {
  margin-left: 0;
  margin-right: 0;
}

.site-wrap,
.header .w1000,
.footer .w1000,
.footcontent {
  width: calc(100% - 40px);
  max-width: var(--wrap);
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(18, 38, 58, 0.04);
}

.header .topbar {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.header .topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  gap: 12px;
}

.header .topbar a {
  color: var(--gold-2);
}

.header .top {
  display: flex;
  align-items: center;
  gap: 24px;
  height: auto !important;
  min-height: 84px;
  padding: 12px 0;
  overflow: visible !important;
}

.header .top .logo {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  flex: 0 0 auto;
}

.header .top .logo a,
.logo-link {
  display: flex !important;
  align-items: center;
  gap: 12px;
  color: var(--navy);
}

.header .top .logo img {
  display: block;
  height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-text b {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--navy);
}

.logo-text small {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.header .top .search {
  float: none !important;
  flex: 1 1 auto;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  max-width: 560px;
}

.header .top .search form {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--cream);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.header .top .search form:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 163, 90, 0.18);
  background: #fff;
}

.header .top .search .search_txt {
  flex: 1;
  float: none !important;
  width: auto !important;
  height: 42px !important;
  border: 0 !important;
  background: transparent;
  padding: 0 18px !important;
  font: 14px/42px "PingFang SC", "Microsoft YaHei", sans-serif !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}

.header .top .search .search_btn {
  float: none !important;
  width: 88px !important;
  height: 42px !important;
  border: 0;
  cursor: pointer;
  background: var(--navy) !important;
  background-image: none !important;
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.12em;
}

.header .top .search .search_btn:hover {
  background: var(--gold-deep) !important;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex: 0 0 auto;
}

.header-actions a {
  color: var(--navy-2);
  font-size: 14px;
  padding: 8px 10px;
}

.header-actions .btn-publish {
  background: var(--gold);
  color: var(--navy) !important;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
}

.header-actions .btn-publish:hover {
  background: var(--gold-2);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  position: relative;
}

.nav-toggle span,
.nav-toggle span:before,
.nav-toggle span:after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy);
  position: absolute;
  left: 11px;
  content: "";
}

.nav-toggle span {
  top: 20px;
}

.nav-toggle span:before {
  top: -6px;
}

.nav-toggle span:after {
  top: 6px;
}

/* ---------- Nav ---------- */
.nav {
  width: 100%;
  height: auto !important;
  background: var(--navy) !important;
}

.nav .nav_con {
  height: auto !important;
  display: flex;
  align-items: center;
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  float: none !important;
  height: auto !important;
  width: 100%;
}

.nav ul li {
  float: none !important;
  background: none !important;
  position: relative;
}

.nav ul li.navhover,
.nav ul li.nav-open,
.nav ul li:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.nav ul li a {
  display: block;
  width: auto !important;
  height: 48px !important;
  padding: 0 18px !important;
  font: 15px/48px "PingFang SC", "Microsoft YaHei", sans-serif !important;
  color: #fff !important;
  text-align: center;
}

.nav ul li.navhover a,
.nav ul li a:hover {
  color: var(--gold-2) !important;
}

.nav ul li ol {
  display: none;
  position: absolute;
  left: 0;
  top: 48px;
  min-width: 180px;
  width: auto !important;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  box-shadow: var(--shadow);
  padding: 10px 14px !important;
  z-index: 20;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.9;
  white-space: nowrap;
}

.nav ul li ol a,
.nav ul li ol p a {
  float: none !important;
  display: block !important;
  width: auto !important;
  height: 36px !important;
  line-height: 36px !important;
  padding: 0 16px !important;
  color: var(--ink) !important;
  font-size: 13px !important;
  background: transparent !important;
  text-align: left;
}

.nav ul li ol a:hover {
  background: var(--cream) !important;
  color: var(--gold-deep) !important;
}

#iflogin {
  color: var(--ink);
  font-size: 13px;
}

#iflogin a {
  display: inline-block;
  margin-right: 6px;
}

/* ---------- Home ---------- */
.hero {
  width: 100%;
  height: 600px;
  background: #12263a url(/images/banner.jpg) center center / cover no-repeat;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
}

.btn-gold:hover {
  background: var(--gold-2);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn-ghost:hover {
  border-color: var(--gold-2);
  color: var(--gold-2);
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: -36px;
  position: relative;
  z-index: 2;
}

.feature-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
}

.feature-card strong {
  display: block;
  font-size: 15px;
  color: var(--navy);
  margin-bottom: 4px;
}

.feature-card span {
  color: var(--muted);
  font-size: 13px;
}

.cat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 28px auto 8px;
}

.cat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--ink);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.cat-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: var(--shadow);
}

.cat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--cream);
  color: var(--gold-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
}

.cat-card b {
  display: block;
  font-size: 16px;
}

.cat-card em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}

.home-main {
  padding: 12px 0 48px;
}

.block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 20px 22px;
  margin: 22px auto 0;
  box-shadow: 0 8px 20px rgba(18, 38, 58, 0.04);
}

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px 12px;
  border-bottom: 1px solid var(--line);
}

.block-head h2 {
  font-size: 20px;
  color: var(--navy);
  font-weight: 700;
}

.block-head h2 small {
  margin-left: 8px;
  font-size: 12px;
  color: var(--gold-deep);
  letter-spacing: 0.16em;
  font-weight: 400;
}

.block-head .more {
  color: var(--muted);
  font-size: 13px;
}

.block-head .more:hover {
  color: var(--gold-deep);
}

/* 二手手机 · 等比图片货架 */
.phone-block {
  background: #fff;
}

.phone-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  padding-top: 18px;
  list-style: none;
  align-items: start;
}

.phone-item {
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.phone-item:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: var(--shadow);
}

.phone-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 168px;
  padding: 12px;
  background: #f3eee6;
  box-sizing: border-box;
}

.phone-thumb img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  object-position: center;
}

.phone-meta {
  padding: 10px 12px 12px;
  background: #fff;
}

.phone-title {
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.info-writer {
  min-width: 0;
  color: var(--navy-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-writer:before {
  content: "发布人 ";
  color: var(--muted);
}

.info-date {
  flex: 0 0 auto;
  color: var(--muted);
}

/* 二手台式机 · 双列图文目录 */
.pc-block .block-head h2 small {
  color: var(--navy-2);
}

.pc-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  padding-top: 18px;
  list-style: none;
}

.pc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 10px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.pc-item:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: var(--shadow);
}

.pc-thumb {
  flex: 0 0 148px;
  width: 148px;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  overflow: hidden;
  background: #ece6db;
  box-sizing: border-box;
}

.pc-thumb img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 96px;
  object-fit: contain;
  object-position: center;
}

.pc-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pc-body h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc-body p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc-body p:empty {
  display: none;
}

.pc-body .info-foot {
  margin-top: auto;
  padding-top: 8px;
}

.goods-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding-top: 18px;
  list-style: none;
}

.goods-card {
  display: block;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.goods-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: var(--shadow);
}

.goods-thumb {
  aspect-ratio: 1;
  background: #f0ebe3;
  overflow: hidden;
}

.goods-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.goods-title {
  padding: 10px 12px 12px;
  font-size: 13px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
  padding: 10px 4px 0;
  list-style: none;
}

.news-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  overflow: hidden;
}

.news-list .idx {
  flex: 0 0 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  text-align: center;
  line-height: 24px;
}

.news-list li:nth-child(-n+3) .idx {
  background: var(--gold-deep);
}

.news-list a {
  flex: 1;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-list a:hover {
  color: var(--gold-deep);
}

.news-list time,
.news-list strong {
  flex: 0 0 92px;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  float: none !important;
  width: auto !important;
}

.cta-band {
  margin-top: 28px;
  background: var(--navy);
  color: #fff;
  border-radius: 16px;
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cta-band h3 {
  font-size: 22px;
  margin-bottom: 6px;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- Footer ---------- */
.footer,
.foot {
  background: #0e1c2b !important;
  height: auto !important;
  padding: 0 !important;
}

.footer .foot {
  padding: 36px 0 0 !important;
}

.footcontent {
  color: rgba(255, 255, 255, 0.68) !important;
  width: calc(100% - 40px) !important;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 24px;
}

.footer-grid h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 14px;
  letter-spacing: 0.08em;
}

.footer-grid p,
.footer-grid a {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.9;
}

.footer-grid a:hover {
  color: var(--gold-2);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footcontent > p,
.footer .copy-links {
  text-align: left !important;
  line-height: 2 !important;
}

.copyright {
  width: 100% !important;
  background: none !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 8px !important;
  padding: 16px 0 22px !important;
  text-align: left !important;
}

.copyright p,
.copyright p a {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 12px !important;
  text-align: left;
  line-height: 1.8;
}

#totop {
  right: 20px;
  bottom: 20px;
}

#totops {
  background-color: var(--navy) !important;
  border-radius: 10px !important;
}

#totops:hover {
  background-color: var(--gold-deep) !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .goods-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .phone-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .header .top {
    flex-wrap: wrap;
    gap: 12px;
  }

  .header .top .search {
    order: 3;
    max-width: none;
    width: 100% !important;
    flex-basis: 100%;
  }

  .header-actions {
    display: none;
  }

  .nav-toggle {
    display: inline-block;
    margin-left: auto;
  }

  .nav {
    display: none;
  }

  .nav.is-open {
    display: block;
  }

  .nav ul {
    flex-direction: column;
  }

  .nav ul li a {
    text-align: left;
    height: 42px !important;
    line-height: 42px !important;
  }

  .feature-row,
  .cat-row {
    grid-template-columns: 1fr 1fr;
  }

  .goods-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .phone-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pc-board {
    grid-template-columns: 1fr;
  }

  .news-list {
    grid-template-columns: 1fr;
  }

  .cta-band,
  .footer-grid {
    display: block;
  }

  .cta-band .btn {
    margin-top: 16px;
  }

  .footer-grid > div {
    margin-bottom: 22px;
  }
}

@media (max-width: 640px) {
  .header .topbar {
    display: none;
  }

  .phone-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pc-thumb {
    flex-basis: 112px;
    width: 112px;
    min-height: 80px;
  }

  .pc-thumb img {
    max-height: 80px;
  }

  .feature-row,
  .cat-row,
  .goods-grid {
    grid-template-columns: 1fr 1fr;
  }

  .block {
    padding: 6px 12px 16px;
  }
}
