
html {
  font-family: Baskervville, serif;
  letter-spacing: 0.10938rem;
  font-size: 1.4rem;
  color: #000000;
  -webkit-font-smoothing: antialiased;
  font-weight: 500;
}

body {
  margin: 0;
  padding: 0;
  background-color: #fffaf0;
}

.font-baskervville {
  font-family: "Baskervville", serif;
  font-weight: 300;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.125rem;
  font-size: 1.0625rem;
}

.box {
  display: grid;
  grid-template-columns: 1fr 2.3fr;
  min-height: 100vh;
}

.right {
  position: sticky;
}

.right img {
  width: 100%;
  height: 100vh;
  object-fit: cover;
}

.wrapper {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

.left {
  flex: 1 1 0;
  min-width: 470px;
  margin: 10% 8%;
  margin-left: 50px;
  display: flex;
  flex-direction: column;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 17px;
  max-height: 1000px;
  padding: 0;
}

.contact {
  margin-top: 50px;
}


#aboutHomeText {
  margin-top: 0;
}

.logo {
  margin-top: 20px;
  margin-bottom: 25px;
}

.logo > a > img {
  width: 302px;
  height: 64px;
}

a {
  text-decoration: none;
}

a.back {
  background: black;
  color: #fffaf0;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1rem;
}

.menu-nav {
  font-family: "Baskervville", serif;
  padding: 20px 40px 0 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}



.mySlides {
  display: none;
}

.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

/* Popup Styles */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 250, 240, 0.6);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.popup-content {
  background: #fffaf0;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  font-family: "Baskervville", serif;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
}

.popup-content h2 {
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.popup-content input {
  width: 90%;
  padding: 10px;
  margin: 10px 0;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.popup-content button {
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #000;
  color: #fffaf0;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
}

.popup-content button:hover {
  background-color: #333;
}

.order-buttons-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 45px;
}

.order-link {
  display: block;
}

.order-icon-only {
  height: 70px;
  width: auto;
  transition: transform 0.3s ease;
}

.order-icon-only:hover {
  transform: scale(1.1);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
}

.join-btn {
  font-family: "Baskervville", serif;
}

.subscribe-form {
  font-family: "Baskervville", serif;
}

.social-links {
  margin-top: 10px;
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
}

.social-icon {
  width: 30px;
  height: 30px;
  transition: transform 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.2);
}

/* Visually hidden but accessible to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Mobile Optimizations */
@media screen and (max-width: 768px) {
  .box {
    display: flex;
    flex-direction: column;
  }

  .left {
    margin: 20px;
    min-width: unset;
    padding: 0 10px;
  }

  .content {
    align-items: center;
  }

  .right img {
    height: auto;
    max-height: 50vh;
  }

  .logo > a > img {
    width: 80%;
    height: auto;
  }

  .font-baskervville {
    font-size: 1rem;
    letter-spacing: 0.05rem;
  }

  .desc {
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
  }

  .menu {
    margin-bottom: 10px;
  }

  .wrapper {
    position: static;
    overflow: visible;
  }

  .right {
    position: static;
  }

  .contact p {
    font-size: 1rem;
    text-align: center;
  }

  .popup-content {
    width: 90%;
  }

  .social-links {
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
  }
  
  .social-icon {
    width: 40px;
    height: 40px;
  }
  
}

/* === Mobile menu overflow fix (applied via style.css) === */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { overflow-x: hidden; }

@media (max-width: 600px) {
  /* Beat inline <style> rules with higher specificity + !important */
  html body .menu-container {
    display: grid !important;
    grid-template-columns: 1fr !important; /* prevent min 350px track from overflowing */
    gap: 16px !important;
    padding: 16px !important;
  }
  html body .menu-section {
    padding: 0 16px !important;
    margin-top: 24px !important;
  }
  html body .menu-card {
    width: auto !important;
    max-width: 100% !important;
    float: none !important;
    clear: both !important;
    display: block !important;
  }
  /* Prevent child content pushing card wider than viewport in Safari */
  html body .menu-card > * { min-width: 0 !important; }
  /* Ensure images never widen cards */
  html body .menu-card img { max-width: 100% !important; height: auto; display: block; }
}
/* === End Mobile menu overflow fix === */

/* Sandwich cards: if there's only one image, make it full-width */
.menu-images > img:only-child { 
  width: 100%;
  display: block;   /* avoids inline whitespace */
}

/* If you ever use <picture>, cover that too */
.menu-images > picture:only-child img {
  width: 100%;
  display: block;
}

/* Images fill the card width and never overflow */
.menu-card img,
.menu-img-single {
  display: block;        /* removes inline gaps */
  width: 100%;
  max-width: 100%;
  height: auto;          /* natural aspect ratio */
}

/* Guard against flex/grid overflow on iOS Safari */
.menu-card > * { min-width: 0; }

/* Show full image; may add padding bars */
html body .menu-img-single,
html body .menu-images > img {
  width: 100%;
  height: 220px;        /* or 240–260px if you want it taller */
  object-fit: contain;  /* no cropping */
  background: #fff;     /* matches your card background */
  display: block;
}

/* Keep single-image cards from reserving "second image" space */
.menu-images > img:only-child { width: 100%; }

/* Make sure nothing overflows the card */
.menu-card > * { min-width: 0; }

/* === Cold Drinks flavour grids === */
.menu-images.flavours-4,
.menu-images.flavours-3 {
  display: grid !important;         /* override inline flex in menu.html */
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: auto;
}

.menu-images.flavours-4 img,
.menu-images.flavours-3 img {
  width: 100%;
  height: 180px;                    /* same visual height as other cards */
  object-fit: cover;                /* fills cell without distortion */
  display: block;
  border-radius: 10px;
}

/* Single-image menu-images stays full-width, no leftover gap */
.menu-images > img:only-child { width: 100%; }

/* === Dalston's 5-flavour grid === */
.menu-images.flavours-5 {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: auto;
}
.menu-images.flavours-5 img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

/* Optional: 3 columns on wider screens for a tidier last row */
@media (min-width: 700px) {
  .menu-images.flavours-5 { grid-template-columns: repeat(3, 1fr); }
}

/* --- Stop cold-drinks images overflowing on phones --- */
*,
*::before,
*::after { box-sizing: border-box; }

/* Safety net; real fix is below */
html, body { overflow-x: hidden; }

/* Make the multi-image wrappers fit the card */
.menu-images.flavours-3,
.menu-images.flavours-4,
.menu-images.flavours-5 {
  width: 100% !important;
  display: grid !important;            /* beats inline styles */
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  overflow: hidden;                     /* clip any stray overflow */
}

/* Images scale to their grid cells (override 50% rules from inline CSS) */
.menu-images.flavours-3 img,
.menu-images.flavours-4 img,
.menu-images.flavours-5 img {
  width: 100% !important;
  max-width: 100% !important;
  height: 180px;                        /* keep consistent card height */
  object-fit: cover;                    /* fill cell, no distortion */
  display: block;
  border-radius: 10px;
}

/* Prevent grid/flex min-content bugs (iOS Safari) */
.menu-card,
.menu-card > * { min-width: 0 !important; }

/* Tighten the overall grid on small screens so cards never exceed viewport */
@media (max-width: 600px) {
  .menu-container {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 16px !important;
  }
  .menu-section { padding: 0 16px !important; }
}

/* Optional: nicer layout on wider screens */
@media (min-width: 700px) {
  .menu-images.flavours-3 { grid-template-columns: repeat(3, 1fr); }
  .menu-images.flavours-5 { grid-template-columns: repeat(3, 1fr); }
}

/* --- Cold Drinks: prevent overflow on phones --- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { overflow-x: hidden; }

/* 1) Contain the flavour grids to the card width */
html body .menu-card .menu-images {
  width: 100% !important;
  max-width: 100% !important;
  display: grid !important;                 /* beat any inline/fallback styles */
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* minmax(0,1fr) fixes Safari min-content overflow */
  gap: 10px;
  overflow: hidden;                          /* clip anything stray */
}

/* 2) Images fill their grid cell; never exceed card */
html body .menu-card .menu-images img {
  display: block !important;
  width: 100% !important;                    /* overrides any 50% rules */
  max-width: 100% !important;
  height: 180px;                              /* match your card look; adjust if you like */
  object-fit: cover;                          /* no distortion; no overflow */
  border-radius: 10px;
}

/* 3) Stop children from forcing the card wider (iOS Safari) */
html body .menu-card,
html body .menu-card > *,
html body .menu-card .menu-images,
html body .menu-card .menu-images > * { min-width: 0 !important; }

/* 4) Tighten the main menu grid on small screens so cards never exceed viewport */
@media (max-width: 600px) {
  html body .menu-container {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
    padding: 16px !important;
  }
  html body .menu-section { padding: 0 16px !important; }
}

/* Optional: nicer layout for odd image counts on wider screens */
@media (min-width: 700px) {
  .menu-images.flavours-3,
  .menu-images.flavours-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

