/* ============================================================
   bar-v2.css — Bar detail page redesign (TripAdvisor-inspired)
   All classes prefixed bv2- to avoid collisions with legacy CSS.
   Relies on :root tokens from styles-base.css.
   ============================================================ */

:root {
  --bv2-radius: 14px;
}

/* ---------- head ---------- */
.bv2-head { padding: 26px 0 22px; }
.bv2-crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.bv2-crumbs a:hover { color: var(--accent-deep); }
.bv2-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.bv2-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5vw, 58px); line-height: 1.02; letter-spacing: -0.01em; }
.bv2-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 14.5px; color: var(--muted); }
.bv2-chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 500; color: var(--ink); }
.bv2-chip.cat { border-color: var(--accent); color: var(--accent-deep); }
.bv2-byline { font-size: 13.5px; color: var(--muted); margin-top: 10px; }
.bv2-byline a { text-decoration: underline; text-underline-offset: 3px; }
.bv2-byline a:hover { color: var(--accent-deep); }
.bv2-award { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; background: #f7f0dd; border: 1px solid #e6d7ae; color: #6e5114; border-radius: 10px; padding: 7px 14px; font-size: 13px; font-weight: 600; }
.bv2-actions { display: flex; gap: 10px; padding-bottom: 6px; }

/* ---------- gallery ---------- */
.bv2-gallery { display: grid; grid-template-columns: 1.9fr 1fr 1fr; grid-template-rows: 215px 215px; gap: 10px; position: relative; }
.bv2-g-item { border-radius: var(--bv2-radius); overflow: hidden; position: relative; cursor: pointer; border: 0; padding: 0; background: #eee7d8; }
.bv2-g-item.main { grid-row: 1 / 3; }
.bv2-g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
.bv2-g-item:hover img { transform: scale(1.04); }
.bv2-g-all { position: absolute; right: 14px; bottom: 14px; background: rgba(255,255,255,0.94); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-card); }
.bv2-g-all:hover { background: #fff; }

/* ---------- 3-column layout ---------- */
.bv2-layout { display: grid; grid-template-columns: 184px minmax(0, 1fr) 320px; gap: 44px; padding: 44px 0 10px; align-items: start; }

/* Compact variant: pages with fewer than 3 sections have nothing worth jumping
   to, so the rail is dropped and the article gets the width instead. Applied by
   migrate_bar_v2.py, which omits the rail entirely on those pages. */
.bv2-layout.compact { grid-template-columns: minmax(0, 1fr) 320px; gap: 52px; }
.bv2-layout.compact .bv2-article { max-width: 68ch; }

/* left rail */
.bv2-rail { position: sticky; top: 92px; font-size: 14px; }
.bv2-rail h4 { font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.bv2-rail ul { list-style: none; display: flex; flex-direction: column; gap: 2px; margin: 0 0 28px; padding: 0; }
.bv2-rail a { display: block; padding: 6px 10px; border-left: 2px solid transparent; color: var(--muted); border-radius: 0 8px 8px 0; transition: 0.15s; }
.bv2-rail a:hover { color: var(--ink); background: var(--cream); }
.bv2-rail a.active { border-left-color: var(--accent); color: var(--accent-deep); font-weight: 600; background: var(--cream); }
.bv2-rail .ext a { border-left: 0; padding-left: 0; }
.bv2-rail .ext a:hover { background: none; color: var(--accent-deep); }

/* article */
.bv2-article h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 38px 0 14px; letter-spacing: -0.01em; }
.bv2-article h2:first-of-type { margin-top: 0; }
.bv2-article p { margin-bottom: 16px; color: #2e2a24; font-size: 16.5px; line-height: 1.65; }
.bv2-article p a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); }
.bv2-article p a:hover { color: var(--accent-deep); }
.bv2-lede { font-family: var(--serif); font-size: 22px; line-height: 1.45; color: var(--ink) !important; }
.bv2-pull { border-left: 3px solid var(--accent); padding: 6px 0 6px 20px; margin: 26px 0; font-family: var(--serif); font-size: 20px; font-style: italic; color: #4a453c; }
.bv2-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 4px; }

/* essentials card */
.bv2-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 14px; }
.bv2-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--bv2-radius); box-shadow: var(--shadow-card); padding: 22px; }
.bv2-card h3 { font-family: var(--serif); font-weight: 400; font-size: 21px; margin-bottom: 14px; }
.bv2-facts { list-style: none; font-size: 14px; margin: 0; padding: 0; }
.bv2-facts li { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.bv2-facts li:last-child { border-bottom: 0; }
.bv2-facts .k { flex: 0 0 92px; color: var(--muted); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; padding-top: 2px; }
.bv2-side .btn-ink, .bv2-side .btn-ghost { justify-content: center; width: 100%; text-align: center; }

/* ---------- related cards ---------- */
.bv2-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.bv2-bar-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--bv2-radius); overflow: hidden; transition: 0.2s var(--ease-out); }
.bv2-bar-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.bv2-bar-card .thumb { height: 150px; overflow: hidden; background: #eee7d8; }
.bv2-bar-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease-out); }
.bv2-bar-card:hover .thumb img { transform: scale(1.05); }
.bv2-bar-card .body { padding: 15px 17px 17px; }
.bv2-bar-card h3 { font-family: var(--serif); font-weight: 400; font-size: 19px; margin-bottom: 3px; }
.bv2-bar-card .sub { font-size: 13px; color: var(--muted); }
.bv2-bar-card .why { font-size: 13.5px; color: #4a453c; margin-top: 8px; line-height: 1.5; }

/* ---------- lightbox ---------- */
.bv2-lb { position: fixed; inset: 0; background: rgba(15, 13, 10, 0.93); display: none; align-items: center; justify-content: center; z-index: 200; flex-direction: column; gap: 16px; }
.bv2-lb.open { display: flex; }
.bv2-lb img { max-width: min(920px, 92vw); max-height: 72vh; border-radius: 14px; object-fit: contain; }
.bv2-lb .cap { color: #d8d0c0; font-size: 13.5px; }
.bv2-lb .close { position: absolute; top: 20px; right: 26px; background: none; border: 0; color: #fff; font-size: 30px; }
.bv2-lb .prev, .bv2-lb .next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.12); border: 0; color: #fff; font-size: 26px; width: 46px; height: 46px; border-radius: 50%; }
.bv2-lb .prev { left: 22px; }
.bv2-lb .next { right: 22px; }
.bv2-lb .prev:hover, .bv2-lb .next:hover { background: rgba(255,255,255,0.25); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .bv2-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .bv2-rail { display: none; }
  .bv2-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .bv2-layout { grid-template-columns: 1fr; gap: 28px; }
  .bv2-side { position: static; }
  .bv2-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 180px 110px; }
  .bv2-g-item.main { grid-column: 1 / 3; grid-row: 1; }
  .bv2-g-item:nth-child(n+4) { display: none; }
  .bv2-cards { grid-template-columns: 1fr; }
}
