/* Branches — Cannan Liquor client portal. Uses the variables from style.css */

.topbar-branch { color: var(--gold-light); font-weight: 600; }
.topbar-branch:hover { text-decoration: underline; }

/* ---------- Branch cards ---------- */
.branch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding: 14px 0 12px; }
.branch-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
  animation: branchRise .6s ease both;
}
.branch-card:nth-child(2) { animation-delay: .08s; }
.branch-card:nth-child(3) { animation-delay: .16s; }
.branch-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(20,30,50,.15); }
.branch-card-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--navy-2); overflow: hidden; }
.branch-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.branch-card:hover .branch-card-media img { transform: scale(1.06); }
.branch-card-noimg { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 54px; }
.branch-card-area {
  position: absolute; left: 12px; bottom: 12px; background: rgba(11,20,32,.82); color: var(--gold-light);
  font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(4px);
}
.branch-card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.branch-card-body h3 { margin: 0; font-family: Georgia, serif; font-size: 19px; line-height: 1.25; }
.branch-card-body h3 a:hover { color: var(--gold); }
.branch-card-phone { color: var(--muted); font-weight: 600; font-size: 14.5px; }
.branch-card-phone:hover { color: var(--navy-2); }
.branch-card-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.branch-card-actions .btn { padding: 10px 18px; font-size: 13.5px; }

@keyframes branchRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Branches page hero ---------- */
.branches-hero { background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; padding: 46px 0 40px; }
.branches-hero h1 { font-family: Georgia, serif; font-size: 34px; margin: 8px 0 10px; }
.branches-hero p { color: #b9c2d0; max-width: 560px; margin: 0; line-height: 1.6; }
.branches-page { padding-top: 26px; padding-bottom: 30px; }

.home-branches { padding-top: 34px; }
.branch-price-note { color: var(--muted); font-size: 14px; margin: 0 0 4px; }

/* ---------- Branch switcher ---------- */
.branch-switcher { background: var(--navy); border-top: 1px solid rgba(255,255,255,.06); }
.branch-switcher-inner { display: flex; align-items: center; gap: 14px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.branch-switcher-label { color: #cfd7e6; font-size: 13px; font-weight: 600; }
.branch-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.branch-pill {
  color: #fff; border: 1.5px solid rgba(255,255,255,.25); padding: 7px 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; transition: all .2s ease;
}
.branch-pill:hover { border-color: var(--gold-light); color: var(--gold-light); }
.branch-pill.active { background: linear-gradient(135deg, var(--gold-light), var(--gold)); border-color: transparent; color: #241a04; }

/* ---------- Branch detail ---------- */
.branch-detail { padding-top: 30px; }
.branch-detail-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 22px; }
.branch-detail-head h1 { font-family: Georgia, serif; font-size: 32px; margin: 6px 0 8px; }
.branch-detail-head p { color: var(--muted); max-width: 620px; line-height: 1.65; margin: 0; }
.branch-detail-head .hero-eyebrow { color: var(--gold); }
.branch-detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.branch-media-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; align-items: start; }

.branch-gallery { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.branch-gallery-main {
  position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 10px; overflow: hidden;
  background: var(--navy-2); aspect-ratio: 4 / 3; cursor: zoom-in;
}
.branch-gallery-main img { width: 100%; height: 100%; object-fit: cover; animation: branchFade .35s ease; }
.branch-gallery-zoom {
  position: absolute; right: 10px; bottom: 10px; background: rgba(11,20,32,.78); color: #fff;
  font-size: 12px; padding: 5px 11px; border-radius: 999px;
}
.branch-gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; }
.branch-thumb {
  flex: 0 0 92px; height: 70px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden;
  background: var(--navy-2); opacity: .7; transition: all .2s ease;
}
.branch-thumb img { width: 100%; height: 100%; object-fit: cover; }
.branch-thumb:hover { opacity: 1; }
.branch-thumb.active { border-color: var(--gold); opacity: 1; }
@keyframes branchFade { from { opacity: .3; } to { opacity: 1; } }

.branch-map-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.branch-map iframe { width: 100%; height: 340px; border: 0; display: block; background: #e9edf3; }
.branch-map-meta { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.branch-map-meta strong { display: block; font-size: 14px; }
.branch-map-meta small { color: var(--muted); font-size: 13px; }
.branch-map-links { display: flex; flex-direction: column; gap: 6px; }
.branch-map-links a { color: var(--navy-2); font-weight: 700; font-size: 14px; }
.branch-map-links a:hover { color: var(--gold); }

/* ---------- Branch products ---------- */
.branch-products { padding-top: 44px; padding-bottom: 20px; }
.branch-cats { margin: 14px 0 4px; }
.cat-chip.is-active { background: var(--navy-2); color: #fff; border-color: var(--navy-2); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(6,10,18,.93); z-index: 998; display: none; align-items: center; justify-content: center; padding: 20px; }
.lightbox.open { display: flex; animation: branchFade .2s ease; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox-close { position: absolute; top: 16px; right: 18px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 18px; }
.lightbox-close:hover { background: rgba(255,255,255,.26); }

@media (prefers-reduced-motion: reduce) {
  .branch-card, .branch-gallery-main img, .lightbox.open { animation: none; }
  .branch-card, .branch-card-media img { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .branch-grid { grid-template-columns: repeat(2, 1fr); }
  .branch-media-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .branch-grid { grid-template-columns: 1fr; }
  .branches-hero h1, .branch-detail-head h1 { font-size: 26px; }
  .branch-detail-actions { width: 100%; }
  .branch-detail-actions .btn { flex: 1; }
  .branch-map iframe { height: 280px; }
}
