:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #68625f;
  --line: #ddd7ce;
  --paper: #fffdf8;
  --panel: #ffffff;
  --red: #c91826;
  --red-dark: #8f111b;
  --gold: #f5c542;
  --green: #1f7a4d;
  --shadow: 0 18px 50px rgba(33, 24, 17, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  padding-bottom: 5.5rem;
}

body.checkout-open {
  overflow: hidden;
}

body.checkout-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(12, 10, 8, 0.76);
  backdrop-filter: blur(2px);
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.site-header {
  min-height: 92vh;
  color: white;
  background:
    linear-gradient(90deg, rgba(21, 19, 17, 0.92), rgba(56, 23, 26, 0.76)),
    radial-gradient(circle at 85% 22%, rgba(245, 197, 66, 0.72), transparent 20rem),
    linear-gradient(135deg, #2b1b19, #9e141f 54%, #111);
}

.fireworks-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.site-header .topbar,
.site-header .hero {
  position: relative;
  z-index: 1;
}

.hero h1 {
  text-shadow:
    0 0 40px rgba(245, 197, 66, 0.25),
    0 0 80px rgba(201, 24, 38, 0.15);
  animation: heroGlow 4s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0%   { text-shadow: 0 0 40px rgba(245, 197, 66, 0.2), 0 0 80px rgba(201, 24, 38, 0.1); }
  100% { text-shadow: 0 0 60px rgba(245, 197, 66, 0.4), 0 0 120px rgba(201, 24, 38, 0.25); }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: white;
  font-weight: 900;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.14rem;
}

.brand small {
  display: block;
  color: #ffe9a5;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-actions a,
.cart-button,
.primary-link,
.secondary-link,
.submit-button,
.card-button,
.quantity button,
.dialog-close {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  padding: 0.68rem 0.9rem;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
}

.cart-button,
.primary-link,
.submit-button,
.card-button {
  border-color: var(--gold);
  color: #16120e;
  background: var(--gold);
}

.secondary-link {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: end;
  gap: 2rem;
  max-width: 1180px;
  min-height: calc(92vh - 76px);
  margin: 0 auto;
  padding: clamp(2rem, 8vw, 6rem) 1rem;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.65rem, 7vw, 6.5rem);
  line-height: 0.95;
}

.hero p {
  max-width: 620px;
  color: #fff5d2;
  font-size: 1.15rem;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-panel {
  display: grid;
  gap: 0.4rem;
  padding: 1rem;
  color: #1b1613;
  background: rgba(255, 255, 255, 0.9);
  border-left: 6px solid var(--gold);
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px 190px;
  gap: 0.8rem;
  padding: 0.85rem;
  margin: -2.5rem 0 2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  padding: 0.75rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0 1rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.product-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(33, 24, 17, 0.08);
}

.product-media {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 0;
  border: 0;
  cursor: pointer;
  background:
    linear-gradient(135deg, rgba(201, 24, 38, 0.08), rgba(245, 197, 66, 0.2)),
    #fff8e8;
  overflow: hidden;
  padding: 0;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 1rem;
}

.fallback-art {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  color: white;
  background: #1b1613;
  border: 8px solid var(--gold);
  font-size: 2rem;
  font-weight: 900;
}

.product-body {
  display: grid;
  grid-template-rows: auto minmax(2.8rem, auto) auto auto;
  gap: 0.75rem;
  padding: 1rem;
  align-content: start;
}

.product-title {
  min-height: 0;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.25;
}

.product-badges {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
}

.video-icon-button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 1px solid var(--red-dark);
  border-radius: 50%;
  color: white;
  background: var(--red-dark);
  cursor: pointer;
}

.video-icon-button span {
  margin-left: 2px;
  font-size: 0.78rem;
  line-height: 1;
}

.price {
  color: var(--red-dark);
  font-size: 1.35rem;
  font-weight: 900;
}

.product-sentinel {
  padding: 1.25rem;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.product-sentinel[hidden] {
  display: none;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.details-button {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.checkout-section {
  display: none;
  position: fixed;
  top: clamp(0.75rem, 3vw, 2rem);
  left: 50%;
  bottom: clamp(0.75rem, 3vw, 2rem);
  width: min(1120px, calc(100vw - 2rem));
  transform: translateX(-50%);
  z-index: 40;
  overflow: auto;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: #fffdf8;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.checkout-section.is-open {
  display: block;
}

.checkout-main[hidden] {
  display: none;
}

.checkout-heading-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.checkout-heading-actions p {
  margin: 0;
  font-weight: 900;
}

.checkout-close {
  min-height: 42px;
  border: 1px solid var(--line);
  padding: 0.68rem 0.9rem;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 1rem;
  align-items: start;
}

.cart-panel,
.checkout-form {
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(33, 24, 17, 0.08);
  padding: 1.15rem;
}

.cart-items {
  display: grid;
  gap: 0.75rem;
}

.empty-cart {
  color: var(--muted);
  padding: 1rem;
  border: 1px dashed var(--line);
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.cart-line strong {
  display: block;
}

.quantity {
  display: grid;
  grid-template-columns: 38px 42px 38px;
  align-items: center;
  text-align: center;
}

.quantity button {
  min-height: 36px;
  padding: 0;
  border-color: var(--line);
  background: #f7f2ec;
}

.totals {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 3px solid var(--ink);
  font-size: 1.2rem;
}

.checkout-form {
  display: grid;
  gap: 0.9rem;
}

.address-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 120px;
  gap: 0.75rem;
}

.form-status {
  min-height: 1.5rem;
  margin: 0;
  color: var(--green);
  font-weight: 800;
}

.form-status.error {
  color: var(--red-dark);
}

.confirmation-section {
  padding: 2rem 1rem 4rem;
  background: #f7f2ec;
}

.checkout-section .confirmation-section {
  padding: 0;
  background: transparent;
}

.confirmation-section[hidden] {
  display: none;
}

.confirmation-panel {
  width: min(820px, 100%);
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.checkout-section .confirmation-panel {
  box-shadow: none;
}

.confirmation-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 1rem;
}

.confirmation-panel h2 {
  max-width: 680px;
  margin: 0.25rem 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.95;
}

.confirmation-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.confirmation-summary div {
  padding: 1rem;
  border: 1px solid var(--line);
  background: #fffaf1;
}

.confirmation-summary span,
.confirmation-items span {
  color: var(--muted);
}

.confirmation-summary strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.25rem;
}

.confirmation-items {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.confirmation-items li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.product-dialog {
  width: min(860px, calc(100vw - 2rem));
  border: 0;
  padding: 0;
  box-shadow: var(--shadow);
}

.product-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.dialog-close {
  float: right;
  margin: 0.75rem;
  background: white;
  border-color: var(--line);
}

.dialog-inner {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 1fr;
  gap: 1rem;
  padding: 1rem;
  clear: both;
}

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #111;
}

.video-wrap {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.video-link {
  color: var(--red-dark);
  font-weight: 800;
}

.product-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1rem 0;
}

.product-specs div {
  padding: 0.75rem;
  border: 1px solid var(--line);
  background: #fffaf1;
}

.product-specs dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-specs dd {
  margin: 0.15rem 0 0;
  font-weight: 800;
}

.floating-checkout {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: 1rem;
  z-index: 20;
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 56px;
  padding: 0.8rem 1rem;
  color: #15110d;
  background: var(--gold);
  border: 2px solid #15110d;
  box-shadow: var(--shadow);
  text-decoration: none;
  font-weight: 900;
}

.floating-checkout strong {
  font-size: 1.05rem;
}

.floating-checkout em {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 0.4rem;
  border-radius: 999px;
  color: white;
  background: var(--red-dark);
  font-style: normal;
}

.floating-checkout.has-items {
  background: #ffe178;
}

footer {
  padding: 2rem 1rem;
  color: white;
  background: #171717;
  text-align: center;
}

@media (max-width: 760px) {
  .topbar,
  .nav-actions,
  .hero-actions {
    align-items: stretch;
  }

  .topbar,
  .hero,
  .toolbar,
  .checkout-layout,
  .dialog-inner {
    grid-template-columns: 1fr;
  }

  .topbar,
  .nav-actions {
    flex-direction: column;
  }

  .hero {
    align-items: start;
    min-height: calc(92vh - 190px);
  }

  .toolbar {
    position: static;
    margin-top: 1rem;
  }

  .floating-checkout {
    left: 1rem;
    right: 1rem;
    grid-template-columns: 1fr auto auto;
  }

  .checkout-section {
    top: 0.5rem;
    bottom: 0.5rem;
    width: calc(100vw - 1rem);
    padding: 1rem;
  }

  .checkout-heading-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .confirmation-heading {
    grid-template-columns: 1fr;
  }

  .confirmation-summary {
    grid-template-columns: 1fr;
  }

  .confirmation-items li {
    display: grid;
  }

  .address-grid {
    grid-template-columns: 1fr;
  }

  .product-specs {
    grid-template-columns: 1fr;
  }
}
