/*
Theme Name: 海星家具
Theme URI: http://120.27.219.193/
Author: Haixing Furniture
Description: 常州市海星家具有限公司官网主题 — 新中式酸枝家具厂家站
Version: 1.0.9
Text Domain: haixing
*/

:root {
  --cream: #f5f1e8;
  --cream-soft: #faf7f1;
  --ink: #2c2118;
  --ink-soft: #5a4a3a;
  --muted: #8a7a68;
  --tan: #b8956a;
  --tan-dark: #9a7648;
  --wood: #3e2b1e;
  --wood-deep: #2a1c14;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(44, 33, 24, 0.08);
  --max: 1360px;
  --header-h: 84px;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

.section {
  padding: 88px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
}

.section-head h2 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--tan);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--tan-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-outline {
  background: transparent;
  color: var(--tan-dark);
  border-color: var(--tan);
}

.btn-outline:hover {
  background: var(--tan);
  color: var(--white);
}

.link-more {
  color: var(--tan-dark);
  font-size: 0.92rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: 0.2s;
}

.link-more:hover {
  color: var(--wood);
  gap: 8px;
}

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 241, 232, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(62, 43, 30, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 36px;
  max-width: 1480px;
  width: min(100% - 48px, 1480px);
  margin-inline: auto;
}

.site-header > .container.header-inner {
  width: min(100% - 48px, 1480px);
  max-width: 1480px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  background: var(--wood);
  color: var(--white);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 4px;
}

.brand-text {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  font-weight: 700;
  color: var(--wood);
  letter-spacing: 0.06em;
  white-space: nowrap;
  line-height: 1.25;
}

.brand-logo {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand-logo--footer {
  height: 56px;
  /* soft plate so red logo stays clear on dark footer */
  background: rgba(255, 255, 255, 0.96);
  border-radius: 8px;
  padding: 4px;
}

.nav-main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 8px;
  min-width: 0;
}

.nav-main > ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 2.8vw, 42px);
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.nav-main a {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.15vw, 1.12rem);
  font-weight: 600;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 2px;
  letter-spacing: 0.06em;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-main a:hover,
.nav-main a.current,
.nav-main .current-menu-item > a {
  color: var(--tan-dark);
}

.nav-main a.current::after,
.nav-main .current-menu-item > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--tan);
}

.header-cta {
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--wood);
  margin: 6px 0;
  transition: 0.25s;
}

/* ========== Hero ========== */
.hero {
  position: relative;
  height: min(88vh, 760px);
  min-height: 520px;
  overflow: hidden;
  color: var(--white);
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(30, 18, 10, 0.35) 0%,
    rgba(30, 18, 10, 0.55) 55%,
    rgba(30, 18, 10, 0.72) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}

.hero-content h1 {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
  animation: fadeUp 0.9s ease both;
}

.hero-content p {
  margin: 0 0 32px;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  opacity: 0.92;
  max-width: 560px;
  animation: fadeUp 0.9s 0.15s ease both;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.9s 0.3s ease both;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 28px;
  height: 3px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: 0.25s;
}

.hero-dots button.is-active {
  background: var(--white);
  width: 36px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== About split ========== */
.about-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

.about-split__media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
}

.about-split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.about-split__media:hover img {
  transform: scale(1.04);
}

.about-split__body h2 {
  margin: 0 0 20px;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--ink);
  letter-spacing: 0.04em;
}

.about-split__body p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* ========== Cards grid ========== */
.cards-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(44, 33, 24, 0.12);
}

.card__media {
  aspect-ratio: 4/3;
  overflow: hidden;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card__media img {
  transform: scale(1.05);
}

.card__body {
  padding: 20px 20px 22px;
}

.card__body h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--ink);
}

.card__body p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section-foot {
  text-align: center;
  margin-top: 40px;
}

/* ========== Page hero ========== */
.page-hero {
  padding: 72px 0 40px;
  text-align: center;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: var(--ink);
  letter-spacing: 0.06em;
}

.page-hero p {
  margin: 0 auto;
  max-width: 560px;
  color: var(--muted);
}

/* ========== Filters ========== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-bar button,
.filter-bar a {
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid rgba(62, 43, 30, 0.12);
  background: var(--white);
  color: var(--ink-soft);
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.2s;
}

.filter-bar button.is-active,
.filter-bar a.is-active,
.filter-bar button:hover,
.filter-bar a:hover {
  background: var(--tan);
  border-color: var(--tan);
  color: var(--white);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card .card__media {
  aspect-ratio: 1;
  background: #eae4da;
}

.product-card .card__body {
  text-align: center;
}

.product-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 14px !important;
}

/* ========== Timeline ========== */
.timeline {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(184, 149, 106, 0.45);
  transform: translateX(-50%);
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
  position: relative;
}

.timeline-item:nth-child(even) .timeline-card {
  grid-column: 2;
}

.timeline-item:nth-child(odd) .timeline-card {
  grid-column: 1;
}

.timeline-item::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 28px;
  width: 12px;
  height: 12px;
  background: var(--tan);
  border: 3px solid var(--cream);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}

.timeline-card .year {
  color: var(--tan-dark);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.timeline-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

.timeline-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 48px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  text-align: center;
}

.feature-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ========== Contact ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.contact-info {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}

.contact-info h2 {
  margin: 0 0 24px;
  font-family: var(--font-serif);
  font-size: 1.5rem;
}

.contact-row {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  align-items: flex-start;
}

.contact-row .icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(184, 149, 106, 0.15);
  color: var(--tan-dark);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.contact-row strong {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 2px;
}

.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 360px;
  background: #ddd;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}

.contact-map-fallback {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8dfd2, #d4c4ae);
  padding: 32px;
  text-align: center;
}

.contact-map-fallback p {
  margin: 0 0 16px;
  color: var(--ink-soft);
}

/* ========== News ========== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.news-card .meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.news-card .meta span {
  color: var(--tan-dark);
  margin-right: 10px;
}

/* ========== Footer ========== */
.site-footer {
  background: var(--wood);
  color: rgba(255, 255, 255, 0.88);
  padding: 64px 0 0;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand .brand-text {
  color: var(--tan);
}

.footer-brand .brand {
  text-decoration: none;
}

.footer-brand p {
  margin: 16px 0 0;
  font-size: 0.9rem;
  line-height: 1.75;
  opacity: 0.85;
  max-width: 340px;
}

.footer-col h4 {
  margin: 0 0 18px;
  color: var(--tan);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
}

.footer-col a {
  display: block;
  margin-bottom: 10px;
  font-size: 0.92rem;
  opacity: 0.85;
  transition: 0.2s;
}

.footer-col a:hover {
  opacity: 1;
  color: var(--tan);
}

.footer-contact li {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.92rem;
  opacity: 0.9;
}

.footer-contact .ico {
  color: var(--tan);
  width: 1.2em;
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 0;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.85;
}

.footer-bottom__inner p {
  margin: 0 0 6px;
  line-height: 1.7;
}

.footer-bottom__inner p:last-child {
  margin-bottom: 0;
}

/* ========== Detail page ========== */
.product-detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
  padding-bottom: 60px;
}

.product-detail__gallery {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.product-detail__info h1 {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-size: 2rem;
}

.product-detail__info > p {
  color: var(--ink-soft);
  margin: 0 0 24px;
}

.spec-list {
  margin-bottom: 28px;
}

.spec-list li {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.spec-list .ico {
  color: var(--tan-dark);
}

.detail-panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-top: 24px;
}

.detail-panel h2 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 1.25rem;
}

.detail-panel p {
  margin: 0 0 20px;
  color: var(--ink-soft);
}

.detail-panel p:last-child {
  margin-bottom: 0;
}

.cta-band {
  text-align: center;
  padding: 48px 0 20px;
}

/* ========== Reveal ========== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .brand-text {
    font-size: 1rem;
    max-width: none;
    white-space: nowrap;
  }

  .nav-main > ul {
    gap: 18px;
  }

  .nav-main a {
    font-size: 0.95rem;
  }

  .feature-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-split,
  .contact-grid,
  .product-detail {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .timeline::before {
    left: 16px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    padding-left: 40px;
  }

  .timeline-item:nth-child(odd) .timeline-card,
  .timeline-item:nth-child(even) .timeline-card {
    grid-column: 1;
  }

  .timeline-item::after {
    left: 16px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-main,
  .header-cta {
    display: none;
  }

  .site-header.is-open .nav-main {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--cream);
    padding: 20px 24px 28px;
    gap: 18px;
    border-bottom: 1px solid rgba(62, 43, 30, 0.08);
    box-shadow: var(--shadow);
  }

  .site-header.is-open .header-cta {
    display: block;
    position: absolute;
    top: calc(var(--header-h) + 220px);
    left: 24px;
    right: 24px;
    z-index: 101;
  }

  .cards-3,
  .product-grid,
  .news-grid,
  .feature-cards,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cards-4 {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 460px;
    height: 70vh;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

  .page-hero h1 {
    font-size: 1.5rem;
  }

  .section {
    padding: 64px 0;
  }
}
