/* Modern Ordering Experience - Menu Page */
:root {
  --order-bg: #0f0f0f;
  --order-panel: #151412;
  --order-surface: #1d1b18;
  --order-text: #f5f3ef;
  --order-text-2: #c9c4bc;
  --order-muted: #a79f93;
  --order-accent: #b9a07e;
  --order-accent-2: #d9c3a3;
  --order-border: rgba(185, 160, 126, 0.28);
  --order-border-2: rgba(245, 243, 239, 0.08);
  --order-radius: 14px;
  --order-radius-lg: 18px;
  --order-shadow: 0 40px 80px -60px rgba(185, 160, 126, 0.5);
}

body.ordering-active {
  overflow: hidden;
}

/* Menu Grid - Clean Alignment */
.menu-grid--order {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(1.6rem, 5vw, 2.4rem);
  align-items: stretch;
}

.menu-item--order {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--order-border-2);
  border-radius: var(--order-radius-lg);
  background: radial-gradient(circle at top, rgba(185, 160, 126, 0.09), transparent 65%), linear-gradient(180deg, rgba(25, 23, 21, 0.9), rgba(17, 17, 17, 0.98));
  overflow: hidden;
  transition: transform 280ms ease, border-color 280ms ease, box-shadow 280ms ease;
  height: 100%;
  position: relative;
}

.menu-item--order::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(185, 160, 126, 0.12), transparent 55%);
  pointer-events: none;
}

.menu-item--order > * {
  position: relative;
  z-index: 1;
}

.menu-item--order:hover {
  transform: translateY(-6px);
  border-color: var(--order-border);
  box-shadow: var(--order-shadow);
}

.menu-item__media--order {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: radial-gradient(circle, rgba(185, 160, 126, 0.14), transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-item__media--order::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at bottom, rgba(185, 160, 126, 0.12), transparent 60%);
  pointer-events: none;
}

.menu-item__media--order img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease;
  cursor: zoom-in;
}

.menu-item--order:hover .menu-item__media--order img {
  transform: scale(1.04);
}

.menu-item__body--order {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: clamp(1.2rem, 3vw, 1.6rem);
  flex: 1 1 auto;
}

.menu-item__header--order {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.menu-item__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.4rem;
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.14em * 2);
}

.menu-item__price--order {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-variant-numeric: tabular-nums;
  font-size: 1.32rem;
  color: var(--order-accent-2);
  white-space: nowrap;
  flex: 0 0 auto;
}

.menu-item__desc {
  color: var(--order-text-2);
  font-size: 0.98rem;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.2em;
}

.btn--add {
  margin-top: auto;
  width: 100%;
  justify-content: center;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.78rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--order-accent), var(--order-accent-2));
  color: #151210;
  border: none;
  box-shadow: 0 30px 60px -40px rgba(185, 160, 126, 0.8);
}

.btn--add:hover {
  filter: brightness(1.05);
  color: #151210;
}

/* ---------- Menu search ---------- */

.menu-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: min(620px, 100%);
  margin: 0 auto 1.6rem;
  padding: 0.3rem 0.35rem 0.3rem 1.1rem;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(29, 27, 24, 0.75), rgba(17, 17, 17, 0.88));
  backdrop-filter: blur(10px);
  transition: border-color 260ms ease, box-shadow 260ms ease, background 260ms ease;
}

.menu-search:focus-within {
  border-color: #d4af37;
  background: linear-gradient(180deg, rgba(34, 31, 27, 0.85), rgba(17, 17, 17, 0.94));
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.12), 0 30px 60px -45px rgba(212, 175, 55, 0.55);
}

.menu-search__icon {
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.05rem;
  color: #d4af37;
  transition: color 260ms ease;
}

.menu-search__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.7rem 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--order-text);
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.menu-search__input::placeholder {
  color: var(--order-muted);
}

/* hide the native "search" affordances, we render our own clear button */
.menu-search__input::-webkit-search-cancel-button,
.menu-search__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.menu-search__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: none;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.12);
  color: #d4af37;
  cursor: pointer;
  transition: background 220ms ease, transform 220ms ease;
}

/* the [hidden] attribute must win over the flex display above */
.menu-search__clear[hidden] {
  display: none;
}

.menu-search__clear:hover {
  background: rgba(212, 175, 55, 0.24);
  transform: scale(1.06);
}

.menu-search__clear i {
  font-size: 0.9rem;
  pointer-events: none;
}

/* search / category filtering */
.menu-item--order.is-hidden {
  display: none !important;
}

.menu-empty {
  width: min(620px, 100%);
  margin: 1.6rem auto 0;
  text-align: center;
  color: var(--order-muted);
}

.menu-empty span {
  color: #d4af37;
}

/* Floating Cart Pill / Drawer */
.cart-fab {
  position: fixed;
  bottom: 1.6rem;
  right: 1.6rem;
  z-index: 40;
  display: none;
}

.cart-fab.is-visible {
  display: block;
}

.cart-fab__btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--order-border);
  background: radial-gradient(circle at top, rgba(185, 160, 126, 0.25), rgba(17, 17, 17, 0.98));
  color: var(--order-text);
  padding: 0.9rem 1.8rem;
  box-shadow: 0 40px 80px -50px rgba(185, 160, 126, 0.6);
  backdrop-filter: blur(14px);
  cursor: pointer;
  font-family: var(--font-body);
}

.cart-fab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--order-accent), var(--order-accent-2));
  color: #151210;
  font-weight: 600;
}

.cart-fab__total {
  font-variant-numeric: tabular-nums;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: stretch;
  justify-content: flex-end;
}

.cart-drawer.is-open {
  display: flex;
}

.cart-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(4px);
}

.cart-drawer__panel {
  position: relative;
  width: min(420px, 100%);
  height: 100%;
  background: radial-gradient(circle at top, rgba(185, 160, 126, 0.12), transparent 60%), var(--order-panel);
  border-left: 1px solid var(--order-border-2);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 320ms cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cart-drawer.is-open .cart-drawer__panel {
  transform: translateX(0);
}

.cart-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 2rem 2rem 1.2rem;
  border-bottom: 1px solid var(--order-border-2);
}

.cart-drawer__close {
  background: none;
  border: none;
  color: var(--order-text);
  font-size: 2rem;
  cursor: pointer;
}

.cart-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1.2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--order-border-2);
  border-radius: var(--order-radius);
  padding: 0.8rem;
}

.cart-item__media {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
}

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

.cart-item__info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cart-item__name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.1rem;
}

.cart-item__price {
  font-variant-numeric: tabular-nums;
  color: var(--order-muted);
}

.cart-item__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.cart-item__qty {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--order-border-2);
  padding: 0.3rem 0.6rem;
}

.cart-item__qty button {
  background: none;
  border: none;
  color: var(--order-text);
  cursor: pointer;
}

.cart-item__subtotal {
  font-variant-numeric: tabular-nums;
  color: var(--order-accent-2);
}

.cart-drawer__footer {
  border-top: 1px solid var(--order-border-2);
  padding: 1.2rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-drawer__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.4rem;
}

.cart-drawer__total span:last-child {
  font-variant-numeric: tabular-nums;
}

/* Centered Checkout Modal */
.order-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

.order-modal.is-open {
  display: flex;
}

.order-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(6px);
}

.order-modal__card {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 2.4rem);
  overflow-y: auto;
  border-radius: var(--order-radius-lg);
  border: 1px solid var(--order-border-2);
  background: radial-gradient(circle at top, rgba(185, 160, 126, 0.14), transparent 60%), var(--order-panel);
  box-shadow: 0 80px 160px -80px rgba(185, 160, 126, 0.4);
  display: flex;
  flex-direction: column;
}

.order-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 2rem 2rem 1rem;
}

.order-modal__close {
  background: none;
  border: none;
  color: var(--order-text);
  font-size: 2rem;
  cursor: pointer;
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 0 2rem 2rem;
}

.order-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.order-form__label {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  color: var(--order-text-2);
}

.order-form__input,
.order-form__textarea {
  background: transparent;
  border: 1px solid var(--order-border-2);
  border-radius: var(--order-radius);
  color: var(--order-text);
  font-family: var(--font-body);
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
}

.order-form__textarea {
  min-height: 110px;
  resize: vertical;
}

.order-form__submit {
  width: 100%;
  justify-content: center;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.order-summary-mini {
  margin: 0 2rem 1rem;
  padding: 1rem 1.2rem;
  border-radius: var(--order-radius);
  border: 1px solid var(--order-border-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.order-summary-mini__count,
.order-summary-mini__total {
  font-variant-numeric: tabular-nums;
}

/* Success State */
.order-success {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

.order-success.is-open {
  display: flex;
}

.order-success__card {
  width: min(460px, 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  border-radius: var(--order-radius-lg);
  border: 1px solid var(--order-border-2);
  background: radial-gradient(circle at top, rgba(185, 160, 126, 0.16), transparent 60%), var(--order-panel);
  padding: clamp(2rem, 6vw, 3rem);
}

.order-success__icon {
  font-size: 3rem;
  color: var(--order-accent-2);
}

.order-success__id {
  font-variant-numeric: tabular-nums;
}

.order-success__webhook {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: var(--order-text-2);
}

@media (max-width: 680px) {
  .menu-search {
    margin-bottom: 1.2rem;
    padding-left: 0.9rem;
  }
  .cart-fab {
    left: 1rem;
    right: 1rem;
  }
  .cart-fab__btn {
    width: 100%;
    justify-content: space-between;
  }
  .order-modal {
    padding: 0.8rem;
  }
  .order-form,
  .order-modal__header,
  .order-summary-mini {
    padding-left: 1.4rem;
    padding-right: 1.4rem;
  }
}

.cart-drawer__search {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0 1.8rem 1rem;
  position: relative;
}

.cart-search {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(185, 160, 126, 0.35);
  background: linear-gradient(90deg, rgba(185, 160, 126, 0.08), rgba(245, 243, 239, 0.01));
  padding: 0.6rem 1.2rem;
  min-height: 48px;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.cart-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(185, 160, 126, 0.25);
}

.cart-search__icon {
  color: var(--accent);
  display: flex;
  align-items: center;
  font-size: 1rem;
}

.cart-search__input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--order-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.cart-search__input::placeholder {
  color: var(--order-muted);
}

.cart-search__input:focus {
  outline: none;
}

.cart-search__results {
  position: absolute;
  top: calc(100% - 0.2rem);
  left: 1.8rem;
  right: 1.8rem;
  background: radial-gradient(circle at top, rgba(185, 160, 126, 0.12), transparent 70%), #151210;
  border: 1px solid rgba(185, 160, 126, 0.4);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 60px 80px -60px rgba(185, 160, 126, 0.5);
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 15;
  backdrop-filter: blur(12px);
}

.cart-search__results[hidden] {
  display: none !important;
}

.cart-search__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid rgba(245, 243, 239, 0.06);
  transition: background 160ms ease;
}

.cart-search__item:hover {
  background: rgba(185, 160, 126, 0.08);
}

.cart-search__item:last-child {
  border-bottom: none;
}

.cart-search__info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cart-search__name {
  color: var(--order-text);
  font-size: 0.98rem;
}

.cart-search__price {
  color: var(--order-muted);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cart-search__add {
  border: 1px solid rgba(185, 160, 126, 0.5);
  background: linear-gradient(120deg, rgba(185, 160, 126, 0.9), rgba(217, 195, 163, 0.9));
  color: #151210;
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  min-height: 40px;
  min-width: 44px;
  cursor: pointer;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  transition: filter 160ms ease, transform 160ms ease;
}

.cart-search__add:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
