/* =====================================================================
   บ้านเถ้าแก่ — /links + /venues (TikTok bio link & venue-hire pages)
   Fully separate stylesheet. Never imported by /booking or /admin, and
   does not import anything from them either.
   Palette: green (matches booking site) + white + wood brown, light
   glass effect, mobile-first, big tap targets, minimal animation.
===================================================================== */
:root {
  --green-900: #1f4d34;
  --green-700: #2f7a52;
  --green-600: #3a9463;
  --green-500: #4aa872;
  --green-100: #e6f4ec;
  --green-50: #f3faf6;
  --wood-700: #6b4226;
  --wood-500: #8a5a34;
  --wood-300: #c99a68;
  --wood-100: #f2e6d8;
  --white: #ffffff;
  --gray-900: #22302a;
  --gray-600: #5c6b64;
  --gray-300: #d7e3dc;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 2px 14px rgba(31, 77, 52, 0.12);
  --shadow-lg: 0 10px 32px rgba(31, 40, 30, 0.28);
  --glass-bg: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: 'Noto Sans Thai', 'Loma', system-ui, -apple-system, sans-serif;
  background: var(--green-50);
  color: var(--gray-900);
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; display: block; }
button, a { font-family: inherit; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}

/* ---------------------------------------------------------------
   /links — full-screen hero landing page
--------------------------------------------------------------- */
.links-page {
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.links-page::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(10, 20, 14, 0.38); /* ~35-40% dark overlay */
  z-index: 0;
}
.links-inner {
  position: relative; z-index: 1;
  width: 100%; max-width: 480px;
  margin: 0 auto;
  padding: 28px 18px 32px;
  display: flex; flex-direction: column;
  min-height: 100dvh;
  min-height: 100vh;
}
.links-header {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; text-align: center; color: var(--white);
  margin-bottom: 22px;
}
.links-logo {
  width: 84px; height: 84px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.85);
  object-fit: cover; background: var(--white);
  box-shadow: var(--shadow-lg);
}
.links-title {
  font-size: 26px; font-weight: 800; margin: 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}
.links-tagline {
  font-size: 14px; margin: 0; opacity: 0.95;
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}

.link-buttons {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: auto; margin-bottom: 8px;
}
.link-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  width: 100%; padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--white);
  font-size: 16px; font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}
.link-btn:active { transform: scale(0.98); background: rgba(255,255,255,0.22); }
.link-btn.primary {
  background: linear-gradient(135deg, var(--green-600), var(--green-800, var(--green-900)));
  border-color: transparent;
}
.link-btn.wood {
  background: linear-gradient(135deg, var(--wood-500), var(--wood-700));
  border-color: transparent;
}
.link-btn.social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.social-icon {
  width: 32px;
  height: 32px;
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.social-label {
  font-size: inherit;
  line-height: 1;
  font-weight: 700;
}
@media (min-width: 768px) {
  .social-icon {
    width: 36px;
    height: 36px;
    max-width: 36px;
    max-height: 36px;
  }
}
.links-footer {
  text-align: center; color: rgba(255,255,255,0.85);
  font-size: 12px; margin-top: 18px;
}

/* ---------------------------------------------------------------
   Shared site chrome for /venues pages (not used by /links)
--------------------------------------------------------------- */
.mkt-header {
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  color: var(--white);
  position: sticky; top: 0; z-index: 30;
  box-shadow: var(--shadow);
}
.mkt-header-inner {
  max-width: 960px; margin: 0 auto;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.mkt-logo {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; background: var(--white); flex-shrink: 0;
}
.mkt-brand { font-size: 17px; font-weight: 800; }
.mkt-brand-sub { font-size: 12px; opacity: 0.88; }
.mkt-back {
  color: var(--white); text-decoration: none; font-size: 20px;
  padding: 4px 6px; border-radius: 8px; flex-shrink: 0;
}
.mkt-back:active { background: rgba(255,255,255,0.15); }

.mkt-main { max-width: 960px; margin: 0 auto; padding: 18px 14px 40px; }

.mkt-hero {
  border-radius: var(--radius);
  overflow: hidden; position: relative;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  background: var(--wood-100);
}
.mkt-hero img { width: 100%; height: 220px; object-fit: cover; }
.mkt-hero-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(10,20,14,0.72), transparent);
  color: var(--white); padding: 30px 16px 12px; font-weight: 700;
}

.mkt-intro { color: var(--gray-600); font-size: 15px; line-height: 1.6; margin-bottom: 18px; }
.mkt-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.mkt-tag {
  background: var(--green-100); color: var(--green-900);
  font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
}

/* Venue cards on /venues */
.venue-grid { display: flex; flex-direction: column; gap: 16px; }
.venue-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-300);
}
.venue-card-media { position: relative; background: var(--wood-100); }
.venue-card-media img { width: 100%; height: 190px; object-fit: cover; }
.venue-card-media.empty {
  height: 190px; display: flex; align-items: center; justify-content: center;
  color: var(--wood-500); font-size: 14px; background: var(--wood-100);
}
.venue-card-body { padding: 16px; }
.venue-card-name { font-size: 18px; font-weight: 800; margin: 0 0 6px; color: var(--green-900); }
.venue-card-desc { font-size: 14px; color: var(--gray-600); margin: 0 0 10px; line-height: 1.5; }
.venue-card-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; color: var(--white); font-size: 14px;
  background: var(--green-600); padding: 10px 16px; border-radius: 999px;
}

/* Facility strip on /venues */
.facility-section { margin: 26px 0; }
.facility-title { font-size: 16px; font-weight: 800; color: var(--green-900); margin: 0 0 10px; }
.facility-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.facility-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.facility-photos img { width: 100%; height: 110px; object-fit: cover; border-radius: var(--radius-sm); }
.facility-photo-cap { font-size: 12px; color: var(--gray-600); margin-top: 4px; text-align: center; }

/* Detail page spec table */
.spec-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 20px; }
.spec-row {
  display: flex; justify-content: space-between; gap: 12px;
  background: var(--white); border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.spec-label { font-size: 13px; color: var(--gray-600); font-weight: 600; }
.spec-value { font-size: 14px; font-weight: 700; color: var(--gray-900); text-align: right; }
.spec-value.muted { color: var(--wood-500); font-weight: 600; }

/* Gallery */
.gallery-wrap { margin-bottom: 20px; }
.gallery-scroll {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 6px; -webkit-overflow-scrolling: touch;
}
.gallery-scroll img {
  scroll-snap-align: center; flex: 0 0 82%; height: 220px;
  object-fit: cover; border-radius: var(--radius); cursor: zoom-in;
  box-shadow: var(--shadow);
}
.gallery-empty {
  height: 180px; border-radius: var(--radius); background: var(--wood-100);
  color: var(--wood-500); display: flex; align-items: center; justify-content: center;
  font-size: 14px; text-align: center; padding: 16px;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(10,10,10,0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.lightbox img { max-width: 94vw; max-height: 82vh; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.16); color: var(--white);
  border: none; font-size: 20px; cursor: pointer;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.16); color: var(--white);
  border: none; font-size: 22px; cursor: pointer;
}
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

/* Contact buttons on venue pages */
.contact-row { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.contact-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 16px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 15px; text-decoration: none;
  border: none; cursor: pointer;
}
.contact-btn.green { background: var(--green-600); color: var(--white); }
.contact-btn.wood { background: var(--wood-500); color: var(--white); }
.contact-btn.outline { background: var(--white); color: var(--green-700); border: 1.5px solid var(--green-600); }
.contact-btn[disabled], .contact-btn.disabled {
  opacity: 0.5; pointer-events: none;
}
.contact-note { font-size: 12px; color: var(--gray-600); text-align: center; margin-top: -2px; }

.mkt-footer {
  text-align: center; color: var(--gray-600); font-size: 12px;
  padding: 20px 16px 36px;
}

@media (min-width: 720px) {
  .venue-grid { display: grid; grid-template-columns: 1fr 1fr; }
  .mkt-hero img { height: 300px; }
  .facility-photos { grid-template-columns: repeat(4, 1fr); }
  .contact-row { flex-direction: row; }
  .contact-btn { flex: 1; }
}
