:root {
  --bg: #0e0f12;
  --panel: #16181d;
  --panel-2: #1d2027;
  --text: #e8e9ec;
  --muted: #9aa0ab;
  --accent: #4c86b4;       /* Prime Cameras brand blue */
  --accent-2: #79aad0;     /* lighter blue for links/hover on dark */
  --danger: #e0564b;
  --border: #2a2e37;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* --- Header --- */
.site-header {
  background: #0a0b0d;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px 20px; }
.brand { justify-self: start; display: inline-flex; align-items: center; }
.brand-logo { height: 56px; width: auto; display: block; }
.brand:hover { text-decoration: none; }
.site-title { justify-self: center; color: var(--text); font-weight: 800; font-size: 1.8rem; letter-spacing: 3px; text-transform: uppercase; white-space: nowrap; }
.site-title:hover { color: #fff; text-decoration: none; }
.nav { justify-self: end; }
.nav a { margin-left: 22px; color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav-cta { color: var(--accent) !important; }

/* --- Hero (legacy, kept for any other page) --- */
.hero { padding: 48px 0 28px; text-align: center; }
.hero h1 { font-size: 2.4rem; margin: 0 0 10px; }
.hero-sub { color: var(--muted); max-width: 640px; margin: 0 auto; }

/* --- Editorial hero --- */
.hero-editorial {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; background: #0a0b0d; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.6s ease-in-out;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(8,9,11,.55) 0%, rgba(8,9,11,.35) 40%, rgba(8,9,11,.85) 100%);
}
/* Fallback look when there are no featured shots yet */
.hero-plain .hero-bg {
  background: radial-gradient(120% 120% at 50% 0%, #1a2a38 0%, #0d1218 55%, #0a0b0d 100%);
}
.hero-content { position: relative; z-index: 2; padding: 40px 20px; max-width: 880px; }
.hero-content h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.05; margin: 0 0 18px;
  color: #fff; font-weight: 800; letter-spacing: -1px;
  text-shadow: 0 2px 30px rgba(0,0,0,.5);
}
.hero-content p {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: #d7dbe0; margin: 0 auto 28px; max-width: 620px;
  text-shadow: 0 1px 14px rgba(0,0,0,.5);
}
.hero-cta {
  display: inline-block; background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.7); color: #fff;
  font-weight: 700; padding: 14px 30px; border-radius: 40px;
  font-size: 1.02rem; backdrop-filter: blur(3px); transition: all .15s ease;
}
.hero-cta:hover { background: #fff; color: #0e0f12; text-decoration: none; }
.hero-cta.solid { background: var(--accent); border-color: var(--accent); }
.hero-cta.solid:hover { background: #fff; border-color: #fff; color: var(--accent); }

/* --- Home sections --- */
.home-section { padding: 64px 20px 20px; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 { font-size: 2rem; margin: 0 0 6px; }
.section-head p { color: var(--muted); margin: 0; }
.album-grid.three-col { grid-template-columns: repeat(3, 1fr); }

/* --- Featured gear / case study --- */
.gear-section {
  margin-top: 56px;
  background: linear-gradient(180deg, #101722 0%, #0c1118 100%);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 72px 20px;
}
.gear-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.gear-kicker {
  text-transform: uppercase; letter-spacing: 3px; font-size: .82rem;
  color: var(--accent-2); font-weight: 700; margin: 0 0 14px;
}
.gear-inner h2 { font-size: 2.1rem; margin: 0 0 14px; }
.gear-inner p { color: var(--muted); font-size: 1.05rem; margin: 0 0 26px; }

/* --- Album grid --- */
.album-grid {
  display: grid; gap: 22px; padding: 10px 0 50px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.album-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .12s ease, border-color .12s ease; }
.album-card:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
.album-thumb { aspect-ratio: 3/2; background: var(--panel-2); }
.album-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-thumb-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: .9rem; }
.album-meta { padding: 14px 16px; }
.album-meta h3 { margin: 0 0 4px; color: var(--text); }
.album-meta p { margin: 0; color: var(--muted); font-size: .88rem; }

/* --- Breadcrumbs / heads --- */
.crumbs { color: var(--muted); font-size: .9rem; padding: 22px 0 6px; }
.page-head { padding: 40px 0 24px; text-align: center; }
.page-head h1 { font-size: 2.2rem; margin: 0 0 8px; }
.page-head p { color: var(--muted); margin: 0; }
.album-head { padding: 6px 0 22px; }
.album-head h1 { margin: 0 0 6px; }
.album-date { color: var(--muted); margin: 4px 0; }
.album-hint { color: var(--muted); }

/* --- Photo grid --- */
.photo-grid {
  display: grid; gap: 14px; padding: 8px 0 50px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.photo-tile { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--panel-2); aspect-ratio: 1/1; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.photo-tile:hover img { transform: scale(1.04); }
.photo-price { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.7); color: var(--accent-2); font-weight: 700; padding: 4px 10px; border-radius: 20px; font-size: .85rem; }

/* --- Photo detail --- */
.photo-detail { display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; padding: 10px 0 60px; align-items: start; }
.photo-detail-img img { width: 100%; border-radius: var(--radius); display: block; }
.photo-buy { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; position: sticky; top: 90px; }
.photo-buy h1 { font-size: 1.4rem; margin: 0 0 8px; }
.price-big { font-size: 2.2rem; font-weight: 800; color: var(--accent); margin: 0 0 14px; }
.buy-desc { color: var(--muted); font-size: .95rem; }
.shot-on { color: var(--muted); font-size: .9rem; }

/* --- Buttons --- */
.buy-btn { background: var(--accent); color: #fff; border: none; font-weight: 700; font-size: 1rem; padding: 13px 18px; border-radius: var(--radius); cursor: pointer; width: 100%; transition: background .12s ease; }
.buy-btn:hover:not(:disabled) { background: #5e97c4; }
.buy-btn:disabled { opacity: .5; cursor: not-allowed; }
.buy-note { color: var(--muted); font-size: .82rem; text-align: center; margin: 10px 0 0; }
.ghost-btn { display: inline-block; border: 1px solid var(--border); color: var(--text); padding: 9px 14px; border-radius: var(--radius); font-weight: 600; font-size: .9rem; }
.ghost-btn:hover { border-color: var(--accent); text-decoration: none; }
.danger-btn { background: transparent; border: 1px solid var(--danger); color: var(--danger); padding: 9px 14px; border-radius: var(--radius); cursor: pointer; font-weight: 600; }
.danger-btn:hover { background: var(--danger); color: #fff; }
.link-danger { background: none; border: none; color: var(--danger); cursor: pointer; padding: 0; font-size: .85rem; }

hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* --- Flash --- */
.flash { padding: 12px 16px; border-radius: var(--radius); margin: 16px 0; font-weight: 600; }
.flash-success { background: rgba(96,180,110,.15); border: 1px solid #4f9e62; color: #b7e6c2; }
.flash-error { background: rgba(224,86,75,.15); border: 1px solid var(--danger); color: #f3b6b1; }

/* --- Admin --- */
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0 4px; }
.admin-bar h1, .admin-bar h2 { margin: 0; }
.admin-panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin: 18px 0; }
.admin-panel h2 { margin-top: 0; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form input[type=text] { flex: 1; min-width: 220px; }
input, select { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); padding: 11px 13px; border-radius: var(--radius); font-size: .95rem; }
input[type=file] { padding: 9px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .5px; }
.admin-photo-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-top: 14px; }
.admin-photo { position: relative; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.admin-photo img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.admin-photo-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; font-size: .78rem; }
.admin-photo-meta span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-photo-actions { display: flex; gap: 10px; flex-shrink: 0; }
.link-feature { background: none; border: none; color: var(--accent-2); cursor: pointer; padding: 0; font-size: .85rem; font-weight: 600; }
.featured-badge { position: absolute; top: 8px; left: 8px; z-index: 2; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 20px; }
.admin-login { max-width: 380px; margin: 60px auto; background: var(--panel); border: 1px solid var(--border); padding: 30px; border-radius: var(--radius); }
.admin-login form { display: flex; flex-direction: column; gap: 12px; }
.admin-login label { color: var(--muted); font-size: .9rem; }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 26px 0; background: #0a0b0d; }
.footer-cta { font-weight: 600; margin: 0 0 6px; }
.footer-fine { color: var(--muted); font-size: .82rem; margin: 0; }

.empty { color: var(--muted); padding: 30px 0; }

/* --- Success page --- */
.success-wrap { display: flex; justify-content: center; padding: 40px 0 60px; }
.success-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; max-width: 480px; text-align: center; }
.success-tick { width: 64px; height: 64px; line-height: 64px; margin: 0 auto 16px; border-radius: 50%; background: rgba(96,180,110,.18); color: #74d089; font-size: 2rem; font-weight: 800; }
.success-card h1 { font-size: 1.5rem; margin: 0 0 8px; }
.success-sub { color: var(--muted); margin: 0 0 22px; }
.download-btn { display: block; text-align: center; }
.download-btn:hover { text-decoration: none; }
.success-thumb { margin: 22px 0 0; }
.success-thumb img { max-width: 220px; border-radius: var(--radius); }

/* --- Responsive --- */
@media (max-width: 900px) {
  .album-grid.three-col { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .photo-detail { grid-template-columns: 1fr; }
  .photo-buy { position: static; }
  .hero h1 { font-size: 1.8rem; }
  .album-grid.three-col { grid-template-columns: 1fr; }
  .hero-editorial { min-height: 70vh; }
  .brand-logo { height: 42px; }
  .site-title { font-size: 1.15rem; letter-spacing: 1.5px; }
  .nav a { margin-left: 12px; font-size: .85rem; }
}
@media (max-width: 520px) {
  /* On phones the centred title links home, so the extra "Event Photos" link is redundant */
  .nav a:not(.nav-cta) { display: none; }
  .site-title { font-size: 1rem; letter-spacing: 1px; }
}
