/* ============================================================
   Taste Of Thailand — Custom Styles (Bootstrap 5 supplement)
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=Manrope:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* --- Color variables --- */
:root {
  --ink:        #15201B;
  --canvas:     #F6F9F6;
  --jade-50:    #EAF4F0;
  --jade-100:   #D2E7DE;
  --jade-200:   #A8D0C0;
  --jade-400:   #2E8169;
  --jade-600:   #0E5C4D;
  --jade-700:   #0B4A3D;
  --jade-900:   #082E26;
  --chili-50:   #FCEEE6;
  --chili-100:  #F7D8C4;
  --chili-600:  #C2410C;
  --chili-700:  #9A340A;
  --gold-50:    #FBF3E2;
  --gold-400:   #D9A62B;
  --gold-600:   #8A6512;
}

/* --- Typography --- */
body {
  font-family: 'Manrope', sans-serif;
  background-color: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 72px;
}

@media (min-width: 992px) {
  body { padding-bottom: 0; }
}

.font-display { font-family: 'Fraunces', serif; }
.font-mono    { font-family: 'IBM Plex Mono', monospace; }

/* --- Shadows --- */
.shadow-card { box-shadow: 0 1px 2px rgba(21,32,27,.06), 0 8px 24px -12px rgba(21,32,27,.18); }
.shadow-lift { box-shadow: 0 4px 6px rgba(21,32,27,.05), 0 16px 32px -16px rgba(21,32,27,.28); }

/* --- Jade / Chili / Gold colour helpers --- */
.text-jade-600  { color: var(--jade-600) !important; }
.text-jade-700  { color: var(--jade-700) !important; }
.text-chili-600 { color: var(--chili-600) !important; }
.text-gold-400  { color: var(--gold-400) !important; }
.text-ink       { color: var(--ink) !important; }
.text-ink-60    { color: rgba(21,32,27,.60) !important; }
.text-ink-70    { color: rgba(21,32,27,.70) !important; }
.text-ink-75    { color: rgba(21,32,27,.75) !important; }
.text-ink-50    { color: rgba(21,32,27,.50) !important; }
.text-ink-45    { color: rgba(21,32,27,.45) !important; }

.bg-canvas      { background-color: var(--canvas) !important; }
.bg-jade-50     { background-color: var(--jade-50) !important; }
.bg-jade-600    { background-color: var(--jade-600) !important; }
.bg-jade-700    { background-color: var(--jade-700) !important; }
.bg-chili-600   { background-color: var(--chili-600) !important; }
.bg-chili-700   { background-color: var(--chili-700) !important; }
.bg-gold-400    { background-color: var(--gold-400) !important; }
.bg-ink         { background-color: var(--ink) !important; }

.border-jade-300  { border-color: var(--jade-100) !important; }
.border-jade-400  { border-color: var(--jade-400) !important; }
.border-ink-8     { border-color: rgba(21,32,27,.08) !important; }
.border-ink-12    { border-color: rgba(21,32,27,.12) !important; }
.border-ink-15    { border-color: rgba(21,32,27,.15) !important; }

/* --- Hero --- */
.hero-wrapper {
  position: relative;
  height: clamp(340px, 48vh, 480px);
  overflow: hidden;
}
.hero-wrapper img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay-tb {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--ink) 0%, rgba(21,32,27,.55) 50%, rgba(21,32,27,.10) 100%);
}
.hero-overlay-lr {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(21,32,27,.40) 0%, transparent 60%);
}
.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
}
.hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.05;
}
.hero-gold-bar {
  height: 4px;
  width: 64px;
  background-color: var(--gold-400);
  border-radius: 999px;
  margin-top: 8px;
}
.badge-restaurant {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.95);
  color: var(--ink);
  font-family: 'IBM Plex Mono', monospace;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* --- Navigation tabs --- */
.section-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(21,32,27,.08);
}
.section-nav .nav-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.section-nav .nav-wrap::-webkit-scrollbar { display: none; }
.section-nav a {
  flex-shrink: 0;
  padding: 14px 16px;
  font-size: .875rem;
  font-weight: 700;
  color: rgba(21,32,27,.6);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.section-nav a:hover {
  color: var(--jade-700);
  border-bottom-color: var(--jade-400);
}

/* --- Gallery grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-radius: 1rem;
  overflow: hidden;
}
.gallery-tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
}
.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.gallery-tile:hover img { transform: scale(1.05); }
.gallery-tile .more-overlay {
  position: absolute;
  inset: 0;
  background: rgba(21,32,27,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .875rem;
  pointer-events: none;
}

/* --- Menu list (perforation top bar) --- */
.menu-card {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
}
.perforation-bar {
  height: 12px;
  background-color: var(--jade-700);
  background-image: radial-gradient(circle, var(--canvas) 5px, transparent 5.5px);
  background-position: top center;
  background-size: 18px 14px;
  background-repeat: repeat-x;
}
.menu-item {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(21,32,27,.08);
}
.menu-item:last-child { border-bottom: none; }
.menu-item-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.menu-item-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  margin: 0;
}
.menu-price {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  color: var(--jade-700);
  margin-left: auto;
  flex-shrink: 0;
}
.menu-leader {
  flex: 1;
  min-width: 24px;
  border-bottom: 2px dotted rgba(21,32,27,.2);
  margin-bottom: 3px;
}
.menu-desc {
  font-size: .875rem;
  color: rgba(21,32,27,.6);
  margin-top: 4px;
  max-width: 100%;
}

/* --- Business info category label --- */
.info-category {
  font-family: 'IBM Plex Mono', monospace;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: rgba(21,32,27,.45);
  font-weight: 600;
  margin-bottom: 8px;
}
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  color: rgba(21,32,27,.75);
  margin-bottom: 6px;
}
.check-icon { color: var(--jade-600); flex-shrink: 0; }

/* --- Contact / sidebar cards --- */
.sidebar-card {
  background: #fff;
  border-radius: 1rem;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.sidebar-card-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
}

/* --- Opening hours table --- */
.hours-table { width: 100%; font-size: .875rem; }
.hours-table td { padding: 8px 0; border-bottom: 1px solid rgba(21,32,27,.06); }
.hours-table td:first-child { color: rgba(21,32,27,.6); }
.hours-table td:last-child  { text-align: right; font-family: 'IBM Plex Mono', monospace; color: rgba(21,32,27,.75); }

/* --- Review cards --- */
.review-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  font-size: 1rem;
}

/* --- Place cards --- */
.place-card {
  display: flex;
  flex-direction: column;
  height: 100%;          /* fill Bootstrap col height so all cards are equal */
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s;
}
.place-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(21,32,27,.18); }
.place-card .thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  flex-shrink: 0;
}
.place-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.place-card:hover .thumb img { transform: scale(1.05); }
.place-card .info {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.place-card .info h3 { font-weight: 800; font-size: .9rem; color: var(--ink); margin: 0; }
.place-card .info .cat { font-size: .75rem; color: rgba(21,32,27,.5); margin: 0; }
.place-card .info .addr {
  font-size: .68rem;
  color: rgba(21,32,27,.4);
  margin-top: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Section headings --- */
.section-heading {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* --- Buttons --- */
.btn-jade {
  background-color: var(--jade-600);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  border: none;
  transition: background-color .15s;
}
.btn-jade:hover { background-color: var(--jade-700); color: #fff; }

.btn-chili {
  background-color: var(--chili-600);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  border: none;
  transition: background-color .15s;
}
.btn-chili:hover { background-color: var(--chili-700); color: #fff; }

.btn-ink {
  background-color: var(--ink);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  border: none;
  transition: background-color .15s;
}
.btn-ink:hover { background-color: var(--jade-700); color: #fff; }

.btn-outline-white {
  background: transparent;
  border: 1px solid rgba(255,255,255,.6);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  transition: background-color .15s;
}
.btn-outline-white:hover { background: rgba(255,255,255,.1); color: #fff; }

.btn-outline-ink {
  background: transparent;
  border: 1px solid rgba(21,32,27,.15);
  color: var(--ink);
  font-weight: 700;
  border-radius: 999px;
  transition: border-color .15s;
}
.btn-outline-ink:hover { border-color: var(--jade-400); }

.btn-rounded-xl { border-radius: .75rem !important; }

/* --- Icon action buttons (share/save) --- */
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(21,32,27,.12);
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(21,32,27,.6);
  transition: color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--jade-700); border-color: var(--jade-100); }
.icon-btn.heart:hover { color: var(--chili-600); border-color: var(--chili-50); }

/* --- Lightbox --- */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(21,32,27,.95);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#lightbox.active { display: flex; }
#lightboxImg {
  max-height: 82vh;
  max-width: 85vw;
  object-fit: contain;
  border-radius: .5rem;
}
#lightboxCounter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.7);
  font-family: 'IBM Plex Mono', monospace;
  font-size: .75rem;
}
.lb-btn {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.lb-btn:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 16px; right: 16px; }
.lb-prev  { left:  8px; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 8px; top: 50%; transform: translateY(-50%); }

/* --- Suggest Edit Modal --- */
#suggestEditModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(21,32,27,.6);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#suggestEditModal.active { display: flex; }
.modal-inner {
  background: #fff;
  border-radius: 1rem;
  padding: 24px;
  width: 100%;
  max-width: 440px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: none;
  color: rgba(21,32,27,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.modal-close:hover { background: var(--canvas); }
.form-label-sm {
  font-size: .75rem;
  font-weight: 700;
  color: rgba(21,32,27,.6);
  margin-bottom: 6px;
  display: block;
}
.form-input-custom {
  width: 100%;
  border: 1px solid rgba(21,32,27,.15);
  border-radius: .5rem;
  padding: 10px 14px;
  font-size: .875rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.form-input-custom:focus {
  border-color: var(--jade-400);
  box-shadow: 0 0 0 3px rgba(46,129,105,.15);
}

/* --- Mobile sticky bar --- */
.mobile-bar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: #fff;
  border-top: 1px solid rgba(21,32,27,.1);
  padding: 12px 16px;
  gap: 12px;
  box-shadow: 0 -4px 16px rgba(21,32,27,.08);
}
@media (min-width: 992px) { .mobile-bar { display: none !important; } }

/* --- Back to top --- */
#backToTop {
  display: none;
  position: fixed;
  bottom: 96px;
  right: 16px;
  z-index: 40;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  border: none;
  color: #fff;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
#backToTop.visible { display: flex; }
#backToTop:hover { background: var(--jade-700); }
@media (min-width: 992px) { #backToTop { bottom: 24px; right: 24px; } }

/* --- About section --- */
.about-section {
  background: #fff;
  border-top: 1px solid rgba(21,32,27,.08);
  border-bottom: 1px solid rgba(21,32,27,.08);
}

/* --- Scroll margin for anchors --- */
.scroll-mt { scroll-margin-top: 80px; }

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}


/* ============================================================
   Taste Of Thailand — Menu Page Styles
   ============================================================ */

.menu-hero-wrapper {
  min-height: 420px;
}

.hero-meta {
  color: rgba(255,255,255,.9);
  font-size: .875rem;
  font-weight: 600;
}

.hero-meta-separator {
  opacity: .4;
}

.sidebar-stack {
  position: sticky;
  top: 80px;
}

.menu-sidebar-card {
  border: 1px solid rgba(21,32,27,.08);
}

.menu-category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 460px;
  overflow: auto;
  padding-right: 4px;
}

.menu-category-link {
  border: 1px solid rgba(21,32,27,.08);
  border-radius: .75rem;
  padding: 10px 12px;
  color: rgba(21,32,27,.75);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 700;
  background: rgba(255,255,255,.7);
  transition: border-color .15s, background-color .15s, color .15s, transform .15s;
}

.menu-category-link:hover,
.menu-category-link.active {
  color: var(--jade-700);
  background: var(--jade-50);
  border-color: var(--jade-100);
  transform: translateY(-1px);
}

.menu-category-count {
  min-width: 28px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-50);
  color: var(--gold-600);
  font-family: 'IBM Plex Mono', monospace;
  font-size: .72rem;
  font-weight: 700;
}

.menu-brand-card {
  border: 1px solid rgba(21,32,27,.08);
}

.menu-brand-photo {
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--jade-50);
}

.menu-brand-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-brand-title,
.menu-content-title {
  color: var(--ink);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1.1;
}

.menu-brand-desc,
.menu-content-desc {
  font-size: .95rem;
  line-height: 1.75;
}

.menu-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--jade-50);
  border: 1px solid var(--jade-100);
  color: var(--jade-700);
  font-size: .78rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 7px 11px;
}

.menu-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-radius: 1rem;
  overflow: hidden;
}

.menu-gallery-tile {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: none;
  padding: 0;
  background: var(--jade-50);
  cursor: pointer;
}

.menu-gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}

.menu-gallery-tile:hover img {
  transform: scale(1.05);
}

.menu-gallery-toggle {
  display: inline-flex;
}

.menu-gallery-toggle.is-hidden,
.menu-gallery-tile.is-hidden,
.menu-no-results.is-hidden,
.menu-section.is-hidden,
.menu-item.is-hidden {
  display: none !important;
}

.menu-section {
  display: block;
}

.menu-section-count {
  flex-shrink: 0;
  font-size: .75rem;
}

.menu-list {
  display: grid;
  grid-template-columns: 1fr;
}

.menu-item mark {
  background: var(--gold-50);
  color: var(--ink);
  padding: 0 .1em;
  border-radius: .15rem;
}

.menu-contact-list li {
  align-items: flex-start;
}

.form-label-sm {
  display: block;
  font-size: .75rem;
  font-weight: 800;
  color: rgba(21,32,27,.6);
  margin-bottom: 6px;
}

.form-input-custom {
  width: 100%;
  border: 1px solid rgba(21,32,27,.12);
  border-radius: .8rem;
  padding: 11px 12px;
  font-size: .875rem;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.form-input-custom:focus {
  border-color: var(--jade-400);
  box-shadow: 0 0 0 .2rem rgba(46,129,105,.12);
}

.btn-outline-ink {
  border: 1px solid rgba(21,32,27,.22);
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

.btn-outline-ink:hover {
  border-color: var(--jade-600);
  background: var(--jade-50);
  color: var(--jade-700);
}

@media (min-width: 768px) {
  .menu-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .menu-item:nth-child(odd) {
    border-right: 1px solid rgba(21,32,27,.06);
  }
}

@media (max-width: 991.98px) {
  .sidebar-stack {
    position: static;
  }

  .menu-category-list {
    flex-direction: row;
    overflow-x: auto;
    max-height: none;
    padding-bottom: 4px;
  }

  .menu-category-link {
    flex: 0 0 auto;
    max-width: 260px;
  }
}

@media (max-width: 575.98px) {
  .menu-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .menu-brand-photo {
    aspect-ratio: 16 / 10;
  }

  .menu-item {
    padding: 14px 16px;
  }

  .menu-item-row {
    align-items: flex-start;
  }
}


/* --- Menu page refinements: full-width content layout --- */
.menu-main-wide {
  max-width: 100%;
}

.menu-main-wide .menu-section {
  width: 100%;
}

.menu-main-wide .menu-card {
  width: 100%;
}

@media (min-width: 1200px) {
  .menu-main-wide .menu-item {
    padding: 18px 28px;
  }
}


/* --- Shared theme helpers --- */
.menu-anchor { height: 0; min-height: 0; }


/* ============================================================
   Policy pages — minimal prose styles
   ============================================================ */
.policy-prose {
  color: rgba(21,32,27,.75);
  font-size: .9375rem;
  line-height: 1.85;
}
.policy-prose p { margin-bottom: 1rem; }
.policy-prose h2 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  margin-top: 2rem;
  margin-bottom: .5rem;
}
.policy-prose a {
  color: var(--jade-600);
  font-weight: 600;
  text-underline-offset: 2px;
}
.policy-prose a:hover { color: var(--jade-700); }
