/* ===================================
   MENU PAGE SPECIFIC STYLES
   =================================== */
@font-face {
  font-family: "Soulcraft";
  src: url("../fonts/soulcraftgx.ttf");
}

@font-face {
  font-family: "Bilo, sans-serif";
  src: url("../fonts/bilo.otf");
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--dl-color-menu-white);
  overscroll-behavior-y: contain;
}

/* Menu Main Content */
.menu-main {
  display: flex;
  align-self: stretch;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  background-color: var(--dl-color-menu-mercury);
  padding: 32px 0 48px;
}

.menu-container {
  gap: 40px;
  width: 1140px;
  max-width: 100%;
  display: flex;
  padding: 32px 32px 48px;
  align-items: center;
  flex-shrink: 0;
  flex-direction: column;
  margin-top: 80px;
}


/* Menu Grid */
.menu-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 30px;
  position: relative;
}

.menu-item {
  width: 100%;
  display: flex;
  padding: 30px 10px 0 0;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
}

.menu-card {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  height: 256.84px;
  display: flex;
  align-self: stretch;
  box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.2);
  align-items: flex-start;
  flex-direction: column;
  background-color: var(--dl-color-menu-white);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.menu-card:hover {
  transform: translateY(-5px);
  box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.15);
}

.menu-image {
  width: 100%;
  height: 211.66px;
  display: flex;
  overflow: hidden;
  position: relative;
  align-self: stretch;
  align-items: flex-start;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat; 
}

.menu-label {
  display: flex;
  padding: 9px 10px 10px;
  align-self: stretch;
  align-items: flex-start;
  flex-shrink: 0;
  justify-content: center;
  background-color: var(--dl-color-menu-white);
}

.menu-title {
  color: var(--dl-color-menu-black);
  font-size: 19px;
  line-height: 25.2px;
  text-align: center;
  margin: 0;
  font-size: 18px;
  font-family: "soulcraft";
  font-weight: 400;
  color: #000;
}

/* Allergen Info */
.allergen-info {
  display: flex;
  position: relative;
  align-self: center;
  align-items: flex-start;
  padding-top: 20px;
}

.allergen-text {
  color: var(--dl-color-menu-black);
  font-size: 13.8px;
  font-family: Inter;
  font-weight: 300;
  line-height: 24px;
  text-align: left;
  max-width: 1050px;
}

.allergen-link {
  color: rgba(169, 21, 35, 1);
  font-size: 14.6px;
  font-family: Inter;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(169, 21, 35, 1);
  transition: color 0.3s ease;
}

.allergen-link:hover {
  color: rgba(190, 30, 45, 1);
}

/* Responsive Design */
@media (max-width: 1100px) {
  .menu-container {
    margin-top: 10px;
  }
}

@media (max-width: 991px) {
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 25px;
  }
  
  .menu-container {
    width: 100%;
    padding: 32px 24px 48px;
  }
}

@media (max-width: 1100px) {
  .menu-main {
    margin-top: 0;
  }
}


@media (max-width: 767px) {
  .menu-grid {
    grid-template-columns: repeat(1, 1fr);
    grid-gap: 30px;
  }

  .menu-container {
    padding: 24px 30px 40px;
  }

  .menu-item {
    padding: 20px 5px 0 0;
  }

  .menu-card {
    min-height: 44px;
    height: auto;
  }

  .menu-details {
    animation-duration: 0.3s;
  }
  
  .menu-title {
    font-size: 16px;
  }

  .allergen-text {
    font-size: 16px;
  }
}

@media (max-width: 479px) {
  .menu-grid {
    grid-template-columns: 1fr;
    grid-gap: 15px;
  }

  .menu-container {
    padding: 20px 12px 32px;
  }

  .menu-item {
    padding: 15px 0 0 0;
  }

  .menu-image {
    height: 200px;
  }

  .menu-title {
    font-size: 18px;
  }
}

/* .menu-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 30px;
  position: relative;
}
 */

/* Expanded Menu Expansion Item */
.menu-item.expanded .menu-card {
  transform: translateY(-5px);
  box-shadow: 0px 4px 12px 0px rgba(169, 21, 35, 0.3);
  border: 2px solid rgba(169, 21, 35, 0.5);
}

/* Menu Details Section - spans full width and creates new row */
.menu-details {
  grid-column: 1 / -1; /* Span all columns */
  width: 100%;
  margin: 0;
  animation: slideDown 0.3s ease-out;
  overflow: hidden;
  /* Prevent flickering during scroll */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-10px) translateZ(0);
  }
  to {
    opacity: 1;
    max-height: 2000px;
    transform: translateY(0) translateZ(0);
  }
}

/* The menupopup6 container */
.details-content {
  width: 100%;
  display: flex;
  overflow: hidden;
  position: relative;
  align-items: flex-start;
  flex-shrink: 0;
  border-color: #690001;
  border-style: solid;
  border-width: 1px;
  flex-direction: row;
  flex-wrap: wrap;
  background-color: var(--dl-color-menu-white);
  min-height: 234px;
}

/* Individual item boxes */
.details-item {
  width: 33.333%;
  min-height: 233px;
  display: flex;
  padding: 29.4px 30.8px 30.8px 30px;
  position: relative;
  align-items: center;
  flex-shrink: 0;
  border-color: rgba(230, 230, 230, 1);
  border-style: solid;
  border-width: 0 0.8px 0.8px 0;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--dl-color-menu-white);
  box-sizing: border-box;
}

/* Remove right border on last item of each row */
.details-item:nth-child(3n) {
  border-right: none;
}

/* Item content wrapper */
.item-content-wrapper {
  display: flex;
  padding: 0 0 20px;
  align-items: center;
  flex-direction: column;
}

.item-inner-container {
  gap: 16px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

/* Item heading */
.item-heading {
  display: flex;
  align-self: stretch;
  align-items: center;
  flex-direction: column;
}

.item-name {
  color: var(--dl-color-menu-black);
  height: auto;
  text-align: center;
  line-height: 21.6px;
  font-size: 16.5px;
  font-style: normal;
  font-family: Inter;
  font-weight: 500;
  font-stretch: normal;
  letter-spacing: 0em;
}

/* Item description */
.item-description-wrapper {
  display: flex;
  align-self: stretch;
  align-items: center;
  flex-direction: column;
}

.item-description {
  color: var(--dl-color-menu-black);
  height: auto;
  font-size: 14.1px;
  font-style: normal;
  text-align: center;
  font-family: Inter;
  font-weight: 300;
  line-height: 24px;
  font-stretch: normal;
  text-decoration: none;
}

/* Start Order button - adapted from component style */
.add-to-order {
  display: flex;
  padding: 13.9px 24.8px 11.7px;
  overflow: hidden;
  align-items: center;
  border-color: rgba(105, 0, 1, 1);
  border-style: solid;
  border-width: 0.8px 0.8px 0;
  border-radius: 4px;
  flex-direction: column;
  justify-content: center;
  background-color: var(--dl-color-menu-funred);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.add-to-order:hover {
  background-color: rgba(120, 0, 1, 1);
}

.button-text {
  color: var(--dl-color-menu-white);
  height: auto;
  text-align: center;
  line-height: 16.2px;
  font-size: 12.5px;
  font-style: normal;
  font-family: Inter;
  font-weight: 700;
  font-stretch: normal;
  letter-spacing: 0em;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .details-item {
    width: 50%;
  }

  .details-item:nth-child(3n) {
    border-right: 0.8px solid rgba(230, 230, 230, 1);
  }

  .details-item:nth-child(2n) {
    border-right: none;
  }
}

@media (max-width: 767px) {
  .details-item {
    width: 50%;
    padding: 20px;
    min-height: 200px;
  }

  .item-name {
    font-size: 15px;
  }

  .item-description {
    font-size: 13px;
  }
}

@media (max-width: 479px) {
  .details-item {
    width: 100%;
    border-right: none;
  }

  .details-item:nth-child(3n),
  .details-item:nth-child(2n) {
    border-right: none;
  }

  .item-name {
    font-size: 14px;
  }

  .item-description {
    font-size: 12px;
  }
}

@media (max-width: 767px) {
  .menu-grid {
    grid-template-columns: repeat(1, 1fr);
    grid-gap: 12px; /* reduce gaps like screenshot */
  }

  .menu-item {
    padding: 0;
  }

  .menu-card {
    height: auto;
    border-radius: 8px;
    overflow: hidden;
  }

  .menu-image {
    height: 300px; 
  }

  .menu-title {
    font-size: 15px;
  }
}

.menu-mobile {
  display: none;
}

@media (max-width: 768px) {
  .menu-mobile {
    display: block;
    position: sticky;
    top: 0;
    background: white;
    padding: 10px 0;
    overflow-x: auto;
    white-space: nowrap;
    z-index: 20;
  }

  .mobile-tabs button {
    display: inline-block;
    margin: 0 8px;
    padding: 10px 16px;
    border-radius: 30px;
    font-weight: 600;
    background: #f5f5f5;
    border: none;
    font-size: 15px;
    font-family: "soulcraft";
    font-weight: 400;
    color: #000;
  }

  .mobile-tabs .active {
    background: #cc0000;
    color: #fff;
  }

  /* Hide all items by default */
  .menu-item {
    display: none;
  }

  /* Show only filtered ones */
  .menu-item.show {
    display: block;
  }

  .allergen-info {
    margin-top: 150px;
}
  .allergen-text {
    font-size: 0.75rem;
  }

  .allergen-link {
    font-size: 0.75rem;
  }
  
}
