/* J.A Ferramentas — catálogo estático, direção visual monocromática */

:root {
  --bg: #ffffff;
  --bg-muted: #f3f3f3;
  --card: #ffffff;
  --ink: #1a1a1a;
  --ink-soft: rgba(0, 0, 0, 0.83);
  --muted: #6b6b6b;
  --muted-2: #838383;
  --line: #e6e6e6;
  --line-strong: #cfcfcf;
  --header: #111111;
  --header-2: #1a1a1a;
  --header-text: #ffffff;
  --header-muted: #b3b3b3;
  --btn: #1a1a1a;
  --btn-hover: #000000;
  --wa: #3d8c5c;
  --radius: 2px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --font: "Outfit", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --photo-panel: #2c2c2c;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select { font: inherit; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; font-weight: 700; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.5rem 0.85rem; text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

.icon-wa { flex: 0 0 auto; display: block; }

/* Top bar + header */

.site-top { position: sticky; top: 0; z-index: 50; }

.topbar {
  background: #000;
  color: #d0d0d0;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}
.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.35rem 1.25rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
}
.topbar p { margin: 0; }
.topbar-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.04em;
}
.topbar-wa .icon-wa { color: var(--wa); }

.site-header {
  background: var(--header);
  color: var(--header-text);
  border-bottom: 1px solid #2a2a2a;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "menu logo wa"
    "search search search";
  gap: 0.7rem 0.85rem;
  align-items: center;
}

.btn-icon, .btn-departamentos, .search-submit, .search-clear, .chip, .gallery-nav, .modal-close {
  cursor: pointer;
}

.btn-menu {
  grid-area: menu;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid #3a3a3a;
  background: transparent;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
}
.btn-menu span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: #fff;
}

.logo { grid-area: logo; justify-self: center; display: block; line-height: 0; }
.site-header .logo img { height: 56px; width: auto; }

.btn-departamentos {
  display: none;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.55rem 0.85rem;
  white-space: nowrap;
}
.btn-departamentos:hover,
.btn-departamentos[aria-expanded="true"] {
  background: #fff;
  color: #111;
}

.search {
  grid-area: search;
  position: relative;
  display: flex;
  background: #fff;
  border: 1px solid #d8d8d8;
}
.search input {
  flex: 1;
  height: 2.55rem;
  border: 0;
  padding: 0 0.9rem;
  color: var(--ink);
  background: transparent;
  min-width: 0;
  outline: none;
}
.search input::placeholder { color: #8a8a8a; }
.search-submit {
  border: 0;
  background: transparent;
  color: var(--ink);
  width: 2.6rem;
  display: grid;
  place-items: center;
}
.search-clear {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 0 0.3rem;
}

.header-wa {
  grid-area: wa;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
}
.header-wa .icon-wa { color: var(--wa); }
.header-wa-text { display: none; flex-direction: column; line-height: 1.15; }
.header-wa-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--header-muted); }
.header-wa-number { font-weight: 600; }

/* Departamentos panel */

.dept-panel {
  background: #fff;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-height: min(70vh, 32rem);
  overflow: auto;
}
.dept-panel-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem 1.4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.dept-col h3 {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dept-col ul { list-style: none; margin: 0; padding: 0; }
.dept-col button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.2rem 0;
  font-size: 0.88rem;
}
.dept-col button:hover,
.dept-col button.is-active { color: var(--ink); font-weight: 600; }

/* Hero — large J.A lockup + store name */

.hero {
  background-color: #111;
  background-image: linear-gradient(90deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.52) 55%, rgba(0,0,0,0.38) 100%), url("../assets/hero-texture.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
  min-height: 420px;
  display: flex;
  align-items: center;
}
.hero-slide {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.4rem 1.25rem 2.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.hero-copy { flex: 1 1 auto; min-width: 0; }
.hero-logo {
  display: block;
  height: 72px;
  width: auto;
  margin: 0 0 1.15rem;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.5));
}
.hero h1 {
  margin: 0 0 0.2rem;
  color: #fff;
  font-size: clamp(2.15rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: 0;
  word-spacing: 0.08em;
}
.hero-tag {
  margin: 0 0 0.85rem;
  font-size: clamp(0.95rem, 2.2vw, 1.2rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d4d4d4;
}
.hero-lead {
  margin: 0 0 1.4rem;
  color: #d6d6d6;
  font-weight: 300;
  max-width: 40ch;
  font-size: 1.05rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.btn-hero {
  display: inline-block;
  background: #fff;
  color: #111;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.8rem 1.3rem;
  border: 1px solid #fff;
  text-align: center;
  min-width: 13.5rem;
}
.btn-hero:hover { background: #e8e8e8; }
.btn-hero-ghost {
  background: transparent;
  color: #fff;
}
.btn-hero-ghost:hover { background: #fff; color: #111; }
.hero-emblem {
  display: none;
  flex: 0 0 auto;
  width: min(320px, 30vw);
}
.hero-emblem img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}

/* Category photo tiles — layout cue from the SB LP, our photos and monochrome treatment */

.dept-tiles {
  background: #161616;
  color: #fff;
  padding: 2.2rem 1rem 2.4rem;
}
.dept-tiles-inner {
  max-width: var(--max);
  margin: 0 auto;
}
.section-head-on-dark {
  margin: 0 0 1.4rem;
}
.section-head-on-dark h2 { color: #fff; }
.section-head-on-dark::before,
.section-head-on-dark::after { background: #3a3a3a; }

.dept-tiles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}

.dept-tile {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #0a0a0a;
  aspect-ratio: 6 / 5;
  isolation: isolate;
}
.dept-tile:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.dept-tile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.dept-tile:hover .dept-tile-photo,
.dept-tile:focus-visible .dept-tile-photo { transform: scale(1.05); }
.dept-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.12) 42%, rgba(0,0,0,0.82) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0.7rem 0.75rem 0.65rem;
  text-align: left;
}
.dept-tile-mark {
  position: absolute;
  top: 0.55rem;
  left: 0.6rem;
  height: 20px;
  width: auto;
  opacity: 0.9;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.7));
  pointer-events: none;
}
.dept-tile-brand {
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
  font-weight: 500;
  margin-bottom: 0.12rem;
  white-space: nowrap;
}
.dept-tile-name {
  font-size: clamp(0.78rem, 1.6vw, 1.02rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.65);
  overflow-wrap: normal;
  word-break: keep-all;
}
.dept-tile.is-active {
  box-shadow: 0 0 0 2px #fff;
}

.dept-help {
  margin-top: 1.15rem;
  text-decoration: none;
  color: #fff;
  padding: 0.95rem 1.1rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.88rem;
  background: #111;
  border: 1px solid #2e2e2e;
  border-radius: 8px;
}
.dept-help strong { font-size: 0.95rem; line-height: 1.25; color: #fff; }
.dept-help span { color: #bdbdbd; }
.dept-help .icon-wa { color: var(--wa); margin-left: auto; }

/* Trust row */

.trust { padding: 1.4rem 1rem 0.4rem; }
.trust-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.trust-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.75rem 0.8rem;
  display: flex;
  gap: 0.7rem;
  align-items: center;
  background: #fff;
}
.trust-icon { color: #222; flex: 0 0 auto; }
.trust-item p { margin: 0; display: flex; flex-direction: column; }
.trust-item strong {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.trust-item span { font-size: 0.78rem; color: var(--muted); }

/* Catalog */

.catalog {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.6rem 1rem 4.5rem;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.6rem 0 1rem;
}
.section-head h2,
.section-title {
  margin: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
  white-space: nowrap;
}
.section-head::before,
.section-head::after,
.section-title-row::before,
.section-title-row::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d4d4d4;
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0 1rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-bottom: 1rem;
}
.toolbar-count { margin: 0; color: var(--muted); font-size: 0.9rem; flex: 1 1 auto; }
.toolbar-sort { margin-left: auto; }
.toolbar-sort select {
  background: #fff;
  border: 1px solid var(--line-strong);
  padding: 0.4rem 0.55rem;
  color: var(--ink);
}
.subcats { display: none; gap: 0.4rem; overflow-x: auto; }
.subcats:not([hidden]) { display: flex; flex-basis: 100%; width: 100%; }
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
}
.chip.is-active { background: #111; border-color: #111; color: #fff; }
.chip-count { opacity: 0.65; margin-left: 0.15rem; font-weight: 400; }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem 0.9rem;
  align-items: stretch;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 0;
  overflow: hidden;
}

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
  flex: 0 0 auto;
  overflow: hidden;
  isolation: isolate;
  background: var(--photo-panel);
  cursor: pointer;
  border: 0;
  padding: 0;
  display: block;
}
.card-media img {
  position: absolute;
  inset: 0.45rem;
  width: calc(100% - 0.9rem);
  height: calc(100% - 0.9rem);
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
}
.card-media:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.badges {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1;
  display: flex;
  gap: 0.25rem;
  pointer-events: none;
}
.badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.16rem 0.35rem;
  background: #111;
  color: #fff;
}
.badge-seminovo, .badge-usado { background: #5a5a5a; }
.badge-promo { background: #111; }

.card-body {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.7rem 0.7rem;
  flex: 1;
  text-align: center;
}
.card-sku {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  color: var(--muted-2);
  font-weight: 400;
}
.card-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.3;
  min-height: 2.5em;
}
.card-title button {
  all: unset;
  cursor: pointer;
  color: inherit;
}
.card-title button:hover { text-decoration: underline; text-underline-offset: 2px; }

.card-price {
  margin: 0.7rem 0 0.15rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}
.price-old {
  color: var(--muted-2);
  text-decoration: line-through;
  font-size: 0.82rem;
  font-weight: 300;
}
.price-now {
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}
.card-stock {
  margin: 0 0 0.7rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.card-stock.is-low { color: var(--ink); font-weight: 600; }

.btn-buy {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  background: var(--btn);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 0.8rem;
  border: 0;
  cursor: pointer;
}
.btn-buy:hover, .btn-buy:focus-visible { background: var(--btn-hover); outline: none; }
.btn-buy .icon-wa { color: var(--wa); }
.btn-buy-lg { margin-top: 1rem; padding: 0.9rem 1rem; font-size: 0.85rem; }

.empty { text-align: center; color: var(--muted); padding: 3rem 1rem; }

/* Footer — dark so the white logo reads */

.site-footer {
  background: #111;
  color: #c8c8c8;
  padding: 2.4rem 1rem 5.5rem;
  font-size: 0.9rem;
  border-top: 1px solid #2a2a2a;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 1.6rem;
}
.footer-brand .logo img { height: 64px; width: auto; margin-bottom: 0.85rem; }
.footer-name {
  margin: 0 0 0.35rem;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0;
  word-spacing: 0.06em;
}
.footer-legal { margin: 0; line-height: 1.65; color: #c8c8c8; font-size: 0.95rem; }
.footer-col h3 {
  margin: 0 0 0.55rem;
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-col p { margin: 0 0 0.3rem; }
.footer-col a { color: #fff; font-weight: 600; text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.footer-copy {
  max-width: var(--max);
  margin: 2rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid #2a2a2a;
  font-size: 0.75rem;
  color: #8a8a8a;
  text-align: center;
}

/* FAB */

.fab-wa {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 45;
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.28);
  text-decoration: none;
}
.fab-wa .icon-wa { color: var(--wa); }
.fab-wa:hover, .fab-wa:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Modal */

.modal {
  border: 0;
  padding: 0;
  width: min(64rem, 100%);
  max-width: 100%;
  max-height: 100%;
  background: transparent;
}
.modal::backdrop { background: rgba(0, 0, 0, 0.72); }
.modal-inner {
  background: var(--card);
  color: var(--ink-soft);
  display: grid;
  grid-template-columns: 1fr;
  max-height: 100dvh;
  overflow: auto;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #1a1a1a;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}
.modal-gallery { background: var(--photo-panel); padding: 1.5rem 1rem 1rem; isolation: isolate; }
.gallery-main {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-height: 55vh;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  background: var(--photo-panel);
}
.gallery-main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 50%;
  background: rgba(17,17,17,0.8);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
}
.gallery-nav.prev { left: 0.2rem; }
.gallery-nav.next { right: 0.2rem; }
.gallery-nav:disabled { opacity: 0.3; cursor: default; }
.gallery-thumbs { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.75rem 0 0; }
.gallery-thumbs button {
  position: relative;
  flex: 0 0 auto;
  width: 3.4rem;
  height: 3.4rem;
  padding: 0;
  border: 2px solid transparent;
  background: var(--photo-panel);
  isolation: isolate;
  overflow: hidden;
  cursor: pointer;
}
.gallery-thumbs button.is-active { border-color: #fff; }
.gallery-thumbs img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}
.modal-info { padding: 1.25rem 1.15rem 1.75rem; }
.modal-meta {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.modal-info h2 { margin: 0 0 0.25rem; font-size: 1.4rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.modal-sku { margin: 0 0 0.75rem; color: var(--muted-2); font-size: 0.85rem; }
.modal-price .price-now { font-size: 1.85rem; }
.modal-stock { margin: 0.4rem 0 0.8rem; font-size: 0.9rem; color: var(--muted); }
.modal-stock.is-low { color: var(--ink); font-weight: 600; }
.modal-desc { font-size: 0.95rem; }
.modal-desc p { margin: 0 0 0.7rem; }
.modal-ml { margin: 0.85rem 0 0; font-size: 0.85rem; color: var(--muted); }
.modal-ml a { color: var(--ink); font-weight: 600; }

.toast {
  position: fixed; left: 50%; bottom: 5.5rem; transform: translateX(-50%);
  background: #111; color: #fff; padding: 0.7rem 1rem; z-index: 60; font-size: 0.9rem;
  max-width: min(22rem, calc(100% - 2rem));
}
.noscript, .not-found { max-width: 36rem; margin: 3rem auto; padding: 1rem; text-align: center; }
.not-found { color: var(--ink); }
.not-found .logo { display: inline-block; background: #111; padding: 0.8rem 1rem; margin-bottom: 1rem; }
.not-found .logo img { height: 40px; width: auto; }

@media (max-width: 639px) {
  .dept-help { flex-wrap: wrap; }
  .dept-help .icon-wa { margin-left: 0; }
}

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .header-wa-text { display: flex; }
  .trust-inner { grid-template-columns: repeat(4, 1fr); }
  .dept-tiles-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-logo { height: 96px; }
}

@media (min-width: 900px) {
  .btn-menu { display: none; }
  .btn-departamentos { display: inline-flex; }
  .header-inner {
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas: "logo dept search wa";
    padding: 0.95rem 1.25rem;
    gap: 1rem 1.15rem;
  }
  .logo { justify-self: start; }
  .site-header .logo img { height: 72px; }
  .hero { min-height: 560px; }
  .hero-slide { padding: 3.4rem 1.5rem 3.6rem; }
  .hero-logo { height: 128px; margin-bottom: 1.35rem; }
  .hero-emblem { display: block; }
  .dept-tiles-grid { grid-template-columns: repeat(5, 1fr); gap: 0.85rem; }
  .dept-tile-mark { height: 24px; }
  .footer-brand .logo img { height: 80px; }
  .dept-panel-inner { grid-template-columns: repeat(5, 1fr); }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .modal-inner { grid-template-columns: 1.05fr 0.95fr; max-height: min(52rem, 92vh); }
  .modal-gallery { padding: 1.5rem; }
  .gallery-main { max-height: none; }
  .modal-info { padding: 2rem 1.75rem 2rem 0.5rem; }
  .footer-inner { grid-template-columns: 1.3fr 1fr 1fr; padding-bottom: 0; }
  .site-footer { padding-bottom: 2.25rem; }
}

@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}


/* Keep the departamentos heading white on the dark band */
.dept-tiles .section-head h2,
.section-head.section-head-on-dark h2 {
  color: #fff;
}


/* Catalog page (v5) */

.topbar-inner { justify-content: flex-end; }
.topbar-home {
  margin-right: auto;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.topbar-home:hover { text-decoration: underline; }

.catalog-page-title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
  white-space: normal;
}
.catalog-context {
  margin: -0.2rem 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}
button.linkish {
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.dept-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.dept-chip {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}
.dept-chip:hover,
.dept-chip.is-active {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* Dark catalog page: no white canvas; ML white photo backdrops blend into the grey panel */
body.catalog-page {
  --bg: #141414;
  --bg-muted: #1a1a1a;
  --card: #1c1c1c;
  --photo-panel: #2c2c2c;
  --ink: #f3f3f3;
  --ink-soft: rgba(255, 255, 255, 0.88);
  --muted: #a8a8a8;
  --muted-2: #8d8d8d;
  --line: #2a2a2a;
  --line-strong: #3d3d3d;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  background: var(--bg);
  color: var(--ink-soft);
  color-scheme: dark;
}

/* White search field in the dark header must keep dark text */
body.catalog-page .search input,
body.catalog-page .search-submit {
  color: #111;
}

body.catalog-page .dept-panel {
  background: #1a1a1a;
  color: var(--ink-soft);
  border-bottom-color: var(--line);
}

body.catalog-page .section-head::before,
body.catalog-page .section-head::after,
body.catalog-page .section-title-row::before,
body.catalog-page .section-title-row::after {
  background: #3a3a3a;
}

body.catalog-page .toolbar-sort select {
  background: #1a1a1a;
  border-color: var(--line-strong);
  color: var(--ink);
}

body.catalog-page .dept-chip,
body.catalog-page .chip {
  background: #1a1a1a;
  border-color: var(--line-strong);
  color: var(--ink-soft);
}
body.catalog-page .dept-chip:hover,
body.catalog-page .dept-chip.is-active,
body.catalog-page .chip.is-active {
  background: #f2f2f2;
  color: #111;
  border-color: #f2f2f2;
}

body.catalog-page button.linkish {
  color: #fff;
}

body.catalog-page .card-media:focus-visible {
  outline-color: #fff;
}
