:root {
  color-scheme: light dark;
  --bg: #f3f2ed;
  --surface: #faf9f5;
  --surface-2: #e8e7e1;
  --text: #171816;
  --muted: #676963;
  --line: #d7d6cf;
  --accent: #4f6957;
  --accent-text: #f7faf7;
  --hero-text: #f7f7f3;
  --radius: 14px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, white);
  outline-offset: 3px;
}
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 20; background: var(--text); color: var(--bg); padding: .8rem 1rem; border-radius: 10px; }
.skip-link:focus { top: 1rem; }

.site-header {
  height: 72px;
  padding: 0 clamp(1rem, 4vw, 4rem);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; font-weight: 800; letter-spacing: -.035em; width: fit-content; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--text); color: var(--bg); border-radius: 10px; font-size: .95rem; }
nav { display: flex; align-items: center; gap: 2rem; white-space: nowrap; font-size: .88rem; }
nav a { color: var(--muted); transition: color .25s var(--ease); }
nav a:hover { color: var(--text); }
.header-tools { justify-self: end; display: flex; align-items: center; gap: .65rem; }
.language-field { position: relative; display: block; }
.language-field::after {
  content: "";
  position: absolute;
  right: .9rem;
  top: 50%;
  width: .42rem;
  height: .42rem;
  border-right: 1.5px solid var(--text);
  border-bottom: 1.5px solid var(--text);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.language-field select { width: 126px; height: 44px; padding: 0 2.4rem 0 .9rem; background: var(--surface); font-size: .82rem; font-weight: 650; }
.whatsapp-action { width: 46px; height: 46px; display: block; border-radius: 12px; overflow: hidden; transition: transform .25s var(--ease), filter .25s var(--ease); }
.whatsapp-action img { display: block; width: 100%; height: 100%; object-fit: cover; }
.whatsapp-action:hover { transform: translateY(-2px); filter: brightness(1.06); }
.hero-cta:active, button:active { transform: translateY(1px); }

.hero { min-height: min(610px, calc(100dvh - 72px)); position: relative; isolation: isolate; overflow: hidden; background: #171916; }
.hero-tiles { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(2, 1fr); gap: 3px; transform: scale(1.025); }
.hero-tiles img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.72) contrast(1.03); opacity: .9; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9,11,9,.94) 0%, rgba(9,11,9,.7) 42%, rgba(9,11,9,.25) 78%, rgba(9,11,9,.14) 100%); }
.hero-content { position: relative; z-index: 1; width: min(1360px, 100%); margin: 0 auto; padding: clamp(3rem, 7vw, 6rem) clamp(1.2rem, 5vw, 4.5rem) 2.2rem; color: var(--hero-text); }
.eyebrow, .section-kicker { margin: 0 0 1.25rem; text-transform: uppercase; letter-spacing: .18em; font-size: .67rem; font-weight: 700; }
.hero h1 { max-width: 790px; margin: 0; font-size: clamp(2.75rem, 6vw, 5.8rem); line-height: .94; letter-spacing: -.066em; font-weight: 750; }
.hero-copy { max-width: 540px; margin: 1.6rem 0 1.7rem; font-size: clamp(1rem, 1.5vw, 1.18rem); line-height: 1.5; color: rgba(247,247,243,.82); }
.hero-cta { display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.25rem; border-radius: 999px; background: var(--hero-text); color: #171816; font-weight: 750; font-size: .9rem; transition: transform .25s var(--ease), background .25s var(--ease); }
.hero-cta:hover { background: #dfe9e1; transform: translateY(-2px); }
.hero-stats { margin: clamp(2rem, 5vh, 3.3rem) 0 0; display: flex; gap: .65rem; }
.hero-stats div { min-width: 140px; padding: .9rem 1rem; border: 1px solid rgba(255,255,255,.26); border-radius: var(--radius); background: rgba(20,23,20,.36); backdrop-filter: blur(13px); }
.hero-stats dt { font-size: 1.35rem; font-weight: 760; letter-spacing: -.03em; }
.hero-stats dd { margin: .25rem 0 0; color: rgba(247,247,243,.68); font-size: .73rem; }

.catalog { width: min(1460px, 100%); margin: 0 auto; padding: clamp(2rem, 4vw, 3.5rem) clamp(1rem, 4vw, 3.5rem) 8rem; }
.catalog-head { max-width: 760px; }
.section-kicker { color: var(--accent); }
.catalog-head h2 { margin: 0; font-size: clamp(2.3rem, 5vw, 4.9rem); line-height: .98; letter-spacing: -.06em; }
.catalog-head > p:last-child { max-width: 620px; margin: 1.25rem 0 0; color: var(--muted); line-height: 1.55; }
.toolbar { margin-top: 0; padding: .8rem; display: grid; grid-template-columns: auto minmax(220px, 1fr) minmax(170px, 210px); gap: .75rem; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); position: sticky; top: 84px; z-index: 8; box-shadow: 0 12px 38px color-mix(in srgb, var(--text) 7%, transparent); }
.type-tabs { display: flex; gap: .3rem; align-items: center; height: 47px; padding: .25rem; background: var(--surface-2); border-radius: 11px; }
.type-tabs button, .results-line button, .load-more { border: 0; cursor: pointer; color: var(--muted); background: transparent; }
.type-tabs button { height: 39px; padding: 0 1rem; border-radius: 8px; font-weight: 700; font-size: .82rem; }
.type-tabs button.is-active { color: var(--accent-text); background: var(--accent); }
.search-field, .brand-select-field { display: grid; gap: .35rem; }
.brand-select-field { position: relative; }
.brand-select-field::after {
  content: "";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  width: .48rem;
  height: .48rem;
  border-right: 1.5px solid var(--text);
  border-bottom: 1.5px solid var(--text);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.search-field span, .brand-select-field span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
input, select { width: 100%; height: 47px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--bg); padding: 0 .95rem; outline: none; }
select { appearance: none; padding-right: 3.25rem; cursor: pointer; }
input::placeholder { color: color-mix(in srgb, var(--muted) 78%, transparent); }
input:focus, select:focus { border-color: var(--accent); }
.results-line { min-height: 72px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .86rem; }
.results-line p { margin: 0; }
.results-line strong { color: var(--text); }
.results-line button { text-decoration: underline; text-underline-offset: 3px; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.7rem) .9rem; }
.product-card { min-width: 0; animation: card-in .55s var(--ease) both; animation-delay: min(calc(var(--index) * 20ms), 260ms); }
.product-open { width: 100%; border: 0; padding: 0; text-align: left; background: transparent; color: inherit; cursor: pointer; }
.product-media { aspect-ratio: 1 / 1.08; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease), filter .4s var(--ease); }
.product-open:hover .product-media img { transform: scale(1.035); filter: contrast(1.04); }
.brand-card .product-brand { font-size: 1rem; }
.brand-card .product-name { font-size: .76rem; }
.brand-media { aspect-ratio: 1 / .92; }
.shoe-logo-media { background: #fff; }
.shoe-logo-media img { object-fit: contain; padding: clamp(.7rem, 2vw, 1.35rem); background: #fff; }
.product-meta { padding: .8rem .2rem 0; }
.product-brand { margin: 0 0 .32rem; font-size: .84rem; font-weight: 780; letter-spacing: -.015em; }
.product-name { margin: 0; color: var(--muted); font-size: .74rem; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-extra { margin: .55rem 0 0; display: flex; gap: .65rem; color: var(--muted); font-size: .67rem; }
.product-extra span + span::before { content: "/"; margin-right: .65rem; color: var(--line); }
.skeleton { aspect-ratio: 1 / 1.08; border-radius: var(--radius); background: var(--surface-2); }
@media (prefers-reduced-motion: no-preference) { .skeleton { background: linear-gradient(105deg, var(--surface-2) 20%, color-mix(in srgb, var(--surface-2) 50%, white) 40%, var(--surface-2) 60%); background-size: 220% 100%; animation: shimmer 1.35s infinite linear; } }
.empty-state { grid-column: 1 / -1; min-height: 300px; display: grid; place-items: center; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty-state strong { display: block; margin-bottom: .6rem; color: var(--text); font-size: 1.15rem; }
.load-wrap { display: grid; place-items: center; padding-top: 3.5rem; }
.load-more { min-height: 47px; padding: 0 1.3rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 720; }
.load-more:hover { border-color: var(--text); }

footer { padding: 3rem clamp(1rem, 4vw, 4rem); display: grid; grid-template-columns: 1fr minmax(280px, 520px) auto; gap: 2rem; align-items: center; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.source-links { display: flex; gap: 1.2rem; justify-content: flex-end; }
.source-links a { text-decoration: underline; text-underline-offset: 4px; }

.product-dialog { width: min(1120px, calc(100% - 2rem)); max-height: min(860px, calc(100dvh - 2rem)); padding: 0; border: 0; border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: 0 28px 100px rgba(9,10,9,.32); overflow: auto; }
.product-dialog::backdrop { background: rgba(12,14,12,.72); backdrop-filter: blur(7px); }
.dialog-close { position: sticky; float: right; top: .8rem; margin: .8rem .8rem -3.5rem 0; z-index: 2; width: 42px; height: 42px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--text); cursor: pointer; font-size: 1.5rem; backdrop-filter: blur(10px); }
.dialog-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); }
.dialog-gallery { padding: 1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; background: var(--bg); }
.dialog-gallery img { width: 100%; aspect-ratio: 1 / 1.08; object-fit: cover; border-radius: 11px; background: var(--surface-2); }
.dialog-gallery img:only-child { grid-column: 1 / -1; max-height: 780px; aspect-ratio: auto; }
.dialog-info { padding: clamp(2rem, 5vw, 4.5rem) 2rem; align-self: start; position: sticky; top: 0; }
.dialog-info > p:first-child { margin: 0 0 .8rem; color: var(--accent); font-size: .69rem; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; }
.dialog-info h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1; letter-spacing: -.055em; }
.dialog-name { margin: 1.1rem 0 .7rem; color: var(--muted); line-height: 1.5; }
.dialog-photo-count { margin: 0 0 1.5rem; color: var(--accent); font-size: .76rem; font-weight: 750; }
.dialog-specs { margin: 0 0 1.5rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.dialog-specs div { min-width: 0; padding: .8rem; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); }
.dialog-specs dt { margin: 0 0 .3rem; color: var(--muted); font-size: .64rem; text-transform: uppercase; letter-spacing: .1em; }
.dialog-specs dd { margin: 0; font-size: .8rem; font-weight: 720; overflow-wrap: anywhere; }
.dialog-description { margin: 0 0 1.7rem; color: var(--muted); font-size: .82rem; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.source-action { display: inline-flex; min-height: 48px; padding: 0 1.2rem; align-items: center; border-radius: 999px; color: var(--accent-text); background: var(--accent); font-weight: 750; font-size: .86rem; }

@keyframes shimmer { to { background-position-x: -220%; } }
@keyframes card-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-color-scheme: dark) {
  :root { --bg: #141613; --surface: #1b1e1a; --surface-2: #252923; --text: #edf0e9; --muted: #a7ada4; --line: #343a32; --accent: #77927f; --accent-text: #0e140f; }
  .brand-mark { background: var(--text); color: var(--bg); }
  .hero-cta { background: #f1f3ed; color: #171816; }
}

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .hero-tiles { grid-template-columns: repeat(4, 1fr); }
  .hero-tiles img:nth-child(n+9) { display: none; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  footer { grid-template-columns: 1fr 1fr; }
  footer > p { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 720px) {
  .site-header { height: 64px; padding: 0 1rem; }
  .header-tools { gap: .45rem; }
  .language-field select { width: 108px; height: 42px; padding-left: .7rem; font-size: .76rem; }
  .language-field::after { right: .75rem; }
  .whatsapp-action { width: 42px; height: 42px; border-radius: 11px; }
  .hero { min-height: calc(100dvh - 64px); }
  .hero-tiles { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
  .hero-tiles img:nth-child(n+10) { display: none; }
  .hero-shade { background: linear-gradient(90deg, rgba(8,10,8,.91), rgba(8,10,8,.48)); }
  .hero-content { padding: 3.4rem 1.15rem 1.5rem; }
  .hero h1 { font-size: clamp(2.65rem, 13vw, 4.2rem); }
  .hero-copy { max-width: 340px; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .hero-stats div { min-width: 0; padding: .75rem .6rem; }
  .hero-stats dt { font-size: 1.02rem; }
  .hero-stats dd { font-size: .63rem; }
  .catalog { padding: 2rem 1rem 5rem; }
  .toolbar { top: 72px; grid-template-columns: 1fr 115px; }
  .type-tabs { grid-column: 1 / -1; }
  .type-tabs button { flex: 1; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem .65rem; }
  .product-media { aspect-ratio: 1 / 1.12; }
  footer { grid-template-columns: 1fr; }
  footer > p { grid-column: auto; grid-row: auto; }
  .source-links { justify-content: flex-start; flex-wrap: wrap; }
  .dialog-layout { grid-template-columns: 1fr; }
  .dialog-gallery { padding: .65rem; }
  .dialog-info { position: static; padding: 2.2rem 1.2rem 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
