/* =========================================================
   RUNHOTEL BUFFET BRAND LANDING PAGE
   Scoped under .rh-brand-page
========================================================= */

.rh-brand-page {
  --rh-orange: #f58220;
  --rh-orange-hover: #e56f0a;
  --rh-blue: #1f67c7;
  --rh-text: #243447;
  --rh-heading: #1f2f46;
  --rh-secondary: #475569;
  --rh-muted: #6b7785;
  --rh-price: #f04b3a;
  --rh-border: #e6ebf0;
  --rh-surface: #ffffff;
  --rh-background: #f7f9fc;
  --rh-radius-md: 12px;
  --rh-shadow: 0 2px 10px rgba(16, 24, 40, 0.06);

  width: 100%;
  color: var(--rh-text);
  background: var(--rh-background);
  padding: 28px 0 64px;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  font-weight: 500;
}

.rh-brand-page * {
  box-sizing: border-box;
}

.rh-brand-page .rh-brand-breadcrumb,
.rh-brand-page .rh-brand-hero,
.rh-brand-page .rh-brand-toolbar,
.rh-brand-page .rh-brand-filter-toggle,
.rh-brand-page .rh-brand-layout,
.rh-brand-page .rh-brand-why,
.rh-brand-page .rh-brand-popular,
.rh-brand-page .rh-brand-other,
.rh-brand-page .rh-brand-seo,
.rh-brand-page .rh-admin-debug {
  width: calc(100% - 48px);
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}

.rh-brand-breadcrumb {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--rh-muted);
  margin-bottom: 18px;
}

.rh-brand-breadcrumb a {
  color: var(--rh-secondary);
  text-decoration: none;
}

.rh-brand-breadcrumb a:hover {
  text-decoration: underline;
}

/* Hero */
.rh-brand-hero {
  display: grid;
  grid-template-columns: 190px minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: center;
  background: var(--rh-surface);
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius-md);
  padding: 24px;
  box-shadow: var(--rh-shadow);
  margin-bottom: 18px;
}

.rh-brand-hero__logo {
  width: 170px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--rh-border);
  border-radius: 10px;
}

.rh-brand-hero__logo img {
  max-width: 130px;
  max-height: 80px;
  object-fit: contain;
}

.rh-brand-hero__logo-fallback {
  font-size: 28px;
  font-weight: 700;
  color: var(--rh-secondary);
}

.rh-brand-hero__title {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--rh-text);
}

.rh-brand-hero__intro {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--rh-secondary);
  max-width: 620px;
}

.rh-brand-hero__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.rh-brand-hero__pill {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #f3d4be;
  background: #fff7f1;
  color: #b45309;
}

.rh-brand-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--rh-text);
}

.rh-brand-hero__benefits {
  background: #fff9f3;
  border: 1px solid #f7d8bc;
  border-radius: 10px;
  padding: 18px;
}

.rh-brand-benefit {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.rh-brand-benefit:last-child {
  margin-bottom: 0;
}

.rh-brand-benefit__icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(245, 130, 32, 0.12);
  color: var(--rh-orange);
  font-size: 14px;
}

.rh-brand-benefit strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.rh-brand-benefit p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--rh-secondary);
}

/* Toolbar — date, meal, sort, button */
.rh-brand-page .rh-brand-toolbar {
  grid-template-columns:
    minmax(160px, 1fr)
    minmax(130px, 0.7fr)
    minmax(150px, 0.8fr)
    auto;
  margin-bottom: 18px;
}

.rh-brand-filter-toggle {
  display: none;
  width: calc(100% - 48px);
  max-width: 1320px;
  margin: 0 auto 14px;
  height: 44px;
  border: 1px solid var(--rh-border);
  border-radius: 10px;
  background: #ffffff;
  color: var(--rh-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.rh-brand-layout {
  margin-bottom: 40px;
}

.rh-brand-section-title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--rh-text);
}

.rh-brand-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.rh-brand-section-header .rh-brand-section-title {
  margin-bottom: 0;
}

.rh-brand-section-link {
  color: var(--rh-blue);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.rh-brand-section-link:hover {
  text-decoration: underline;
}

/* Why section */
.rh-brand-why {
  margin-bottom: 40px;
}

.rh-brand-why__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.rh-brand-why__item h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.rh-brand-why__item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--rh-secondary);
}

.rh-brand-why__icon {
  display: inline-block;
  color: var(--rh-orange);
  font-weight: 700;
  margin-bottom: 8px;
}

/* Popular */
.rh-brand-popular {
  margin-bottom: 40px;
}

/* Other brands */
.rh-brand-other {
  margin-bottom: 32px;
  position: relative;
}

.rh-brand-other__lead {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--rh-secondary);
}

.rh-brand-other__arrows {
  position: absolute;
  top: 0;
  right: 24px;
}

.rh-brand-other .rh-buffet-brand-logo-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 8px;
}

/* SEO */
.rh-brand-seo {
  margin-bottom: 24px;
}

.rh-brand-seo p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--rh-muted);
}

.rh-brand-empty h3 {
  margin-top: 0;
}

/* Reuse search result card tweaks under brand page */
.rh-brand-page .rh-result-card__title a {
  color: var(--rh-blue);
  text-decoration: none;
}

.rh-brand-page .rh-result-card__title a:hover {
  text-decoration: underline;
}

.rh-brand-page .rh-price-chip.is-active {
  border-color: var(--rh-orange);
  background: rgba(245, 130, 32, 0.1);
  color: #b45309;
}

.rh-brand-page .rh-filter-options.is-collapsed .rh-checkbox:nth-child(n + 7) {
  display: none;
}

/* Page shell background when brand page is active */
.RHdealpage:has(.rh-brand-page),
.rh-buffet-page:has(.rh-brand-page) {
  background: var(--rh-background);
}

.RHdealpage:has(.rh-brand-page) > .rh-buffet-header {
  margin-bottom: 0;
}

@media (max-width: 1024px) {
  .rh-brand-hero {
    grid-template-columns: 140px minmax(0, 1fr);
  }

  .rh-brand-hero__benefits {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .rh-brand-page {
    padding: 16px 0 48px;
  }

  .rh-brand-page .rh-brand-breadcrumb,
  .rh-brand-page .rh-brand-hero,
  .rh-brand-page .rh-brand-toolbar,
  .rh-brand-page .rh-brand-filter-toggle,
  .rh-brand-page .rh-brand-layout,
  .rh-brand-page .rh-brand-why,
  .rh-brand-page .rh-brand-popular,
  .rh-brand-page .rh-brand-other,
  .rh-brand-page .rh-brand-seo {
    width: calc(100% - 32px);
  }

  .rh-brand-hero {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }

  .rh-brand-hero__logo {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }

  .rh-brand-page .rh-brand-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .rh-brand-page .rh-search-toolbar__button {
    grid-column: 1 / -1;
  }

  .rh-brand-filter-toggle {
    display: block;
  }

  .rh-brand-layout {
    grid-template-columns: 1fr;
  }

  .rh-brand-page .rh-brand-sidebar {
    display: none;
    margin-bottom: 16px;
  }

  .rh-brand-page .rh-brand-sidebar.is-open {
    display: block;
  }

  .rh-brand-why__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .rh-brand-popular .rh-buffet-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rh-brand-other__arrows {
    position: static;
    margin-bottom: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }

  .rh-brand-other .rh-buffet-brand-logo-item {
    flex: 0 0 125px;
    height: 86px;
  }

  .rh-brand-page .rh-result-card {
    flex-direction: column;
  }

  .rh-brand-page .rh-result-card__image-wrap {
    width: 100%;
    min-height: 180px;
  }

  .rh-brand-page .rh-result-card__price-area {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .rh-brand-popular .rh-buffet-card-grid {
    grid-template-columns: 1fr;
  }

  .rh-brand-page .rh-brand-toolbar {
    grid-template-columns: 1fr;
  }
}

/* Admin-only brand price debug */
.rh-brand-page .rh-admin-debug {
  margin: 28px auto 0;
  padding: 14px 16px;
  border: 2px solid #d97706;
  border-radius: 10px;
  background: #fffbeb;
  color: #78350f;
  font-size: 13px;
  line-height: 1.45;
}

.rh-brand-page .rh-admin-debug__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.rh-brand-page .rh-admin-debug__head span {
  opacity: 0.75;
  font-size: 12px;
}

.rh-brand-page .rh-admin-debug__ok {
  margin: 0 0 10px;
}

.rh-brand-page .rh-admin-debug details {
  margin-top: 10px;
}

.rh-brand-page .rh-admin-debug summary {
  cursor: pointer;
  font-weight: 600;
}

.rh-brand-page .rh-admin-debug__table-wrap {
  overflow-x: auto;
  margin-top: 8px;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  background: #fff;
}

.rh-brand-page .rh-admin-debug table {
  width: 100%;
  border-collapse: collapse;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.rh-brand-page .rh-admin-debug th,
.rh-brand-page .rh-admin-debug td {
  padding: 5px 7px;
  border-bottom: 1px solid #fde68a;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.rh-brand-page .rh-admin-debug td.rh-admin-debug__math {
  white-space: normal;
  min-width: 220px;
}

.rh-brand-page .rh-admin-debug th {
  background: #fef3c7;
  position: sticky;
  top: 0;
}
