:root {
  --bg: #0a0a0c;
  --panel: #121216;
  --panel-light: #1a1a22;
  --border: #2a2a35;
  --text: #ece6da;
  --muted: #9c958b;
  --gold: #d4af37;
  --gold-hover: #f3cf65;
  --red: #cf2e2e;
  --red-hover: #e23a36;
  --font-serif: 'Outfit', sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Clip horizontal overflow at the root so off-canvas fixed elements (the cart
   drawer) can never add page width / horizontal scroll. `clip` is used instead
   of `hidden` because it doesn't establish a scroll container, so position:
   sticky (e.g. the photo detail sidebar) keeps working. */
html {
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: clip;
}

/* Film grain texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
}

header .nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
}

.logo-text span {
  color: var(--gold);
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-links a.active { color: var(--gold); }

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.cart-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: all 0.2s;
}

.cart-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.cart-count {
  background: var(--gold);
  color: var(--bg);
  font-weight: 700;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 40px 0 20px;
}

.hero-tag {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  display: block;
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.15;
  margin-bottom: 20px;
  color: #fff;
}

.hero h1 span {
  color: var(--gold);
}

.hero p {
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  max-width: 650px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.hero-cta {
  width: auto !important;
  display: inline-block !important;
  padding: 14px 40px !important;
  font-size: 15px !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}

/* How It Works Section */
.how-it-works {
  padding: 60px 0;
  background: var(--panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.how-it-works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  text-align: center;
}

.how-it-works-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.how-it-works-icon {
  font-size: 36px;
  color: var(--gold);
  margin-bottom: 16px;
}

.how-it-works-item h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
}

.how-it-works-item p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* Cinematic hero — cross-fading collection images behind the headline. */
.hero-cinematic {
  position: relative;
  padding: 0;
  min-height: clamp(440px, 72vh, 660px);
  display: flex;
  align-items: center;
  text-align: left;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0a0a0c;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.6s ease;
  will-change: opacity, transform;
}

.hero-slide.is-active {
  opacity: 1;
  animation: heroKen 8s ease-out forwards;
}

@keyframes heroKen {
  from { transform: scale(1.06); }
  to   { transform: scale(1.14); }
}

/* Dark scrim so the headline stays legible over any image. */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(10,10,12,0.93) 0%, rgba(10,10,12,0.74) 42%, rgba(10,10,12,0.30) 100%),
    linear-gradient(0deg, rgba(10,10,12,0.85) 0%, rgba(10,10,12,0) 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 40px;
  padding-bottom: 40px;
}

.hero-cinematic .hero p {
  margin-left: 0;
}
.hero-cinematic p {
  margin-left: 0;
}

.hero-cinematic .hero-actions {
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
}

.hero-cta-secondary {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 6px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.hero-cta-secondary:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
  .hero-slide.is-active { animation: none; transform: none; }
}

/* Gallery Section */
.gallery-section {
  padding: 60px 0;
  border-top: 1px solid var(--border);
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
}

.gallery-header h2 {
  font-family: var(--font-serif);
  font-size: 32px;
}

.gallery-filters {
  display: flex;
  gap: 12px;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.filter-btn.active, .filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.photo-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
}

.photo-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #000;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.photo-card:hover .card-img-wrap img {
  transform: scale(1.05);
}

.card-meta {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(10, 10, 12, 0.8);
  border: 1px solid var(--border);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--gold);
}

.card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-content h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin-bottom: 8px;
  color: #fff;
}

.card-title-link { color: inherit; text-decoration: none; }
.card-title-link:hover { color: var(--gold); }

.card-content p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.price-tag {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.buy-btn {
  background: var(--gold);
  color: var(--bg);
  border: 0;
  padding: 8px 16px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.buy-btn:hover {
  background: var(--gold-hover);
}

.buy-btn.in-cart {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}

/* Sidebar Cart */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: min(100%, 400px);
  height: 100vh;
  background: var(--panel);
  border-left: 1px solid var(--border);
  z-index: 200;
  box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  /* Off-canvas via transform (not right:-400px) so it never adds page width. */
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.cart-sidebar.open {
  transform: translateX(0);
}

.cart-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h3 {
  font-family: var(--font-serif);
  font-size: 22px;
}

.close-cart {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}

.cart-items {
  flex-grow: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.cart-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-details h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.cart-item-details span {
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
}

.remove-item {
  background: transparent;
  border: 0;
  color: var(--red);
  cursor: pointer;
  font-size: 12px;
}

.remove-item:hover {
  color: var(--red-hover);
}

.cart-footer-details {
  padding: 24px;
  border-top: 1px solid var(--border);
  background: var(--panel-light);
}

.pricing-notice {
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 12px;
  text-align: center;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 16px;
}

.cart-summary-row.total {
  font-weight: 700;
  font-size: 18px;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}

.checkout-email {
  width: 100%;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  margin-bottom: 12px;
  font-size: 14px;
}

.checkout-btn {
  width: 100%;
  background: var(--gold);
  color: var(--bg);
  border: 0;
  padding: 14px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.2s;
}

.checkout-btn:hover {
  background: var(--gold-hover);
}

.checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 150;
  display: none;
}

.cart-overlay.open {
  display: block;
}

/* Admin Modal */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  font-family: inherit;
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.admin-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
}

.admin-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.admin-btn.danger:hover {
  border-color: var(--red);
  color: var(--red);
}

/* ---- Admin badge (reused by the /badmin console) ---- */
.admin-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--bg);
  background: var(--muted);
  padding: 1px 6px;
  border-radius: 3px;
  vertical-align: middle;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  background: var(--panel);
  padding: 48px 0 24px;
  color: var(--muted);
  font-size: 14px;
  margin-top: 80px;
}

footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 40px;
}

footer h4 {
  font-family: var(--font-serif);
  color: var(--text);
  margin-bottom: 16px;
}

footer ul {
  list-style: none;
}

footer ul li {
  margin-bottom: 8px;
}

footer ul li a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

footer ul li a:hover {
  color: var(--gold);
}

footer .footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---- Photo zoom affordance ---- */
.card-img-wrap[data-id] { cursor: zoom-in; }

.zoom-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(10, 10, 12, 0.82);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.photo-card:hover .zoom-hint,
.card-img-wrap:focus-visible .zoom-hint { opacity: 1; transform: translateY(0); }

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 5, 7, 0.9);
  backdrop-filter: blur(6px);
}

.lightbox.open { display: flex; animation: lb-fade 0.2s ease; }

@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }

.lightbox-inner {
  position: relative;
  max-width: 1100px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-y: auto; /* keep the price + Add to Cart reachable on short screens */
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-figure {
  position: relative;
  line-height: 0;
}

.lightbox-img {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  background: #000;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Transparent layer over the preview: intercepts right-click / drag-to-save. */
.lightbox-guard {
  position: absolute;
  inset: 0;
}

/* Discourage dragging thumbnails out of the gallery. */
.card-img-wrap img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

.lightbox-caption { padding: 18px 22px 22px; }

.lightbox-buy { display: flex; align-items: center; gap: 18px; margin-top: 16px; }
.lightbox-buy .price-tag { font-size: 20px; }
.lightbox-buy .buy-btn { width: auto; padding: 9px 22px; }

.lightbox-caption h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  color: #fff;
  margin-bottom: 4px;
}

.lightbox-meta {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--gold);
  margin-bottom: 10px;
}

.lightbox-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 1;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(10, 10, 12, 0.75);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.lightbox-close:hover { background: var(--red); border-color: var(--red); }

/* ---- Loading skeletons ---- */
.skeleton-card { pointer-events: none; }

.skeleton-shimmer, .skeleton-line {
  position: relative;
  overflow: hidden;
  background: var(--panel-light);
}

.skeleton-line {
  height: 12px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.skeleton-shimmer::after, .skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: skeleton-slide 1.3s infinite;
}

@keyframes skeleton-slide { 100% { transform: translateX(100%); } }

@media (prefers-reduced-motion: reduce) {
  .skeleton-shimmer::after, .skeleton-line::after { animation: none; }
  .lightbox.open { animation: none; }
}

/* ---- Per-photo detail page ---- */
.photo-page { padding: 32px 0 64px; }

.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { margin: 0 6px; }

.photo-detail {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
}

.photo-detail-figure {
  position: relative;
  line-height: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.photo-detail-figure img {
  width: 100%;
  height: auto;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}
.photo-detail-guard { position: absolute; inset: 0; }

/* ---- Then & Now comparison slider ---- */
.then-now {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: ew-resize;
}
.tn-layer { position: absolute; inset: 0; background-size: cover; background-position: center; }
.tn-then { clip-path: inset(0 50% 0 0); } /* JS updates the clip as you drag */
.tn-label {
  position: absolute; bottom: 12px; z-index: 3;
  background: rgba(10, 10, 12, 0.82); border: 1px solid var(--border);
  color: var(--text); font-size: 11px; letter-spacing: 1px;
  padding: 4px 8px; border-radius: 4px; text-transform: uppercase;
}
.tn-label-then { left: 12px; }
.tn-label-now { right: 12px; }
.tn-handle {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; background: var(--gold); transform: translateX(-1px); z-index: 2;
}
.tn-handle span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gold); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.photo-detail-info { position: sticky; top: 24px; }
.photo-detail-meta {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--gold);
  margin-bottom: 10px;
}
.photo-detail-info h1 {
  font-family: var(--font-serif);
  font-size: 34px;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 16px;
}
.photo-detail-desc { color: var(--text); font-size: 15px; line-height: 1.65; margin-bottom: 24px; }
.photo-detail-buy { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.photo-detail-buy .price-tag { font-size: 22px; }
.photo-detail-buy .checkout-btn { width: auto; padding: 0 26px; }
.photo-detail-note { font-size: 12.5px; color: var(--muted); margin-bottom: 20px; }
.photo-detail-note a, .photo-detail-info > p a { color: var(--gold); text-decoration: none; }

.related { margin-top: 64px; }
.related h2 { font-family: var(--font-serif); font-size: 24px; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.related-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--panel);
  transition: border-color 0.2s, transform 0.2s;
}
.related-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.related-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.related-card span { display: block; padding: 12px; font-size: 13px; color: var(--text); }

/* ---- Guide / stories pages ---- */
.guide-page { padding: 32px 0 64px; }
.guide-article { max-width: 720px; margin: 0 auto 48px; }
.guide-subtitle {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.guide-article h1 {
  font-family: var(--font-serif);
  font-size: 42px;
  line-height: 1.12;
  color: #fff;
  margin-bottom: 24px;
}
.guide-article p { color: var(--text); font-size: 16px; line-height: 1.75; margin-bottom: 20px; }
.guide-cta { text-align: center; margin-top: 40px; }

.guide-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  background: var(--panel);
  transition: border-color 0.2s, transform 0.2s;
}
.guide-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.guide-card h3 { font-family: var(--font-serif); font-size: 21px; color: #fff; margin-bottom: 6px; }
.guide-card span { color: var(--muted); font-size: 13.5px; }

/* ---- Map page ---- */
.map-page { padding: 32px 0 64px; }
#map {
  height: 68vh;
  min-height: 420px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}
.map-note { color: var(--muted); font-size: 12px; margin-top: 12px; }
.leaflet-popup-content { margin: 12px; }

/* ---- Mobile / small screens ---- */
@media (max-width: 600px) {
  .guide-article h1 { font-size: 30px; }
  #map { height: 60vh; }
  .photo-detail { grid-template-columns: 1fr; gap: 24px; }
  .photo-detail-info { position: static; }
  .photo-detail-info h1 { font-size: 27px; }
  /* Safety net: never allow a stray element to force horizontal scrolling. */
  .container { padding: 0 16px; }

  /* Header: shrink + allow the nav to wrap so nothing (esp. Cart) is clipped. */
  .nav-container { flex-wrap: wrap; row-gap: 8px; }
  .logo-text { font-size: 18px; }
  .logo-mark { width: 26px; height: 26px; }
  .nav-links { gap: 12px; font-size: 12.5px; flex-wrap: wrap; justify-content: flex-end; }
  .nav-links a { font-size: 12.5px; }

  /* Stack the collection heading above its filter chips, and let chips wrap. */
  .gallery-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .gallery-filters { flex-wrap: wrap; }
}

/* ---- Map pins + grouped-location popups (public /map) ---- */
.map-pin { position: relative; }
.map-pin-dot {
  display: block; width: 16px; height: 16px; margin: 2px; border-radius: 50%;
  background: var(--gold); border: 2px solid #0a0a0c;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.35);
}
.map-pin-count {
  position: absolute; top: -8px; right: -8px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: #0a0a0c; color: var(--gold); border: 1px solid var(--gold);
  border-radius: 9px; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center;
}
.map-popup-list { width: 230px; }
.map-popup-head { display: block; font-size: 12px; color: #555; margin-bottom: 8px; }
.map-popup-item {
  display: grid; grid-template-columns: 46px 1fr; gap: 9px; align-items: center;
  text-decoration: none; color: inherit; padding: 5px; border-radius: 6px;
}
.map-popup-item:hover { background: rgba(0, 0, 0, 0.06); }
.map-popup-item img { width: 46px; height: 34px; object-fit: cover; border-radius: 4px; display: block; }
.map-popup-item span { font-size: 13px; line-height: 1.25; }
.map-popup-item small { display: block; color: #777; font-size: 11px; margin-top: 1px; }
