/* ============ Homimate — Global Styles ============ */
:root {
  --primary: #2c5f7c;
  --primary-dark: #1a3a4d;
  --accent: #c2a878;
  --text: #333;
  --text-light: #777;
  --bg-light: #f6f8f9;
  --border: #e5e8ea;
  --white: #fff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.section { padding: 70px 0; }
.section-title { text-align: center; margin-bottom: 12px; font-size: 32px; color: var(--primary-dark); }
.section-sub { text-align: center; color: var(--text-light); max-width: 640px; margin: 0 auto 45px; }

.btn {
  display: inline-block; padding: 12px 32px; border-radius: 4px;
  background: var(--primary); color: var(--white); font-size: 15px;
  border: none; cursor: pointer; transition: background .25s;
}
.btn:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border: 2px solid var(--white); }
.btn-outline:hover { background: var(--white); color: var(--primary-dark); }

/* ============ Header ============ */
.topbar {
  background: var(--primary-dark); color: #cfdde6; font-size: 13px; padding: 8px 0;
}
.topbar .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

.header {
  background: var(--white); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { font-size: 26px; font-weight: 700; color: var(--primary-dark); letter-spacing: .5px; }
.logo span { color: var(--accent); }

.nav > ul { display: flex; gap: 34px; }
.nav > ul > li { position: relative; }
.nav a { font-size: 15px; font-weight: 500; padding: 26px 0; display: block; }
.nav > ul > li:hover > a, .nav a.active { color: var(--primary); }

.dropdown {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: var(--white); min-width: 200px; border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(0,0,0,.08); opacity: 0; visibility: hidden;
  transition: all .2s;
}
.nav li:hover .dropdown { opacity: 1; visibility: visible; }
.dropdown a { padding: 11px 20px; font-weight: 400; font-size: 14px; }
.dropdown a:hover { background: var(--bg-light); color: var(--primary); }

.nav-toggle { display: none; font-size: 26px; background: none; border: none; cursor: pointer; }

/* ============ Hero ============ */
.hero { position: relative; color: var(--white); }
.hero img { width: 100%; height: 560px; object-fit: cover; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(12,32,46,.72) 0%, rgba(12,32,46,.35) 55%, rgba(12,32,46,.1) 100%);
}
.hero-content { z-index: 2; }
.hero-content {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  left: 0; right: 0;
}
.hero-content h1 { font-size: 46px; line-height: 1.2; max-width: 620px; margin-bottom: 18px; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.hero-content p { font-size: 18px; max-width: 540px; margin-bottom: 30px; text-shadow: 0 1px 6px rgba(0,0,0,.3); }
.hero-content .btn-group { display: flex; gap: 16px; }

/* ============ Category Grid ============ */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.category-grid > .category-card:last-child:nth-child(3n+1) { grid-column: 2; }
.category-card {
  position: relative; overflow: hidden; border-radius: 6px; cursor: pointer;
}
.category-card img { transition: transform .4s; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.category-card:hover img { transform: scale(1.05); }
.category-card h3 {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 16px;
  color: var(--white); font-size: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
}

/* ============ Product Cards ============ */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden; transition: box-shadow .25s, transform .25s;
}
.product-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,.1); transform: translateY(-4px); }
.product-card img { aspect-ratio: 1/1; object-fit: cover; width: 100%; }
.product-card .info { padding: 16px; }
.product-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.product-card p { font-size: 13px; color: var(--text-light); }

/* ============ Features (Why Choose Us) ============ */
.features { background: var(--bg-light); }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-box {
  background: var(--white); text-align: center; padding: 40px 24px;
  border-radius: 6px; border: 1px solid var(--border);
}
.feature-box .icon { font-size: 40px; margin-bottom: 16px; }
.feature-box h3 { font-size: 18px; margin-bottom: 10px; color: var(--primary-dark); }
.feature-box p { font-size: 14px; color: var(--text-light); }

/* ============ Newsletter ============ */
.newsletter { background: var(--primary); color: var(--white); text-align: center; }
.newsletter h2 { font-size: 30px; margin-bottom: 10px; }
.newsletter p { opacity: .85; margin-bottom: 28px; }
.newsletter form { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.newsletter input {
  padding: 13px 18px; border: none; border-radius: 4px; width: 340px; max-width: 100%;
  font-size: 15px;
}
.newsletter .btn { background: var(--accent); }
.newsletter .btn:hover { background: #a98f5e; }

/* ============ Footer ============ */
.footer { background: var(--primary-dark); color: #b9c9d3; font-size: 14px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; padding: 60px 0 40px;
}
.footer h4 { color: var(--white); font-size: 16px; margin-bottom: 18px; }
.footer li { margin-bottom: 10px; }
.footer a:hover { color: var(--white); }
.footer .logo { color: var(--white); margin-bottom: 14px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; text-align: center; font-size: 13px;
}

/* ============ Page banner (subpages) ============ */
.page-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white); text-align: center; padding: 60px 20px;
}
.page-banner h1 { font-size: 36px; }
.page-banner p { opacity: .8; margin-top: 8px; }

/* ============ About page ============ */
.about-flex { display: flex; gap: 50px; align-items: center; }
.about-flex > div { flex: 1; }
.about-flex h2 { font-size: 30px; color: var(--primary-dark); margin-bottom: 18px; }
.about-flex p { margin-bottom: 14px; color: #555; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 50px; text-align: center; }
.stats .num { font-size: 38px; font-weight: 700; color: var(--primary); }
.stats .label { color: var(--text-light); font-size: 14px; }

/* ============ News page ============ */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--white); }
.news-card img { aspect-ratio: 8/5; object-fit: cover; width: 100%; }
.news-card .info { padding: 20px; }
.news-card .date { font-size: 13px; color: var(--text-light); }
.news-card h3 { font-size: 18px; margin: 8px 0 10px; color: var(--primary-dark); }
.news-card p { font-size: 14px; color: var(--text-light); }

/* ============ Contact page ============ */
.contact-flex { display: flex; gap: 50px; }
.contact-flex > div { flex: 1; }
.contact-info h3 { font-size: 22px; color: var(--primary-dark); margin-bottom: 20px; }
.contact-info li { margin-bottom: 16px; display: flex; gap: 12px; align-items: flex-start; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 13px 16px; margin-bottom: 16px;
  border: 1px solid var(--border); border-radius: 4px; font-size: 15px; font-family: inherit;
}
.contact-form textarea { min-height: 140px; resize: vertical; }

/* ============ Responsive ============ */
@media (max-width: 992px) {
  .category-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-content h1 { font-size: 34px; }
}
@media (max-width: 768px) {
  .nav {
    position: fixed; top: 76px; left: 0; right: 0; background: var(--white);
    border-bottom: 1px solid var(--border); display: none; max-height: calc(100vh - 76px); overflow-y: auto;
  }
  .nav.open { display: block; }
  .nav > ul { flex-direction: column; gap: 0; padding: 10px 20px; }
  .nav a { padding: 12px 0; }
  .dropdown { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: none; padding-left: 16px; }
  .nav-toggle { display: block; }
  .hero { display: flex; }
  .hero img { position: absolute; inset: 0; width: 100%; height: 100%; }
  .hero-content { position: relative; padding: 60px 20px; }
  .about-flex, .contact-flex { flex-direction: column; }
  .news-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .category-grid, .product-grid, .feature-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 28px; }
}

/* ============ WhatsApp float button ============ */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 200;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.25); transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ============ FAQ page ============ */
.faq-item {
  background: var(--white); border: 1px solid var(--border); border-radius: 6px;
  padding: 22px 26px; margin-bottom: 14px;
}
.faq-item h3 { font-size: 17px; color: var(--primary-dark); margin-bottom: 8px; }
.faq-item p { font-size: 15px; color: #555; }
.sample-policy {
  margin-top: 40px; background: var(--bg-light); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: 6px; padding: 26px 30px;
}
.sample-policy h3 { color: var(--primary-dark); margin-bottom: 12px; }
.sample-policy li { margin-bottom: 8px; color: #555; }

/* ============ How We Work steps ============ */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.step { text-align: center; padding: 26px 14px; background: var(--white); border: 1px solid var(--border); border-radius: 6px; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 14px;
  background: var(--primary); color: var(--white); font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: 16px; color: var(--primary-dark); margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--text-light); }
@media (max-width: 992px) { .steps { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr 1fr; } }

/* ============ Logo tagline ============ */
.logo-tag {
  display: block; font-size: 9.5px; font-weight: 600;
  letter-spacing: 3px; color: var(--primary); margin-top: 2px;
}
.footer .logo-tag { color: #b9c9d3; }
