@import "color_palette.css";

/*==============================
  Global Utility
==============================*/
:root {
  --menuItemFontSize: 1.125rem;
  --menuTitleSize: 2.5rem;
  --menuDescSize: 0.875rem;
  --menuPriceSize: 1.3rem;
  --menuImageWidth: 430px;
  --menuImageHeight: 470px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  scroll-padding-top: 60px;
  /* Account for sticky top nav if any */
  font-family: 'Libre Baskerville', serif;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/*==============================
  Menu Section
==============================*/
.menu-category-wrapper {
  position: sticky;
  top: 60px;
  z-index: 999;
  background-color: rgb(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  padding: 0.5em 0;
}

.menu-category ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.25em;
  padding: 0;
  margin: 0;
  list-style: none;
}


.menu-category ul li {
  position: relative;
  font-size: var(--menuItemFontSize);
  color: var(--secondaryAccent);
  font-style: italic;
  cursor: pointer;
  padding: 1.25em 0.5em;
  transition: color 0.3s ease;
  display: flex;
  align-items: flex-end;
  gap: 0.6em;
}

.menu-category ul li.selected-category {
  color: var(--secondary);
  font-style: normal;
  font-weight: 600;
}

.selected-category .selected-line {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 2px;
  width: 100%;
  background-color: var(--secondary);
}

.hover-category::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  width: 100%;
  height: 2px;
  background-color: var(--secondary);
  transition: transform 0.3s ease;
}

.hover-category:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.hover-category:hover {
  color: var(--secondary);
}

/*==============================
  Menu Wrapper
==============================*/
.menu-wrapper {
  display: flex;
  align-items: flex-start;
  position: relative;
  margin-top: 2em;
  gap: 2em;
  padding: 0 2em;
  flex-wrap: nowrap;
  /* prevent wrapping */
}

.menu-image-container {
  position: sticky;
  top: 155px;
  width: var(--menuImageWidth);
  height: var(--menuImageHeight);
  flex-shrink: 0;
  /* Do not shrink */
  z-index: 998;
  /* Stay above background if needed */
}


.menu-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 4px solid var(--sectionBackground);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  display: block;
}

/*==============================
  Menu Grid
==============================*/
.menu {
  flex-grow: 1;
  display: grid;
  grid-template-columns: 3fr 1fr;
  border-top: 1px solid var(--headerBackground);
  margin-bottom: 2em;
}

.item-name,
.item-price {
  border-bottom: 1px solid var(--headerBackground);
}

.item-name {
  border-right: 1px solid var(--headerBackground);
  padding: 1em 2.5em;
  display: flex;
  flex-direction: column;
  gap: 0.8em;
}

.item-name h4 {
  font-size: 1.4rem;
  color: var(--secondary);
  font-weight: 520;
  word-spacing: 1px;
}

.item-name p {
  font-style: italic;
  text-align: left;
  font-size: var(--menuDescSize);
  color: var(--brightAccent);
  font-family: "Caprasimo", serif;
}

.item-price {
  font-size: var(--menuPriceSize);
  font-family: "Caprasimo", serif;
  color: var(--secondary);
  font-weight: 520;
  display: flex;
  align-items: center;
  justify-content: center;
}

.price-curency {
  padding-left: 0.4em;
  font-size: 0.75rem;
  font-weight: 200;
  color: #b3b3b3;
}

/*==============================
  Section Titles
==============================*/
.menu-title-container {
  text-align: center;
  margin: 3em 0;
}

.menu-title-container img {
  width: 220px;
  height: auto;
  margin-bottom: 1.5em;
  object-fit: cover;
}

.menu-title-container h2 {
  font-size: var(--menuTitleSize);
  font-family: "Caprasimo", serif;
  font-weight: 500;
  margin-bottom: 0.4em;
  color: var(--secondary);
}

.menu-title-line {
  width: 80px;
  height: 2px;
  background-color: var(--brightAccent);
  margin: 5px auto 0;
}

/*==============================
  Responsive Design
==============================*/

@media (max-width: 1024px) {
  /* Menu Category */
  .menu-category {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
  }

  .menu-category::-webkit-scrollbar {
    display: none;
  }
  .menu-category {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .menu-category ul {
    flex-wrap: nowrap;
    width: max-content;
    margin: 0 auto; 
  }

  /* Menu Category nav */
    .menu-wrapper {
    flex-direction: column;
    align-items: center;
  }
/* Image Container */
  .menu-image-container {
    position: static;
    width: 75%;
    height: 400px;
  }

  
  .item-name {
    border-right: none;
  }

  .menu-category-wrapper {
    padding: 0.5em;
  }

  .menu-category ul {
    gap: 1em;
  }


  .menu-category ul li {
    padding: 1em 0.3em;
    gap: 0.4em;
    font-size: 1em;
  }
  /* Items Price */
  .item-price {
  justify-content: flex-end;
}
}
@media (max-width: 768px) {
  .top-header h2{
  font-size: 1.3em;
}
  /* Image Container */
  .menu-image-container {
    width: 100%;
  }
 .menu {
    grid-template-columns: 1fr;
  }

}
