/* Frigella on wide screens (laptops and desktops).
   Phones and tablets keep the original layout; everything here is inside
   one media query, so nothing changes below 1100px. */
@media (min-width: 1100px) {
  :root { --side: 248px; }

  /* Sidebar instead of the bottom bar */
  nav.tabs {
    top: 0; bottom: 0; right: auto; width: var(--side);
    border-top: 0; border-right: 1px solid var(--line);
    padding: 0; display: flex; flex-direction: column;
  }
  nav.tabs .in {
    max-width: none; margin: 0; padding: 26px 16px 20px;
    display: flex; flex-direction: column; gap: 4px; height: 100%; box-sizing: border-box;
  }
  nav.tabs .in::before {
    content: "Frigella"; display: block; margin: 0 8px 26px; order: -2;
    padding-left: 34px; min-height: 34px; line-height: 34px;
    background: url(/logo.svg) no-repeat left center / 26px 33px;
    font-family: var(--display); font-weight: 800; font-size: 1.45rem; letter-spacing: -.02em; color: var(--ink);
  }
  nav.tabs button {
    flex-direction: row; justify-content: flex-start; gap: 12px;
    padding: 11px 14px; border-radius: 12px; font-size: .98rem; text-align: left;
  }
  nav.tabs button:hover { background: var(--surface-2, rgba(0,0,0,.04)); color: var(--ink); }
  nav.tabs button[aria-current="page"] { background: color-mix(in srgb, var(--brand) 12%, transparent); }
  nav.tabs button[aria-current="page"]::before { display: none; }
  nav.tabs .badge { position: static; margin-left: auto; }

  /* The Add button becomes a wide pill at the top of the list */
  nav.tabs .navadd {
    order: -1; flex-direction: row; justify-content: center; gap: 10px;
    margin: 0 0 18px; padding: 0; border-radius: 14px;
    background: var(--brand); color: var(--brand-ink); font-size: 1rem;
    box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--brand) 80%, transparent);
  }
  nav.tabs .navadd:hover { background: var(--brand); color: var(--brand-ink); filter: brightness(1.06); }
  nav.tabs .navadd .disc {
    width: auto; height: 46px; margin: 0; border-radius: 0; background: none; box-shadow: none; color: inherit;
  }
  nav.tabs .navadd .disc svg { width: 22px; height: 22px; }
  nav.tabs .navadd .lb::after { content: " food"; }
  :root[data-skin="door"] nav.tabs .navadd { background: var(--tomato); color: #fff; }
  :root[data-skin="door"] nav.tabs .navadd .disc { background: none; box-shadow: none; }

  /* Main area beside the sidebar */
  .wrap { max-width: 1180px; margin: 0 0 0 var(--side); padding: 30px 44px 60px; }
  @media (min-width: 1600px) { .wrap { margin-left: calc(var(--side) + (100vw - var(--side) - 1180px) / 2 - 8px); } }
  header.top h1.fg-brand { display: none; }
  header.top { margin-bottom: 20px; }
  .homebtn { margin-top: 0; }
  .homebtn #homeLabel { max-width: 320px; }

  /* "Use these first": wrap the cards instead of a cut-off sideways strip */
  .shelf {
    margin: 0; padding: 4px 0 8px; overflow: visible; flex-wrap: wrap;
    scroll-snap-type: none;
  }
  /* Category chips wrap too */
  .cats { margin: 0 0 16px; padding: 0; overflow: visible; flex-wrap: wrap; }

  /* The full list in columns */
  #itemList { columns: 2; column-gap: 22px; }
  #itemList > * { break-inside: avoid; display: block; margin-bottom: 18px; }
  @media (min-width: 1680px) { #itemList { columns: 3; } }

  /* Reading width for the other sections */
  #view-shop, #view-hist { max-width: 860px; }
  #view-cook .panel { max-width: 860px; }
  .recipes { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
  #recipes > .kcal-note { grid-column: 1 / -1; }

}
