:root {
  --color-primary: #1c1917;
  --color-on-primary: #fffaf3;
  --color-secondary: #44403c;
  --color-accent: #a16207;
  --color-accent-hover: #854d0e;
  --color-gold: #d4af77;
  --color-background: #f6f1e8;
  --color-foreground: #1c1917;
  --color-muted: #7c746b;
  --color-border: #e4ddd2;
  --color-surface: #fffcf7;
  --color-surface-2: #efe8dc;
  --shadow-sm: 0 8px 24px rgba(28, 25, 23, 0.06);
  --shadow-md: 0 18px 40px rgba(28, 25, 23, 0.1);
  --shadow-lg: 0 28px 60px rgba(28, 25, 23, 0.16);
  --radius: 22px;
  --radius-sm: 14px;
  --font-display: "Playfair Display", "Kanit", serif;
  --font-body: "Kanit", sans-serif;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-foreground);
  background:
    radial-gradient(1200px 420px at 50% -80px, rgba(161, 98, 7, 0.12), transparent 60%),
    linear-gradient(180deg, #faf6ef 0%, var(--color-background) 180px);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(22, 17, 14, 0.92);
  border-bottom: 1px solid rgba(212, 175, 119, 0.28);
}

.site-header__inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: var(--color-on-primary);
}

.brand__mark {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.brand__mark span {
  color: var(--color-gold);
}

.brand__sub {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 250, 243, 0.62);
}

.header-meta {
  color: var(--color-gold);
  font-size: 0.85rem;
  white-space: nowrap;
  text-decoration: none;
}

a.header-meta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(212, 175, 119, 0.4);
  border-radius: 999px;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #16110e;
  box-shadow: var(--shadow-md);
  margin-bottom: 28px;
}

.hero__map {
  width: 100%;
  height: min(42vw, 380px);
  min-height: 220px;
  border: 0;
  filter: saturate(0.92) contrast(1.04);
}

.hero__caption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(22, 17, 14, 0.72);
  color: #fffaf3;
  font-size: 0.82rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 119, 0.35);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  line-height: 1.2;
}

.section-title small {
  display: block;
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--color-muted);
}

.search {
  position: relative;
  flex: 1 1 240px;
  max-width: 340px;
}

.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--color-muted);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 42px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-foreground);
  font: inherit;
  box-shadow: var(--shadow-sm);
}

.search input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(161, 98, 7, 0.16);
}

.branch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.branch-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}

.branch-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(145deg, #2b2118, #16110e);
}

.branch-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}

.branch-card__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 18px;
}

.branch-card__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
}

.branch-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-accent);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 48px 16px;
  text-align: center;
  color: var(--color-muted);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 280px;
  background: #16110e;
  box-shadow: var(--shadow-md);
}

.detail-hero img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  opacity: 0.88;
}

.detail-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 17, 14, 0.08) 20%, rgba(22, 17, 14, 0.88) 100%);
}

.detail-hero__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 22px 22px;
  color: var(--color-on-primary);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--color-gold);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.detail-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 600;
  line-height: 1.15;
}

.detail-grid {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.panel {
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 500;
}

.hours {
  display: grid;
  gap: 10px;
}

.hours__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
}

.hours__label {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.hours__time {
  font-weight: 500;
}

.actions {
  display: grid;
  gap: 12px;
}

.action {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 18px;
  align-items: center;
  column-gap: 16px;
  min-height: 84px;
  padding: 14px 18px 14px 14px;
  text-decoration: none;
  color: inherit;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}

.action__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(180deg, #2a221c 0%, #16110e 100%);
  color: var(--color-gold);
  box-shadow: inset 0 1px 0 rgba(212, 175, 119, 0.28);
}

.action__icon svg {
  display: block;
  width: 24px;
  height: 24px;
}

.action__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  padding-top: 1px;
}

.action__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.action__desc {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.action__chevron {
  display: block;
  width: 16px;
  height: 16px;
  color: #c4b5a0;
  justify-self: end;
}

.map-frame {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  min-height: 240px;
}

.map-frame iframe {
  width: 100%;
  height: 320px;
  border: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 8px 0 18px;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
}

.not-found {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.not-found h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
}

.not-found p {
  color: var(--color-muted);
}

@media (hover: hover) {
  .branch-card:hover {
    transform: translateY(-4px);
    border-color: rgba(161, 98, 7, 0.45);
    box-shadow: var(--shadow-lg);
  }

  .branch-card:hover .branch-card__media img {
    transform: scale(1.06);
  }

  .action:hover {
    transform: translateY(-2px);
    border-color: rgba(161, 98, 7, 0.45);
    box-shadow: var(--shadow-md);
  }
}

@media (min-width: 640px) {
  .branch-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .page {
    padding-top: 36px;
  }

  .branch-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .detail-hero img {
    height: 420px;
  }

  .detail-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }

  .map-frame {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
