/*
 * Bar pages (page-templates/bar.php), laid out like the Elementor bar pages
 * they replace (/bars/layaway-bar/, Elementor page 8429).
 *
 * Reuses the site's global classes where they exist:
 *   .banner_wrapper, .hero-copy-container, .hero-wide — hero frame and
 *                     glass copy box (Customizer CSS)
 *   .framed-section — frame widths (Customizer CSS)
 *   .stepped-frame  — the notched image frame (assets/js/stepped-frame.js)
 * Values Elementor set per element on page 8429 are copied here. The menu
 * reuses the eatery menu and its styles (eatery.css, under .eatery-page).
 * Everything else is scoped under .bar-page.
 */

.bar-page {
  --bar-navy: var(--e-global-color-primary, #142142);
  --bar-heading: #403836;
  --bar-card-border: #e6e6e6;
  --bar-heading-font: "LaFarge Medium", var(--e-global-typography-secondary-font-family, "LaFarge Medium"), sans-serif;
  --bar-body-font: var(--e-global-typography-fb39187-font-family, "LaFarge Book"), sans-serif;

  overflow-x: clip;
  color: #000;
}

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

.bar-page img {
  max-width: 100%;
  height: auto;
}

.bar-page a:focus-visible,
.bar-page button:focus-visible {
  outline: 3px solid var(--bar-navy);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #fff;
}

.bar-page ul.bar-tabs__list,
.bar-page ul.bar-gallery__track,
.bar-page ul.bar-specials__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Hero ---------- */

/*
 * Border widths, margins and the outer navy frame come from the Customizer's
 * .banner_wrapper rules; colours and heights from page 8429's banner.
 */
.bar-page .bar-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* The Customizer's .banner_wrapper height is for Elementor containers. */
  height: auto;
  min-height: 600px;
  /* No overflow: hidden; it would clip the Customizer's outer navy frame
     (.banner_wrapper::after), which sits outside the box. */
  border-style: solid;
  border-color: #99532f;
  background-color: #632c07;
}

.bar-page .bar-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  object-position: bottom center;
}

/* Elementor's background overlay on the banner. */
.bar-page .bar-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: #632c07;
  opacity: 0.7;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* Clears the transparent header, which overlaps the hero. */
.bar-page .bar-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 9.25rem 15px 1rem;
}

.bar-page .bar-hero__copy {
  text-align: center;
}

.bar-page .bar-hero__title {
  margin: 0;
  color: #fff;
  font-family: var(--e-global-typography-primary-font-family, "LaFarge Medium"), sans-serif;
  font-size: var(--e-global-typography-primary-font-size, 28px);
  font-weight: var(--e-global-typography-primary-font-weight, 600);
  line-height: var(--e-global-typography-primary-line-height, 1.1em);
  text-transform: uppercase;
}

.bar-page .bar-hero__intro {
  margin: 0.75em 0 0;
  color: #fff;
  font-family: var(--e-global-typography-d393c35-font-family, "LaFarge Book"), sans-serif;
  font-size: var(--e-global-typography-d393c35-font-size, 16px);
  line-height: var(--e-global-typography-d393c35-line-height, 1.2em);
}

.bar-page .bar-hero__intro > * {
  margin: 0;
}

.bar-page .bar-hero__intro > * + * {
  margin-top: 0.75em;
}

.bar-page .bar-hero__intro a {
  color: #fff;
  text-decoration: underline;
}

@media (min-width: 768px) {
  .bar-page .bar-hero {
    min-height: 640px;
  }

  .bar-page .bar-hero__img {
    object-position: center center;
  }

  .bar-page .bar-hero__inner {
    padding-inline: 30px;
  }
}

/* ---------- Sections ---------- */

.bar-page .bar-page__intro {
  border-style: solid;
  border-color: #396661;
  background-color: var(--e-global-color-secondary, #81c1b3);
  padding: 40px 20px;
}

.bar-page .bar-page__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 1260px;
  margin: 0 auto;
}

@media (min-width: 1025px) {
  .bar-page .bar-page__intro {
    padding: 50px 30px 96px;
  }
}

/* White cards: the happy hour box and the intro card. */
.bar-page .bar-card {
  padding: 16px;
  border: 1px solid var(--bar-card-border);
  border-radius: 24px;
  background: #fff;
  font-family: var(--bar-body-font);
  font-size: var(--e-global-typography-fb39187-font-size, 18px);
  line-height: var(--e-global-typography-fb39187-line-height, 1.2em);
}

.bar-page .bar-card__title {
  margin: 0;
  color: var(--bar-heading);
  font-family: var(--bar-heading-font);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.1;
  text-transform: none;
}

@media (min-width: 768px) {
  .bar-page .bar-card {
    padding: 32px;
  }

  .bar-page .bar-card__title {
    font-size: 32px;
  }
}

/* ---------- Tabs ---------- */

.bar-page .bar-tabs__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  border-radius: 50px;
  background: #fff;
}

.bar-page .bar-tabs__link {
  display: block;
  padding: 18px 24px;
  border-radius: 500px;
  color: var(--bar-navy);
  font-family: "LaFarge Bold", sans-serif;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.2s, color 0.2s;
}

.bar-page .bar-tabs__link:hover,
.bar-page .bar-tabs__link.is-current {
  background: var(--bar-navy);
  color: #fff;
}

/* ---------- Happy hour ---------- */

.bar-page .bar-happy-hour {
  width: min(550px, 100%);
  text-align: center;
}

.bar-page .bar-happy-hour__title {
  font-size: 21px;
}

.bar-page .bar-happy-hour__schedule {
  margin: 0.75em 0 0;
  font-family: "LaFarge Bold", var(--bar-body-font);
}

.bar-page .bar-happy-hour__offer {
  margin: 0.25em 0 0;
}

@media (min-width: 768px) {
  .bar-page .bar-happy-hour__title {
    font-size: 26px;
  }
}

/* ---------- Intro card + gallery ---------- */

.bar-page .bar-about {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.bar-page .bar-about__prose {
  margin-top: 1em;
}

.bar-page .bar-about__prose > * {
  margin: 0 0 1em;
}

.bar-page .bar-about__prose > :last-child {
  margin-bottom: 0;
}

.bar-page .bar-about__prose a {
  color: var(--bar-navy);
  text-decoration: underline;
}

.bar-page .bar-hours {
  margin-top: 1.5em;
}

.bar-page .bar-hours__list {
  margin: 0.75em 0 0;
  font-size: 16px;
}

.bar-page .bar-hours__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 1em;
  padding: 0.35em 0;
}

.bar-page .bar-hours__row dt,
.bar-page .bar-hours__row dd {
  margin: 0;
  font-weight: 400;
}

.bar-page .bar-hours__row dd {
  margin-left: auto;
  text-align: right;
}

@media (min-width: 1025px) {
  .bar-page .bar-about {
    flex-direction: row;
    align-items: flex-start;
  }

  .bar-page .bar-about__card {
    flex: 0 0 35%;
  }

  .bar-page .bar-about--no-gallery .bar-about__card {
    flex-basis: auto;
    width: min(800px, 100%);
    margin: 0 auto;
  }

  .bar-page .bar-gallery {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* ---------- Gallery ---------- */

.bar-page .bar-gallery {
  width: 100%;
}

.bar-page .bar-gallery__frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
}

/* Swipeable on its own; bar-gallery.js adds the buttons. */
.bar-page .bar-gallery__track {
  position: relative;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.bar-page .bar-gallery__track::-webkit-scrollbar {
  display: none;
}

.bar-page .bar-gallery__slide {
  position: relative;
  flex: 0 0 100%;
  height: 240px;
  scroll-snap-align: start;
}

.bar-page .bar-gallery__img {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
}

/* Above the stepped frame's SVG (z-index 1). */
.bar-page .bar-gallery__button {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--bar-navy);
  cursor: pointer;
  transform: translateY(-50%);
}

.bar-page .bar-gallery__button[hidden] {
  display: none;
}

.bar-page .bar-gallery__button:hover {
  background: var(--bar-navy);
  color: #fff;
}

.bar-page .bar-gallery__button--prev {
  left: 8px;
}

.bar-page .bar-gallery__button--next {
  right: 8px;
}

.bar-page .bar-gallery__button svg {
  width: 45%;
  height: 45%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

@media (min-width: 768px) {
  .bar-page .bar-gallery__slide {
    height: 610px;
  }

  .bar-page .bar-gallery__button {
    width: 60px;
    height: 60px;
  }
}

/* ---------- Special drinks ---------- */

.bar-page .bar-specials {
  border-style: solid;
  border-color: #f8a808;
  background-color: #f9efdb;
  padding: 50px 20px;
  text-align: center;
}

.bar-page .bar-specials__heading {
  margin: 0;
  color: var(--bar-heading);
  font-family: var(--e-global-typography-secondary-font-family, "LaFarge Medium"), sans-serif;
  font-size: var(--e-global-typography-secondary-font-size, 32px);
  font-weight: var(--e-global-typography-secondary-font-weight, 600);
  line-height: var(--e-global-typography-secondary-line-height, 1.1em);
}

.bar-page .bar-specials__intro {
  max-width: 680px;
  margin: 0 auto;
  font-family: var(--bar-body-font);
  font-size: var(--e-global-typography-fb39187-font-size, 18px);
  line-height: 1.3;
}

/* Flex rather than grid so a short last row (e.g. 3 drinks on desktop) is
 * centred; each card keeps its column width. */
.bar-page .bar-specials__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  width: 100%;
}

.bar-page .bar-specials__list > li {
  flex: 0 1 100%;
  min-width: 0;
}

/* Arch-topped white cards, like the homepage's. */
.bar-page .bar-specials__item {
  padding-bottom: 24px;
  border-radius: 300px 300px 0 0;
  background: #fff;
}

.bar-page .bar-specials__media {
  position: relative;
  overflow: hidden;
  border-radius: 300px 300px 0 0;
}

.bar-page .bar-specials__img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.bar-page .bar-specials__name {
  margin: 16px 16px 0;
  color: var(--bar-heading);
  font-family: "LaFarge Medium", sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.1;
}

.bar-page .bar-specials__description {
  margin: 8px 16px 0;
  font-family: "LaFarge Book", sans-serif;
  font-size: 16px;
  line-height: 1.2;
}

@media (min-width: 600px) {
  .bar-page .bar-specials__list > li {
    flex-basis: calc((100% - 24px) / 2);
  }
}

@media (min-width: 1025px) {
  .bar-page .bar-specials {
    padding: 90px 30px;
  }

  .bar-page .bar-specials__list > li {
    flex-basis: calc((100% - 3 * 24px) / 4);
  }

  .bar-page .bar-specials__name {
    font-size: 24px;
  }

  .bar-page .bar-specials__description {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bar-page .bar-tabs__link {
    transition: none;
  }
}
