:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17120f;
  background: #f7f3ec;
  --serif: Georgia, "Times New Roman", serif;
  --panel: #fffaf1;
  --ink: #17120f;
  --muted: #756d64;
  --line: #ded5c8;
  --coal: #17120f;
  --cream: #fffaf1;
  --red: #e3382f;
  --blue: #1667c7;
  --yellow: #f2be22;
  --green: #07886f;
  --price: #bd2026;
  --shadow: 0 18px 40px rgba(23, 18, 15, 0.14);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: #f7f3ec; color: var(--ink); }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

button, .button {
  min-height: 40px;
  border: 1px solid var(--coal);
  border-radius: 7px;
  background: var(--cream);
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
  box-shadow: 3px 3px 0 rgba(23, 18, 15, 0.14);
}

.button.primary, button.primary {
  background: var(--red);
  border-color: var(--coal);
  color: #fff;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 310px minmax(320px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 22px 0;
  background: rgba(255, 250, 241, 0.96);
  border-bottom: 2px solid var(--coal);
  backdrop-filter: blur(12px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
}

.wordmark span {
  width: 46px;
  height: 46px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--red) 0 33%, var(--yellow) 33% 66%, var(--blue) 66%);
  border: 2px solid var(--coal);
  color: #fff;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
}

.search {
  position: relative;
  display: grid;
  grid-template-columns: 138px 1fr 96px;
}

.search select, .search input, .search button {
  height: 46px;
  border: 2px solid var(--coal);
}

.search select {
  border-radius: 7px 0 0 7px;
  padding: 0 10px;
  background: #fff;
}

.search input {
  border-left: 0;
  border-right: 0;
  padding: 0 14px;
  outline: 0;
  background: #fff;
}

.search button {
  border-radius: 0 7px 7px 0;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.suggestions {
  position: absolute;
  inset: 52px 96px auto 138px;
  background: #fff;
  border: 2px solid var(--coal);
  border-radius: 7px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.suggestions button {
  width: 100%;
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.header-actions a {
  border-bottom: 3px solid transparent;
}

.header-actions a:hover {
  border-color: var(--yellow);
}

.category-nav {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0 12px;
  font-size: 14px;
}

.category-nav a {
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 7px 12px;
  color: #2b241f;
  font-weight: 800;
}

.hero {
  position: relative;
  min-height: 470px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 0.9fr);
  gap: 26px;
  align-items: center;
  overflow: hidden;
  padding: 54px;
  background:
    linear-gradient(90deg, rgba(23, 18, 15, 0.88), rgba(23, 18, 15, 0.56)),
    radial-gradient(circle at 80% 18%, rgba(242, 190, 34, 0.9), transparent 24%),
    linear-gradient(135deg, #17120f 0%, #2d2117 44%, #1667c7 44%, #1667c7 60%, #e3382f 60%, #e3382f 78%, #07886f 78%);
  color: #fff;
  border-bottom: 2px solid var(--coal);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 12px;
  background: repeating-linear-gradient(90deg, var(--red) 0 48px, var(--yellow) 48px 96px, var(--blue) 96px 144px, var(--green) 144px 192px);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.kicker {
  display: inline-flex;
  margin-bottom: 12px;
  color: #ffe9aa;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero p {
  max-width: 650px;
  color: #f6ead8;
  font-size: 19px;
  line-height: 1.45;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-actions .button { box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.25); }

.hero-showcase {
  position: relative;
  z-index: 1;
  min-height: 360px;
}

.hero-piece {
  position: absolute;
  display: grid;
  place-items: center;
  width: min(42vw, 230px);
  aspect-ratio: 0.72;
  background: #fff;
  border: 3px solid var(--coal);
  border-radius: 8px;
  box-shadow: 10px 14px 0 rgba(0, 0, 0, 0.24);
  transform: rotate(-5deg);
}

.hero-piece img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.hero-piece span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: var(--yellow);
  border: 2px solid var(--coal);
  border-radius: 999px;
  color: var(--coal);
  padding: 5px 9px;
  font-size: 13px;
  font-weight: 900;
}

.piece-1 { left: 4%; top: 6%; }
.piece-2 { right: 2%; top: 18%; transform: rotate(7deg); }
.piece-3 { left: 25%; bottom: 0; transform: rotate(-1deg); }

.wrap { max-width: 1440px; margin: 0 auto; padding: 28px 22px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-family: var(--serif); font-size: 32px; }
.section-head p { margin: 4px 0 0; color: var(--muted); }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
}

.tile, .card, .panel {
  background: var(--panel);
  border: 2px solid var(--coal);
  border-radius: 8px;
}

.tile {
  min-height: 126px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  box-shadow: 5px 5px 0 rgba(23, 18, 15, 0.12);
}

.tile strong { font-family: var(--serif); font-size: 22px; }
.tile span { color: #2d241c; font-weight: 800; }
.tile-sports-cards { background: #ffe8ec; }
.tile-collectibles { background: #fff2b8; }
.tile-electronics { background: #dcecff; }
.tile-home { background: #dff6ea; }
.tile-everything-else { background: #f0e5ff; }

.browse {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 18px;
}

.filters {
  padding: 16px;
  align-self: start;
  position: sticky;
  top: 124px;
  background: #fff;
}

.filter-group { display: grid; gap: 7px; margin-bottom: 14px; }
.filter-group label { font-size: 12px; font-weight: 900; color: #332a22; text-transform: uppercase; }
.filter-group select, .filter-group input { min-height: 40px; border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; background: #fffaf1; }

.results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.breadcrumbs { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.results-head h1 { margin: 0; font-family: var(--serif); }
.results-head select { min-height: 40px; border: 2px solid var(--coal); border-radius: 7px; background: #fff; padding: 0 10px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
  gap: 16px;
}

.product-card {
  overflow: hidden;
  display: grid;
  grid-template-rows: 250px auto;
  min-height: 426px;
  background: #fff;
  box-shadow: 0 10px 0 rgba(23, 18, 15, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 0 rgba(23, 18, 15, 0.12);
}

.image-box {
  background:
    linear-gradient(90deg, rgba(23, 18, 15, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 18, 15, 0.04) 1px, transparent 1px),
    #fffaf1;
  background-size: 18px 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 2px solid var(--coal);
}

.image-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

.card-body { padding: 13px; }
.card-body h3 { margin: 0 0 8px; font-size: 15px; line-height: 1.28; }
.meta { color: var(--muted); font-size: 13px; min-height: 34px; }
.price { color: var(--price); font-weight: 900; font-size: 22px; margin-top: 10px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.badge { border-radius: 999px; background: #fff2b8; border: 1px solid #e1bd38; padding: 4px 8px; font-size: 12px; font-weight: 800; color: #332a22; }

.detail {
  display: grid;
  grid-template-columns: minmax(320px, 56%) minmax(320px, 1fr);
  gap: 28px;
}

.gallery-main {
  min-height: 580px;
  background:
    radial-gradient(circle at 50% 34%, #fff 0 26%, transparent 27%),
    linear-gradient(135deg, #fff5c8, #dcecff 54%, #ffe8ec);
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 2px solid var(--coal);
  box-shadow: 8px 8px 0 rgba(23, 18, 15, 0.1);
}

.gallery-main img { max-width: 100%; max-height: 700px; object-fit: contain; padding: 14px; }
.thumbs { display: flex; gap: 8px; margin-top: 12px; }
.thumbs button { background: #fff; }
.detail h1 { margin: 0 0 8px; font-family: var(--serif); font-size: 38px; line-height: 1.08; }
.buy-box { padding: 18px; display: grid; gap: 12px; background: #fff; }
.fulfillment { display: grid; gap: 8px; }
.fulfillment label { display: flex; gap: 8px; align-items: start; }

.cart-row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #fff;
}

.cart-row img { width: 96px; height: 96px; object-fit: contain; background: #fffaf1; border: 1px solid var(--line); }
.checkout-grid { display: grid; grid-template-columns: 1fr 360px; gap: 18px; }
.form-grid { display: grid; gap: 10px; }
.form-grid input, .form-grid select, .form-grid textarea { min-height: 42px; border: 1px solid var(--line); border-radius: 7px; padding: 10px; background: #fffaf1; }
.summary { padding: 16px; align-self: start; position: sticky; top: 124px; background: #fff; }

.legal { max-width: 920px; line-height: 1.6; }
.site-footer { display: flex; flex-wrap: wrap; gap: 16px; padding: 26px 22px; border-top: 2px solid var(--coal); color: #4c4036; background: #fffaf1; }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr; padding: 10px 14px 0; }
  .search { grid-template-columns: 96px 1fr 76px; }
  .suggestions { inset: 52px 76px auto 96px; }
  .hero { min-height: 640px; padding: 28px 22px 36px; grid-template-columns: 1fr; align-items: start; }
  .hero-showcase { min-height: 310px; }
  .hero-piece { width: min(46vw, 190px); }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .browse { grid-template-columns: 1fr; }
  .filters { position: static; }
  .detail, .checkout-grid { grid-template-columns: 1fr; }
  .gallery-main { min-height: 380px; }
}

@media (max-width: 620px) {
  .wrap { padding: 16px 14px; }
  .wordmark strong { font-size: 17px; }
  .hero h1 { font-size: 48px; }
  .hero p { font-size: 16px; }
  .tile-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-card { grid-template-rows: 176px auto; min-height: 374px; }
  .card-body h3 { font-size: 14px; }
  .price { font-size: 19px; }
  .cart-row { grid-template-columns: 72px 1fr; }
  .cart-row img { width: 72px; height: 72px; }
}
