: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;
}

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);
}

.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;
  gap: 0.35rem;
}

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

.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-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 1rem;
  align-items: start;
}

.cart-panel,
.checkout-form {
  background: white;
  border: 1px solid var(--line);
  padding: 1rem;
}

.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;
}

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

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

.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;
}

.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;
  }
}
