:root {
  --wine: #731f2a;
  --wine-dark: #52121b;
  --wine-soft: #f6e7e9;
  --ink: #261d1d;
  --muted: #746b69;
  --line: #e8e0dc;
  --paper: #fffdfa;
  --canvas: #f7f4f1;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(65, 37, 32, 0.08);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { display: block; max-width: 100%; }

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-150%); background: var(--ink); color: white; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar { height: 100vh; position: sticky; top: 0; background: var(--paper); border-right: 1px solid var(--line); padding: 34px 22px 22px; display: flex; flex-direction: column; }
.brand { width: max-content; margin: 0 8px 42px; display: flex; flex-direction: column; color: var(--wine); }
.brand-word { font-family: var(--serif); font-size: 1.55rem; letter-spacing: .35em; line-height: 1; }
.brand-caption { margin-top: 7px; font-size: .63rem; letter-spacing: .22em; color: #846a67; }
.side-nav { display: grid; gap: 7px; }
.nav-item { min-height: 48px; display: flex; align-items: center; gap: 13px; border: 0; border-radius: 12px; padding: 0 14px; color: #514947; background: transparent; text-decoration: none; font-size: .94rem; text-align: left; cursor: pointer; }
.nav-item.active { position: relative; color: var(--wine); background: var(--wine-soft); font-weight: 650; }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px; border-radius: 4px; background: var(--wine); }
.nav-item.muted { color: #a49c98; cursor: default; }
.nav-icon { width: 20px; text-align: center; font-size: 1.1rem; }
.nav-button { width: 100%; }
.nav-count { margin-left: auto; min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; color: var(--wine); background: #fff; font-size: .75rem; }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 6px 0; border-top: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #dccdca; border-radius: 50%; background: #f9eeee; color: var(--wine); font-family: var(--serif); font-size: .82rem; }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { font-size: .76rem; }
.sidebar-footer small { color: var(--muted); font-size: .67rem; }

.workspace { min-width: 0; }
.topbar { height: 72px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 4vw, 64px); border-bottom: 1px solid rgba(232,224,220,.9); background: rgba(255,253,250,.9); backdrop-filter: blur(18px); }
.mobile-brand { display: none; color: var(--wine); font-family: var(--serif); letter-spacing: .26em; text-decoration: none; }
.topbar-label { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .86rem; }
.crumb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--wine); }
.saved-top { display: flex; align-items: center; gap: 9px; min-height: 40px; border: 1px solid var(--line); border-radius: 999px; padding: 0 8px 0 15px; background: white; cursor: pointer; }
.saved-top b { min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--wine); color: white; font-size: .72rem; }

main { max-width: 1540px; margin: 0 auto; padding: 42px clamp(24px, 4vw, 64px) 72px; }
.catalog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.eyebrow { display: block; margin-bottom: 8px; color: var(--wine); font-size: .7rem; font-weight: 800; letter-spacing: .14em; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, .card-title, .product-name { font-family: var(--serif); }
h1 { margin-bottom: 9px; font-size: clamp(2.15rem, 4vw, 3.4rem); line-height: 1.03; letter-spacing: -.035em; }
.catalog-head p { max-width: 640px; margin-bottom: 0; color: var(--muted); font-size: 1rem; }
.catalog-stat { flex: none; text-align: right; }
.catalog-stat strong { display: block; color: var(--wine); font-family: var(--serif); font-size: 2.15rem; line-height: 1; }
.catalog-stat span { color: var(--muted); font-size: .76rem; }

.search-row { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; gap: 10px; }
.search-box { min-height: 54px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 15px; padding: 0 16px; background: var(--white); box-shadow: 0 8px 24px rgba(65,37,32,.035); }
.search-box:focus-within { border-color: #b8848b; box-shadow: 0 0 0 4px rgba(115,31,42,.08); }
.search-icon { color: var(--wine); font-size: 1.15rem; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 1rem; }
.search-box input::placeholder { color: #aaa09d; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 12px; padding: 0 18px; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .18s, background .18s, border-color .18s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: var(--wine); }
.button.primary:hover { background: var(--wine-dark); }
.button.secondary { border-color: var(--line); background: white; }
.button.ghost { min-height: 54px; border-color: var(--line); background: var(--white); }
.button .count-pill { margin-left: 8px; padding: 2px 7px; border-radius: 999px; color: white; background: var(--wine); font-size: .72rem; }

.category-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 17px 0 8px; }
.category-strip::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 38px; border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; color: #5b5351; background: rgba(255,255,255,.75); font-size: .86rem; cursor: pointer; }
.chip.active { border-color: var(--wine); color: white; background: var(--wine); }
.results-bar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.results-bar p { margin: 0; color: var(--muted); font-size: .86rem; }
.results-bar strong { color: var(--ink); }
.active-filters { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.filter-token { border: 0; border-radius: 999px; padding: 6px 10px; color: var(--wine); background: var(--wine-soft); font-size: .75rem; cursor: pointer; }

.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 18px; }
.recipe-card { min-width: 0; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: 0 10px 30px rgba(65,37,32,.045); transition: transform .22s ease, box-shadow .22s ease; }
.recipe-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-link { display: block; color: inherit; text-decoration: none; }
.card-image-wrap { aspect-ratio: 4 / 3; overflow: hidden; background: #eee5e1; }
.card-image { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.recipe-card:hover .card-image { transform: scale(1.035); }
.image-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(115,31,42,.72); background: radial-gradient(circle at 30% 25%, #faecec, #eadbd4); font-family: var(--serif); font-size: 1.5rem; }
.favorite-button { width: 38px; height: 38px; position: absolute; top: 12px; right: 12px; z-index: 2; border: 0; border-radius: 50%; display: grid; place-items: center; color: var(--wine); background: rgba(255,255,255,.92); box-shadow: 0 5px 16px rgba(46,24,24,.15); font-size: 1.18rem; cursor: pointer; }
.favorite-button.saved { color: white; background: var(--wine); }
.card-body { padding: 15px 16px 16px; }
.card-kicker { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: var(--wine); font-size: .68rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.card-title { min-height: 2.6em; margin-bottom: 12px; font-size: 1.15rem; line-height: 1.25; letter-spacing: -.015em; }
.card-meta { display: flex; gap: 12px; color: var(--muted); font-size: .76rem; }
.card-meta span { display: flex; align-items: center; gap: 5px; }
.card-cta { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--wine); font-size: .78rem; font-weight: 750; }
.load-more-wrap { display: flex; justify-content: center; padding-top: 30px; }
.empty-state { grid-column: 1 / -1; padding: 76px 24px; border: 1px dashed #d9cbc7; border-radius: 20px; text-align: center; background: rgba(255,255,255,.55); }
.empty-state h2 { margin-bottom: 8px; }
.empty-state p { color: var(--muted); }

.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; color: var(--wine); text-decoration: none; font-size: .86rem; font-weight: 700; }
.detail-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--white); box-shadow: var(--shadow); }
.detail-photo { min-height: 470px; background: #eee5e1; }
.detail-photo img, .detail-photo .image-fallback { width: 100%; height: 100%; object-fit: cover; }
.detail-intro { padding: clamp(30px, 5vw, 62px); display: flex; flex-direction: column; justify-content: center; }
.detail-intro h1 { font-size: clamp(2.3rem, 4vw, 4.35rem); overflow-wrap: anywhere; }
.detail-description { margin-bottom: 22px; color: var(--muted); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.meta-pill { padding: 7px 11px; border-radius: 999px; color: #5d514f; background: #f5f0ed; font-size: .78rem; }
.flavor-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 27px; padding: 0; list-style: none; }
.flavor-list li { padding: 5px 10px; border: 1px solid #ead4d6; border-radius: 999px; color: var(--wine); font-size: .75rem; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 22px; margin-top: 22px; align-items: start; }
.detail-card { border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
.recipe-content { display: grid; grid-template-columns: .82fr 1.18fr; }
.recipe-section { padding: 30px; }
.recipe-section + .recipe-section { border-left: 1px solid var(--line); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: 1.35rem; }
.ingredient-list, .step-list { margin: 0; padding: 0; list-style: none; }
.ingredient-list { display: grid; gap: 11px; }
.ingredient-item { display: grid; grid-template-columns: 8px 1fr; gap: 10px; color: #4f4745; }
.ingredient-item::before { content: ""; width: 5px; height: 5px; margin-top: 10px; border-radius: 50%; background: var(--wine); }
.ingredient-item strong { color: var(--ink); font-weight: 700; }
.step-list { counter-reset: steps; display: grid; gap: 16px; }
.step-item { counter-increment: steps; display: grid; grid-template-columns: 30px 1fr; gap: 12px; color: #4f4745; }
.step-item::before { content: counter(steps); width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #dfc7ca; border-radius: 50%; color: var(--wine); font-size: .76rem; font-weight: 750; }
.products-card { position: sticky; top: 94px; overflow: hidden; }
.products-card-header { padding: 25px 25px 18px; border-bottom: 1px solid var(--line); }
.products-card-header h2 { margin-bottom: 4px; font-size: 1.35rem; }
.products-card-header p { margin: 0; color: var(--muted); font-size: .82rem; }
.product-list { padding: 8px 25px 16px; }
.product-row { display: flex; align-items: center; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.product-mark { width: 42px; height: 54px; display: grid; place-items: center; border-radius: 10px; color: var(--wine); background: linear-gradient(150deg,#fbefee,#f2dfe0); font-family: var(--serif); font-size: .68rem; }
.product-name { font-size: .98rem; line-height: 1.25; }
.product-family { display: block; color: var(--muted); font-family: var(--sans); font-size: .7rem; }
.product-empty { padding: 24px 0; color: var(--muted); font-size: .86rem; }
.source-note { margin: 20px 0 0; color: var(--muted); font-size: .75rem; text-align: center; }
.source-note a { color: var(--wine); }

.panel-dialog { width: min(520px, calc(100vw - 24px)); max-height: min(760px, calc(100vh - 24px)); margin: auto 0 auto auto; border: 0; border-radius: 22px 0 0 22px; padding: 0; color: var(--ink); background: var(--paper); box-shadow: -18px 0 60px rgba(44,25,25,.18); }
.panel-dialog[open] { animation: slideIn .24s ease-out; }
.panel-dialog::backdrop { background: rgba(38,29,29,.34); backdrop-filter: blur(3px); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 26px; border-bottom: 1px solid var(--line); background: var(--paper); }
.dialog-head h2 { margin: 0; font-size: 1.7rem; }
.dialog-head .eyebrow { margin-bottom: 3px; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: white; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.dialog-content { min-height: 200px; max-height: 500px; overflow: auto; padding: 10px 26px; }
.saved-item { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.saved-item img, .saved-thumb-fallback { width: 76px; height: 60px; object-fit: cover; border-radius: 10px; background: #eee5e1; }
.saved-item strong { display: block; font-family: var(--serif); line-height: 1.2; }
.saved-item small { color: var(--muted); }
.saved-item button { border: 0; background: transparent; color: var(--wine); cursor: pointer; }
.dialog-empty { padding: 58px 20px; text-align: center; }
.dialog-empty span { display: block; margin-bottom: 12px; color: var(--wine); font-size: 2rem; }
.dialog-empty p { margin: 0; color: var(--muted); }
.dialog-actions { position: sticky; bottom: 0; display: flex; gap: 10px; justify-content: flex-end; padding: 18px 26px 26px; border-top: 1px solid var(--line); background: var(--paper); }
.filter-dialog { width: min(430px, calc(100vw - 24px)); }
.filter-form { display: grid; gap: 18px; padding: 28px 26px 180px; }
.filter-form label { display: grid; gap: 8px; font-size: .82rem; font-weight: 700; }
.filter-form select { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 11px; padding: 0 12px; color: var(--ink); background: white; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 100; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; border-radius: 999px; padding: 11px 17px; color: white; background: var(--ink); box-shadow: var(--shadow); font-size: .82rem; transition: .22s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 86px minmax(0, 1fr); }
  .sidebar { padding: 28px 14px 20px; align-items: center; }
  .brand { margin-inline: 0; align-items: center; }
  .brand-word { font-size: 1.15rem; letter-spacing: .2em; }
  .brand-caption, .nav-item:not(.active) > :not(.nav-icon), .nav-item { font-size: 0; }
  .side-nav { width: 100%; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-icon { font-size: 1.1rem; }
  .nav-count { position: absolute; top: -3px; right: -3px; font-size: .65rem; }
  .sidebar-footer { display: none; }
  .detail-layout { grid-template-columns: 1fr; }
  .products-card { position: static; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { height: 62px; padding: 0 18px; }
  .mobile-brand { display: block; }
  .topbar-label { display: none; }
  .saved-top { min-height: 38px; }
  main { padding: 27px 16px 56px; }
  .catalog-head { align-items: flex-start; margin-bottom: 22px; }
  .catalog-head p { font-size: .93rem; }
  .catalog-stat { display: none; }
  h1 { font-size: 2.3rem; }
  .search-row { grid-template-columns: minmax(0, 1fr) auto; }
  .search-row .desktop-saved { display: none; }
  .button.ghost { width: 54px; padding: 0; font-size: 0; }
  .button.ghost .filter-label { display: none; }
  .button.ghost::before { content: "☷"; font-size: 1.1rem; }
  .category-strip { margin-right: -16px; padding-right: 16px; }
  .results-bar { align-items: flex-start; }
  .active-filters { justify-content: flex-start; }
  .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .recipe-card { border-radius: 14px; }
  .card-body { padding: 12px; }
  .card-title { min-height: 0; margin-bottom: 9px; font-size: 1rem; }
  .card-kicker { font-size: .6rem; }
  .card-meta { display: none; }
  .card-cta { margin-top: 10px; padding-top: 9px; font-size: .7rem; }
  .favorite-button { width: 34px; height: 34px; top: 8px; right: 8px; }
  .detail-hero { display: block; border-radius: 18px; }
  .detail-photo { min-height: 0; aspect-ratio: 1 / 1; }
  .detail-intro { padding: 26px 22px 29px; }
  .detail-intro h1 { font-size: 2.45rem; }
  .detail-layout { margin-top: 14px; gap: 14px; }
  .recipe-content { display: block; }
  .recipe-section { padding: 23px 20px; }
  .recipe-section + .recipe-section { border-left: 0; border-top: 1px solid var(--line); }
  .section-head { align-items: flex-start; }
  .products-card-header, .product-list { padding-inline: 20px; }
  .panel-dialog { width: calc(100vw - 12px); max-height: calc(100vh - 12px); border-radius: 20px 0 0 20px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
}

@media (max-width: 410px) {
  .saved-top-label { display: none; }
  .search-box { min-height: 50px; padding-inline: 13px; }
  .button.ghost { min-height: 50px; width: 50px; }
  .recipe-grid { grid-template-columns: 1fr; }
  .card-title { font-size: 1.1rem; }
  .card-meta { display: flex; }
  .detail-actions .button { width: 100%; }
  .section-head { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Editorial aperitivo visual refresh */
:root {
  --wine: #721b2a;
  --wine-dark: #491018;
  --wine-bright: #972f40;
  --wine-soft: #f8e9e8;
  --gold: #c69a52;
  --ink: #231b19;
  --muted: #746a65;
  --line: #e3d9d1;
  --paper: #fffaf5;
  --canvas: #f4f0eb;
  --shadow: 0 20px 55px rgba(63, 31, 27, .1);
  --shadow-strong: 0 28px 70px rgba(53, 22, 22, .18);
  --serif: "Iowan Old Style", Baskerville, Georgia, "Times New Roman", serif;
}

body {
  background:
    radial-gradient(circle at 92% 2%, rgba(198, 154, 82, .09), transparent 24rem),
    var(--canvas);
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(198, 154, 82, .72);
  outline-offset: 3px;
}

.app-shell { grid-template-columns: 226px minmax(0, 1fr); }

.sidebar {
  overflow: hidden;
  border-right: 0;
  padding: 36px 20px 24px;
  color: #fff;
  background:
    radial-gradient(circle at 10% 7%, rgba(255,255,255,.12), transparent 15rem),
    linear-gradient(165deg, #4a0e17 0%, #731b2a 58%, #3d0b12 100%);
  box-shadow: 12px 0 36px rgba(57, 17, 22, .12);
}

.sidebar::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: 115px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
}

.brand { margin-bottom: 54px; color: #fff; }
.brand-word { font-size: 1.65rem; letter-spacing: .39em; text-shadow: 0 2px 18px rgba(0,0,0,.18); }
.brand-caption { color: #e2c292; font-weight: 700; letter-spacing: .18em; }
.side-nav { position: relative; z-index: 1; gap: 9px; }
.nav-item { min-height: 52px; color: rgba(255,255,255,.76); border: 1px solid transparent; border-radius: 14px; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-item.active { color: var(--wine-dark); background: #fffaf5; box-shadow: 0 12px 28px rgba(31,6,10,.18); }
.nav-item.active::before { left: 7px; width: 4px; background: var(--gold); }
.nav-icon { font-family: var(--serif); font-size: 1.15rem; }
.nav-count { color: #fff; background: rgba(255,255,255,.16); }

.sidebar-info {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  padding: 17px 16px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(10px);
}
.sidebar-info-label { display: block; margin-bottom: 6px; color: #e4c48f; font-size: .64rem; font-weight: 800; letter-spacing: .14em; }
.sidebar-info strong { display: block; color: #fff; font-family: var(--serif); font-size: 1.22rem; font-weight: 500; }
.sidebar-info small { color: rgba(255,255,255,.62); font-size: .7rem; }
.sidebar-footer { position: relative; z-index: 1; border-color: rgba(255,255,255,.13); }
.avatar { border-color: rgba(255,255,255,.22); color: #fff; background: rgba(255,255,255,.1); }
.sidebar-footer strong { color: rgba(255,255,255,.9); }
.sidebar-footer small { color: rgba(255,255,255,.54); }

.topbar {
  height: 76px;
  padding: 0 clamp(24px, 3.5vw, 58px);
  border-bottom-color: rgba(106, 72, 61, .12);
  background: rgba(255,250,245,.88);
  box-shadow: 0 6px 26px rgba(54,26,21,.035);
}
.topbar-label { color: #655956; font-weight: 650; }
.crumb-dot { width: 8px; height: 8px; background: var(--gold); box-shadow: 0 0 0 5px rgba(198,154,82,.13); }
.saved-top { min-height: 44px; padding: 0 8px 0 16px; border-color: #ddd0c7; color: var(--wine); box-shadow: 0 7px 22px rgba(67,28,24,.06); transition: border-color .18s, transform .18s, box-shadow .18s; }
.saved-top:hover { transform: translateY(-1px); border-color: #caaeb0; box-shadow: 0 10px 26px rgba(67,28,24,.1); }
.saved-top b { background: var(--wine); }

main { max-width: 1500px; padding: 34px clamp(24px, 3.5vw, 58px) 80px; }

.catalog-hero {
  min-height: 300px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  overflow: hidden;
  margin-bottom: 24px;
  padding: clamp(34px, 4vw, 52px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 30px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 10%, rgba(255,255,255,.13), transparent 18rem),
    linear-gradient(125deg, #4c0e18 0%, #711928 48%, #8c2a38 100%);
  box-shadow: var(--shadow-strong);
}
.catalog-hero::before {
  content: "";
  position: absolute;
  left: -65px;
  bottom: -145px;
  width: 290px;
  height: 290px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
}
.hero-copy { position: relative; z-index: 2; max-width: 690px; }
.catalog-hero .eyebrow { margin-bottom: 12px; color: #e7c58d; }
.catalog-hero h1 { max-width: 760px; margin-bottom: 16px; color: #fff; font-size: clamp(2.7rem, 4.5vw, 4.7rem); line-height: .98; letter-spacing: -.048em; }
.catalog-hero p { max-width: 590px; margin-bottom: 24px; color: rgba(255,255,255,.74); font-size: 1.02rem; }
.hero-summary { display: flex; align-items: center; gap: 12px; }
.hero-summary strong { color: #f0ce95; font-family: var(--serif); font-size: 2rem; font-weight: 500; line-height: 1; }
.hero-summary span { max-width: 140px; color: rgba(255,255,255,.7); font-size: .72rem; line-height: 1.25; }
.hero-gallery { position: relative; min-height: 225px; }
.hero-shot { position: absolute; overflow: hidden; border: 5px solid rgba(255,250,245,.98); border-radius: 18px; background: #ddccc1; box-shadow: 0 20px 45px rgba(31,5,10,.3); transition: transform .28s ease, z-index 0s; }
.hero-shot:hover { z-index: 5; transform: rotate(0) translateY(-5px); }
.hero-shot-image { width: 100%; height: 100%; object-fit: cover; }
.hero-shot span { position: absolute; inset: auto 0 0; padding: 34px 12px 10px; color: #fff; background: linear-gradient(transparent,rgba(30,8,11,.8)); font-family: var(--serif); font-size: .76rem; }
.hero-shot.shot-1 { inset: 8px 115px 5px 0; z-index: 3; transform: rotate(-3deg); }
.hero-shot.shot-2 { inset: 0 0 40px 205px; z-index: 2; transform: rotate(5deg); }
.hero-shot.shot-3 { inset: 105px 18px -12px 225px; z-index: 4; transform: rotate(2deg); }

.catalog-tools {
  position: sticky;
  top: 76px;
  z-index: 15;
  margin: 0 -10px;
  padding: 12px 10px 5px;
  background: linear-gradient(to bottom, rgba(244,240,235,.97) 78%, rgba(244,240,235,0));
  backdrop-filter: blur(12px);
}
.search-row { grid-template-columns: minmax(280px, 1fr) auto auto; gap: 11px; }
.search-box { min-height: 58px; border-color: #ded1c8; border-radius: 17px; padding: 0 19px; box-shadow: 0 10px 28px rgba(60,31,25,.07); }
.search-box:focus-within { border-color: var(--wine-bright); box-shadow: 0 0 0 4px rgba(151,47,64,.09), 0 12px 30px rgba(60,31,25,.08); }
.search-icon { font-size: 1.35rem; }
.button { border-radius: 13px; }
.button.primary { background: linear-gradient(135deg, var(--wine-bright), var(--wine-dark)); box-shadow: 0 10px 24px rgba(114,27,42,.17); }
.button.secondary, .button.ghost { border-color: #ded1c8; }
.button.ghost { min-height: 58px; box-shadow: 0 9px 24px rgba(60,31,25,.045); }
.category-strip { gap: 9px; padding: 13px 0 10px; }
.chip { min-height: 43px; display: inline-flex; align-items: center; gap: 9px; border-color: #ddd1c8; padding: 0 11px 0 16px; background: rgba(255,250,245,.88); font-size: .82rem; font-weight: 650; transition: transform .16s, border-color .16s, background .16s; }
.chip:hover { transform: translateY(-1px); border-color: #c6ada7; }
.chip b { min-width: 25px; height: 25px; display: grid; place-items: center; border-radius: 999px; color: #766964; background: #eee6df; font-size: .65rem; }
.chip.active { border-color: var(--wine); background: var(--wine); box-shadow: 0 8px 20px rgba(114,27,42,.18); }
.chip.active b { color: var(--wine); background: #fff; }

.results-bar { min-height: 76px; justify-content: flex-start; }
.results-heading { margin-right: auto; }
.results-heading > span { display: block; color: var(--wine); font-size: .62rem; font-weight: 800; letter-spacing: .15em; }
.results-heading h2 { margin: 1px 0 0; font-size: clamp(1.55rem, 2.5vw, 2rem); line-height: 1.1; }
.results-bar > p { padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,250,245,.72); }
.filter-token { padding: 7px 11px; font-weight: 650; }

.recipe-grid { grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 22px; }
.recipe-card { border-color: #ded4cc; border-radius: 22px; box-shadow: 0 11px 32px rgba(61,31,25,.065); }
.recipe-card:hover { transform: translateY(-6px); border-color: #cdbab0; box-shadow: 0 24px 52px rgba(61,31,25,.14); }
.card-link { height: 100%; display: flex; flex-direction: column; }
.card-image-wrap { position: relative; aspect-ratio: 1.28 / 1; }
.card-image-wrap::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(26,10,10,.36)); pointer-events: none; }
.card-image { transition-duration: .65s; }
.recipe-card:hover .card-image { transform: scale(1.055); }
.favorite-button { top: 13px; right: 13px; border: 1px solid rgba(255,255,255,.55); box-shadow: 0 8px 25px rgba(30,9,12,.2); transition: transform .18s, background .18s; }
.favorite-button:hover { transform: scale(1.08); }
.card-badge-row { position: absolute; right: 13px; bottom: 12px; left: 13px; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; pointer-events: none; }
.category-badge, .zero-badge { padding: 6px 9px; border-radius: 999px; color: #fff; background: rgba(48,13,18,.76); backdrop-filter: blur(8px); font-size: .61rem; font-weight: 750; letter-spacing: .035em; }
.zero-badge { color: var(--wine-dark); background: #fff5df; }
.card-body { flex: 1; display: flex; flex-direction: column; padding: 18px 18px 17px; }
.card-title { min-height: 2.5em; margin-bottom: 9px; font-size: 1.3rem; line-height: 1.2; }
.card-flavors { min-height: 25px; display: flex; gap: 6px; margin-bottom: 12px; }
.card-flavors span { padding: 4px 8px; border-radius: 999px; color: #7a4f43; background: #f5ece5; font-size: .64rem; font-weight: 650; }
.card-meta { flex-wrap: wrap; row-gap: 5px; font-size: .72rem; }
.card-meta span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #c4a17a; }
.card-meta span:first-child::before { background: var(--wine-bright); }
.card-cta { margin-top: auto; padding-top: 14px; border-color: #eee5de; font-size: .8rem; }

.back-link { margin-bottom: 18px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,250,245,.78); }
.detail-hero { grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); border-color: #dfd2c8; border-radius: 30px; box-shadow: var(--shadow-strong); }
.detail-photo { min-height: 540px; position: relative; overflow: hidden; }
.detail-photo img { object-position: center center; }
.detail-photo::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(38,11,14,.22)); pointer-events: none; }
.detail-intro { position: relative; padding: clamp(38px, 5vw, 70px); background: linear-gradient(145deg, #fffdf9 0%, #f8eee8 100%); }
.detail-intro::before { content: ""; position: absolute; top: 48px; bottom: 48px; left: 0; width: 4px; background: linear-gradient(var(--gold), var(--wine)); }
.detail-intro h1 { margin-bottom: 16px; color: var(--wine-dark); font-size: clamp(2.7rem, 4.5vw, 4.8rem); line-height: .98; }
.detail-description { width: fit-content; margin-bottom: 22px; padding: 7px 11px; border-radius: 999px; color: #6b5752; background: #f0e3da; font-size: .8rem; font-weight: 650; }
.meta-pill { border: 1px solid #e5d7cf; background: rgba(255,255,255,.65); }
.flavor-list li { border-color: #ddc4be; background: rgba(255,255,255,.48); font-weight: 650; }
.detail-layout { gap: 24px; margin-top: 24px; }
.detail-card { border-color: #ded2c9; border-radius: 24px; box-shadow: 0 12px 35px rgba(61,31,25,.065); }
.recipe-section { padding: 34px; }
.section-head { justify-content: flex-start; gap: 11px; margin-bottom: 22px; }
.section-number { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--wine); font-size: .66rem; font-weight: 800; }
.section-head h2 { font-size: 1.5rem; }
.ingredient-list { gap: 8px; }
.ingredient-item { grid-template-columns: 8px 1fr; padding: 11px 12px; border-radius: 11px; color: #504641; background: #faf5f0; }
.ingredient-item::before { background: var(--gold); }
.step-list { gap: 19px; }
.step-item { grid-template-columns: 34px 1fr; }
.step-item::before { width: 32px; height: 32px; border-color: #dcbfc0; background: #fbefec; font-weight: 800; }
.products-card { top: 100px; }
.products-card-header { padding: 28px 27px 22px; border: 0; color: #fff; background: linear-gradient(135deg, var(--wine-dark), var(--wine)); }
.products-card-header .eyebrow { color: #e6c58d; }
.products-card-header h2 { color: #fff; font-size: 1.55rem; }
.products-card-header p { color: rgba(255,255,255,.66); }
.product-list { padding: 9px 27px 18px; }
.product-row { padding: 17px 0; }
.product-mark { border: 1px solid #ead5ce; color: var(--wine); background: linear-gradient(150deg,#fff7f1,#f2ddd7); box-shadow: 0 7px 18px rgba(64,30,25,.07); }
.source-note { margin-top: 24px; }

.panel-dialog { border-radius: 26px 0 0 26px; background: #fffaf5; box-shadow: -25px 0 80px rgba(42,16,17,.24); }
.dialog-head, .dialog-actions { background: #fffaf5; }
.dialog-head { padding: 28px; }
.dialog-head h2 { font-size: 1.95rem; }
.icon-button { border-color: #dacbc3; transition: transform .18s, background .18s; }
.icon-button:hover { transform: rotate(4deg); background: var(--wine-soft); }
.saved-item a { color: inherit; text-decoration: none; }
.saved-item a:hover strong { color: var(--wine); }
.filter-form select { border-color: #d9cbc2; background: #fff; }
.toast { background: var(--wine-dark); box-shadow: 0 15px 35px rgba(55,15,21,.25); }

@media (max-width: 1180px) {
  .catalog-hero { grid-template-columns: minmax(0, 1fr) 360px; }
  .hero-shot.shot-1 { right: 90px; }
  .hero-shot.shot-2 { left: 175px; }
  .hero-shot.shot-3 { left: 195px; }
}

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 88px minmax(0, 1fr); }
  .sidebar { padding: 30px 13px 20px; }
  .brand-word { color: #fff; }
  .sidebar-info { display: none; }
  .nav-item.active { color: var(--wine-dark); }
  .catalog-hero { grid-template-columns: minmax(0, 1fr) 300px; gap: 25px; }
  .catalog-hero h1 { font-size: 3.25rem; }
  .hero-shot.shot-1 { right: 70px; }
  .hero-shot.shot-2 { left: 145px; }
  .hero-shot.shot-3 { left: 165px; }
}

@media (max-width: 820px) {
  .catalog-hero { grid-template-columns: 1fr; }
  .hero-copy { max-width: 580px; }
  .hero-gallery { min-height: 175px; }
  .hero-shot.shot-1 { inset: 0 47% 0 0; }
  .hero-shot.shot-2 { inset: 5px 23% 18px 46%; }
  .hero-shot.shot-3 { inset: 34px 0 -4px 72%; }
}

@media (max-width: 760px) {
  .topbar { height: 64px; background: rgba(255,250,245,.94); }
  .mobile-brand { color: var(--wine); font-weight: 700; }
  main { padding: 22px 15px 62px; }
  .catalog-hero { gap: 21px; margin-bottom: 16px; padding: 28px 24px 24px; border-radius: 24px; }
  .catalog-hero h1 { font-size: clamp(2.45rem, 11vw, 3.4rem); }
  .catalog-hero p { font-size: .92rem; }
  .hero-summary strong { font-size: 1.7rem; }
  .hero-gallery { min-height: 150px; }
  .catalog-tools { position: static; margin-inline: 0; padding: 0; background: transparent; backdrop-filter: none; }
  .search-box { min-height: 54px; border-radius: 15px; }
  .button.ghost { min-height: 54px; }
  .category-strip { margin-right: -15px; padding-right: 15px; }
  .results-bar { min-height: 83px; flex-wrap: wrap; gap: 8px; padding-block: 13px; }
  .results-heading { width: auto; }
  .results-heading h2 { font-size: 1.65rem; }
  .active-filters { width: 100%; }
  .recipe-grid { gap: 13px; }
  .card-image-wrap { aspect-ratio: 1.12 / 1; }
  .card-badge-row { right: 10px; bottom: 9px; left: 10px; }
  .category-badge, .zero-badge { max-width: 78%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .card-title { font-size: 1.1rem; }
  .card-flavors { min-height: 21px; margin-bottom: 7px; }
  .detail-hero { border-radius: 24px; }
  .detail-photo {
    display: grid;
    min-height: 0;
    aspect-ratio: 1 / 1;
    place-items: center;
  }
  .detail-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }
  .detail-intro::before { top: 25px; bottom: 25px; }
  .detail-intro h1 { font-size: clamp(2.5rem, 12vw, 3.6rem); }
  .detail-description { white-space: normal; }
  .detail-card { border-radius: 20px; }
  .recipe-section { padding: 25px 20px; }
  .products-card-header, .product-list { padding-inline: 22px; }
}

@media (max-width: 480px) {
  .hero-gallery { min-height: 162px; }
  .hero-shot.shot-1 { inset: 0 16% 0 0; }
  .hero-shot.shot-2, .hero-shot.shot-3 { display: none; }
  .recipe-grid { grid-template-columns: 1fr; }
  .card-image-wrap { aspect-ratio: 1.36 / 1; }
  .card-title { min-height: 0; font-size: 1.28rem; }
  .card-meta { display: flex; }
  .panel-dialog { width: calc(100vw - 8px); border-radius: 24px 0 0 24px; }
}

.collections-section { margin-bottom: 13px; padding: 8px 0 4px; }
.collections-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.collections-head .eyebrow { margin-bottom: 3px; }
.collections-head h2 { margin: 0; font-size: clamp(1.45rem, 2.2vw, 1.9rem); }
.collection-arrows { display: flex; gap: 7px; }
.collection-arrows button { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid #d9ccc3; border-radius: 50%; color: var(--wine); background: rgba(255,250,245,.9); box-shadow: 0 7px 20px rgba(61,31,25,.055); cursor: pointer; transition: transform .16s, border-color .16s, background .16s; }
.collection-arrows button:hover { transform: translateY(-2px); border-color: #c5a9a2; background: #fff; }
.collections-track { display: grid; grid-auto-flow: column; grid-auto-columns: 290px; gap: 12px; overflow-x: auto; padding: 2px 2px 13px; scroll-behavior: smooth; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #cbb9ae transparent; }
.collection-card { height: 128px; position: relative; overflow: hidden; display: block; border: 2px solid transparent; border-radius: 18px; color: #fff; background: #4e1a20; box-shadow: 0 12px 30px rgba(55,24,21,.12); scroll-snap-align: start; text-decoration: none; isolation: isolate; transition: transform .2s, box-shadow .2s, border-color .2s; }
.collection-card:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(55,24,21,.19); }
.collection-card.active { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198,154,82,.17), 0 18px 38px rgba(55,24,21,.19); }
.collection-image { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.collection-card:hover .collection-image { transform: scale(1.045); }
.collection-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(39,9,13,.93) 0%, rgba(55,12,18,.76) 51%, rgba(39,9,13,.22) 100%); }
.collection-symbol { width: 38px; height: 38px; position: absolute; top: 50%; left: 15px; z-index: 2; transform: translateY(-50%); display: grid; place-items: center; border: 1px solid rgba(255,255,255,.32); border-radius: 50%; color: var(--wine-dark); background: rgba(255,250,245,.94); font-family: var(--serif); font-size: .76rem; font-weight: 800; box-shadow: 0 6px 18px rgba(22,5,8,.2); }
.collection-copy { position: absolute; top: 50%; right: 13px; left: 66px; z-index: 2; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-start; }
.collection-copy strong { max-width: 100%; overflow: hidden; font-family: var(--serif); font-size: 1.08rem; font-weight: 600; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.collection-copy small { max-width: 100%; margin: 4px 0 8px; overflow: hidden; color: rgba(255,255,255,.7); font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.collection-copy b { padding: 3px 7px; border-radius: 999px; color: #f2d29e; background: rgba(255,255,255,.1); font-size: .61rem; letter-spacing: .03em; }
.filter-token { display: inline-flex; align-items: center; text-decoration: none; }

@media (min-width: 1420px) {
  .collections-track { grid-auto-columns: 300px; }
}

@media (max-width: 760px) {
  .collections-section { margin: 3px -15px 11px 0; padding-top: 7px; }
  .collections-head { padding-right: 15px; }
  .collections-head h2 { font-size: 1.55rem; }
  .collection-arrows { display: none; }
  .collections-track { grid-auto-columns: minmax(255px, 78vw); gap: 10px; padding-right: 15px; }
  .collection-card { height: 120px; border-radius: 16px; }
}

@media (max-width: 480px) {
  .collections-track { grid-auto-columns: 82vw; }
  .collection-card { height: 116px; }
}
