/* =========================================================
   พันธิสารับซื้อแอร์เก่าอลูมิเนียมสายไฟ - ธีมเขียว/ขาว
   ========================================================= */

:root {
  --green-900: #063d1b;
  --green-800: #0a5325;
  --green-700: #0d6b2f;
  --green-600: #128b3e;
  --green-500: #19a34a;
  --green-400: #2fbf60;
  --green-050: #eef8f0;
  --yellow: #ffe24d;
  --line: #06c755;
  --text: #2b2b2b;
  --muted: #5c6b60;
  --gray-bg: #f4f6f4;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: #fff;
  font-size: 16px;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-500); }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: 16px;
}

/* ---------- ลายคลื่นเซกาอิฮะ (แทนพื้นหลังลายเดิม) ---------- */
.seigaiha {
  background-color: var(--green-700);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.10' stroke-width='2'%3E%3Cpath d='M2 60a28 28 0 0 1 56 0'/%3E%3Cpath d='M9 60a21 21 0 0 1 42 0'/%3E%3Cpath d='M16 60a14 14 0 0 1 28 0'/%3E%3Cpath d='M23 60a7 7 0 0 1 14 0'/%3E%3Cpath d='M-28 30a28 28 0 0 1 56 0'/%3E%3Cpath d='M-21 30a21 21 0 0 1 42 0'/%3E%3Cpath d='M-14 30a14 14 0 0 1 28 0'/%3E%3Cpath d='M-7 30a7 7 0 0 1 14 0'/%3E%3Cpath d='M32 30a28 28 0 0 1 56 0'/%3E%3Cpath d='M39 30a21 21 0 0 1 42 0'/%3E%3Cpath d='M46 30a14 14 0 0 1 28 0'/%3E%3Cpath d='M53 30a7 7 0 0 1 14 0'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 60px 60px;
}

/* ---------- แถบบนสุด ---------- */
.topbar {
  background-image: linear-gradient(120deg, var(--green-800) 0%, var(--green-600) 100%);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
}
.topbar strong { font-weight: 600; }
.topbar .shop-name { font-size: 20px; line-height: 1.3; }
.topbar .shop-contact { font-size: 16px; margin-top: 2px; }
.topbar a { color: #fff; text-decoration: underline; white-space: nowrap; }
.topbar a:hover { color: var(--yellow); }
.topbar .sep { opacity: .6; padding: 0 2px; }

/* ---------- เฮดเดอร์ / เมนู ---------- */
.site-header {
  background: #fff;
  border-bottom: 3px solid var(--green-600);
  position: sticky;
  top: 0;
  z-index: 60;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 74px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 46px; height: 46px; flex: none;
  border-radius: 12px;
  background-image: linear-gradient(135deg, var(--green-600), var(--green-800));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 600; font-size: 21px;
  box-shadow: 0 3px 8px rgba(10, 83, 37, .35);
}
.brand-text { line-height: 1.2; }
.brand-text b { display: block; font-size: 18px; color: var(--green-800); font-weight: 600; }
.brand-text span { font-size: 12.5px; color: var(--muted); }

.main-nav ul {
  display: flex; align-items: center; gap: 6px;
  list-style: none; margin: 0; padding: 0;
}
.main-nav a {
  display: block;
  padding: 9px 18px;
  border-radius: 4px;
  color: var(--green-800);
  font-weight: 500;
}
.main-nav a:hover { background: var(--green-050); }
.main-nav a.active { background: var(--green-600); color: #fff; }

.nav-toggle {
  display: none;
  border: 1px solid var(--green-600);
  background: #fff; color: var(--green-700);
  border-radius: 4px; padding: 7px 12px; font-size: 20px;
  line-height: 1; cursor: pointer;
}

/* ---------- แบนเนอร์หลัก ---------- */
.hero { color: #fff; padding: 30px 0; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(230px, 360px) 1fr;
  align-items: center;
  gap: 26px;
}
.hero-photos { position: relative; height: 340px; }
.hero-photos figure {
  position: absolute; margin: 0; padding: 5px;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  background: #fff;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .4));
}
.hero-photos img {
  width: 100%; height: 100%; object-fit: cover;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}
.hero-photos .p1 { width: 68%; height: 54%; top: 0; left: 0; }
.hero-photos .p2 { width: 54%; height: 42%; top: 30%; right: 0; }
.hero-photos .p3 { width: 60%; height: 46%; bottom: 0; left: 5%; }

.hero-title span { display: inline-block; }
.hero-title {
  margin: 0 0 6px;
  font-size: clamp(30px, 5.2vw, 62px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--yellow);
  text-shadow: 3px 3px 0 rgba(0, 0, 0, .28);
}
.hero-sub {
  margin: 0 0 6px;
  font-size: clamp(18px, 2.4vw, 30px);
  font-weight: 500;
  color: #fff;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .22);
}
.hero-note { margin: 0 0 18px; font-size: clamp(14px, 1.5vw, 19px); color: #eafbe9; }

.hero-contact { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero-phones .label { font-size: 17px; margin-bottom: 2px; }
.hero-phones a {
  display: block; color: #fff; font-weight: 600;
  font-size: clamp(24px, 3.2vw, 38px); line-height: 1.28;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .25);
}
.hero-phones a:hover { color: var(--yellow); }
.hero-phones a small { font-size: .55em; font-weight: 400; opacity: .92; }
.hero-qr {
  background: #fff; padding: 8px; border-radius: 10px;
  width: 168px; flex: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
}
.hero-qr img { border-radius: 4px; }
.hero-qr span {
  display: block; text-align: center; color: var(--green-800);
  font-size: 13px; font-weight: 500; padding-top: 4px;
}

/* ---------- สไลด์ภาพตัวอย่าง ---------- */
.strip { background: #fff; padding: 26px 0; }
.carousel {
  display: flex; gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}
.carousel img {
  width: 260px; height: 175px; flex: none;
  object-fit: cover; border-radius: 6px;
  scroll-snap-align: start; cursor: zoom-in;
  border: 1px solid #e3e9e4;
  transition: transform .2s, box-shadow .2s;
}
.carousel img:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0, 0, 0, .18); }

/* ---------- ส่วนเนื้อหา ---------- */
.section { padding: 46px 0; }
.section--gray { background: var(--gray-bg); }
.section--white { background: #fff; }

.section h1, .section h2 {
  margin: 0 0 18px;
  text-align: center;
  font-weight: 600;
  line-height: 1.35;
  color: var(--green-700);
  font-size: clamp(22px, 2.9vw, 33px);
}
.hero-section h1 { color: var(--yellow); text-shadow: 2px 2px 0 rgba(0, 0, 0, .22); }
.hero-section .lead { color: #fff; text-align: center; }
.lead { font-size: clamp(16px, 1.6vw, 19px); margin: 0 0 20px; }
.section p.body { font-size: clamp(16px, 1.6vw, 19px); margin: 0 0 22px; text-indent: 2.2em; }

/* ---------- ปุ่ม ---------- */
.btn-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 18px; border-radius: 6px;
  font-size: 19px; font-weight: 500; text-align: center;
  border: 1px solid transparent;
  transition: transform .15s, filter .15s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.07); }
.btn-call { background: #fff; color: var(--green-800); border-color: #d6e3d8; }
.btn-call:hover { color: var(--green-700); }
.btn-line { background: var(--line); color: #fff; }
.btn-line:hover { color: #fff; }
.btn svg { width: 22px; height: 22px; flex: none; fill: currentColor; }

/* ---------- แกลเลอรี ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 6px; cursor: zoom-in;
  background: #e9eee9;
  transition: transform .2s, box-shadow .2s;
}
.gallery img:hover { transform: scale(1.03); box-shadow: 0 8px 18px rgba(0, 0, 0, .2); }

/* ---------- กล่องติดต่อ ---------- */
.contact-card {
  background: #fff; border: 1px solid #dbe6dd; border-radius: 10px;
  padding: 26px; max-width: 760px; margin: 0 auto;
  box-shadow: 0 6px 18px rgba(6, 61, 27, .07);
}
.contact-card dl { margin: 0; display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; }
.contact-card dt { font-weight: 500; color: var(--green-800); }
.contact-card dd { margin: 0; }
.contact-qr { text-align: center; margin-bottom: 22px; }
.contact-qr img { width: 100%; max-width: 230px; margin: 0 auto 8px; border-radius: 8px; }

/* ---------- ฟุตเตอร์ ---------- */
.site-footer { background: var(--green-900); color: #dceadf; padding: 46px 0 0; }
.footer-grid { display: grid; grid-template-columns: 280px 1fr; gap: 34px; }
.footer-title {
  color: #fff; font-weight: 600; font-size: 19px;
  margin: 0 0 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--green-600);
}
.site-footer a { color: #b9e8c6; }
.site-footer a:hover { color: var(--yellow); }
.site-footer p { margin: 0 0 6px; }
.footer-qr { width: 100%; max-width: 230px; border-radius: 8px; margin-bottom: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span {
  background: var(--green-700); color: #fff;
  border-radius: 999px; padding: 4px 12px; font-size: 13.5px;
}
.footer-bottom {
  margin-top: 34px; padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, .15);
  text-align: center; font-size: 14px; color: #a9cdb5;
}

/* ---------- ปุ่มลอยติดต่อ ---------- */
.fab {
  position: fixed; right: 16px; z-index: 80;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 10px;
}
.fab a {
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
  transition: transform .15s;
}
.fab a:hover { transform: scale(1.08); color: #fff; }
.fab .f-line { background: var(--line); }
.fab .f-call { background: var(--green-600); }
.fab svg { width: 28px; height: 28px; fill: #fff; }

/* ---------- ไลท์บ็อกซ์ ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, .92);
  display: grid; place-items: center;
  padding: 50px 16px;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.lightbox button {
  position: absolute; background: rgba(255, 255, 255, .13);
  border: 0; color: #fff; font-size: 30px; line-height: 1;
  width: 50px; height: 50px; border-radius: 50%; cursor: pointer;
}
.lightbox button:hover { background: rgba(255, 255, 255, .28); }
.lb-close { top: 16px; right: 16px; font-size: 26px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- จอเล็ก ---------- */
@media (max-width: 991px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photos { height: 260px; max-width: 420px; margin: 0 auto; width: 100%; }
  .hero-text { text-align: center; }
  .hero-contact { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 3px solid var(--green-600);
    box-shadow: 0 8px 16px rgba(0, 0, 0, .12);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px; }
  .main-nav a { padding: 12px 16px; }
  .site-header .container { position: relative; }
}

@media (max-width: 767px) {
  body { font-size: 15px; }
  .topbar .shop-name { font-size: 17px; }
  .topbar .shop-contact { font-size: 14.5px; }
  .topbar .sep { display: block; height: 0; overflow: hidden; }
  .btn-row { grid-template-columns: 1fr; }
  .section { padding: 34px 0; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .carousel img { width: 210px; height: 145px; }
  .contact-card { padding: 18px; }
  .contact-card dl { grid-template-columns: 1fr; gap: 2px; }
  .contact-card dd { margin-bottom: 10px; }
  .hero-qr { width: 140px; }
  .brand-text b { font-size: 15px; }
  .brand-text span { display: none; }
}
