/* =========================================================
   Menu CSS
   Romm Coffee — printed-menu layout for the Menu page.

   Direction (refero-design reference lock): a real specialty-
   coffee menu, not a product-card grid. Categorised item lists
   with a name + tasting note on the left, price on the right,
   joined by a classic dotted leader line.

   Token roles preserved:
   - gold accent  -> price + thin rules ONLY (never a fill)
   - chocolate    -> category headings + item names
   - muted text   -> tasting notes

   Works with:
   - Pages/Menu.cshtml
   - Models/RommMenu.cs
   - wwwroot/css/design-tokens.css
========================================================= */

/* ---------- Category cards (landing view) ----------
   obirmenu-style: image cards; tap one to open its products.
   2 per row on phones, more as the screen grows. */

.menu-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 2.5vw, 1.25rem);
}

@media (min-width: 720px) {
  .menu-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1040px) {
  .menu-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.menu-cat-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg, 1rem);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  background: var(--color-primary-dark, #05323a);
  box-shadow: var(--shadow-md, 0 12px 28px rgba(16, 24, 40, 0.12));
  isolation: isolate;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.menu-cat-card:hover,
.menu-cat-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg, 0 20px 40px rgba(16, 24, 40, 0.18));
}

.menu-cat-card:focus-visible {
  outline: 3px solid var(--color-secondary, #649ea1);
  outline-offset: 2px;
}

.menu-cat-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.4s ease;
}

.menu-cat-card:hover .menu-cat-card-img {
  transform: scale(1.05);
}

.menu-cat-card-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top,
    rgba(5, 26, 30, 0.86) 0%,
    rgba(5, 26, 30, 0.35) 45%,
    rgba(5, 26, 30, 0.08) 100%);
}

.menu-cat-card-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(0.75rem, 3vw, 1.1rem);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: left;
}

.menu-cat-card-name {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 1rem + 0.7vw, 1.5rem);
  font-weight: var(--weight-bold, 700);
  line-height: 1.15;
  color: #fff;
  text-wrap: balance;
}

.menu-cat-card-count {
  font-size: var(--text-xs, 0.75rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.82);
}

/* ---------- Product panel (opened category) ---------- */

.menu-panel {
  max-width: 60rem;
  margin-inline: auto;
}

.menu-panel:focus {
  outline: none;
}

.menu-panel-head {
  margin-bottom: var(--space-5, 1.5rem);
  padding-bottom: var(--space-4, 1rem);
  border-bottom: 1px solid var(--color-border, #d5e2e2);
}

.menu-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: var(--space-4, 1rem);
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border, #d5e2e2);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  color: var(--color-primary, #06515d);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.menu-back:hover,
.menu-back:focus-visible {
  background: var(--color-surface-soft, #eaf1f1);
  border-color: var(--color-secondary, #649ea1);
}

.menu-panel-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--text-2xl, 2rem);
  line-height: 1.15;
  color: var(--color-text, #12292d);
  text-wrap: balance;
}

.menu-panel-blurb {
  margin: var(--space-2, 0.5rem) 0 0;
  font-size: var(--text-sm, 0.875rem);
  line-height: var(--line-normal, 1.6);
  color: var(--color-text-muted, #5f7a7d);
}

/* On wider screens, each sub-group's items flow in two columns
   so a long category doesn't become one endless strip. */
@media (min-width: 760px) {
  .menu-panel .menu-item-list {
    columns: 2;
    column-gap: clamp(2rem, 5vw, 4rem);
  }

  .menu-panel .menu-item {
    break-inside: avoid;
  }
}

/* ---------- Sub-category heading ---------- */

.menu-subcategory {
  margin: var(--space-6, 2rem) 0 var(--space-2, 0.5rem);
  font-family: var(--font-body);
  font-size: var(--text-sm, 0.875rem);
  font-weight: var(--weight-bold, 700);
  letter-spacing: 0.08em;
  /* No text-transform: Türkçe locale'de "i"yi "İ" yapıp yabancı
     alt-kategori adlarını bozardı (Milkshakeler, San Sebastian, Chia). */
  color: var(--color-secondary-dark, #3f7b7e);
}

/* First sub-category sits right under the blurb — trim the top gap. */
.menu-subcategory:first-of-type {
  margin-top: 0;
}

/* ---------- Item row ---------- */

.menu-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding-block: var(--space-4, 1rem);
}

/* Small product thumbnail (only on items that have an image). */
.menu-item-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 0.6rem;
  object-fit: cover;
  background: var(--color-surface-soft, #eaf1f1);
}

.menu-item-body {
  min-width: 0;
}

.menu-item + .menu-item {
  border-top: 1px solid
    color-mix(in srgb, var(--color-border, #e7d8c8) 60%, transparent);
}

.menu-item-name {
  margin: 0;
  font-size: var(--text-md, 1.125rem);
  font-weight: var(--weight-semibold, 600);
  color: var(--color-text, #2a1c14);
}

.menu-item-note {
  margin: var(--space-1, 0.25rem) 0 0;
  max-width: 44ch;
  font-size: var(--text-sm, 0.875rem);
  line-height: var(--line-normal, 1.6);
  color: var(--color-text-muted, #7a6658);
  text-wrap: pretty;
}

/* ---------- Brew-method strip ---------- */

.brew-strip {
  display: grid;
  gap: var(--space-6, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.brew-item {
  border-top: 2px solid var(--color-accent, #d6a85a);
  padding-top: var(--space-4, 1rem);
}

.brew-item-step {
  display: block;
  margin-bottom: var(--space-2, 0.5rem);
  font-size: var(--text-xs, 0.75rem);
  font-weight: var(--weight-bold, 700);
  letter-spacing: 0.16em;
  color: var(--color-secondary, #8b5e3c);
}

.brew-item-name {
  margin: 0 0 var(--space-2, 0.5rem);
  font-family: var(--font-heading);
  font-size: var(--text-lg, 1.25rem);
  color: var(--color-text, #2a1c14);
}

.brew-item-text {
  margin: 0;
  font-size: var(--text-sm, 0.875rem);
  line-height: var(--line-normal, 1.6);
  color: var(--color-text-muted, #7a6658);
}

/* ---------- Cezve guide ----------
   The real 5-step brewing guide printed on the back of the
   Romm Türk Kahvesi package. */

.cezve-guide {
  margin: var(--space-8, 3rem) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: cezve;

  display: grid;
  gap: var(--space-5, 1.5rem);
}

@media (min-width: 760px) {
  .cezve-guide {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  }
}

.cezve-step {
  counter-increment: cezve;
  padding-top: var(--space-4, 1rem);
  border-top: 1px solid var(--color-border, #d5e2e2);
}

.cezve-step::before {
  content: counter(cezve, decimal-leading-zero);

  display: block;
  margin-bottom: var(--space-2, 0.5rem);

  font-family: var(--font-heading);
  font-size: var(--text-lg, 1.25rem);
  font-weight: var(--weight-bold, 700);
  color: var(--color-secondary, #649ea1);
}

.cezve-step p {
  margin: 0;
  font-size: var(--text-sm, 0.875rem);
  line-height: var(--line-relaxed, 1.7);
  color: var(--color-text-muted, #5f7a7d);
}
