*, *::before, *::after { box-sizing: border-box; }
:root {
  --brand: #14604a;
  --brand-dark: #0d4030;
  --ink: #1d2a26;
  --muted: #67776f;
  --bg: #f7faf8;
  --card: #ffffff;
  --line: #e3ece7;
  --accent: #c9a227;
  --gold: #c9a227;
  --gold-dark: #a8790f;
  --gold-light: #e6c96a;
  --danger: #d64545;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(20, 60, 45, .08);
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: 'Noto Sans Thai', system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; overflow-x: hidden; }
img { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3 { line-height: 1.3; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 860px; }
.muted { color: var(--muted); }
.section { padding: 40px 16px; }
.section-title { font-size: 1.6rem; font-weight: 800; margin: 0 0 20px; }
.section-title::after { content: ''; display: block; width: 56px; height: 4px; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 2px; margin-top: 8px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.link-more { font-weight: 600; }

/* Header */
.site-header { background: #fff; border-bottom: 2px solid var(--gold); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.logo img { height: 44px; width: auto; }
.main-nav { display: flex; gap: 18px; margin-left: auto; }
.main-nav a { font-weight: 600; color: var(--ink); }
.main-nav a:hover { color: var(--brand); }
.lang-switch { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: .85rem; color: var(--line); }
.lang-switch a { color: var(--muted); padding: 2px 3px; }
.lang-switch a.active { color: var(--gold-dark); border-bottom: 2px solid var(--gold); }
.cart-btn { font-size: 1.2rem; position: relative; padding: 6px 10px; border-radius: 10px; background: #f7f0dc; border: 1px solid #e8dcb8; }
.cart-count { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; }

/* Hero slider */
.hero-slider { position: relative; height: min(70vh, 520px); overflow: hidden; background: #223; }
.slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .8s ease; display: flex; align-items: center; }
.slide.active { opacity: 1; z-index: 1; }
.slide-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.15)); }
.slide-content { position: relative; z-index: 2; color: #fff; }
.slide-content h2 { font-size: clamp(1.6rem, 4vw, 2.8rem); margin: 0 0 8px; font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.slide-content p { font-size: clamp(1rem, 2vw, 1.25rem); margin: 0 0 18px; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.slide-content .btn-primary { background: linear-gradient(135deg, #d4af37, var(--gold-dark)); }
.slide-content .btn-primary:hover { background: linear-gradient(135deg, var(--gold-dark), #8a6209); }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; background: rgba(255,255,255,.85); border: 0; width: 42px; height: 42px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; line-height: 1; }
.slider-arrow.prev { left: 14px; } .slider-arrow.next { right: 14px; }
.slider-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 3; }
.dot { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; }
.dot.active { background: #fff; }

/* Buttons */
.btn { display: inline-block; border: 0; cursor: pointer; font-family: inherit; font-weight: 700; border-radius: 10px; padding: 10px 20px; font-size: 1rem; transition: .15s; text-align: center; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: #fff; color: var(--brand); border: 2px solid var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-lg { padding: 13px 26px; font-size: 1.05rem; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-danger { background: var(--danger); color: #fff; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Category grid */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.cat-card { position: relative; height: 140px; border-radius: var(--radius); background-size: cover; background-position: center; display: flex; align-items: flex-end; overflow: hidden; box-shadow: var(--shadow); }
.cat-card span { position: relative; z-index: 1; color: #fff; font-weight: 700; padding: 12px 14px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.cat-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.65)); }
.cat-card:hover { transform: translateY(-2px); transition: .2s; }

/* Product cards */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--ink); display: flex; flex-direction: column; transition: .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(20,60,45,.14); }
.card-img { position: relative; height: 0; padding-bottom: 72%; overflow: hidden; }
.card-img img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; left: 10px; font-size: .75rem; font-weight: 700; color: #fff; padding: 3px 10px; border-radius: 999px; }
.badge-hot { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); }
.badge-sale { background: var(--danger); left: auto; right: 10px; }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { font-size: .78rem; color: var(--muted); font-weight: 600; }
.card-body h3 { margin: 0; font-size: 1.05rem; }
.card-desc { margin: 0; font-size: .87rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.card-price { margin-top: 6px; display: flex; align-items: baseline; gap: 8px; }
.price { font-size: 1.25rem; font-weight: 800; color: var(--gold-dark); }
.compare { text-decoration: line-through; color: var(--muted); font-size: .9rem; }
.per { color: var(--muted); font-size: .8rem; }

/* About band */
.about-band { background: #fff; border-top: 1px solid var(--line); padding: 48px 0; margin-top: 20px; }
.about-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: center; }
.about-inner img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 720px) { .about-inner { grid-template-columns: 1fr; } }

/* Filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-bottom: 22px; align-items: center; }
.filter-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: .88rem; font-weight: 600; color: var(--ink); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.filter-tools { display: flex; gap: 10px; }
input, select, textarea { font-family: inherit; font-size: .95rem; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }

/* Detail */
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 16px; }
.short-desc { color: var(--muted); }
.detail-sections { margin-top: 28px; clear: both; }
.detail-sections::after { content: ''; display: table; clear: both; }
.detail-block { display: block; width: 100%; box-sizing: border-box; margin: 0 0 18px; float: none; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; }
.detail-block h2 { margin: 0 0 12px; font-size: 1.2rem; border-left: 4px solid var(--gold); padding-left: 12px; }
.rich-text { font-size: 1rem; line-height: 1.8; }
.highlight-block { background: linear-gradient(135deg, #fdf9ec, #f7f0dc); border: 1px solid #e8dcb8; }
.highlight-block h2 { border-left-color: var(--gold-dark); }
.highlight-list { list-style: none; padding: 0; margin: 0; }
.highlight-list li { padding: 6px 0; font-weight: 600; font-size: 1.02rem; }
.detail-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 34px; }
@media (max-width: 820px) { .detail-grid { grid-template-columns: 1fr; } }
/* Grid/flex items refuse to shrink below content width by default (min-width:auto).
   The thumbnail strip (14 imgs ≈ 972px) blew the page out to 984px on phones,
   forcing browsers to zoom the whole page out. min-width:0 lets the scroll
   container actually scroll instead of stretching the page. */
.detail-grid > * { min-width: 0; }
.gallery, .gallery-thumbs { max-width: 100%; }
.product-grid > *, .cat-grid > *, .footer-grid > * { min-width: 0; }
.gallery-main { position: relative; height: 0; padding-bottom: 66%; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery-main img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumbs img { width: 84px; height: 62px; object-fit: cover; border-radius: 8px; cursor: pointer; opacity: .65; border: 2px solid transparent; flex-shrink: 0; }
.gallery-thumbs img.active { opacity: 1; border-color: var(--brand); }
.detail-info h1 { font-size: 1.5rem; margin: 6px 0 10px; }
.detail-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.detail-price .price { font-size: 1.9rem; }
.stock-line { font-weight: 600; }
.includes { list-style: none; padding: 0; margin: 8px 0 8px; }
.includes li { padding: 6px 0; font-weight: 500; font-size: 1.02rem; }
.qty-row { display: flex; align-items: center; gap: 14px; margin: 14px 0; }
.qty-ctrl { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.qty-ctrl button { width: 40px; height: 42px; border: 0; background: #fff; font-size: 1.2rem; cursor: pointer; }
.qty-ctrl button:hover { background: var(--bg); }
.qty-ctrl input { width: 56px; text-align: center; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Cart & checkout */
#cartArea { overflow-x: auto; }
.cart-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cart-table th, .cart-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table th { background: var(--bg); font-size: .85rem; }
.cart-item-name { display: flex; align-items: center; gap: 12px; }
.cart-item-name img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; }
.summary-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-top: 20px; }
.summary-row { display: flex; justify-content: space-between; padding: 5px 0; }
.summary-row.total { font-size: 1.25rem; font-weight: 800; color: var(--brand); border-top: 2px solid var(--line); margin-top: 8px; padding-top: 12px; }
.coupon-row { display: flex; gap: 8px; margin: 12px 0; }
.coupon-row input { flex: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; background: #fff; padding: 22px; border-radius: var(--radius); box-shadow: var(--shadow); }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 4px; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.pay-methods { display: grid; gap: 10px; margin: 14px 0; }
.pay-method { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; }
.pay-method.active { border-color: var(--brand); background: #f2faf7; }
.pay-method input { width: auto; margin-top: 4px; }
.pay-detail { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-top: 16px; }
.pay-detail img.qr { max-width: 260px; display: block; margin: 12px auto; }
.bank-acc { background: var(--bg); border-radius: 10px; padding: 12px 16px; margin: 8px 0; }
.error-msg { color: var(--danger); font-weight: 600; }
.ok-msg { color: var(--brand); font-weight: 600; }

/* Order page */
.order-head { text-align: center; padding: 20px 0; }
.order-head .big { font-size: 3rem; }
.status-steps { display: flex; justify-content: space-between; margin: 24px 0; position: relative; }
.status-steps::before { content: ''; position: absolute; top: 15px; left: 6%; right: 6%; height: 3px; background: var(--line); z-index: 0; }
.step { position: relative; z-index: 1; text-align: center; flex: 1; font-size: .78rem; color: var(--muted); }
.step .ball { width: 32px; height: 32px; margin: 0 auto 6px; border-radius: 50%; background: #fff; border: 3px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.step.on { color: var(--brand); font-weight: 700; }
.step.on .ball { border-color: var(--brand); background: var(--brand); color: #fff; }
.upload-box { border: 2px dashed var(--line); border-radius: var(--radius); padding: 26px; text-align: center; background: #fff; margin: 14px 0; cursor: pointer; }
.upload-box:hover { border-color: var(--brand); }
.upload-box img { max-height: 260px; border-radius: 10px; }

/* Footer */
.site-footer { background: #0f221c; border-top: 3px solid var(--gold); color: #cfe2da; margin-top: 48px; padding: 40px 0 16px; }
.site-footer a { color: var(--gold-light); }
.site-footer h4 { color: var(--gold-light); margin: 0 0 10px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.footer-brand { display: flex; align-items: flex-start; gap: 14px; }
.footer-brand p { margin: 4px 0; }
.footer-logo { height: 70px; background: #fff; border-radius: 10px; padding: 6px; flex-shrink: 0; }
@media (max-width: 700px) {
  .site-footer { padding: 26px 0 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 8px 18px; }
  .footer-brand { grid-column: 1 / -1; align-items: center; }
  .footer-brand p { font-size: .82rem; }
  .footer-logo { height: 52px; }
  .site-footer h4 { margin: 10px 0 6px; font-size: .95rem; }
  .site-footer p { margin: 5px 0; font-size: .88rem; overflow-wrap: anywhere; }
  .copyright { margin-top: 16px; font-size: .75rem; }
}
.copyright { border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding-top: 14px; font-size: .82rem; color: #90a89f; }

/* Floating chat (WhatsApp + LINE, real brand logos) */
.chat-widget { position: fixed; right: 16px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.chat-fab { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); transition: .15s; }
.chat-fab:hover { transform: scale(1.08); }
.chat-fab svg { width: 32px; height: 32px; }
.chat-wa { background: #25d366; }
.chat-line { background: #06c755; }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px; z-index: 999; box-shadow: 0 4px 18px rgba(0,0,0,.25); animation: toastIn .25s ease; font-weight: 600; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }

@media (max-width: 640px) {
  .header-inner { gap: 10px; }
  .logo span { display: none; }
  .main-nav { gap: 12px; margin-left: 0; flex: 1; justify-content: center; }
  .main-nav a { font-size: .88rem; white-space: nowrap; }
  .filter-tools { width: 100%; }
  .filter-tools input { flex: 1; }
  .cart-table th:nth-child(2), .cart-table td:nth-child(2) { display: none; }
  /* Tour detail: photo fits the screen, info readable right below */
  .section { padding: 20px 12px; }
  .detail .breadcrumb { font-size: .78rem; margin-bottom: 10px; }
  .detail-grid { gap: 16px; }
  .gallery-main { padding-bottom: 60%; border-radius: 10px; }
  .gallery-thumbs img { width: 62px; height: 46px; }
  .detail-info h1 { font-size: 1.22rem; margin: 4px 0 8px; }
  .detail-price .price { font-size: 1.55rem; }
  .detail-info p, .includes li { font-size: .95rem; }
  .detail-actions .btn-lg { padding: 12px 18px; font-size: 1rem; flex: 1; }
  .section-title { font-size: 1.3rem; }
}
