/* ==========================================================================
   site-fixes.css
   Repairs applied on top of the archived Squarespace stylesheet.
   Loaded last so it wins on specificity ties.
   ========================================================================== */

/* 1. Horizontal overflow ------------------------------------------------
   A few absolutely-positioned and 100vw elements spill past the viewport,
   which produces a sideways scroll on phones and shrinks the layout. */
html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;   /* stop iOS inflating text in landscape */
  text-size-adjust: 100%;
}
body {
  overflow-x: hidden;
  max-width: 100%;
}

/* 2. Media never exceeds its container ----------------------------------
   Squarespace sets inline max-width from the original asset size (some as
   large as 14868px). Those win once the CMS JS is absent, so images
   overflow on small screens. */
img, video, canvas, iframe, embed, object,
svg:not(.Icon):not([class*="Icon--"]) {
  max-width: 100%;
}
img, video { height: auto; }

/* The rule above must not shrink the UI sprite - the theme sizes those. */
.Icon { max-width: none; }

/* 3. Responsive embeds --------------------------------------------------- */
.sqs-block-embed iframe,
.embed-block iframe,
.video-block iframe,
.sqs-video-wrapper iframe { width: 100%; }

.fluid-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}
.fluid-embed > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 4. Long strings -------------------------------------------------------- */
p, li, dd, h1, h2, h3, h4, h5, h6, .sqs-block-content {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* 5. Tables -------------------------------------------------------------
   No responsive table handling existed; let wide tables scroll in place. */
.sqs-block-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 6. Mobile navigation overlay -----------------------------------------
   The menu panel was overflow:hidden, so on short screens and in landscape
   the lower nav items were unreachable with no way to scroll to them. */
.Mobile-overlay-menu {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.Mobile-overlay-menu-main,
.Mobile-overlay-folder {
  max-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Touch targets. The theme ships 8px padding on the bar buttons, well under
   the 44px minimum, which makes the menu fiddly to hit. */
.Mobile-bar-menu,
.Mobile-bar-search,
.Mobile-overlay-close {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.Mobile-overlay-nav-item,
.Mobile-overlay-folder-item { min-height: 44px; }

/* Stop the page behind the overlay from scrolling while it is open. */
.is-mobile-overlay-active,
.is-mobile-overlay-active body { overflow: hidden; }

/* 7. Mobile bar / desktop header switch ---------------------------------
   The theme leaves this to the Squarespace runtime, so without it both
   headers can render at once. Pin it to the 640px breakpoint the rest of
   the stylesheet already uses. */
@media screen and (max-width: 640px) {
  .Header--top, .Header--bottom { display: none; }
  .Mobile { display: block; }
}
@media screen and (min-width: 641px) {
  .Mobile { display: none; }
}

/* 8. Small-screen spacing ----------------------------------------------
   Full-bleed sections were built for desktop gutters and leave text
   touching the screen edge below 480px. */
@media screen and (max-width: 480px) {
  .Index-page-content,
  .Main--page .sqs-layout,
  .Content-outer {
    padding-left: 6vw;
    padding-right: 6vw;
  }
  .sqs-block-button-element {
    display: block;
    width: 100%;
    text-align: center;
  }
}

/* 9. Forms --------------------------------------------------------------
   iOS zooms the page when a focused input has a font-size under 16px. */
input[type="text"], input[type="email"], input[type="tel"],
input[type="number"], input[type="search"], input[type="password"],
select, textarea {
  font-size: max(16px, 1em);
  max-width: 100%;
}

/* 10. Accessibility ------------------------------------------------------ */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

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

/* ==========================================================================
   PART 2 - layout repairs for the dead Squarespace runtime
   Everything below compensates for behaviour the CMS JS used to apply at
   runtime. Without it these elements were unsized, unpositioned or hidden.
   ========================================================================== */

/* 11. Section hero images ------------------------------------------------
   ImageLoader used to set width/height/object-fit inline from the image's
   focal point. With it gone the images rendered at intrinsic ratio - the
   homepage hero was 1440x3240 inside a 900px-tall section. */
.Index-page-image,
.sqs-video-background {
  overflow: hidden;
}

.Index-page-image > img,
.Index-page-image .sqs-video-background img,
.sqs-video-background > img,
img.custom-fallback-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  max-width: none;
}

/* The loader also added .loaded to fade these in. They are marked loaded in
   the markup now; this is the belt-and-braces version. */
.Index-page-image {
  opacity: 1;
}

/* 13. Column grid --------------------------------------------------------
   The theme jumps straight from full-width stacked at 640px to the desktop
   grid at 641px, so a 4-across row was cramped on tablets. Give the range
   641-960px a two-up layout, then let the real grid take over. */
@media screen and (min-width: 641px) and (max-width: 960px) {
  .sqs-layout .sqs-row > .sqs-col-1,
  .sqs-layout .sqs-row > .sqs-col-2,
  .sqs-layout .sqs-row > .sqs-col-3,
  .sqs-layout .sqs-row > .sqs-col-4,
  .sqs-layout .sqs-row > .sqs-col-5 {
    width: 50%;
  }
  .sqs-layout .sqs-row > .sqs-col-7,
  .sqs-layout .sqs-row > .sqs-col-8,
  .sqs-layout .sqs-row > .sqs-col-9,
  .sqs-layout .sqs-row > .sqs-col-10,
  .sqs-layout .sqs-row > .sqs-col-11 {
    width: 100%;
  }
}

/* Floated columns need their row cleared, otherwise the next row rides up
   into the gap left by unequal column heights. */
.sqs-layout .sqs-row::after {
  content: "";
  display: block;
  clear: both;
}

/* 14. Index section sizing ----------------------------------------------
   Sections were given a fixed viewport height by JS. Let short sections
   size to their content instead of clipping it on small screens. */
.Index-page {
  min-height: 100vh;
  height: auto;
}

@media screen and (max-width: 640px) {
  .Index-page {
    min-height: 70vh;
  }
  .Index-page-content {
    padding-top: 80px;
    padding-bottom: 60px;
  }
}

/* 15. Header ------------------------------------------------------------- */
@media screen and (max-width: 960px) and (min-width: 641px) {
  .Header-nav-item {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.9em;
  }
}

/* 16. Current-page indicator --------------------------------------------
   The nav had no active state once the CMS stopped injecting one. */
.Header-nav-item--active {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.Mobile-overlay-nav--primary .Mobile-overlay-nav-item--active {
  font-weight: 700;
  opacity: 1;
}

.Mobile-overlay-nav--primary .Mobile-overlay-nav-item--active::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 10px;
  vertical-align: middle;
  background: currentColor;
}

/* 17. Footer -------------------------------------------------------------
   The business info row was a JS-managed flex layout; it collapsed to a
   run-on line of text without it. */
.Footer-business-info,
.Footer-business-hours {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  align-items: baseline;
  justify-content: center;
}

@media screen and (max-width: 640px) {
  .Footer-business-info,
  .Footer-business-hours {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  .Footer-blocks,
  .Footer-inner {
    padding-left: 6vw;
    padding-right: 6vw;
  }
}

/* 18. Social icon rows --------------------------------------------------- */
.SocialLinks,
.sqs-svg-icon--list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.sqs-svg-icon--wrapper svg {
  width: 28px;
  height: 28px;
}

/* 19. Gallery / index nav ------------------------------------------------ */
@media screen and (max-width: 640px) {
  .Index-nav {
    display: none;               /* dot rail overlapped content on phones */
  }
}

/* 20. Load-effect gates -------------------------------------------------
   The theme hides large parts of the page at opacity:0 and relies on the
   Squarespace SiteLoader to add a `loaded` class once boot finishes. That
   never happens here, so the entire header, the galleries and the intro
   images stayed invisible. The markup now carries `loaded`; this is the
   safety net for anything the markup pass did not reach. */
.enable-load-effects .Header [data-nc-container],
.enable-load-effects .Index-page-image,
.enable-load-effects .Index-gallery,
.enable-load-effects .Intro-image,
.enable-load-effects .sqs-system-gallery {
  opacity: 1;
}

.sqs-gallery-block-grid img:not(.loaded),
.eventlist-column-thumbnail img:not(.loaded),
.ProductList-image:not(.loaded),
.ProductItem-gallery-slides-item-image:not(.loaded),
.ProductItem-gallery-thumbnails-item img:not(.loaded),
.ProductItem-relatedProducts-image:not(.loaded) {
  opacity: 1;
}

/* Scaled-text blocks were hidden entirely until the sizing script ran. */
.sqs-block-html .sqs-html-content .sqsrte-scaled-text-container:not(.loaded) * {
  visibility: visible;
  opacity: 1;
}

/* The page-load progress bar never completes, so it sat across the top. */
.Loader {
  display: none;
}

/* 21. Header slot spacing -----------------------------------------------
   With the ancillary elements placed statically, the branding slot sits
   flush against the nav slot. Give the three slots breathing room and stop
   the nav from growing into its neighbours. */
.Header-inner {
  gap: 24px;
  padding-left: 24px;
  padding-right: 24px;
}

.Header-inner > [data-nc-container] {
  min-width: 0;
}

.Header-inner > [data-nc-container="bottom-center"],
.Header-inner > [data-nc-container="top-center"] {
  flex: 1 1 auto;
  justify-content: center;
}

.Header-nav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
}

@media screen and (max-width: 1100px) and (min-width: 641px) {
  .Header-inner {
    gap: 12px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .Header-branding-logo {
    max-width: 150px;
  }
}

/* 22. Mobile bar ---------------------------------------------------------
   Three icons now share the top-right slot; keep them evenly spaced and
   the branding from crowding them. */
.Mobile-bar-inner,
.Mobile-bar > [data-nc-container] {
  gap: 4px;
}

.Mobile-bar-branding-logo {
  max-width: 84px;
  height: auto;
}
