/* Shared structure. Variables live in each theme's tokens.css, which is
   loaded first, so every value here resolves against the active palette.
   @font-face blocks are appended by the fonts task. */

@font-face {
  font-family: "Archivo Black";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/archivo-black-400.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/inter-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/inter-variable.woff2") format("woff2");
}

/* nerigallery, slice 4b. One variable file spans the normal-style weight
   range (400 and 500 are both requested against it, same signature as
   inter-variable.woff2 and ibm-plex-sans-variable.woff2 above); the italic
   is a separate static face, the same shape ibm-plex-mono's static
   instances take for weight instead of style. */
@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/eb-garamond-variable.woff2") format("woff2");
}

@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/eb-garamond-variable.woff2") format("woff2");
}

@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/eb-garamond-italic-400.woff2") format("woff2");
}

@font-face {
  font-family: "Karla";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/static/fonts/karla-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Karla";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/karla-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Karla";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/karla-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Karla";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/karla-variable.woff2") format("woff2");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-body);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0 0 0.5rem;
}

.eyebrow,
.card__category {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 0.375rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem 1.5rem;
}

.card__media {
  position: relative;
}

.media {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.media--placeholder {
  background: var(--color-placeholder);
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--color-accent);
  color: var(--color-bg);
  pointer-events: none;
}

.price {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-accent);
}

.detail__media,
.detail__body {
  min-width: 0;
}

/* Keyed on the class, not the tag: this stylesheet is served to every theme,
   and an <article> is a document element a theme may use for anything. */
.detail {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 3rem;
}

@media (max-width: 720px) {
  .detail {
    grid-template-columns: 1fr;
  }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.chip {
  border: 1px solid var(--color-fg);
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
}

.chip--unavailable {
  opacity: 0.4;
  text-decoration: line-through;
}

button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
