/* ==========================================================================
   Menu Page Styles
   Core styling for menu items, categories, and secondary navigation.
   ========================================================================== */

/* ==========================================================================
   1. Card Layout & Base
   ========================================================================== */

.api-items-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, 1fr);
  justify-items: center;
}

.api-items-container .section-title {
  /* Add a top margin for scrolling to account for the sticky header */
  /* Increased to account for main header (80px) + sticky nav (~80px) */
  scroll-margin-top: 160px;
}

.item-card,
.options-container {
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  height: 100%;
  width: 100%;
}

.item-card {
  background-blend-mode: overlay;
  background-color: var(--c-parchment);
  background-image: url("/static/wave.jpg");
  background-repeat: repeat;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  margin: 0;
  max-width: 30rem;
  padding: 0.9375rem;
  position: relative;
}

.item-card::before {
  background-color: rgba(243, 240, 235, 0.736);
  border-radius: 1rem;
  bottom: 0;
  content: '';
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1;
}

/* ==========================================================================
   2. Item Details & Content
   ========================================================================== */

/* Handled by .api-items-grid and .section-title */

.card-body {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1.8fr 1.7fr;
  position: relative;
  width: 100%;
  z-index: 2;
}

.item-details-box {
  display: flex;
  flex-direction: column;
}

.item-variations-box {
  display: flex;
  flex-direction: column;
}

/* Typography */
.item-title,
.description,
.ingredients,
.variation-type {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.item-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
}

.description {
  margin-bottom: 0.3125rem;
}

/* Images */
.item-image-box {
  aspect-ratio: 4 / 3;
  margin-bottom: 0.5rem;
  width: 100%;
}

.item-image-box img {
  border: none;
  border-radius: 1rem;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  width: 100%;
}

.item-image-box:hover img {
  transform: scale(1.05);
}

.item-image-box {
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.lunch-image {
  margin-top: 2rem;
  position: relative;
}

.lunch-image img {
  border-radius: 1.5rem;
  height: auto;
  width: 100%;
}

.clickable-image {
  cursor: pointer;
}

/* Variations & Prices */
.variation-type {
  flex: 1;
  min-width: 0;
}

.variation-price {
  font-weight: bold;
  text-align: left;
  white-space: nowrap;
}

.prices-wrapper {
  display: table;
  margin-bottom: 0.5rem;
  margin-left: auto;
  margin-right: auto;
  margin-top: auto;
}

/* Simple Card Variant */
.item-card--simple .item-variations-box {
  display: block;
}

.item-card--simple .item-details-box {
  width: 20rem;
}

.item-card--simple .prices-wrapper {
  margin-left: 0;
}

/* ==========================================================================
   3. Combination & Category Containers
   ========================================================================== */

/* Legacy combo-header removed in favor of .section-title */

.combo-badge {
  color: var(--c-faded-copper);
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-style: italic;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
}

.combo-info-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
  text-align: center;
}

.combo-description {
  color: var(--c-carbon-black);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.6;
}

.combo-add-ons {
  color: var(--c-faded-copper);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.9rem;
  font-style: italic;
  gap: 2rem;
  justify-content: center;
}

.combo-add-ons span {
  align-items: center;
  display: flex;
}

.combo-add-ons span::before {
  content: '•';
  margin-right: 0.5rem;
}

.menu-category-section {
  padding-bottom: 3rem;
}
.options-container {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1fr;
  margin: 2rem 0 0 0;
  width: 100%;
}

.option-card-1,
.option-card-2 {
  background-color: var(--c-parchment);
  border: 0.0625rem solid rgba(166, 127, 91, 0.2);
  border-radius: 1.5rem;
  box-shadow: 0 0.25rem 0.9375rem rgba(0, 0, 0, 0.08);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.3s ease;
}

.option-card-1:hover,
.option-card-2:hover {
  box-shadow: 0 0.5rem 1.5625rem rgba(166, 127, 91, 0.15);
  transform: translateY(-0.3125rem);
}

.option-card-1 h2,
.option-card-2 h2 {
  border-bottom: 0.0625rem solid rgba(166, 127, 91, 0.1);
  color: var(--c-faded-copper);
  display: block;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  text-transform: uppercase;
}

.option-card-1 .content p,
.option-card-2 .content p {
  font-size: 1rem;
  line-height: 1.4;
  margin: 0.3rem 0;
}

.option-card-1 .content p.small-text,
.option-card-2 .content p.small-text {
  font-size: 0.85rem;
  font-style: italic;
  opacity: 0.8;
}

/* ==========================================================================
   4. Secondary Navigation (.anchor-nav)
   ========================================================================== */

.anchor-nav {
  -webkit-backdrop-filter: blur(0.75rem);
  align-items: center;
  backdrop-filter: blur(0.75rem);
  background-blend-mode: overlay;
  background-color: rgba(243, 240, 235, 0.8);
  background-image: url("/static/wave.jpg");
  background-repeat: repeat;
  border: 0.0625rem solid rgba(255, 255, 255, 0.3);
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  margin: 0 auto 4rem auto;
  max-width: 65rem;
  width: calc(100% - 3.125rem);
  overflow: hidden;
  padding: 0.75rem;
  position: sticky;
  top: 4rem;
  z-index: 999;
}

.anchor-nav::before {
  background-color: rgba(243, 240, 235, 0.85);
  bottom: 0;
  content: '';
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1;
}

.anchor-nav a {
  border-radius: 0.625rem;
  color: inherit;
  padding: 0.5rem 1rem;
  position: relative;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.anchor-nav a:hover {
  background-color: rgba(0, 0, 0, 0.05);
  box-shadow: none;
  color: inherit;
  transform: scale(1.05);
}

.anchor-nav h2 {
  font-size: 1.8rem;
  margin: 0;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   5. Image Preview Modal
   ========================================================================== */

.image-preview-modal {
  align-items: center;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  height: 100%;
  justify-content: center;
  left: 0;
  overflow: hidden;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.modal-content {
  animation-duration: 0.6s;
  animation-name: zoom;
  display: block;
  margin: auto;
  max-height: 90vh;
  max-width: 90vw;
}

@keyframes zoom {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

.close-preview {
  color: #f1f1f1;
  font-size: 2.5rem;
  font-weight: bold;
  position: absolute;
  right: 2.1875rem;
  top: 0.9375rem;
  transition: 0.3s;
}

.close-preview:hover,
.close-preview:focus {
  color: #bbb;
  cursor: pointer;
  text-decoration: none;
}

/* ==========================================================================
   6. Media Queries & Responsive Logic
   ========================================================================== */

/* Large Tablets & Desktop Grid */
@media (max-width: 65rem) {
  .api-items-grid {
    grid-template-columns: 1fr;
  }
}

/* Standard Tablets */
@media (max-width: 47.5rem) {
  .anchor-nav {
    border: none;
    border-bottom: 0.0625rem solid rgba(0, 0, 0, 0.1);
    border-radius: 0;
    box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.05);
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.5rem 1rem;
    top: 4rem;
    width: 100%;
  }

  .anchor-nav a {
    padding: 0.4rem 0.6rem;
    text-align: center;
  }

  .anchor-nav h2 {
    font-size: 1.2rem;
    font-weight: 600;
  }

  .api-items-container .section-title {
    scroll-margin-top: 10rem;
  }
}

/* Mobile Phones & Stacking Logic */
@media (max-width: 37.5rem) {
  .api-items-grid {
    gap: 0.75rem;
    grid-template-columns: 1fr;
  }

  .item-card {
    padding: 0.75rem;
  }

  .card-body {
    display: grid;
    grid-template-areas:
      "image image"
      "details prices";
    grid-template-columns: 1fr auto;
  }

  .item-variations-box {
    display: contents;
  }

  .item-details-box {
    grid-area: details;
    padding-right: 0.5rem;
  }

  .item-image-box {
    grid-area: image;
    margin-bottom: 0.75rem;
  }

  .options-container {
    grid-template-columns: 1fr;
  }

  .prices-wrapper {
    align-self: end;
    grid-area: prices;
    margin-right: 0;
    margin-top: 0;
    text-align: right;
  }

  .prices-wrapper--on-top {
    align-self: start;
  }

  .item-card--simple .card-body {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
  }

  .item-card--simple .item-details-box {
    padding-right: 0.5rem;
    width: auto;
  }

  .item-card--simple .item-variations-box {
    display: block;
  }

  .item-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }

  .description {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .section-title {
    margin-bottom: 1.5rem;
  }
}

/* ==========================================================================
   7. Skeleton Loading State
   ========================================================================== */

.skeleton-container {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, 1fr);
  width: 100%;
}

@media (max-width: 65rem) {
  .skeleton-container {
    grid-template-columns: 1fr;
  }
}

.skeleton-card {
  background-color: var(--c-parchment);
  border-radius: 1rem;
  height: 15rem;
  overflow: hidden;
  padding: 1rem;
  position: relative;
}

.skeleton-pulse {
  animation: pulse 1.5s infinite ease-in-out;
  background: linear-gradient(90deg,
      rgba(166, 127, 91, 0.05) 25%,
      rgba(166, 127, 91, 0.1) 50%,
      rgba(166, 127, 91, 0.05) 75%);
  background-size: 200% 100%;
}

@keyframes pulse {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-title {
  border-radius: 0.25rem;
  height: 1.5rem;
  margin-bottom: 1rem;
  width: 60%;
}

.skeleton-desc {
  border-radius: 0.25rem;
  height: 1rem;
  margin-bottom: 0.5rem;
  width: 90%;
}

.skeleton-desc:last-child {
  width: 70%;
}

.skeleton-price {
  border-radius: 0.25rem;
  bottom: 1rem;
  height: 1.25rem;
  position: absolute;
  right: 1rem;
  width: 3rem;
}
