/* ========================
   PAGE HEADER
======================== */
.page-header {
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  padding: 4rem 3rem;
}

.page-header-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.page-header-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.5rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-top: .6rem;
}

/* ========================
   MENU LAYOUT
======================== */
.menu-section {
  padding: 4rem 3rem;
  background: var(--cream);
}

.menu-wrap {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 4rem;
  align-items: start;
}

/* ========================
   SIDEBAR
======================== */
.menu-sidebar {
  position: sticky;
  top: 90px;
}

.sidebar-label {
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.sidebar-list li button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  text-align: left;
  background: none;
  border: none;
  padding: .55rem .8rem;
  font-size: .82rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--mid);
  cursor: pointer;
  transition: all .18s;
  border-left: 2px solid transparent;
}

.sidebar-list li button:hover {
  color: var(--charcoal);
  background: var(--accent-light);
}

.cat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .18rem .5rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  white-space: nowrap;
}

.cat-name {
  flex: 1;
  text-align: left;
}


.sidebar-list li button.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-light);
  font-weight: 500;
}

/* ========================
   MENU CONTENT
======================== */
.cat-block {
  display: none;
  animation: fadeIn .25s ease;
}

.cat-block.visible {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.cat-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--charcoal);
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--charcoal);
  margin-bottom: 2rem;
}

.items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.menu-item {
  padding: 1rem 1rem 1rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.2rem;
  cursor: pointer;
  transition: background .15s;
}

.menu-item:hover {
  background: var(--accent-light);
  padding-left: .5rem;
}

.menu-item:nth-child(odd) {
  padding-right: 2rem;
  border-right: 1px solid var(--border);
}

.menu-item:nth-child(even) {
  padding-left: 2rem;
  padding-right: 0;
}

.menu-item:nth-child(even):hover {
  padding-left: 2.5rem;
}

.mi-left { flex: 1; }

.mi-name {
  font-size: .92rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: .25rem;
}

.mi-desc {
  font-size: .76rem;
  color: var(--light);
  line-height: 1.55;
  font-style: italic;
}

.mi-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 1px;
}

/* ========================
   POPUP / MODAL
======================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 26, 23, .55);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.open {
  display: flex;
  animation: overlayIn .2s ease;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: #fff;
  max-width: 520px;
  width: 100%;
  position: relative;
  animation: modalIn .25s ease;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  background: rgba(28,26,23,.5);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  line-height: 1;
}

.modal-close:hover {
  background: var(--accent);
}

/* Modal image */
.modal-img {
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .5rem;
  color: var(--light);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

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

/* Modal body */
.modal-body {
  padding: 1.8rem 2rem 2rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: .8rem;
}

.modal-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.2;
}

.modal-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.modal-desc {
  font-size: .85rem;
  color: var(--mid);
  line-height: 1.75;
  margin-bottom: 1.6rem;
  font-style: italic;
}

/* Divider */
.modal-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 1.4rem;
}

/* Rating */
.modal-rating-label {
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: .8rem;
}

.stars {
  display: flex;
  gap: .3rem;
  margin-bottom: 1rem;
}

.star {
  font-size: 1.6rem;
  cursor: pointer;
  color: #d4cfc6;
  transition: color .15s, transform .15s;
  line-height: 1;
  user-select: none;
}

.star:hover,
.star.active {
  color: #c8a030;
  transform: scale(1.15);
}

.rating-feedback {
  font-size: .8rem;
  color: var(--accent);
  min-height: 1.2rem;
  font-weight: 500;
}

.modal-prep {
  margin-top: 1.2rem;
  font-size: .78rem;
  color: var(--light);
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* ========================
   RESPONSIVE
======================== */
@media (max-width: 900px) {
  .page-header { padding: 3rem 1.5rem; }
  .page-header-title { font-size: 2.5rem; }
  .menu-section { padding: 2.5rem 1.5rem; }

  .menu-wrap {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .menu-sidebar {
    position: static;
    margin-bottom: 2rem;
  }

  .sidebar-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: .4rem;
  }

  .sidebar-list li button {
    border-left: none;
    border: 1px solid var(--border);
    padding: .35rem .8rem;
    font-size: .75rem;
  }

  .sidebar-list li button.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
  }

  .items-grid {
    grid-template-columns: 1fr;
  }

  .menu-item:nth-child(odd) {
    padding-right: 0;
    border-right: none;
  }

  .menu-item:nth-child(even) {
    padding-left: 0;
  }

  .modal { max-width: 100%; }
}

/* ========================
   MODAL — MOBİL
======================== */
@media (max-width: 600px) {
  .modal-overlay {
    padding: .8rem;
    align-items: flex-end;
  }

  .modal {
    max-height: 82vh;
    border-radius: 16px 16px 0 0;
    animation: modalSlideUp .3s ease;
  }

  @keyframes modalSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: none; opacity: 1; }
  }

  .modal-img {
    height: 200px;
  }

  .modal-body {
    padding: 1.2rem 1.4rem 1.4rem;
  }

  .modal-name {
    font-size: 1.25rem;
  }

  .modal-price {
    font-size: 1.15rem;
  }

  .modal-desc {
    font-size: .8rem;
    margin-bottom: 1rem;
  }

  .modal-rating-label {
    font-size: .68rem;
    margin-bottom: .6rem;
  }

  .star {
    font-size: 1.3rem;
  }

  .modal-prep {
    font-size: .75rem;
    margin-top: .8rem;
  }

  .modal-divider {
    margin-bottom: 1rem;
  }
}