/* Buffalo Mafia shop v4 */

:root {
  --bg: #0b0b0b;
  --bg-elev: #161616;
  --bg-card: #141414;
  --ink: #f3efe6;
  --ink-dim: #b8b2a6;
  --gold: #c9a24f;
  --gold-lt: #e6c982;
  --gold-dk: #9a7a32;
  --line: #2a2a2a;
  --red: #9a1c20;
  --font-display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --font-condensed: "Oswald", "Arial Narrow", sans-serif;
  --font-serif: "Libre Baskerville", Georgia, serif;
  --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --header-h: 56px;
  --pad-x: 18px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 8px);
}

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  max-width: 100%;
  overflow-x: clip;
}
body { touch-action: manipulation; min-height: 100dvh; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-lt); }

img { max-width: 100%; height: auto; display: block; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  background: var(--gold);
  color: #0b0b0b;
  padding: 10px 14px;
  z-index: 100;
  font-weight: 700;
  border-radius: 8px;
}
.skip-link:focus { top: calc(8px + env(safe-area-inset-top, 0px)); }

/* Room at the bottom for the deed.page badge + iOS home bar */
#app {
  width: 100%;
  max-width: 1280px;
  min-width: 0;
  margin: 0 auto;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--header-h);
  padding: 10px var(--pad-x);
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  padding-left: max(var(--pad-x), env(safe-area-inset-left, 0px));
  padding-right: max(var(--pad-x), env(safe-area-inset-right, 0px));
  background: rgba(11, 11, 11, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid #2a2418;
}
html.statusbar-fallback header {
  padding-top: max(59px, env(safe-area-inset-top, 0px));
}
@media (display-mode: standalone) and (orientation: portrait) {
  header { padding-top: max(10px, env(safe-area-inset-top, 0px)); }
}

.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  line-height: 1;
  white-space: nowrap;
}
.brand:hover { color: var(--gold); }

nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
nav a {
  color: var(--ink);
  font-family: var(--font-condensed);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 10px 7px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
@media (max-width: 400px) {
  .brand { font-size: 1.02rem; letter-spacing: 0.05em; }
  nav a { padding: 10px 5px; font-size: 0.82rem; letter-spacing: 0.05em; }
}
nav a:hover, nav a:focus-visible { color: var(--gold); }

/* ---------- Hero ---------- */
/* Photo first, wordmark underneath — so the printed slogan on the shirt stays readable. */
.hero {
  position: relative;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-media {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: #111;
}
.hero-media picture {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.hero-media img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(72dvh, 820px);
  object-fit: cover;
  object-position: center top;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,11,11,0.35) 0%, rgba(11,11,11,0) 24%);
  pointer-events: none;
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding: 28px var(--pad-x) calc(36px + env(safe-area-inset-bottom, 0px));
  width: 100%;
  background: var(--bg);
}
.hero-kicker {
  font-family: var(--font-condensed);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.hero h1 {
  display: flex;
  flex-direction: column;
  line-height: 0.86;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 16vw, 6.5rem);
  letter-spacing: 0.02em;
}
.hero .w1 { color: var(--ink); }
.hero .w2 { color: var(--gold); margin-top: 0.1em; }
.tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ink-dim);
  margin: 18px 0 22px;
}
.tagline::before {
  content: "";
  display: block;
  width: 72px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 10px;
  font-family: var(--font-condensed);
  font-size: 16px; /* stops iPhone auto-zoom */
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
  max-width: 320px;
}
.btn-gold {
  background: var(--gold);
  color: #0b0b0b;
  border-color: var(--gold);
}
.btn-gold:hover, .btn-gold:focus-visible {
  background: var(--gold-lt);
  color: #0b0b0b;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}

/* ---------- Sections ---------- */
.section {
  padding: 36px var(--pad-x) 12px;
}
.section h2 {
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-lead {
  color: var(--ink-dim);
  line-height: 1.55;
  margin-bottom: 22px;
  max-width: 40rem;
}
.loading { color: var(--ink-dim); }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  width: 100%;
  max-width: 1200px;
  min-width: 0;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
}
.card-image {
  background: #1c1c1c;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.card-name {
  font-family: var(--font-condensed);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.card-blurb {
  color: var(--ink-dim);
  font-size: 0.95rem;
  line-height: 1.4;
}
.card-price {
  margin-top: 4px;
  font-family: var(--font-condensed);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.price-note {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0;
  color: #8d877c;
  text-transform: none;
  margin-left: 6px;
}
.buy-row {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 8px;
  margin-top: 12px;
}
.buy-row label { display: block; min-width: 0; }
.buy-row .btn { max-width: none; width: 100%; }
.checkout-note {
  margin-top: 10px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--ink-dim);
}


select {
  width: 100%;
  min-height: 48px;
  font-size: 16px; /* stops iPhone Safari auto-zoom */
  font-family: var(--font-body);
  color: var(--ink);
  background: #0e0e0e;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  padding: 8px 12px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23c9a24f' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
select:focus, .btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Custom / about ---------- */
.custom { padding-top: 44px; }
.custom-card {
  background: linear-gradient(180deg, #16120c 0%, #121212 100%);
  border: 1px solid #3a3118;
  border-radius: 16px;
  padding: 24px 20px 26px;
  text-align: center;
}
.coming-soon-badge {
  display: inline-block;
  margin: 0 auto 12px;
  padding: 5px 12px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.custom-card h2 { margin-bottom: 10px; }
.custom-card p:not(.coming-soon-badge) {
  color: var(--ink-dim);
  line-height: 1.55;
  margin: 0 auto 20px;
  max-width: 36rem;
}
.custom-card .btn { margin: 0 auto; }

.about p {
  color: var(--ink-dim);
  line-height: 1.6;
  max-width: 38rem;
  margin-bottom: 12px;
}

/* ---------- Footer ---------- */
footer {
  margin-top: 28px;
  padding: 24px var(--pad-x) 8px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: #8d877c;
  font-size: 0.9rem;
  line-height: 1.6;
}
.foot-name { color: var(--ink-dim); margin-bottom: 4px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 10px; justify-content: center; }
.visit-counter {
  margin-top: 14px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: #7a746a;
}
.visit-counter[hidden] { display: none; }

/* ---------- Order modal ---------- */
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.64);
}
.modal-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #141414;
  border: 1px solid #3a3118;
  border-radius: 18px 18px 0 0;
  /* extra bottom space so the Close button sits above the deed.page badge */
  padding: 24px 20px calc(72px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
}
.modal-sheet h2 {
  font-family: var(--font-condensed);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 1.15rem;
  margin-bottom: 10px;
}
.modal-sheet p {
  color: var(--ink-dim);
  line-height: 1.5;
  margin-bottom: 18px;
}
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-actions .btn { max-width: none; }

/* ---------- Breakpoints ---------- */
@media (min-width: 640px) {
  .btn { width: auto; }
  .modal { align-items: center; }
  .modal-sheet {
    border-radius: 16px;
    padding: 28px 24px;
    margin: 16px;
  }
  .lightbox { align-items: center; }
  .lightbox-sheet {
    border-radius: 16px;
    padding: 20px 20px 24px;
    margin: 16px;
    max-height: calc(100dvh - 40px);
  }
}
/* Two-column tees and a 3-col gallery from tablets up, not on phones. */
@media (min-width: 800px) {
  .product-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .gallery { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 900px) {
  /* Keep the wordmark and Shop button on the first screen under the photo. */
  .hero-media img { max-height: min(58dvh, 640px); }
  .hero h1 { font-size: clamp(3rem, 7vw, 4.6rem); }
  .hero-copy { padding-top: 22px; padding-bottom: 28px; }
}
@media (min-width: 1024px) {
  header, .section, footer { padding-left: 28px; padding-right: 28px; }
  .hero-copy { padding-left: 28px; padding-right: 28px; }
}

/* On phones, fill the first screen so THE TEES doesn't peek under the deed.page badge. */
@media (max-width: 699px) {
  .hero {
    min-height: calc(100dvh - var(--header-h) - env(safe-area-inset-top, 0px) - 10px);
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .hero-media img { max-height: min(78dvh, 420px); }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 3.6rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Coming soon / gallery ---------- */
.coming-soon {
  margin-top: 22px;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-dim);
  text-align: left;
}

/* ---------- Fellas video ---------- */
.fellas-video {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.fellas-video video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #0a0a0a;
  border-radius: 16px;
  border: 1px solid var(--line);
}
.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}
.gallery-item {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  min-height: 44px;
  -webkit-appearance: none;
  appearance: none;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
}
.gallery-item:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Lightbox ---------- */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}
.lightbox-sheet {
  position: relative;
  width: 100%;
  max-width: 920px;
  margin: 0;
  background: #111;
  border: 1px solid #3a3118;
  border-radius: 18px 18px 0 0;
  padding: 16px 16px calc(72px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
}
.lightbox-sheet img {
  width: 100%;
  height: auto;
  max-height: min(70vh, 70dvh);
  object-fit: contain;
  background: #0a0a0a;
  border-radius: 8px;
}
.lightbox-sheet figcaption {
  color: var(--ink-dim);
  font-size: 0.95rem;
  margin: 10px 0 14px;
  line-height: 1.4;
}
.lightbox-close { max-width: none; width: 100%; }
