@font-face { font-family: "Anton"; src: url("../fonts/Anton-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --blue: #3572b8;
  --blue-deep: #24548e;
  --ink: #1b2a3d;
  --muted: #5a6b80;
  --paper: #f4f7fb;
  --card: #ffffff;
  --line: #d9e3ef;
  --stage: #e9f0f8;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 "Poppins", Arial, sans-serif; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: "Anton", Impact, sans-serif; font-weight: 400; letter-spacing: .01em; line-height: 1.05; margin: 0; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Barra de navegación */
.topbar { background: var(--blue); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 48px; font-size: 14px; font-weight: 700; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.footer a { color: var(--blue); font-weight: 700; }

/* Encabezado */
.hero { background: #fff; border-bottom: 1px solid var(--line); }
.hero-inner { display: flex; align-items: center; gap: 24px; padding: 26px 0 24px; }
.hero-logo { width: 84px; height: auto; flex: none; }
.hero h1 { font-size: clamp(26px, 3.6vw, 40px); color: var(--ink); text-transform: uppercase; }
.lead { max-width: 60ch; margin: 8px 0 0; color: var(--muted); font-size: 15px; }

/* Filtros */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.filters button, .cuts button, .views button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 16px; font-size: 14px; font-weight: 700;
}
.filters button[aria-pressed="true"], .cuts button[aria-pressed="true"], .views button[aria-pressed="true"] {
  background: var(--blue); border-color: var(--blue); color: #fff;
}
.count { margin: 18px 0 12px; color: var(--muted); font-size: 14px; }

/* Tarjetas */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; padding-bottom: 56px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 14px 32px -18px rgba(27, 42, 61, .35); transform: translateY(-2px); }
.card-media { background: var(--stage); aspect-ratio: 1; padding: 18px; }
.card-media img { width: 100%; height: 100%; object-fit: contain; }
.card-body { padding: 16px 18px 18px; display: grid; gap: 6px; }
.card h3 { font-size: 21px; text-transform: uppercase; }
.meta { margin: 0; font-size: 13px; color: var(--muted); }
.card-foot { display: flex; justify-content: space-between; gap: 8px; margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.card-color { font-weight: 700; color: var(--ink); }
.card-open { position: absolute; inset: 0; background: none; border: 0; border-radius: var(--radius); }
.card .swatches { position: relative; z-index: 1; }

/* Muestras de color */
.swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.swatch {
  width: 24px; height: 24px; padding: 0; border-radius: 50%; background: var(--swatch);
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(27, 42, 61, .25);
}
.swatch.is-selected { box-shadow: 0 0 0 2px var(--blue); }
.swatch[data-size="big"] { width: 36px; height: 36px; }
.more { font-size: 12px; font-weight: 700; color: var(--muted); padding-left: 2px; }
.empty { padding: 48px 0; text-align: center; color: var(--muted); }

/* Detalle */
.detail { width: min(980px, 100% - 24px); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 22px; background: var(--card); color: var(--ink); }
.detail::backdrop { background: rgba(16, 30, 50, .6); }
.detail-body { display: grid; grid-template-columns: 1.1fr 1fr; }
.stage { position: relative; margin: 0; background: var(--stage); padding: 28px; display: grid; place-items: center; min-height: 420px; }
.stage img { width: 100%; max-height: 62dvh; object-fit: contain; }
.views { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 6px; }
.views[hidden] { display: none; }
.info { padding: 32px 28px; display: grid; align-content: start; gap: 14px; }
.info h2 { font-size: clamp(24px, 3vw, 32px); text-transform: uppercase; }
.facts { display: flex; gap: 28px; margin: 0; }
.facts dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.facts dd { margin: 0; font-weight: 700; }
.cuts { display: flex; flex-wrap: wrap; gap: 8px; }
.color-name { margin: 4px 0 0; }
.close { position: absolute; top: 10px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; font-size: 26px; line-height: 1; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }

/* Pie */
.footer { background: #fff; border-top: 1px solid var(--line); padding: 32px 0 40px; }
.footer .wrap { display: flex; align-items: center; gap: 24px; }
.footer img { width: 200px; height: auto; flex: none; }
.footer p { margin: 0; color: var(--muted); font-size: 14px; max-width: 70ch; }

@media (max-width: 720px) {
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 16px; padding: 28px 0; }
  .hero-logo { width: 84px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card-media { padding: 10px; }
  .card-body { padding: 12px; }
  .card h3 { font-size: 20px; }
  .card .swatches .swatch { width: 20px; height: 20px; }
  .detail-body { grid-template-columns: 1fr; }
  .stage { min-height: 0; padding: 16px 16px 60px; }
  .stage img { max-height: 44dvh; }
  .info { padding: 20px 18px 24px; }
  .footer .wrap { flex-direction: column; align-items: flex-start; }
  .footer img { width: 150px; }
}

@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }
