/*!
 * Good Life Pharma — Full CSS (Minimal & Clean: White + Yellow)
 * Single-file stylesheet
 */

/* =============== Reset + Vars =============== */
*,
*::before,
*::after {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #1d1d1f;
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale
}

:root {
  --brand: #f8d94e;
  --brand-2: #ffe77a;
  --ink: #1d1d1f;
  --muted: #666;
  --bg: #fff;
  --card: #fff;
  --border: #eee;
  --shadow: 0 8px 24px rgba(0, 0, 0, .06);
  --danger: #e63946;
  --success: #06d6a0;
  --info: #1f7a8c;
}

/* =============== Typography =============== */
h1,
h2,
h3,
h4 {
  margin: 0 0 .5rem;
  line-height: 1.8
}

h1 {
  font-size: clamp(1.6rem, 2.6vw+1rem, 2.3rem);
  font-weight: 800
}

h2 {
  font-size: clamp(1.25rem, 1.8vw+.6rem, 1.6rem);
  font-weight: 700
}

h3 {
  font-size: 1.1rem;
  font-weight: 700
}

h4 {
  font-size: 1rem;
  font-weight: 700
}

p {
  margin: .25rem 0 .85rem;
  color: var(--ink)
}

small,
.sr {
  font-size: .88rem;
  color: var(--muted)
}

a {
  color: #0b63ce;
  text-decoration: none
}

a:hover {
  text-decoration: underline
}

/* =============== Layout helpers =============== */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px
}

.flex {
  display: flex;
  gap: 12px;
  align-items: center
}

.right {
  text-align: right
}

.center {
  text-align: center
}

.hidden {
  display: none !important
}

.hr {
  height: 1px;
  background: var(--border);
  margin: 16px 0
}

/* =============== Header / Nav =============== */
.site-header {
  background: var(--card);
  border-bottom: 3px solid var(--brand);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
  position: sticky;
  top: 0;
  z-index: 20
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px
}

.logo {
  font-weight: 900;
  font-size: 22px;
  color: var(--ink);
  text-decoration: none
}

.main-nav a {
  margin: 0 10px;
  color: var(--ink);
  font-weight: 600
}

.main-nav a:hover {
  color: #202020;
  text-decoration: none;
  border-bottom: 2px solid var(--brand)
}

/* Header actions (cart/login) */
.header-actions {
  display: flex;
  gap: 8px;
  align-items: center
}

.header-actions .btn,
.header-actions .btn-outline {
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 8px;
  line-height: 1.2
}

/* Mobile menu */
.menu-toggle {
  display: none;
  border: 2px solid var(--brand);
  background: #fff;
  color: #222;
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 700
}

@media (max-width:768px) {
  .menu-toggle {
    display: inline-block
  }

  .main-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    background: #fff;
    border-bottom: 3px solid var(--brand);
    padding: 10px 16px
  }

  .main-nav.open {
    display: block
  }

  .main-nav a {
    display: block;
    padding: 10px 0;
    border-top: 1px solid #f2f2f2
  }

  .header-inner {
    position: relative
  }

  .header-actions {
    gap: 2px
  }

  .header-actions .btn,
  .header-actions .btn-outline {
    font-size: 13px;
    padding: 6px 8px
  }
}

/* =============== Buttons =============== */
.btn,
.btn-outline,
.btn-ghost {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all .25s ease;
  cursor: pointer;
  user-select: none
}

.btn {
  background: var(--brand);
  border: 2px solid var(--brand);
  color: #222
}

.btn:hover {
  background: var(--brand-2)
}

.btn:disabled {
  opacity: .6;
  pointer-events: none
}

.btn-outline {
  border: 2px solid var(--brand);
  color: #222;
  background: #fff
}

.btn-outline:hover {
  background: var(--brand)
}

.btn-ghost {
  background: transparent;
  border: 2px dashed var(--brand);
  color: #222
}

.btn-ghost:hover {
  background: #fffdfa
}

.btn-sm {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: .92rem
}

.btn-lg {
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 1.05rem
}

/* =============== Forms =============== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s
}

input:focus,
textarea:focus,
select:focus {
  border-color: #ffd54d;
  box-shadow: 0 0 0 3px rgba(248, 217, 78, .25)
}

.qty {
  width: 84px
}

.searchbar {
  display: flex;
  gap: 8px;
  margin: 10px 0
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px
}

/* =============== Cards / Banners / Badges =============== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .03)
}

.card.hover {
  transition: transform .25s, box-shadow .25s
}

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

.banner {
  background: #fffbe6;
  border: 1px solid #ffe77a;
  border-radius: 16px;
  padding: 12px
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .82rem;
  background: #fff
}

.tag {
  display: inline-block;
  background: #eef;
  color: #334;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .85rem;
  margin-top: 10px;
}

.notice {
  padding: 10px;
  background: #fffefa;
  border: 1px solid #ffefb5;
  border-radius: 12px
}

.alert {
  padding: 10px;
  background: #ffe5e5;
  border: 1px solid #ffcaca;
  border-radius: 12px;
  color: #8a1f1f
}

/* =============== Product List / Grid =============== */
.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border)
}

.product-card h3 {
  font-size: 1rem;
  margin: 8px 0 2px
}

.product-card .price {
  color: var(--danger);
  font-weight: 800;
  margin: 4px 0
}

/* =============== Product Detail =============== */
.product {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px
}

.product img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border)
}

.product .meta {
  color: var(--muted)
}

/* =============== Tables (Cart / Orders) =============== */
.table {
  width: 100%;
  border-collapse: collapse
}

.table th,
.table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  text-align: left
}

.table .right {
  text-align: right
}

.table-wrap {
  width: 100%;
  overflow-x: auto
}

.table tr:hover td {
  background: #fffdf3
}

/* =============== Hero / Sections =============== */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  align-items: center;
  padding: 20px 0
}

.section {
  margin: 16px 0
}

.fade-in {
  animation: fadeIn .8s ease both
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

/* =============== Footer (new) =============== */
.site-footer {
  background: #fff;
  border-top: 3px solid var(--brand);
  margin-top: 40px
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
  padding: 26px 0 10px
}

.foot-logo {
  font-weight: 900;
  font-size: 20px;
  margin-bottom: 6px
}

.foot-slogan {
  color: #666;
  margin: 0
}

.foot-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0
}

.foot-list li {
  margin: 6px 0
}

.foot-list a {
  color: #0b63ce;
  text-decoration: none
}

.foot-list a:hover {
  text-decoration: underline
}

/* Warning box */
.foot-warning {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 14px auto;
  padding: 14px 16px;
  border: 1px solid #ffe18a;
  border-radius: 14px;
  background: linear-gradient(0deg, #fffdf2, #fff);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .03)
}

.warn-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #222;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .08)
}

.foot-warning h5 {
  margin: 0 0 4px;
  font-size: 14px;
  letter-spacing: .2px
}

.foot-warning p {
  margin: 0;
  color: #444
}

.foot-bottom {
  border-top: 1px solid var(--border);
  padding: 12px 0 18px;
  text-align: center;
  color: #777
}

/* =============== Utilities =============== */
.mt-0 {
  margin-top: 0 !important
}

.mt-1 {
  margin-top: 6px !important
}

.mt-2 {
  margin-top: 12px !important
}

.mt-3 {
  margin-top: 18px !important
}

.mt-4 {
  margin-top: 24px !important
}

.mb-0 {
  margin-bottom: 0 !important
}

.mb-1 {
  margin-bottom: 6px !important
}

.mb-2 {
  margin-bottom: 12px !important
}

.mb-3 {
  margin-bottom: 18px !important
}

.mb-4 {
  margin-bottom: 24px !important
}

.w-100 {
  width: 100% !important
}

/* =============== Responsive Tweaks =============== */
@media (max-width:1200px) {
  .container {
    max-width: 1000px
  }
}

@media (max-width:1024px) {
  .hero {
    grid-template-columns: 1fr
  }
}

@media (max-width:900px) {
  .footer-top {
    grid-template-columns: 1fr 1fr
  }
}

@media (max-width:768px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px
  }

  .product {
    grid-template-columns: 1fr
  }

  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr
  }

  .btn,
  .btn-outline,
  .btn-ghost {
    /* width: 100%; */
    text-align: center
  }

  .logo {
    font-size: 12px
  }

  .hero {
    padding: 12px 0
  }

  .hero h1 {
    font-size: 1.35rem
  }

  .banner {
    font-size: .95rem
  }

  .footer-top {
    grid-template-columns: 1fr
  }
}

@media (max-width:480px) {
  .product-card img {
    height: 140px
  }

  .table th,
  .table td {
    padding: 8px
  }
}

/* ===== Live Chat (floating) ===== */
.glp-chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px
}

.glp-chat .btn {
  box-shadow: 0 8px 24px rgba(248, 217, 78, .35)
}

.glp-chat-box {
  width: 300px;
  max-height: 60vh;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden
}

.glp-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border)
}

.glp-chat-log {
  padding: 10px;
  overflow: auto;
  flex: 1;
  background: #fffdfa
}

.glp-line {
  padding: 8px 10px;
  margin: 6px 0;
  border-radius: 12px;
  max-width: 80%
}

.glp-line.me {
  background: #f8d94e;
  margin-left: auto;
  color: #222
}

.glp-line.bot {
  background: #eee
}

.glp-chat-form {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid var(--border)
}

.glp-chat-form input {
  flex: 1
}

@media (max-width:480px) {
  .glp-chat-box {
    width: 92vw
  }
}


/* ===== Contact page: mobile tune-up ===== */
@media (max-width: 430px) {

  /* ทำให้คอลัมน์ซ้อนกันทีละบล็อค */
  .contact-grid,
  .grid-contact,
  .grid {
    /* เลือก class grid ที่ใช้ใน contact.php ของคุณ */
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* กล่องการ์ดทั้งสองฝั่งให้ขอบมน/เงาบางและ padding น้อยลง */
  .card {
    padding: 14px !important;
    border-radius: 16px !important;
  }

  /* หัวข้อใหญ่ให้เล็กลงนิดเพื่อไม่กินบรรทัด */
  h1,
  .h1 {
    font-size: 28px;
    line-height: 1.8;
  }

  h2,
  .h2 {
    font-size: 22px;
    line-height: 1.25;
  }

  h3,
  .h3 {
    font-size: 18px;
  }

  /* ฟอร์ม: ช่องให้สูง ~44px เพื่อแตะง่าย และไม่ zoom (>=16px) */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select {
    height: 44px;
    font-size: 16px;
    /* กัน iOS zoom */
    padding: 10px 12px;
    border-radius: 12px;
  }

  textarea {
    min-height: 120px;
    font-size: 16px;
    padding: 10px 12px;
    border-radius: 12px;
  }

  label {
    display: block;
    margin-bottom: 6px;
  }

  /* แถวฟอร์มหลายคอลัมน์ -> เป็นคอลัมน์เดียว */
  .form-row,
  .form-row-3 {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  /* สรุปช่องทางด่วนด้านขวาให้ระยะบรรทัดโปร่ง */
  .contact-quick p,
  .contact-quick li {
    line-height: 1.5;
  }

  /* แผนที่: ทำให้ responsive, โค้งมุม, ไม่ล้นขอบ */
  .map-wrap iframe {
    width: 100% !important;
    height: 260px !important;
    border: 0;
    border-radius: 14px;
  }

  .map-wrap {
    overflow: hidden;
    border-radius: 14px;
  }

  /* ปุ่ม */
  .btn,
  .btn-outline {
    padding: 10px 14px;
    font-size: 16px;
  }
}


.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60
}

.modal.hidden {
  display: none
}

.modal-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
  padding: 20px;
  max-width: 520px;
  width: 92%
}

.wheel-wrap {
  display: flex;
  justify-content: center
}

.wheel {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 8px solid #F7D24C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: #fff
}

.wheel.spinning {
  animation: spin 1.6s ease-out
}

@keyframes spin {
  from {
    transform: rotate(0)
  }

  to {
    transform: rotate(1080deg)
  }
}


.header-actions .btn,
.btn,
.btn-outline {
  padding: 8px 12px;
  border-radius: 12px;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
}

/* #openSpin {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
} */


.btn-icon {
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  padding: 0;
}



/* ===== Gift Claw Machine ===== */
.machine-wrap {
  display: flex;
  justify-content: center;
  margin-top: 10px
}

.machine {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border: 2px solid #F7D24C;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
  padding: 14px;
  position: relative;
  overflow: hidden
}

.rail {
  height: 6px;
  background: #F7D24C;
  border-radius: 3px;
  margin: 6px 6px 14px 6px;
  position: relative
}

.claw {
  width: 34px;
  height: 34px;
  background: linear-gradient(#fff, #f6f6f6);
  border: 2px solid #222;
  border-radius: 6px;
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);   /* ให้อยู่กลางจริง */
  transition: left .6s ease, transform .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.claw .arm {
  position: absolute;
  bottom: -10px;
  width: 2px;
  height: 18px;
  background: #222
}

.claw .arm.left {
  transform: rotate(-25deg);
  left: 8px
}

.claw .arm.right {
  transform: rotate(25deg);
  right: 8px
}

.claw .grab {
  position: absolute;
  bottom: -18px;
  width: 22px;
  height: 6px;
  background: #222;
  border-radius: 3px
}

/* สายพาน + กล่องของขวัญ */
.belt {
  background: #fff7cf;
  border: 2px dashed #f0cc4e;
  border-radius: 12px;
  padding: 10px;
  overflow: hidden
}

.gift-row {
  display: flex;
  gap: 12px;
  will-change: transform
}

.gift {
  width: 84px;
  height: 84px;
  border-radius: 12px;
  background: #fff;
  border: 2px solid #F7D24C;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .06)
}

.gift::before {
  content: "🎁";
  font-size: 28px;
  position: absolute;
  top: 6px
}

.gift span {
  font-size: 12px;
  max-width: 78px;
  text-align: center;
  padding: 0 6px;
  margin-top: 20px;
  color: #333
}

/* แอนิเมชันตอนคีบ */
.machine.picking .claw {
  animation: clawDown 1.2s ease forwards
}

@keyframes clawDown {
  0% {
    transform: translateY(0)
  }

  40% {
    transform: translateY(120px)
  }

  60% {
    transform: translateY(120px)
  }

  100% {
    transform: translateY(0)
  }
}

.gift.pick {
  animation: pickUp .9s ease forwards
}

@keyframes pickUp {
  0% {
    transform: translateY(0)
  }

  40% {
    transform: translateY(-16px) scale(1.02)
  }

  100% {
    transform: translateY(0)
  }
}

/* ปุ่มไอคอนเปิดโมดัลแบบกลม */
#openSpin {
  display: inline-flex;
  align-items: center;
  gap: 6px
}

#openSpin i {
  font-size: 16px
}

/* Responsive */
@media (max-width:480px) {
  .gift {
    width: 72px;
    height: 72px
  }

  .gift span {
    font-size: 11px
  }
}


.coupon-card {
  border:2px dashed #f0cc4e;
  background:#fff9e6;
  border-radius:14px;
  padding:12px;
  margin-top:10px;
}
.coupon-head { font-size:16px; margin-bottom:6px; }
.coupon-body { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.coupon-code {
  font-size:16px;
  background:#fff;
  border:1px solid #f0cc4e;
  padding:6px 10px;
  border-radius:8px;
  display:inline-block;
}
.coupon-foot { color:#7a5d00; margin-top:6px; font-size:13px; }
.coupon-actions { margin-top:8px; text-align:right; }


/* แถวคูปอง + เลือกซื้อเพิ่ม ให้อยู่บรรทัดเดียว */
.coupon-row{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:12px;
}

/* ฟอร์มคูปองเป็น flex ภายใน */
.coupon-form{
  display:flex;
  align-items:center;
  gap:8px;
  flex:1;                 /* ให้กินพื้นที่ที่เหลือ */
  min-width:0;            /* กัน overflow ใน flex */
}

/* override สไตล์เดิมที่ width:100% */
.coupon-form input[type="text"]{
  flex:1;
  width:auto !important;  /* สำคัญ: บังคับไม่ให้เต็มบรรทัด */
  min-width:180px;        /* ป้องกันพับ */
}

/* ไม่ให้ปุ่ม/ลิงก์ขึ้นบรรทัดใหม่ */
.coupon-row .btn-outline{
  white-space:nowrap;
}




/* ===== Coupon tables: responsive ===== */
.table.coupons { width: 100%; border-collapse: collapse; }
.table.coupons th, .table.coupons td { padding: 10px 12px; vertical-align: top; }

/* ปุ่ม/โค้ดอ่านง่าย */
code.coupon-code { font-size: 15px; word-break: break-all; }

/* Badge กลมๆ */
.badge { display:inline-block; padding:6px 10px; border-radius:999px; background:#eee; }
.badge.success{ background:#e6f7ea; color:#0a7a2a; }
.badge.warning{ background:#fff6d7; color:#8a6d00; }
.badge.danger { background:#ffe4e4; color:#a40000; }

/* การ์ดคูปองให้ขอบเหลืองนิดๆ */
.coupon-card-row { border:2px solid #f3d24e; border-radius:16px; padding:12px; margin-bottom:12px; background:#fff; }

/* ===== Mobile breakpoint ===== */
@media (max-width: 640px){
  /* ซ่อนหัวตาราง แล้วเปลี่ยนแต่ละ <tr> เป็นการ์ด */
  .table.coupons thead { display:none; }

  .table.coupons tr { display:block; }
  .table.coupons tr + tr { margin-top:12px; }

  .table.coupons td { 
    display:block; 
    padding:6px 0; 
    border:none; 
  }

  /* จัด layout เป็นบล็อก 2 คอลัมน์แนวตั้งสวยๆ */
  .coupon-card-row { display:grid; gap:8px; 
    grid-template-columns: 1fr auto; 
    align-items:center;
  }

  /* โค้ด + ปุ่มคัดลอก */
  .coupon-head { grid-column: 1 / -1; display:flex; align-items:center; gap:8px; }
  .coupon-head .copy { white-space:nowrap; }

  /* เงื่อนไข/ช่วงเวลา */
  .coupon-cond, .coupon-period { color:#555; font-size:14px; }

  /* สถานะ + ปุ่มไปตะกร้า ขยายกว้างเต็มแถวในจอเล็ก */
  .coupon-status { justify-self:start; }
  .coupon-actions { grid-column: 1 / -1; }
  .coupon-actions .btn-outline { width:100%; text-align:center; }
}

/* จอเล็กมาก: กันปุ่มขึ้นบรรทัดใหม่แปลกๆ */
@media (max-width: 380px){
  .coupon-head { flex-direction:column; align-items:flex-start; }
  .coupon-head .copy { width:100%; text-align:center; }
}


/* Landing */
.lp-hero{
  background: radial-gradient(1200px 400px at 50% -100px,#fff7c8,transparent),
              linear-gradient(#fffef7,#ffffff);
  border-bottom: 2px solid #f0cc4e;
}
.lp-hero-inner{
  max-width:1100px; margin:0 auto; padding:36px 16px 22px;
  text-align:center;
}
.lp-badge{ display:inline-block; background:#ffeb7a; border:2px solid #f0cc4e; padding:4px 10px; border-radius:999px; margin-bottom:8px; }
.lp-hero h1{ font-size:32px; margin:6px 0; }
.lp-hero .hl{ color:#a36b00; background:#fff0b3; padding:0 6px; border-radius:8px; }
.lp-cta{ display:flex; gap:10px; justify-content:center; margin-top:10px; }
.lp-usps{ display:flex; gap:14px; justify-content:center; margin-top:12px; flex-wrap:wrap; color:#333; }

.lp-strip{ background:#fff9e6; border-top:1px dashed #f0cc4e; border-bottom:1px dashed #f0cc4e; }
.lp-strip .container{ display:flex; justify-content:space-between; align-items:center; gap:12px; padding:8px 16px; }
.lp-count{ font-variant-numeric: tabular-nums; }

.lp-cats h2, .lp-recs h2, .lp-testis h2, .lp-faq h2{ margin:14px 0 8px; }
.lp-cat-grid{ display:grid; gap:10px; grid-template-columns: repeat(5,1fr); }
.lp-cat{ display:flex; flex-direction:column; align-items:center; gap:6px; border:1px solid #eee; padding:10px; border-radius:12px; background:#fff; transition:box-shadow .2s; }
.lp-cat:hover{ box-shadow:0 6px 20px rgba(0,0,0,.06); }
.lp-cat-icon{ font-size:24px; }
.lp-cat-name{ text-align:center; }

.lp-head{ display:flex; justify-content:space-between; align-items:center; margin-top:4px; }

.lp-coupon{ margin-top:16px; }
.lp-coupon-card{
  display:grid; grid-template-columns:1fr auto; gap:12px;
  border:2px dashed #f0cc4e; background:#fff9e6; border-radius:16px; padding:14px;
}
.lp-coupon-right{ display:flex; align-items:center; }
.lp-stamp{ border:2px solid #f0cc4e; color:#6a4c00; padding:10px 12px; border-radius:12px; background:#ffeb7a; font-weight:700; }

.lp-testi-grid{ display:grid; gap:10px; grid-template-columns: repeat(3,1fr); }
.lp-testi{ border:1px solid #eee; border-radius:12px; padding:12px; background:#fff; }

.lp-faq details{ border:1px solid #eee; border-radius:12px; padding:10px 12px; background:#fff; margin-bottom:8px; }
.lp-faq summary{ cursor:pointer; }

.lp-final-cta{ background:#fff9e6; border-top:2px solid #f0cc4e; margin-top:18px; }
.lp-final-cta .container{ text-align:center; padding:18px 16px; }
.lp-final-cta h2{ margin:0 0 6px; }

@media (max-width: 992px){
  .lp-cat-grid{ grid-template-columns: repeat(3,1fr); }
  .lp-testi-grid{ grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 640px){
  .lp-hero h1{ font-size:26px; }
  .lp-cat-grid{ grid-template-columns: repeat(2,1fr); }
  .lp-cta{ flex-direction:column; }
  .lp-testi-grid{ grid-template-columns: 1fr; }
  .lp-coupon-card{ grid-template-columns: 1fr; }
}

/* ===== Product cards: รูปเท่ากัน เรียบร้อย ===== */

/* กริดสินค้าให้ยืดหยุ่นและเว้นช่องสวย ๆ */
.product-grid{
  display:grid;
  gap:14px;
  grid-template-columns:repeat(auto-fill, minmax(220px,1fr));
}

/* การ์ดสินค้า */
.product-card{
  display:block;
  border:1px solid #eee;
  border-radius:14px;
  background:#fff;
  padding:10px;
  transition:box-shadow .2s ease;
}
.product-card:hover{ box-shadow:0 6px 20px rgba(0,0,0,.06); }

/* กล่องรูป: คุมอัตราส่วน + ตัดส่วนเกิน */
.product-card .thumb{
  position:relative;
  aspect-ratio: 4 / 3;          /* ปรับเป็น 1/1 ถ้าอยากเป็นสี่เหลี่ยมจัตุรัส */
  overflow:hidden;
  border-radius:10px;
  background:#fafafa;
}

/* รูป: เติมเต็มกล่องอย่างสวย */
.product-card .thumb img{
  width:100%;
  height:100%;
  object-fit:cover;             /* ใช้ contain ถ้าต้องการเห็นทั้งภาพ */
  display:block;
}

/* ป้ายแนะนำ */
.badge-recommend{
  position:absolute; top:8px; left:8px;
  background:#ffeb7a; color:#6a4c00;
  border:2px solid #f0cc4e;
  padding:2px 8px; border-radius:999px; font-size:12px;
}

/* ชื่อ/ราคา ให้ตัดบรรทัดพอดี ไม่ดันการ์ดยาวเกิน */
.product-card .title{
  margin-top:8px;
  font-size:15px; line-height:1.35;
  min-height:2.7em;             /* สูงสำหรับ 2 บรรทัด */
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
/* จอเล็ก: ให้กริดเหลือ 2 คอลัมน์ */
@media (max-width:640px){
  .product-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); }
}


/* =========================
   Modern Patch (append only)
   ========================= */

/* 1) Modern tokens */
:root{
  --brand:#f8d94e;
  --brand-2:#ffe77a;
  --brand-ink:#7a5d00;

  --bg:#ffffff;
  --surface:#ffffff;
  --surface-2:#fffdf4;

  --border:#eef0f2;
  --ink:#141518;
  --muted:#5f6368;

  --radius-sm:12px;
  --radius-md:16px;
  --radius-lg:22px;

  --shadow-sm:0 6px 18px rgba(0,0,0,.06);
  --shadow-md:0 10px 30px rgba(0,0,0,.09);

  --ring:0 0 0 4px rgba(248,217,78,.28);
}

/* 2) Global polish */
html,body{ background:linear-gradient(180deg,#ffffff 0%, #fffef8 100%); }
a{ text-underline-offset: 3px; }
p{ color:var(--muted); }

/* 3) Section spacing (more breathable) */
.section, .container{ scroll-margin-top: 86px; }
.lp-cats, .lp-recs, .lp-testis, .lp-faq, .lp-coupon{ margin-top: 18px; }

/* 4) Header: modern sticky + blur (safe fallback) */
.site-header{
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(0,0,0,.05);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
}
.logo{ letter-spacing: .2px; }

/* 5) Buttons: modern elevation + press */
.btn, .btn-outline, .btn-ghost{
  border-radius: 14px;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.btn{
  box-shadow: 0 10px 24px rgba(248,217,78,.25);
}
.btn:hover{ transform: translateY(-1px); box-shadow: 0 14px 28px rgba(248,217,78,.30); }
.btn:active{ transform: translateY(0px) scale(.99); }

.btn-outline{
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
}
.btn-outline:hover{ box-shadow: 0 10px 24px rgba(0,0,0,.07); }

/* 6) Inputs: clearer focus + consistent height */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, select{
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}
input:focus, textarea:focus, select:focus{
  border-color: #ffd54d;
  box-shadow: var(--ring);
}

/* 7) Modern card */
.card, .banner, .lp-cat, .lp-testi, .lp-faq details, .product-card{
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.card{
  box-shadow: var(--shadow-sm);
}
.card.hover:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* 8) Landing hero: softer premium */
.lp-hero{
  background:
    radial-gradient(900px 380px at 50% -120px, rgba(248,217,78,.55), transparent 65%),
    radial-gradient(700px 300px at 8% 0%, rgba(255,231,122,.45), transparent 60%),
    linear-gradient(180deg, #fffef7 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}
.lp-hero-inner{ padding: 44px 16px 26px; }
.lp-badge{
  background: rgba(248,217,78,.55);
  border: 1px solid rgba(122,93,0,.20);
  color: var(--brand-ink);
  box-shadow: 0 6px 16px rgba(0,0,0,.05);
}
.lp-hero h1{
  letter-spacing: -.2px;
}
.lp-hero .hl{
  color: var(--brand-ink);
  background: rgba(248,217,78,.35);
  border: 1px solid rgba(122,93,0,.12);
}

/* 9) Strip: less “promo banner”, more “info bar” */
.lp-strip{
  background: linear-gradient(90deg, #fff7cf, #fffdf1);
  border-top: 1px dashed rgba(122,93,0,.25);
  border-bottom: 1px dashed rgba(122,93,0,.25);
}
.lp-count{
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(0,0,0,.06);
}

/* 10) Categories: modern tiles */
.lp-cat-grid{ gap: 12px; }
.lp-cat{
  background: linear-gradient(180deg, #ffffff 0%, #fffef8 100%);
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.06);
}
.lp-cat:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0,0,0,.08);
}
.lp-cat-icon, .lp-cat-ico{ filter: saturate(1.1); }

/* 11) Product grid: tighter, more premium */
.product-grid{ gap: 14px; }

.product-card{
  background: linear-gradient(180deg, #ffffff 0%, #fffef7 100%);
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.06);
}
.product-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0,0,0,.08);
}
.product-card .thumb{
  border-radius: 14px;
}
.product-card .price{
  color: #b42318; /* still “danger-ish” but premium */
  letter-spacing: .1px;
}

/* 12) Badges: cleaner */
.badge-recommend{
  background: rgba(248,217,78,.85);
  border: 1px solid rgba(122,93,0,.18);
  box-shadow: 0 8px 18px rgba(0,0,0,.10);
}

/* 13) FAQ: modern accordion feel */
.lp-faq details{
  background: #fff;
  box-shadow: 0 10px 26px rgba(0,0,0,.05);
}
.lp-faq summary{
  font-weight: 700;
}
.lp-faq details[open]{
  border-color: rgba(248,217,78,.55);
  box-shadow: 0 16px 34px rgba(0,0,0,.08);
}

/* 14) Final CTA: more modern */
.lp-final-cta{
  background:
    radial-gradient(900px 280px at 50% 0%, rgba(248,217,78,.45), transparent 65%),
    linear-gradient(180deg, #fffdf1 0%, #ffffff 100%);
  border-top: 1px solid rgba(0,0,0,.06);
}

/* 15) Reduce motion (accessibility) */
@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; animation:none !important; }
}