/* ============================================================
   PEPPVILLE — Design System
   ============================================================ */

/* --- Variables --- */
:root {
  --bg:     #0b0c10;
  --card:   #111317;
  --text:   #e9eef7;
  --muted:  #9aa4b2;
  --line:   #222733;
  --acc:    #4caf50;
  --danger: #e53935;
  --header: #07080b;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a    { color: inherit; text-decoration: none; }
main {
  flex: 1;
  width: 100%;
}

/* ============================================================
   BACKGROUND DECOR
   ============================================================ */

.bg-decor {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: top center;
  opacity: 0.15;
}

.bg-decor--molecule {
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100vw;
  background-image: url('/images/capsaicin_molecule.svg');
}

/* ============================================================
   LAYOUT
   ============================================================ */

.container { max-width: 960px; margin: 0 auto; padding: 16px; }
.narrow    { max-width: 520px; }
.row       { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid      { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.grid2     { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ============================================================
   HEADER & FOOTER
   ============================================================ */

.site-header,
.site-footer { background: var(--header); border-bottom: 1px solid var(--line); }
.site-footer { border-top: 1px solid var(--line); border-bottom: none; margin-top: 24px; }

.site-header .container {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.brand { font-weight: 700; letter-spacing: .2px; }
.logo  { height: 42px; width: auto; display: block; }
.nav   { display: flex; gap: 12px; flex-wrap: wrap; }
.right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lang  { opacity: .9; }

/* ============================================================
   TYPOGRAPHY & UTILITIES
   ============================================================ */

.muted { color: var(--muted); }
.lead  { color: var(--muted); font-size: 1.05rem; line-height: 1.45; }
.title { font-weight: 700; }
.text  { white-space: pre-wrap; line-height: 1.5; color: #d7deea; }
.k     { color: var(--muted); margin-right: 8px; }
.kv    { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.err   { color: #ff9090; }

/* ============================================================
   COMPONENTS
   ============================================================ */

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

/* Buttons */
.btn {
  background: var(--acc);
  border: none;
  color: #07121f;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.05); }

.link {
  background: none;
  border: none;
  color: var(--acc);
  cursor: pointer;
  padding: 0;
  font: inherit;
}

/* Badge */
.badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Tag */
.tag {
  font-size: .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
}

/* Alert */
.alert {
  border-radius: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  margin: 10px 0;
}
.alert.ok  { background: rgba(0,200,120,.08); }
.alert.err { background: rgba(255,80,80,.08); }

/* List & Item */
.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
}

.item > div:first-child {
  min-width: 0;
  flex: 1;
}

/* Table */
.table               { width: 100%; border-collapse: collapse; margin-top: 12px; }
.table th, .table td { border-bottom: 1px solid var(--line); text-align: left; padding: 10px; }

/* Photos */
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.photo  { width: 100%; height: 140px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }

/* Sauce product layout */
.sauce-layout { display: block; }
.sauce-layout--has-photo { display: flex; align-items: flex-start; gap: 32px; }

.sauce-photo-col { flex-shrink: 0; position: sticky; top: 80px; }
.sauce-bottle-photo {
  width: 220px;
  height: 400px;
  object-fit: contain;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 16px;
  display: block;
}

.sauce-info-col { flex: 1; min-width: 0; }

@media (max-width: 640px) {
  .sauce-layout--has-photo { flex-direction: column; }
  .sauce-photo-col { position: static; width: 100%; }
  .sauce-bottle-photo { width: 160px; height: 280px; margin: 0 auto; }
}

/* Comments */
.comments      { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.comment       { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.comment .meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ============================================================
   FORMS
   ============================================================ */

.form   { display: flex; flex-direction: column; gap: 12px; }
label   { display: flex; flex-direction: column; gap: 6px; }
.inline { flex-direction: row; align-items: center; gap: 10px; }

input, textarea, select {
  background: #0d0f14;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}
textarea { resize: vertical; }

.field-group  { display: flex; flex-direction: column; gap: .4rem; }
.field-label  { font-weight: 600; font-size: .9rem; }

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .35rem .75rem;
  padding: .5rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--card);
}
.checkbox-item { display: flex; align-items: center; gap: .4rem; font-size: .875rem; }

/* ============================================================
   PEPPER CHIPS
   ============================================================ */

.pepper-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .75rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: .875rem;
  transition: border-color .15s, color .15s;
}
.chip:hover { border-color: var(--acc); color: var(--acc); }
.chip-shu   { font-size: .75rem; color: var(--muted); }

/* ============================================================
   AVATAR DROPDOWN
   ============================================================ */

.avatar-wrap { position: relative; }

.avatar-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

.avatar-hex                   { width: 36px; height: 36px; transition: filter .15s; }
.avatar-btn:hover .avatar-hex { filter: brightness(1.2); }

.avatar-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  z-index: 200;
}
.avatar-wrap.open .avatar-menu { display: flex; flex-direction: column; gap: 2px; }

.avatar-name {
  font-size: .75rem;
  color: var(--muted);
  padding: 6px 10px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Shared dropdown items — десктоп і мобайл */
.avatar-menu a,           .avatar-menu button,
.mobile-drawer-content a, .mobile-drawer-content button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: .9rem;
}
.avatar-menu a:hover,           .avatar-menu button:hover,
.mobile-drawer-content a:hover, .mobile-drawer-content button:hover {
  background: var(--line);
}

/* ============================================================
   MOBILE
   ============================================================ */

.mobile-nav         { display: none; }
.mobile-user-drawer { display: none; }

/* ============================================================
   ADMIN PANEL
   ============================================================ */

/* Кнопка «Адмін» — видима тільки на мобайлі (ADMIN) */
.admin-header-btn {
  display: none;
}

.admin-wrap {
  display: flex;
  flex: 1;
}

.admin-sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--card);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  padding: 12px 0 24px;
}

.admin-section {
  border-bottom: 1px solid var(--line);
}
.admin-section:last-child { border-bottom: none; }

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.admin-section-head::-webkit-details-marker { display: none; }

.admin-section-head .chevron {
  width: 14px;
  height: 14px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .15s;
}
details.admin-section[open] .admin-section-head .chevron { transform: rotate(180deg); }

.admin-section-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 8px 10px;
}

.admin-nav-link {
  display: block;
  padding: 7px 10px 7px 14px;
  font-size: .875rem;
  border-radius: 8px;
  color: var(--text);
  transition: background .1s, color .1s;
}
.admin-nav-link:hover            { background: var(--line); color: var(--acc); }
.admin-nav-link.active           { background: rgba(76,175,80,.12); color: var(--acc); font-weight: 600; }

.admin-content {
  flex: 1;
  padding: 24px 28px;
  min-width: 0;
}

.admin-form { max-width: 520px; }

/* Молекула червона для адмінів */
.bg-decor--molecule.admin-molecule {
  filter: hue-rotate(240deg) saturate(1.4);
}

@media (max-width: 640px) {
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }

  .site-header .nav,
  .site-header .right { display: none; }

  /* Кнопка «Адмін» у хедері на мобайлі */
  .admin-header-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 13px;
    background: var(--danger);
    color: #fff;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .02em;
  }
  .admin-header-btn:hover { filter: brightness(1.1); }

  /* Admin panel — мобайл */
  .admin-wrap {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    min-width: 0;
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 8px 0 12px;
  }

  .admin-content {
    padding: 16px;
  }

  .bg-decor--molecule {
    top: 100px;
    left: -70%;
    width: 165vw;
    height: 165vw;
    transform: rotate(75deg);
  }

  /* Bottom nav */
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--header);
    border-top: 1px solid var(--line);
    z-index: 100;
  }

  .mobile-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--muted);
    font-size: .68rem;
    transition: color .15s;
  }
  .mobile-nav a.active,
  .mobile-nav a:hover { color: var(--acc); }

  .mobile-nav svg {
    width: 22px; height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* User drawer */
  .mobile-user-drawer {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 99;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s;
  }
  .mobile-user-drawer.open { pointer-events: all; opacity: 1; }

  .mobile-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.5);
  }

  .mobile-drawer-content {
    position: absolute;
    bottom: 70px; right: 12px;
    min-width: 200px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    display: flex;
    flex-direction: column;
    gap: 2px;
    transform: translateY(10px);
    transition: transform .2s;
  }
  .mobile-user-drawer.open .mobile-drawer-content { transform: translateY(0); }

  .mobile-drawer-content .avatar-name {
    font-size: .75rem;
    color: var(--muted);
    padding: 6px 10px 8px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4px;
  }
}
/* ============================================================
   SHOWCASE (Вітрина)
   ============================================================ */

/* Top bar: tabs + actions */
.showcase-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.showcase-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.showcase-tab {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  text-decoration: none;
  font-size: .875rem;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.showcase-tab:hover { color: var(--text); border-color: var(--acc); }
.showcase-tab.active { background: var(--acc); color: #000; border-color: var(--acc); font-weight: 600; }
.showcase-tab--add {
  width: 32px; height: 32px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; border-radius: 50%;
  background: transparent; color: var(--acc);
}
.showcase-actions { display: flex; gap: 8px; }

/* ═══════════════════════════════════════════
   SHOWCASE — Lab / Fridge aesthetic
   ═══════════════════════════════════════════ */

/* Cabinet body — dark stainless steel */
.showcase-cabinet {
  display: flex;
  flex-direction: column;
  gap: 0;
  background:
    linear-gradient(180deg, #0b1010 0%, #080d0c 100%);
  border: 1px solid #1a2820;
  border-radius: 20px;
  padding: 28px 28px 12px;
  box-shadow:
    0 12px 48px rgba(0,0,0,.75),
    inset 0 0 80px rgba(76,175,80,.025),
    inset 0 1px 0 rgba(76,175,80,.08);
  position: relative;
  overflow: hidden;
}

/* Top inner LED strip */
.showcase-cabinet::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    rgba(76,175,80,.6) 30%,
    rgba(160,230,160,.9) 50%,
    rgba(76,175,80,.6) 70%,
    transparent);
  border-radius: 0 0 4px 4px;
  filter: blur(1px);
  box-shadow: 0 0 12px rgba(76,175,80,.5);
}

/* Vertical side rails — brushed metal */
.showcase-cabinet::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0; right: 0;
  pointer-events: none;
  border-radius: 20px;
  background:
    linear-gradient(90deg,
      rgba(76,175,80,.04) 0%,
      transparent 6%,
      transparent 94%,
      rgba(76,175,80,.04) 100%);
}

/* Side rail overlays via box-shadow on shelf-plank instead */

.showcase-shelf {
  position: relative;
  padding: 0 8px 0;
  margin-bottom: 4px;
}

/* LED under-shelf glow area */
.showcase-shelf::before {
  content: '';
  position: absolute;
  bottom: 0; left: 16px; right: 16px;
  height: 40px;
  background: radial-gradient(ellipse at 50% 100%,
    rgba(76,175,80,.12) 0%,
    transparent 70%);
  pointer-events: none;
}

.shelf-label {
  font-size: .68rem;
  font-family: 'Courier New', Courier, monospace;
  color: rgba(76, 175, 80, .4);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 6px;
  padding-left: 4px;
}

/* Shelf items row */
.shelf-items {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-height: 120px;
  padding: 12px 8px 0;
  flex-wrap: wrap;
}

/* Each bottle on the shelf */
.shelf-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  cursor: grab;
  transition: transform .15s;
}
.shelf-item:hover { transform: translateY(-6px); z-index: 2; }
.shelf-item:has(.bottle-menu-wrap.open) { transform: translateY(-6px); z-index: 200; }
.shelf-item--ghost { opacity: .25; }
.shelf-item--drag  { opacity: .95; cursor: grabbing; }

/* ── Empty slot (add sauce) ───────────────────────────────────── */
.shelf-item--empty {
  cursor: pointer;
  opacity: .4;
  transition: opacity .15s, transform .15s;
  user-select: none;
}
.shelf-item--empty:hover {
  opacity: .85;
  transform: translateY(-6px);
}
.bottle-add-plus {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 300;
  color: var(--acc, #4caf50);
  pointer-events: none;
  margin-top: 12px;
}

/* ── Sauce picker modal ──────────────────────────────────────── */
.sauce-picker-card {
  width: min(480px, 94vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.sauce-picker-search {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
}
.sauce-picker-list {
  overflow-y: auto;
  flex: 1;
  min-height: 80px;
  max-height: 340px;
}
.sauce-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .12s;
  font-size: .95rem;
}
.sauce-picker-item:hover:not(.sauce-picker-item--present) {
  background: var(--card, #1e2535);
}
.sauce-picker-item--present {
  opacity: .45;
  cursor: default;
}
.sauce-picker-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sauce-picker-brand {
  font-size: .8rem;
  color: var(--muted, #9aa4b2);
  white-space: nowrap;
}
.sauce-picker-tag {
  font-size: .75rem;
  color: var(--muted, #9aa4b2);
  border: 1px solid var(--line, #2a3040);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}
.sauce-picker-loading,
.sauce-picker-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted, #9aa4b2);
  font-size: .9rem;
}

.bottle-wrap {
  width: 56px;
  height: 110px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.bottle-img {
  max-width: 56px;
  max-height: 110px;
  width: auto;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 6px 12px rgba(0,0,0,.7))
    drop-shadow(0 0 8px rgba(76,175,80,.08));
}
.bottle-placeholder {
  opacity: .35;
  display: flex;
  align-items: flex-end;
}
.bottle-name {
  font-size: .6rem;
  font-family: 'Courier New', Courier, monospace;
  color: rgba(76, 175, 80, .55);
  text-align: center;
  max-width: 62px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  letter-spacing: .04em;
}

/* Context menu (⋮) */
.bottle-menu-wrap {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.bottle-menu-btn {
  position: absolute;
  top: 4px; right: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #0d1510;
  border: 1px solid rgba(76,175,80,.3);
  color: rgba(76,175,80,.7);
  font-size: .8rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 1;
  padding: 0;
  transition: border-color .15s, color .15s;
}
.bottle-menu-btn:hover {
  border-color: var(--acc);
  color: var(--acc);
}
.shelf-item:hover .bottle-menu-btn { display: flex; }
.bottle-menu-wrap.open .bottle-menu-btn { display: flex; }

.bottle-menu {
  display: none;
  position: absolute;
  top: 28px; left: 50%;
  transform: translateX(-50%);
  min-width: 160px;
  background: #0c1410;
  border: 1px solid rgba(76,175,80,.2);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.7), 0 0 0 1px rgba(76,175,80,.05);
  z-index: 100;
  overflow: hidden;
  flex-direction: column;
}
.bottle-menu-wrap.open .bottle-menu { display: flex; }

/* Transparent hover bridge between ⋮ button and menu (desktop) */
.bottle-menu::before {
  content: '';
  position: absolute;
  top: -10px; left: 0; right: 0;
  height: 10px;
}

.bottle-menu a,
.bottle-menu button {
  display: block;
  padding: 10px 14px;
  font-size: .85rem;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: background .12s;
}
.bottle-menu a:hover,
.bottle-menu button:hover { background: rgba(76,175,80,.08); }
.bottle-menu-remove { color: var(--danger) !important; }

/* Shelf plank — glass with green LED glow */
.shelf-plank {
  height: 8px;
  background: linear-gradient(to bottom,
    rgba(160, 230, 160, .22) 0%,
    rgba(76, 175, 80, .12) 50%,
    rgba(76, 175, 80, .04) 100%);
  border-radius: 2px;
  border-top: 1px solid rgba(76, 175, 80, .35);
  margin-top: 6px;
  box-shadow:
    0 0 16px rgba(76,175,80,.25),
    0 4px 20px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(200,255,200,.15);
}

.shelf-empty-hint {
  font-size: .75rem;
  font-family: 'Courier New', Courier, monospace;
  color: rgba(76, 175, 80, .2);
  font-style: normal;
  letter-spacing: .06em;
  align-self: center;
  pointer-events: none;
  padding: 8px 0;
}

/* Empty state */
.showcase-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 0;
  text-align: center;
}
.showcase-empty-state svg { opacity: .35; filter: drop-shadow(0 0 8px rgba(76,175,80,.4)); }
.showcase-empty-state p {
  font-family: 'Courier New', Courier, monospace;
  color: rgba(76, 175, 80, .45);
  font-size: .85rem;
  letter-spacing: .06em;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 500;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  min-width: 300px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 16px 48px rgba(0,0,0,.6);
}
.modal-card h2 { margin: 0 0 16px; font-size: 1.1rem; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.btn-sm { font-size: .8rem; padding: 6px 12px; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
.btn-ghost:hover { color: var(--text); border-color: var(--acc); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #c62828; }

/* "Add to showcase" section on sauce view */
.add-to-showcase-wrap { margin-top: 16px; }
.add-to-showcase-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .875rem;
}

/* Responsive */
@media (max-width: 640px) {
  .showcase-topbar { flex-direction: column; align-items: flex-start; }
  .showcase-cabinet { padding: 16px 14px 8px; border-radius: 14px; }
  .shelf-items { min-height: 90px; }
  .bottle-wrap  { width: 44px; height: 88px; }
  .bottle-img   { max-width: 44px; max-height: 88px; }
  .bottle-name  { max-width: 48px; }

  /* No hover lift on touch — ensures position:fixed is always relative to viewport */
  .shelf-item:hover,
  .shelf-item:has(.bottle-menu-wrap.open) {
    transform: none;
  }

  /* Override base positioning for mobile — applied before display:flex, so no jump */
  .bottle-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    width: calc(100vw - 48px);
    max-width: 300px;
    border-radius: 16px;
    z-index: 601;
    padding-top: 0;
  }

  /* Dim backdrop behind menu on mobile */
  .bottle-menu-wrap.open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 600;
  }
}

/* Add-to-showcase modal content */
.ats-list { display: flex; flex-direction: column; gap: 12px; max-height: 360px; overflow-y: auto; }
.ats-showcase { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.ats-sc-name { font-size: .9rem; font-weight: 600; margin-bottom: 8px; }
.ats-shelves { display: flex; gap: 6px; flex-wrap: wrap; }
.ats-shelf-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: .8rem;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.ats-shelf-btn:hover:not(:disabled) { border-color: var(--acc); color: var(--acc); }
.ats-shelf-btn:disabled { opacity: .6; cursor: default; }
