/* Look: a send-up of patriotic campaign-store sites. Flag colours, stars,
   a breaking-news ticker and a made-up seal. */
:root {
  --navy: #0b1f4b;
  --navy-deep: #071535;
  --red: #c8102e;
  --cream: #f6efe0;
  --display: Anton, Impact, "Arial Narrow Bold", sans-serif;
  --serif: "Playfair Display", Georgia, serif;
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23f6efe0' d='M24 6l4.2 12.9h13.6l-11 8 4.2 12.9-11-8-11 8 4.2-12.9-11-8h13.6z'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--navy);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
h1, h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.fine { margin-top: 10px; font-size: 13px; opacity: .75; }

/* Breaking-news ticker: two copies of the text slide left by half, so it loops. */
.ticker {
  overflow: hidden;
  white-space: nowrap;
  background: var(--red);
  color: var(--cream);
  font: 400 14px/1 var(--display);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.ticker div { display: inline-block; padding: 10px 0; animation: ticker 45s linear infinite; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker div { animation: none; } }

.top { background: var(--navy); color: var(--cream); }
.top .wrap { display: flex; justify-content: space-between; align-items: center; padding-block: 12px; }
.brand { font: 400 20px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.top nav { display: flex; align-items: center; gap: 18px; }
.top nav a, .top nav button { font: 400 15px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.top nav a { text-decoration: none; }
.top nav button { padding: 9px 14px; border: 0; background: var(--red); }

/* Big red button, used for the hero link, add to cart and checkout. */
.cta {
  display: inline-block;
  margin-top: 28px;
  padding: 18px 28px;
  border: 0;
  background: var(--red);
  color: var(--cream);
  font: 400 clamp(18px, 2.4vw, 24px)/1 var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 6px 6px 0 var(--navy);
}
.cta:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--navy); }
.cta:disabled { background: #8d93a5; box-shadow: none; transform: none; cursor: not-allowed; }

/* Home */
.hero { padding: 6vh 0 9vh; }
/* The seal is sized in em so it tracks the headline and tucks beside "DID / IT." */
.headline { position: relative; display: inline-block; font-size: clamp(84px, 25vw, 300px); }
.hero h1 { font-size: 1em; line-height: .9; }
.hero h1 span { display: block; }
.hero h1 .it { color: var(--red); }
.seal { position: absolute; right: -.04em; bottom: .08em; width: 1.28em; transform: rotate(10deg); }
@media (min-width: 1000px) { .seal { right: -.8em; bottom: .1em; width: 1.45em; } }
.lede { margin-top: 3vh; max-width: 20ch; font: italic 700 clamp(22px, 3.2vw, 34px)/1.2 var(--serif); }

/* Flag strip: star field on the left, seven stripes on the right. */
.flag { display: grid; grid-template-columns: minmax(110px, 26%) 1fr; height: 98px; }
.flag i:first-child { background: var(--navy) var(--star) center / 28px 28px; }
.flag i:last-child { background: repeating-linear-gradient(var(--red) 0 14px, var(--cream) 14px 28px); }

#shop { padding: 9vh 0 10vh; text-align: center; }
.stars { color: var(--red); letter-spacing: .5em; font-size: 18px; }
#shop h2 { font-size: clamp(44px, 8vw, 84px); line-height: 1; }
.sub { margin: 8px 0 36px; font: italic 700 clamp(18px, 2.4vw, 24px)/1.3 var(--serif); }

.empty { max-width: 640px; margin: 0 auto; padding: 52px 24px; border: 3px dashed var(--navy); }
.empty strong {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font: 400 clamp(26px, 4vw, 40px)/1.1 var(--display);
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 32px 28px;
  text-align: left;
}
.card { display: block; background: #fff; border: 3px solid var(--navy); box-shadow: 6px 6px 0 var(--red); text-decoration: none; }
.card:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--red); }
.card img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; background: #e9e2d0; }
.card .name { display: block; padding: 14px 14px 2px; font: 400 22px/1.1 var(--display); text-transform: uppercase; }
.card .price { display: block; padding: 0 14px 14px; color: var(--red); font-weight: 700; }

.oath { position: relative; overflow: hidden; padding: 10vh 0; background: var(--navy); color: var(--cream); text-align: center; }
.oath::before { content: ""; position: absolute; inset: 0; background: var(--star) 0 0 / 56px 56px; opacity: .07; }
.oath p { position: relative; max-width: 18ch; margin: 0 auto; font: italic 700 clamp(28px, 5vw, 58px)/1.15 var(--serif); }
.oath small {
  position: relative;
  display: block;
  margin-top: 22px;
  font: 400 14px/1 var(--display);
  letter-spacing: .22em;
  text-transform: uppercase;
  opacity: .8;
}

.site-foot { padding: 28px 0 40px; background: var(--navy-deep); color: var(--cream); font-size: 13px; text-align: center; }
.site-foot p + p { max-width: 62ch; margin: 8px auto 0; opacity: .7; }

/* Product page */
.product { padding: 4vh 0 10vh; }
.crumb { margin-bottom: 20px; font: 400 14px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.crumb a { text-decoration: none; }
.product-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: start; }
/* minmax(0, …) stops the scrolling thumbnail row from stretching its column. */
@media (max-width: 800px) { .product-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #e9e2d0;
  border: 3px solid var(--navy);
  box-shadow: 6px 6px 0 var(--red);
}
.thumbs { display: flex; gap: 8px; margin-top: 18px; padding-bottom: 6px; overflow-x: auto; }
.thumbs button { flex: 0 0 62px; padding: 0; border: 2px solid transparent; background: none; }
.thumbs button[aria-current="true"] { border-color: var(--navy); }
.thumbs img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; background: #e9e2d0; }

.buy h1 { font-size: clamp(40px, 6vw, 68px); line-height: .95; }
.buy .price { margin: 10px 0 24px; color: var(--red); font-size: 24px; font-weight: 700; }
fieldset { margin: 0 0 20px; padding: 0; border: 0; }
legend { margin-bottom: 10px; padding: 0; font: 400 14px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts label { position: relative; }
/* The real radio button sits invisibly over its label, so keyboard and screen readers still work. */
.opts input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.opts span { display: block; min-width: 50px; padding: 10px 12px; border: 2px solid var(--navy); background: #fff; text-align: center; font-weight: 600; }
.opts input:checked + span { background: var(--navy); color: var(--cream); }
.opts input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.opts .swatch span { width: 42px; height: 42px; min-width: 0; padding: 0; border-radius: 50%; background: var(--c); }
.opts .swatch input:checked + span { background: var(--c); box-shadow: 0 0 0 3px var(--cream), 0 0 0 6px var(--navy); }
.buy .cta { width: 100%; margin-top: 8px; }
.desc { margin: 30px 0 20px; }
details { padding: 14px 0; border-top: 2px solid var(--navy); }
details:last-of-type { border-bottom: 2px solid var(--navy); }
summary { font: 400 16px/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
details > div { margin-top: 12px; font-size: 15px; }
details ul { padding-left: 20px; }

.message { padding: 12vh 0 16vh; }
.message h1 { font-size: clamp(48px, 10vw, 110px); line-height: .95; }

/* Cart: a panel that slides in from the right. */
.cart {
  width: min(420px, 100vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-left: 4px solid var(--navy);
  background: var(--cream);
  color: var(--navy);
}
.cart[open] { display: flex; flex-direction: column; }
.cart::backdrop { background: rgb(7 21 53 / .6); }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; background: var(--navy); color: var(--cream); }
.cart-head h2 { font-size: 26px; }
.cart-head button { padding: 0 4px; border: 0; background: none; font-size: 32px; line-height: 1; }
.cart-empty { padding: 28px 20px; font: italic 700 20px/1.3 var(--serif); }
.lines { flex: 1; margin: 0; padding: 0 20px; overflow-y: auto; list-style: none; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; padding: 16px 0; border-bottom: 1px solid #d8cfba; }
.line img { display: block; width: 72px; height: auto; aspect-ratio: 3 / 4; object-fit: cover; background: #e9e2d0; border: 2px solid var(--navy); }
.line .name { display: block; font: 400 18px/1.1 var(--display); text-transform: uppercase; text-decoration: none; }
.line .variant { display: block; font-size: 14px; opacity: .8; }
.line.gone .variant::after { content: " · unavailable"; color: var(--red); font-weight: 700; }
.line .total { font-weight: 700; }
.qty { display: inline-flex; align-items: center; margin-top: 8px; border: 2px solid var(--navy); background: #fff; }
.qty button { width: 30px; height: 30px; border: 0; background: none; font-weight: 700; }
.qty span { min-width: 28px; text-align: center; font-weight: 600; }
.line .remove { display: block; margin-top: 8px; padding: 0; border: 0; background: none; font-size: 13px; text-decoration: underline; }
.cart-foot { padding: 16px 20px 24px; border-top: 3px solid var(--navy); background: #fff; }
.subtotal { display: flex; justify-content: space-between; font-size: 19px; }
.cart-error { margin-top: 10px; color: var(--red); font-weight: 600; }
.cart-error:empty { display: none; }
.cart-foot .cta { width: 100%; margin-top: 14px; }
