/* ============================================================
   LovelyHome 雅樹家居生活館 — Design System
   style.css  |  Shared across all pages
   ============================================================ */

/* --- Google Fonts ------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Serif+TC:wght@400;600;700&display=swap');

/* --- CSS Variables ----------------------------------------- */
:root {
  --cream:        #FAF8F4;
  --warm-white:   #FEFCF9;
  --slate:        #2C2C2C;
  --slate-mid:    #4A4845;
  --slate-light:  #7A7875;
  --accent:       #B5784A;
  --accent-light: #D4956A;
  --accent-pale:  #F5EDE4;
  --gold:         #C9A96E;
  --border:       #E8E3DC;

  --font-serif: 'Noto Serif TC', serif;
  --font-sans:  'Noto Sans TC', sans-serif;

  --nav-h: 60px;
  --max-w: 1140px;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 4px rgba(44,44,44,.06);
  --shadow-md: 0 4px 20px rgba(44,44,44,.10);
  --shadow-lg: 0 8px 40px rgba(44,44,44,.14);

  --transition: 0.22s ease;
}

/* --- Reset & Base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  color: var(--slate);
  background: var(--warm-white);
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* --- Utility ----------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 24px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--slate);
  line-height: 1.35;
  margin-bottom: 10px;
}

.section-sub {
  font-size: 14.5px;
  color: var(--slate-light);
  margin-bottom: 40px;
  max-width: 540px;
}

/* --- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 26px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

.btn-outline {
  border: 1.5px solid var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn-outline:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1.5px solid var(--border);
  color: var(--slate-mid);
  background: transparent;
  font-size: 13px;
  padding: 8px 18px;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(254, 252, 249, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--slate);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-mark span {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .05em;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--slate);
  letter-spacing: .03em;
}

.logo-sub {
  font-size: 10px;
  color: var(--slate-light);
  letter-spacing: .04em;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-mid);
  position: relative;
  padding-bottom: 3px;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active { color: var(--slate); }

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  z-index: 1100;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--slate);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
  transform-origin: center;
}

.nav-hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: rgba(254, 252, 249, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 40px 24px;
  flex-direction: column;
  gap: 28px;
  z-index: 999;
  transform: translateY(-12px);
  opacity: 0;
  transition: transform var(--transition), opacity var(--transition);
  pointer-events: none;
}

.nav-mobile.is-open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.nav-mobile a {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--slate);
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.nav-mobile a.active { color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--slate);
  color: #c8c4be;
}

.footer-main {
  padding: 60px 0 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 60px;
  border-bottom: 0.5px solid #3e3e3e;
}

.footer-logo { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }

.footer-logo .logo-mark { background: #3e3e3e; }

.footer-logo .logo-name { color: #f0ece5; }
.footer-logo .logo-sub  { color: #7a7875; }

.footer-tagline {
  font-size: 13px;
  color: #7a7875;
  line-height: 1.65;
  max-width: 280px;
}

.footer-pledge-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 20px;
  letter-spacing: .03em;
}

.footer-pledge-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pledge-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.pledge-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.pledge-text strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #e8e4de;
  margin-bottom: 2px;
}

.pledge-text span {
  font-size: 12.5px;
  color: #7a7875;
  line-height: 1.6;
}

.footer-bottom {
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-copy {
  font-size: 12px;
  color: #5c5956;
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  font-size: 12px;
  color: #7a7875;
  transition: color var(--transition);
}
.footer-legal a:hover { color: var(--accent-light); }

.footer-hours {
  font-size: 12px;
  color: #5c5956;
  margin-top: 6px;
}

/* ============================================================
   IMAGE PLACEHOLDERS
   ============================================================ */
.img-placeholder {
  background: var(--accent-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.img-placeholder::after {
  content: attr(data-label);
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: .04em;
  text-align: center;
  padding: 8px;
}

/* Aspect ratios */
.img-placeholder.ratio-16-9  { aspect-ratio: 16 / 9; }
.img-placeholder.ratio-hero   { height: 520px; }
.img-placeholder.ratio-square { aspect-ratio: 1 / 1; }

/* ============================================================
   HERO — shared base (overridden per page)
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-dark {
  background: var(--slate);
  color: #f0ece5;
  padding: 100px 0 80px;
}

.hero-cream {
  background: var(--cream);
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   CARDS — shared
   ============================================================ */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card-body {
  padding: 22px 24px 24px;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 8px;
  line-height: 1.4;
}

.card-desc {
  font-size: 13.5px;
  color: var(--slate-light);
  line-height: 1.7;
  margin-bottom: 18px;
}

/* ============================================================
   SECTIONS — spacing
   ============================================================ */
section { padding: 80px 0; }

/* ============================================================
   HOME — Trust Stats Bar
   ============================================================ */
.stats-bar {
  background: var(--accent-pale);
  padding: 44px 0;
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.stat-item {
  text-align: center;
  padding: 0 24px;
  position: relative;
}

.stat-item + .stat-item::before {
  content: '';
  position: absolute;
  left: 0; top: 10%; bottom: 10%;
  width: 1px;
  background: var(--border);
}

.stat-number {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--slate-mid);
  line-height: 1.5;
}

/* ============================================================
   HOME — Brand Values
   ============================================================ */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 44px;
}

.value-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.value-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.value-icon {
  font-size: 28px;
  margin-bottom: 16px;
}

.value-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 10px;
  line-height: 1.4;
}

.value-desc {
  font-size: 13.5px;
  color: var(--slate-light);
  line-height: 1.75;
}

/* ============================================================
   HOME — Product Category Grid
   ============================================================ */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 44px;
}

/* ============================================================
   HOME — Reviews
   ============================================================ */
.reviews-section {
  background: var(--slate);
  padding: 80px 0;
}

.reviews-section .section-title { color: #f0ece5; }
.reviews-section .section-sub   { color: #7a7875; }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.review-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  backdrop-filter: blur(6px);
}

.review-stars {
  color: var(--gold);
  font-size: 15px;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.review-text {
  font-size: 14px;
  color: #d8d3cc;
  line-height: 1.8;
  margin-bottom: 16px;
}

.review-author {
  font-size: 12.5px;
  color: #7a7875;
}

/* ============================================================
   ABOUT page
   ============================================================ */
.about-story {
  padding: 60px 0 70px;
  background: var(--cream);
}

.about-story p {
  font-size: 15.5px;
  color: var(--slate-mid);
  line-height: 1.9;
  max-width: 720px;
  margin-bottom: 22px;
}

.policy-section {
  padding: 70px 0 80px;
}

.policy-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 760px;
  margin-top: 36px;
}

.policy-item {
  background: #fff;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
}

.policy-item strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 7px;
}

.policy-item p {
  font-size: 14px;
  color: var(--slate-mid);
  line-height: 1.75;
}

/* ============================================================
   CATALOG page
   ============================================================ */
.catalog-section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border);
}
.catalog-section:last-of-type { border-bottom: none; }

.catalog-section-header {
  margin-bottom: 32px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.catalog-section-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--slate);
}

.catalog-section-count {
  font-size: 12px;
  color: var(--slate-light);
  background: var(--accent-pale);
  padding: 2px 9px;
  border-radius: 99px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow var(--transition), transform var(--transition); }
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.product-card-body { padding: 18px 20px 20px; }

.product-name {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 5px;
  line-height: 1.4;
}

.product-spec {
  font-size: 12.5px;
  color: var(--slate-light);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ============================================================
   LEGAL pages (privacy / terms)
   ============================================================ */
.legal-hero {
  background: var(--cream);
  padding: 64px 0 44px;
  border-bottom: 1px solid var(--border);
}

.legal-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 10px;
}

.legal-hero .meta {
  font-size: 13px;
  color: var(--slate-light);
}

.legal-body {
  padding: 60px 0 80px;
  max-width: 740px;
  margin-inline: auto;
}

.legal-section {
  margin-bottom: 44px;
}

.legal-section h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.legal-section p,
.legal-section li {
  font-size: 14.5px;
  color: var(--slate-mid);
  line-height: 1.85;
  margin-bottom: 10px;
}

.legal-section ul {
  list-style: disc;
  padding-left: 22px;
}

.legal-section ol {
  list-style: decimal;
  padding-left: 22px;
}

/* ============================================================
   RESPONSIVE — 768px breakpoint
   ============================================================ */
@media (max-width: 768px) {
  /* Nav */
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  /* Hero */
  .hero-dark { padding: 70px 0 56px; }
  .img-placeholder.ratio-hero { height: 280px; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr; gap: 0; }
  .stat-item { padding: 20px 0; border-bottom: 1px solid var(--border); }
  .stat-item::before { display: none !important; }
  .stat-item:last-child { border-bottom: none; }

  /* Values */
  .values-grid { grid-template-columns: 1fr; gap: 16px; }

  /* Category grid */
  .catalog-grid { grid-template-columns: 1fr; gap: 20px; }

  /* Reviews */
  .reviews-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-main { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* Products */
  .products-grid { grid-template-columns: 1fr 1fr; }

  /* Legal */
  .legal-body { padding: 40px 0 60px; }

  section { padding: 56px 0; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }

  .container { padding-inline: 18px; }

  .hero-dark { padding: 56px 0 44px; }
}
