:root {
  --cw-gap: 20px !important;
  --cw-navbar-height: 60px !important;
}

@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400&display=swap");

/* =========================================================
   GLOBAL SAFETY: reduce zoom/swap jitter
   ========================================================= */
.caterwize-images-section a,
.cw-slideshow,
.cw-mobile-slideshow {
  display: block !important;
  line-height: 0 !important;
}

.caterwize-images-section img,
.cw-mobile-slideshow img {
  display: block !important;
  max-width: 100% !important;
}

/* =========================================================
   HIDE MOBILE-ONLY BUTTONS ON DESKTOP
   ========================================================= */
.caterwize-categories-mobile-buttons,
.caterwize-view-all-mobile,
.caterwize-arrow-left-mobile,
.caterwize-arrow-right-mobile {
  display: none !important;
}

.pt-4 {
  text-align: center !important;
}

/* =========================================================
   HERO IMAGES SECTION (DESKTOP) — matches your screenshot
   3 columns: Left stack, Center tall, Right stack
   ========================================================= */
.caterwize-images-section {
  margin-top: 20px !important;
  margin-left: 5% !important;
  margin-right: 5% !important;
}

/* Hard-lock the center track so it never grows on swap/zoom */
.caterwize-images-row {
  display: grid !important;
  grid-template-columns: 1fr minmax(465px, 465px) 1fr !important;
  column-gap: var(--cw-gap) !important;
  align-items: start !important;
}

/* Left & right columns: two equal tiles */
.caterwize-column {
  display: grid !important;
  grid-template-rows: 300px 300px !important;
  row-gap: var(--cw-gap) !important;
  min-width: 0 !important;
}

/* Center column: one tall tile (2 * 300 + gap) */
.caterwize-images-row > .caterwize-column:nth-child(2) {
  grid-template-rows: calc(600px + var(--cw-gap)) !important;
  width: 465px !important;
  min-width: 465px !important;
  max-width: 465px !important;
}

/* Wrapper fills the cell, acts as the sizing box */
.cw-slideshow,
.caterwize-column > a {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  border-radius: 8px !important;
  line-height: 0 !important;
}

/* Images are paint-only: absolute fill prevents layout shifts on swap */
.cw-slideshow img,
.caterwize-column > a > img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important; /* switch to contain if you want no text cropping */
  object-position: center center !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 10px rgba(0, 0, 0, 0.3) !important;
  transition: transform 0.7s ease, box-shadow 0.7s ease !important;
  transform: translateZ(0) !important;
}

/* Hover */
.caterwize-img-left:hover,
.caterwize-img-right:hover,
.caterwize-img-center:hover {
  transform: scale(1.05) translateZ(0) !important;
  box-shadow: 0 12px 15px rgba(0, 0, 0, 0.4) !important;
}

/* Desktop: hide mobile slideshow */
.caterwize-images-mobile {
  display: none !important;
}
.cw-mobile-slideshow {
  display: none !important;
}
.caterwize-img-mobile {
  width: 100% !important;
  height: 250px !important;
  object-fit: cover !important;
  border: none !important;
  box-shadow: none !important;
  transition: none !important;
}

/* =========================================================
   HERO IMAGES SECTION (MOBILE)
   ========================================================= */
@media (max-width: 768px) {
  .caterwize-images-section {
    display: none !important;
  }

  .caterwize-images-mobile {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: inherit !important;
  }

  /* show mobile-only buttons on mobile */
  .caterwize-categories-mobile-buttons,
  .caterwize-view-all-mobile,
  .caterwize-arrow-left-mobile,
  .caterwize-arrow-right-mobile {
    display: block !important;
  }

  .cw-mobile-slideshow {
    display: block !important;
    width: 100% !important;
    line-height: 0 !important;
    position: relative !important;
    overflow: hidden !important;
  }

  .cw-mobile-slideshow img {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 250px !important;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: translateZ(0) !important;
  }
}

/* =========================================================
   CATEGORIES SECTION
   ========================================================= */
.caterwize-categories-section {
  margin-top: 20px !important;
}

.caterwize-categories-header {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 20px !important;
  user-select: none !important;
}

.caterwize-view-all,
.caterwize-arrow-left,
.caterwize-arrow-right {
  background: #00569f !important;
  color: #fff !important;
  border: none !important;
  border-radius: 5px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  padding: 8px 12px !important;
  font-family: "Montserrat", sans-serif !important;
  cursor: pointer !important;
  transition: transform 0.2s ease !important;
  user-select: none !important;
}

.caterwize-arrow-right {
  margin-right: 5% !important;
}

.caterwize-view-all:hover,
.caterwize-arrow-left:hover,
.caterwize-arrow-right:hover {
  transform: scale(0.95) !important;
}

.caterwize-categories-container {
  display: flex !important;
  overflow-x: scroll !important;
  gap: var(--cw-gap) !important;
  padding-bottom: 60px !important;
  padding-inline: 5% !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  cursor: grab !important;
  user-select: none !important;
  padding-top: 3px !important;
}

.caterwize-categories-container::-webkit-scrollbar {
  display: none !important;
}
.caterwize-categories-container.active {
  cursor: grabbing !important;
}

.caterwize-cat-box {
  position: relative !important;
  width: 240px !important;
  height: 240px !important;
  flex: 0 0 auto !important;
  background: #fff !important;
  border-radius: 8px !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3) !important;
  transition: transform 0.7s ease, box-shadow 0.7s ease !important;
  text-align: center !important;
  overflow: hidden !important;
  aspect-ratio: 1/1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
  user-select: none !important;
}

.caterwize-cat-box:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 12px 15px rgba(0, 0, 0, 0.4) !important;
}

.caterwize-cat-box img {
  height: 150px !important;
  width: auto !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  display: block !important;
}

.cat-name {
  font-family: "Montserrat", sans-serif !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  text-transform: uppercase !important;
  color: #444 !important;
  padding: 10px !important;
  line-height: 1.2 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  user-select: none !important;
}

.cw-cat-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  z-index: 2 !important;
  cursor: pointer !important;
}

/* =========================================================
   CATEGORIES (MOBILE)
   ========================================================= */
@media (max-width: 768px) {
  /* hide desktop buttons on mobile */
  .caterwize-categories-header .caterwize-view-all,
  .caterwize-categories-header .caterwize-arrow-left,
  .caterwize-categories-header .caterwize-arrow-right {
    display: none !important;
  }

  .caterwize-categories-header {
    justify-content: center !important;
  }

  .caterwize-categories-section {
    flex-direction: column !important;
    align-items: center !important;
  }

  .custom-welcome-category {
    order: 0 !important;
    width: 100% !important;
    text-align: center !important;
    padding: 0 5% !important;
  }

  .caterwize-categories-container {
    order: 1 !important;
    width: 100% !important;
    padding: 0 !important;
    gap: var(--cw-gap) !important;
    overflow-x: auto !important;
    padding-bottom: 10px !important;
    padding-inline: 5% !important;
  }

  /* show mobile buttons on mobile */
  .caterwize-categories-mobile-buttons {
    order: 2 !important;
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
    margin: 10px 0 !important;
  }

  .caterwize-categories-mobile-buttons .caterwize-view-all-mobile,
  .caterwize-categories-mobile-buttons .caterwize-arrow-left-mobile,
  .caterwize-categories-mobile-buttons .caterwize-arrow-right-mobile {
    background: #00569f !important;
    color: #fff !important;
    border: none !important;
    border-radius: 5px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    padding: 8px 12px !important;
    font-family: "Montserrat", sans-serif !important;
    cursor: pointer !important;
  }

  .caterwize-cat-box {
    flex: 0 0 45% !important;
    width: 45% !important;
    height: auto !important;
    aspect-ratio: 1/1 !important;
    margin-bottom: var(--cw-gap) !important;
  }

  .caterwize-cat-box img {
    height: 100px !important;
    width: auto !important;
    object-fit: contain !important;
  }

  .cat-name {
    font-size: 12px !important;
    text-align: center !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    overflow: hidden !important;
    white-space: normal !important;
    text-overflow: ellipsis !important;
  }
}

/* =========================================================
   RESPONSIVE: SMALLER 12" LAPTOPS (no stacking, keep 3 columns)
   ========================================================= */
@media (min-width: 769px) and (max-width: 1280px) {
  .caterwize-images-row {
    grid-template-columns: 1fr minmax(275px, 275px) 1fr !important;
  }

  .caterwize-column {
    grid-template-rows: 170px 170px !important;
  }

  .caterwize-images-row > .caterwize-column:nth-child(2) {
    grid-template-rows: calc(340px + var(--cw-gap)) !important;
    min-width: 275px !important;
    max-width: 275px !important;
    width: 275px !important;
  }
}

/* =========================================================
   RESPONSIVE: SMALLER 14" LAPTOPS (no stacking, keep 3 columns)
   ========================================================= */
@media (min-width: 1280px) and (max-width: 1600px) {
  .caterwize-images-row {
    column-gap: 15px !important;
    grid-template-columns: 1fr minmax(400px, 400px) 1fr !important;
  }

  .caterwize-column {
    grid-template-rows: 180px 180px !important;
  }

  .caterwize-images-row > .caterwize-column:nth-child(2) {
    grid-template-rows: calc(360px + var(--cw-gap)) !important;
    min-width: 400px !important;
    max-width: 400px !important;
    width: 400px !important;
  }

  .caterwize-cat-box {
    width: 200px !important;
    height: 200px !important;
  }

  .cat-name {
    font-size: 16px !important;
  }

  .custom-welcome-category {
    width: 75% !important;
  }
}