/* Asmara Bella — Click & Collect (click-collect.html).
   Ordering-first layout: photo band, compact dish list with sticky category chips,
   sticky basket "ticket" (desktop) and a basket bar (mobile). Logic lives in the page script.
   Tokens from design.css; .xp-* type from experience.css. */

:root {
  --oc-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --oc-line: #e8dccb;
  --oc-soft: #fbf4ea;
  --oc-card: #fffdf9;
  --oc-muted: #6b5f4d;
  --oc-nav: 66px;
}
/* motion.js tucks the fixed nav away while scrolling down; let the sticky bars follow it up. */
body:has(#ab-nav.ab-nav-hidden) { --oc-nav: 0px; }

/* ---------- Hero band ---------- */

.oc-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 64px 24px 150px;
  text-align: center;
  color: #fff;
  background: var(--ab-night);
}
.oc-hero-media {
  position: absolute;
  inset: -25% 0;
  background: linear-gradient(180deg, rgba(22, 14, 7, 0.5), rgba(22, 14, 7, 0.84)), url("/assets/images/beyaynetu-platter.webp") center 55% / cover;
}
.oc-hero-copy { position: relative; max-width: 760px; }
.oc-hero .xp-eyebrow { justify-content: center; animation: ab-rise 1s var(--oc-ease) both; }
.oc-hero .xp-eyebrow::after { content: ""; width: 34px; height: 1px; background: currentColor; opacity: 0.7; }
.oc-hero h1 {
  margin: 0 0 12px;
  font: 600 clamp(40px, 6vw, 74px)/1.02 "Playfair Display", serif;
  letter-spacing: -0.025em;
  color: #fff;
  animation: ab-rise 1s var(--oc-ease) 0.08s both;
}
.oc-hero h1 em { font-style: italic; font-weight: 500; color: var(--ab-gold-hi); }
.oc-hero .oc-hero-lead { margin: 0 auto; max-width: 600px; font-size: 18px; line-height: 1.6; color: #f0e6d3; animation: ab-rise 1s var(--oc-ease) 0.16s both; }
.oc-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  animation: ab-rise 1s var(--oc-ease) 0.24s both;
}
.oc-steps li { display: inline-flex; align-items: center; gap: 10px; font: 600 14.5px/1.2 "Plus Jakarta Sans", sans-serif; color: #f6eedf; }
.oc-steps span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(230, 194, 119, 0.7);
  color: var(--ab-gold-hi);
  font: 600 13px/1 "Playfair Display", serif;
}

/* ---------- Layout ---------- */

.oc-main { position: relative; z-index: 2; margin-top: -104px; padding: 0 clamp(12px, 3.5vw, 40px) 100px; }
.oc-layout { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 28px; align-items: start; }
.oc-menu {
  min-width: 0;
  background: var(--oc-card);
  border-radius: 28px;
  border: 1px solid rgba(179, 147, 77, 0.2);
  box-shadow: 0 40px 100px -40px rgba(33, 27, 18, 0.45);
  padding: 0 clamp(16px, 3vw, 36px) clamp(20px, 3vw, 36px);
}

/* ---------- Category chips (sticky) ---------- */

.oc-catbar {
  position: sticky;
  top: var(--oc-nav);
  z-index: 6;
  margin: 0 calc(-1 * clamp(16px, 3vw, 36px));
  padding: 18px clamp(16px, 3vw, 36px) 14px;
  background: rgba(255, 253, 249, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--oc-line);
  border-radius: 28px 28px 0 0;
  transition: top 0.45s var(--oc-ease);
}
.oc-cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  padding: 2px 28px 2px 2px;
}
.oc-cats::-webkit-scrollbar { display: none; }
.oc-cat {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  min-height: 42px;
  box-sizing: border-box;
  border-radius: 999px;
  border: 1.5px solid var(--oc-line);
  background: #fff;
  color: #4d4639;
  font: 600 14px/1 "Plus Jakarta Sans", sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.25s, background-color 0.25s, color 0.25s, box-shadow 0.3s;
}
.oc-cat:hover { border-color: var(--ab-gold); color: var(--ab-ink); }
.oc-cat.is-on { background: var(--ab-brown); border-color: var(--ab-brown); color: #fff; box-shadow: 0 10px 22px -12px rgba(117, 90, 26, 0.8); }
.oc-cat:focus-visible { outline: 2px solid var(--ab-brown); outline-offset: 2px; }

/* ---------- Sections and dishes ---------- */

.oc-sec { padding-top: 30px; scroll-margin-top: calc(var(--oc-nav) + 84px); }
.oc-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--oc-line); }
.oc-sec-head h2 { margin: 0; font: 600 clamp(24px, 2.4vw, 30px)/1.15 "Playfair Display", serif; color: var(--ab-ink); letter-spacing: -0.01em; }
.oc-sec-head span { font: 600 12.5px/1 "Plus Jakarta Sans", sans-serif; color: #8a7e6c; letter-spacing: 0.04em; white-space: nowrap; }
.oc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }

.oc-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
  border-radius: 20px;
  border: 1.5px solid var(--oc-line);
  background: #fff;
  transition: border-color 0.3s, box-shadow 0.4s var(--oc-ease), transform 0.4s var(--oc-ease);
}
.oc-item:hover { border-color: rgba(179, 147, 77, 0.6); box-shadow: 0 20px 44px -30px rgba(33, 27, 18, 0.5); transform: translateY(-2px); }
.oc-item.in-basket { border-color: var(--ab-brown); background: linear-gradient(180deg, #fff, var(--oc-soft)); }
.oc-item-img {
  width: 112px;
  height: 112px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--oc-soft) var(--ab-tilet) center / 56px 18px repeat-x;
  align-self: start;
}
.oc-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1s var(--oc-ease); }
.oc-item:hover .oc-item-img img { transform: scale(1.06); }
.oc-item-img.is-empty { background: var(--oc-soft); }
.oc-item-body { min-width: 0; display: flex; flex-direction: column; }
.oc-item h3 { margin: 2px 0 4px; font: 600 18px/1.25 "Playfair Display", serif; color: var(--ab-ink); overflow-wrap: anywhere; }
.oc-item p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--oc-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.oc-item-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.oc-price { font: 700 17px/1 "Plus Jakarta Sans", sans-serif; color: var(--ab-brown); font-variant-numeric: tabular-nums; }

.oc-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid var(--ab-brown);
  background: var(--ab-brown);
  color: #fff;
  font: 700 14px/1 "Plus Jakarta Sans", sans-serif;
  cursor: pointer;
  transition: transform 0.35s var(--oc-ease), box-shadow 0.35s var(--oc-ease), background-color 0.25s;
}
.oc-add span { font-size: 18px; line-height: 1; margin-top: -1px; }
.oc-add:hover { background: var(--ab-brown-dk); box-shadow: 0 12px 24px -14px rgba(117, 90, 26, 0.9); transform: translateY(-1px); }
.oc-add:active { transform: scale(0.95); }
.oc-qty {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--ab-brown);
  color: #fff;
  animation: oc-pop 0.35s var(--oc-ease);
}
.oc-qty button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: #fff;
  font: 700 20px/1 "Plus Jakarta Sans", sans-serif;
  cursor: pointer;
  transition: background-color 0.2s;
}
.oc-qty button:hover { background: rgba(255, 255, 255, 0.16); }
.oc-qty-n { min-width: 22px; text-align: center; font: 700 15px/1 "Plus Jakarta Sans", sans-serif; font-variant-numeric: tabular-nums; }
.oc-add:focus-visible, .oc-qty button:focus-visible, .oc-line-qty button:focus-visible, .oc-checkout:focus-visible, .oc-bar-btn:focus-visible { outline: 2px solid var(--ab-gold); outline-offset: 2px; }
@keyframes oc-pop { from { transform: scale(0.85); opacity: 0.4; } }
.oc-none { padding: 40px 0; text-align: center; color: var(--oc-muted); }

/* ---------- Basket ticket ---------- */

.oc-aside { position: sticky; top: calc(var(--oc-nav) + 18px); scroll-margin-top: 84px; transition: top 0.45s var(--oc-ease); }
.oc-ticket {
  border-radius: 26px;
  background: var(--oc-card);
  border: 1px solid rgba(179, 147, 77, 0.2);
  box-shadow: 0 30px 80px -40px rgba(33, 27, 18, 0.45);
  padding: 22px 24px 22px;
}
.oc-ticket-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--oc-line); }
.oc-ticket-head .xp-eyebrow { margin: 0 0 6px; }
.oc-ticket-head h2 { margin: 0; font: 600 28px/1.1 "Playfair Display", serif; color: var(--ab-ink); }
.oc-ticket-count {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  box-sizing: border-box;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--oc-soft);
  border: 1px solid var(--oc-line);
  color: #8a7e6c;
  font: 700 15px/1 "Plus Jakarta Sans", sans-serif;
  transition: background-color 0.3s, color 0.3s;
}
.oc-ticket-count.has-items { background: var(--ab-brown); border-color: var(--ab-brown); color: #fff; }

/* Keep the whole ticket within the viewport while it is sticky: the line list scrolls instead. */
@media (min-width: 1024px) {
  .oc-aside { max-height: calc(100vh - var(--oc-nav) - 30px); overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
  .oc-aside::-webkit-scrollbar { display: none; }
}
@media (min-width: 1024px) and (max-height: 860px) {
  .oc-aside-alt { display: none; }
  .oc-ticket-note { margin-top: 14px; padding-top: 12px; }
  .oc-ticket { padding-top: 18px; padding-bottom: 18px; }
}
.oc-basket { max-height: max(150px, calc(100vh - 660px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--oc-line) transparent; }
.oc-empty { text-align: center; padding: 22px 8px 18px; color: #7a6e5d; }
.oc-empty .material-symbols-outlined { font-size: 34px; color: var(--ab-gold); opacity: 0.7; }
.oc-empty p { margin: 6px 0 4px; font-weight: 700; color: var(--ab-ink); font-size: 15px; }
.oc-empty small { font-size: 13.5px; }
.oc-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--oc-line); }
.oc-line-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.oc-line-name { font: 700 14.5px/1.3 "Plus Jakarta Sans", sans-serif; color: var(--ab-ink); overflow-wrap: anywhere; }
.oc-line-each { font-size: 12.5px; color: #8a7e6c; }
.oc-line-qty { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 999px; background: var(--oc-soft); border: 1px solid var(--oc-line); }
.oc-line-qty button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: #fff; color: var(--ab-brown); font: 700 17px/1 "Plus Jakarta Sans", sans-serif; cursor: pointer; box-shadow: 0 3px 8px -5px rgba(33, 27, 18, 0.4); transition: background-color 0.2s, color 0.2s; }
.oc-line-qty button:hover { background: var(--ab-brown); color: #fff; }
.oc-line-qty span { min-width: 18px; text-align: center; font: 700 14px/1 "Plus Jakarta Sans", sans-serif; }
.oc-line-total { min-width: 58px; text-align: right; font: 700 14.5px/1 "Plus Jakarta Sans", sans-serif; color: var(--ab-brown); font-variant-numeric: tabular-nums; }

.oc-totals { margin: 14px 0 0; }
.oc-totals > div { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: 14.5px; }
.oc-totals dt { color: #7a6e5d; }
.oc-totals dd { margin: 0; font-weight: 700; color: var(--ab-ink); font-variant-numeric: tabular-nums; }
.oc-totals .oc-free { color: var(--ab-green); letter-spacing: 0.04em; }
.oc-totals .oc-total-row { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--oc-line); }
.oc-total-row dt, .oc-total-row dd { font: 600 22px/1.1 "Playfair Display", serif; color: var(--ab-ink); }
.oc-total-row dd { color: var(--ab-brown); }

.oc-collect { margin: 18px 0 0; padding: 16px; border: 1px solid #ead9bd; border-radius: 18px; background: var(--oc-soft); min-width: 0; }
.oc-collect legend { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; margin-left: -6px; font: 700 15px/1.3 "Plus Jakarta Sans", sans-serif; color: var(--ab-ink); }
.oc-collect legend .material-symbols-outlined { font-size: 19px; color: var(--ab-gold); }
.oc-collect-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.oc-field { min-width: 0; }
.oc-field label { display: block; margin: 0 0 6px; font: 700 12px/1 "Plus Jakarta Sans", sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ab-gold); }
.oc-field input, .oc-field select { width: 100%; box-sizing: border-box; min-width: 0; }
.oc-time-msg { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: #fdecea; border: 1px solid #f3c2bb; color: #93000a; font-size: 13.5px; font-weight: 600; line-height: 1.45; }

.oc-checkout {
  width: 100%;
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 17px 24px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, #8a6a22, var(--ab-brown));
  color: #fff;
  font: 700 16px/1 "Plus Jakarta Sans", sans-serif;
  cursor: pointer;
  box-shadow: 0 16px 34px -16px rgba(117, 90, 26, 0.85);
  transition: transform 0.45s var(--oc-ease), box-shadow 0.45s var(--oc-ease), filter 0.3s, opacity 0.3s;
}
.oc-checkout .material-symbols-outlined { font-size: 20px; transition: transform 0.45s var(--oc-ease); }
.oc-checkout:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 22px 40px -16px rgba(117, 90, 26, 0.9); }
.oc-checkout:hover:not(:disabled) .material-symbols-outlined { transform: translateX(4px); }
.oc-checkout:disabled { opacity: 0.45; filter: grayscale(0.5); cursor: not-allowed; box-shadow: none; }
.oc-checkout-hint { margin: 10px 0 0; text-align: center; font-size: 13.5px; color: #7a6e5d; }
.oc-checkout-hint.is-ready { color: var(--ab-green); font-weight: 600; }
.oc-ticket-note { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--oc-line); font-size: 13.5px; line-height: 1.5; color: #5c5142; }
.oc-ticket-note .material-symbols-outlined { font-size: 20px; color: var(--ab-gold); flex-shrink: 0; }
.oc-ticket-note strong { color: var(--ab-ink); }
.oc-aside-alt { margin: 14px 4px 0; text-align: center; font-size: 14px; color: #7a6e5d; }
.oc-aside-alt a { color: var(--ab-brown); font-weight: 700; text-underline-offset: 3px; }

/* ---------- Toast + mobile basket bar ---------- */

.oc-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 99999;
  transform: translate(-50%, 16px);
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ab-ink);
  border: 1px solid var(--ab-gold);
  color: #fff8f3;
  font: 700 14px/1.3 "Plus Jakarta Sans", sans-serif;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.4s var(--oc-ease);
}
.oc-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.oc-bar { display: none; }
@media (max-width: 1023px) {
  body.cc-has-bar { padding-bottom: 84px; }
  body.cc-has-bar .oc-toast { bottom: 96px; }
  body.cc-has-bar #ab-totop { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .oc-bar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 9000;
    border-radius: 20px;
    background: var(--ab-night);
    border: 1px solid rgba(230, 194, 119, 0.35);
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.45s var(--oc-ease), opacity 0.3s;
  }
  .oc-bar.is-tucked { transform: translateY(140%); opacity: 0; pointer-events: none; }
  .oc-bar-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 10px 10px 14px;
    border: 0;
    border-radius: 20px;
    background: none;
    color: #fff;
    font-family: "Plus Jakarta Sans", sans-serif;
    cursor: pointer;
    text-align: left;
  }
  .oc-bar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .oc-bar-icon { color: var(--ab-gold-hi); font-size: 24px; }
  .oc-bar-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  #cc-bar-count { font-weight: 700; font-size: 15px; }
  .oc-bar-slot { font-size: 12.5px; color: #d9cbb3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .oc-bar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
  #cc-bar-total { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
  .oc-bar-cta { padding: 11px 16px; border-radius: 999px; background: var(--ab-gold-hi); color: var(--ab-night); font-weight: 800; font-size: 14px; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1023px) {
  .oc-layout { grid-template-columns: 1fr; }
  .oc-aside { position: static; max-width: 640px; width: 100%; margin: 0 auto; }
  .oc-basket { max-height: none; }
}
@media (max-width: 640px) {
  .oc-hero { padding: 32px 18px 106px; }
  .oc-hero .oc-hero-lead { font-size: 16px; }
  .oc-steps { gap: 8px 16px; margin-top: 18px; }
  .oc-steps li { font-size: 13px; gap: 7px; }
  .oc-steps span { width: 22px; height: 22px; font-size: 12px; }
  .oc-main { margin-top: -84px; padding-bottom: 56px; }
  .oc-menu { border-radius: 22px; padding: 0 14px 18px; }
  .oc-catbar { margin: 0 -14px; padding: 12px 14px 10px; border-radius: 22px 22px 0 0; }
  .oc-cat { padding: 9px 14px; min-height: 40px; font-size: 14px; }
  .oc-sec { padding-top: 22px; }
  .oc-sec-head { margin-bottom: 4px; }
  .oc-sec-head h2 { font-size: 23px; }
  .oc-grid { gap: 0; }
  /* Compact rows: thumbnail, name, short description, price and add control. */
  .oc-item { grid-template-columns: 80px minmax(0, 1fr); gap: 12px; padding: 12px 0; border: 0; border-bottom: 1px solid #f0e6d8; border-radius: 0; background: none; }
  .oc-item:hover { transform: none; box-shadow: none; }
  .oc-item:last-child { border-bottom: 0; }
  .oc-item.in-basket { background: none; }
  .oc-item.in-basket .oc-item-img { box-shadow: 0 0 0 2px var(--ab-brown); }
  .oc-item-img { width: 80px; height: 80px; border-radius: 14px; }
  .oc-item h3 { font-size: 17px; margin: 0 0 2px; }
  .oc-item p { font-size: 14.5px; line-height: 1.45; margin-bottom: 8px; }
  .oc-price { font-size: 16px; }
  .oc-add { min-height: 40px; padding: 0 16px; }
  .oc-qty button { width: 34px; height: 34px; }
  .oc-ticket { border-radius: 22px; padding: 20px 18px; }
  .oc-collect { padding: 14px; }
}
@media (max-width: 640px) {
  .oc-hero .xp-eyebrow { font-size: 11px; letter-spacing: 0.2em; }
  .oc-hero .xp-eyebrow::before, .oc-hero .xp-eyebrow::after { display: none; }
  .oc-hero h1 { font-size: 44px; margin-bottom: 10px; }
  /* The chat launcher shrinks to its avatar here so it does not sit over the Add buttons. */
  #ab-chat-toggle > span { display: none; }
  #ab-chat-toggle { padding: 6px !important; }
}
/* Desktop: show every category at once (wraps) rather than a sideways-scrolling row. */
@media (min-width: 1024px) {
  .oc-cats { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; padding: 2px; }
  .oc-cat { padding: 9px 15px; min-height: 40px; }
}
@media (max-width: 360px) {
  .oc-collect-grid { grid-template-columns: 1fr; }
  .oc-bar-cta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .oc-hero .xp-eyebrow, .oc-hero h1, .oc-hero .oc-hero-lead, .oc-steps, .oc-qty { animation: none; }
  .oc-item, .oc-item-img img, .oc-add, .oc-checkout, .oc-bar, .oc-toast { transition: none; }
  .oc-item:hover, .oc-item:hover .oc-item-img img { transform: none; }
}
