/* ============================================================
   LUME CO., LTD. — Stylesheet
   โครงสร้าง: 1) ตัวแปรสี/ฟอนต์  2) Reset/Base  3) ปุ่ม/ยูทิลิตี้
   4) Header/Nav  5) Hero  6) Section ทั่วไป  7) การ์ด/Grid
   8) ฟอร์ม  9) Footer  10) Responsive  11) Scroll reveal
   Mobile-First: เขียนสไตล์มือถือก่อน แล้วใช้ media query ขยายจอใหญ่
   ============================================================ */

/* ---------- 1) ตัวแปรสี & ฟอนต์ (CSS variables) ---------- */
:root {
  --primary: #16314f;        /* น้ำเงินกรมท่า — สีหลักแบรนด์ */
  --primary-light: #214a73;
  --secondary: #2a9d8f;      /* เขียวเทอร์คอยซ์ — สีรอง */
  --accent: #f4a259;         /* ส้มอำพัน — ปุ่ม/จุดเน้น */
  --accent-dark: #e08a3a;
  --bg: #f7f9fb;             /* พื้นหลังหลัก */
  --bg-alt: #eef2f6;         /* พื้นหลังสลับ section */
  --surface: #ffffff;        /* พื้นการ์ด */
  --text: #1d2730;           /* ตัวอักษรหลัก */
  --text-muted: #5b6770;     /* ตัวอักษรรอง */
  --border: #dde4ea;
  --shadow: 0 6px 20px rgba(22, 49, 79, 0.08);
  --shadow-lg: 0 14px 40px rgba(22, 49, 79, 0.14);
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1180px;
  --font: "Segoe UI", "Prompt", "Sarabun", system-ui, -apple-system, sans-serif;
}

/* ---------- 2) Reset & Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--primary); font-weight: 700; }

ul { list-style: none; }

/* คอนเทนเนอร์กลางหน้า */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
}

/* ---------- 3) ปุ่ม & ยูทิลิตี้ ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-outline:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.btn-ghost { background: var(--primary); color:#fff; }
.btn-ghost:hover { background: var(--primary-light); transform: translateY(-2px); }

.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 42px; }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin-bottom: 12px; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }
.eyebrow {
  display: inline-block; color: var(--secondary); font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; font-size: .82rem; margin-bottom: 8px;
}

/* ---------- 4) Header & Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; font-weight: 800; font-size: 1.2rem;
  display: grid; place-items: center;
}
.brand .brand-text strong { color: var(--primary); font-size: 1.1rem; display:block; line-height:1.1; }
.brand .brand-text span { color: var(--text-muted); font-size: .72rem; letter-spacing: .5px; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px; font-weight: 500; color: var(--text);
  transition: background .2s, color .2s;
}
.nav-links a:hover, .nav-links a.active { background: var(--bg-alt); color: var(--primary); }
.nav-links .btn { color:#fff; margin-left: 6px; padding: 9px 20px; }

/* ปุ่ม hamburger (ซ่อนบนเดสก์ท็อป) */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span { width: 26px; height: 3px; background: var(--primary); border-radius: 3px; transition: .3s; }
.nav-toggle.open span:nth-child(1){ transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2){ opacity: 0; }
.nav-toggle.open span:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }

/* ---------- 5) Hero ---------- */
.hero {
  position: relative; color: #fff; text-align: center;
  padding: 92px 0 100px;
  background:
    linear-gradient(rgba(13,28,46,.78), rgba(13,28,46,.82)),
    url("https://loremflickr.com/1600/800/home,appliance,kitchen?lock=21") center/cover no-repeat;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 5.5vw, 3.4rem); margin-bottom: 16px; }
.hero p.lead { font-size: clamp(1.02rem, 2.5vw, 1.25rem); max-width: 680px; margin: 0 auto 28px; opacity: .95; }
.hero .hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* แถบสถิติ/ความน่าเชื่อถือ */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 0; }
.stats .stat {
  background: var(--surface); border-radius: var(--radius); padding: 26px 18px;
  text-align: center; box-shadow: var(--shadow);
}
.stats .stat b { display: block; font-size: 2rem; color: var(--secondary); }
.stats .stat span { color: var(--text-muted); font-size: .95rem; }
.stats-wrap { margin-top: -56px; position: relative; z-index: 5; }

/* ---------- 6) จุดเด่น (features) ---------- */
.features { display: grid; grid-template-columns: 1fr; gap: 22px; }
.feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature .icon { font-size: 2rem; width: 58px; height: 58px; border-radius: 14px;
  display: grid; place-items: center; background: var(--bg-alt); margin-bottom: 14px; }
.feature h3 { font-size: 1.2rem; margin-bottom: 8px; }
.feature p { color: var(--text-muted); }

/* ---------- 7) การ์ดสินค้า & Grid ---------- */
.product-grid {
  display: grid; grid-template-columns: 1fr; gap: 24px;
}
.product-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.product-card .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--bg-alt); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product-card:hover .thumb img { transform: scale(1.06); }
.product-card .body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card .cat {
  align-self: flex-start; background: var(--bg-alt); color: var(--secondary);
  font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 50px;
}
.product-card h3 { font-size: 1.08rem; }
.product-card .desc { color: var(--text-muted); font-size: .9rem; flex: 1; }
.product-card .price { font-size: 1.25rem; font-weight: 800; color: var(--primary); }
.product-card .price small { font-size: .8rem; color: var(--text-muted); font-weight: 500; }
.product-card .btn { width: 100%; }

/* ช่องค้นหา + ปุ่มกรอง */
.shop-tools { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.search-box { position: relative; }
.search-box input {
  width: 100%; padding: 13px 16px 13px 44px; border: 1px solid var(--border);
  border-radius: 50px; font-size: 1rem; font-family: var(--font); background: var(--surface);
}
.search-box input:focus { outline: 2px solid var(--secondary); border-color: transparent; }
.search-box::before { content: "🔍"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn {
  padding: 8px 16px; border: 1px solid var(--border); background: var(--surface);
  border-radius: 50px; cursor: pointer; font-size: .9rem; font-family: var(--font);
  color: var(--text); transition: .2s;
}
.filter-btn:hover { border-color: var(--secondary); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.no-result { text-align: center; color: var(--text-muted); padding: 40px; grid-column: 1/-1; }

/* ---------- รีวิวลูกค้า ---------- */
.reviews { display: grid; grid-template-columns: 1fr; gap: 22px; }
.review {
  background: var(--surface); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.review .stars { color: var(--accent); margin-bottom: 8px; }
.review p { color: var(--text); font-style: italic; margin-bottom: 16px; }
.review .who { display: flex; align-items: center; gap: 12px; }
.review .who img { width: 46px; height: 46px; border-radius: 50%; }
.review .who b { display: block; font-size: .95rem; color: var(--primary); }
.review .who span { font-size: .82rem; color: var(--text-muted); }

/* โลโก้พาร์ทเนอร์ */
.partners { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; align-items: center; }
.partners .p-logo {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 26px; font-weight: 800; color: var(--text-muted); letter-spacing: 1px;
  box-shadow: var(--shadow);
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; text-align: center; border-radius: var(--radius); padding: 48px 24px;
}
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 4vw, 2.1rem); margin-bottom: 12px; }
.cta-band p { opacity: .92; margin-bottom: 22px; }

/* ---------- 8) ฟอร์ม & ตาราง ---------- */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.card-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 1rem; font-family: var(--font); background: var(--surface);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--secondary); border-color: transparent;
}
.field textarea { min-height: 130px; resize: vertical; }
.field .error-msg { color: #d64545; font-size: .82rem; margin-top: 4px; display: none; }
.field.invalid input, .field.invalid textarea { border-color: #d64545; }
.field.invalid .error-msg { display: block; }
.form-note { font-size: .85rem; color: var(--text-muted); margin-top: 8px; }
.form-success {
  display: none; background: #e7f6f2; border: 1px solid var(--secondary);
  color: #1c6b60; padding: 14px; border-radius: var(--radius-sm); margin-bottom: 16px;
}

/* ตารางบัญชี/ค่าจัดส่ง */
.table-wrap { overflow-x: auto; }
table.info {
  width: 100%; border-collapse: collapse; background: var(--surface);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-width: 480px;
}
table.info th, table.info td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); }
table.info th { background: var(--primary); color: #fff; font-weight: 600; }
table.info tr:last-child td { border-bottom: none; }
table.info tbody tr:nth-child(even) { background: var(--bg-alt); }

/* ขั้นตอนสั่งซื้อ */
.steps { display: grid; grid-template-columns: 1fr; gap: 20px; counter-reset: step; }
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); position: relative; padding-left: 70px;
}
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 20px; top: 22px;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800;
  display: grid; place-items: center;
}
.step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: .95rem; }

/* FAQ (accordion) */
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.faq-q { width: 100%; text-align: left; padding: 16px 18px; font-weight: 600; background: none; border: none; cursor: pointer; font-size: 1rem; font-family: var(--font); color: var(--primary); display: flex; justify-content: space-between; gap: 12px; }
.faq-q::after { content: "+"; font-size: 1.4rem; color: var(--accent); transition: transform .2s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; padding: 0 18px; color: var(--text-muted); }
.faq-item.open .faq-a { max-height: 320px; padding: 0 18px 18px; }

/* กล่องข้อมูลติดต่อ */
.contact-list li { display: flex; gap: 14px; margin-bottom: 18px; align-items: flex-start; }
.contact-list .ic { font-size: 1.3rem; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--bg-alt); display: grid; place-items: center; }
.contact-list b { display: block; color: var(--primary); }
.contact-list span { color: var(--text-muted); }
.map-frame { border: 0; width: 100%; height: 320px; border-radius: var(--radius); box-shadow: var(--shadow); }

/* badge ความน่าเชื่อถือ */
.trust-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 16px; }
.trust-row .badge { background: var(--surface); border: 1px solid var(--border); border-radius: 50px; padding: 8px 18px; font-size: .88rem; color: var(--text-muted); box-shadow: var(--shadow); }

/* ---------- 9) Footer ---------- */
.site-footer { background: var(--primary); color: #cfd9e3; padding: 52px 0 22px; margin-top: 10px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 30px; margin-bottom: 30px; }
.site-footer h4 { color: #fff; margin-bottom: 14px; font-size: 1.05rem; }
.site-footer a:hover { color: #fff; }
.site-footer .f-brand .logo {
  width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, var(--secondary), var(--accent));
  color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 12px;
}
.site-footer ul li { margin-bottom: 9px; font-size: .95rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 18px; text-align: center; font-size: .85rem; color: #9fb0c0; }

/* ---------- 10) Responsive (จอใหญ่ขึ้น) ---------- */
@media (min-width: 600px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .reviews { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(4, 1fr); }
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .shop-tools { flex-direction: row; align-items: center; justify-content: space-between; }
  .search-box { width: 320px; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; }
}
@media (min-width: 1100px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

/* เมนูมือถือ: ต่ำกว่า 860px ให้ใช้ hamburger */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-130%); transition: transform .3s ease;
    padding: 10px 16px 18px;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 10px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .nav-links .btn { margin: 10px 0 0; }
}

/* ---------- 11) Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
