/* COLORES DEL CATÁLOGO */
:root {
  --ink: #102139;
  --blue: #2458ed;
  --muted: #596779;
  --line: #dce3eb;
  --paper: #f4f7fb;
}

/* CONFIGURACIÓN GENERAL */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

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

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid #de7400;
  outline-offset: 4px;
}

button,
.contact,
.buy,
.button {
  min-height: 44px;
}

input,
select {
  min-width: 0;
  max-width: 100%;
  padding: 14px;
  font-size: 16px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}

h1,
h2,
h3,
.description {
  overflow-wrap: anywhere;
}

.wrap {
  max-width: 1280px;
  margin: auto;
  padding-right: 32px;
  padding-left: 32px;
}

/* ENCABEZADO */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding-top: 25px;
  padding-bottom: 25px;
}

.brand {
  display: flex;
  align-items: center;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -1px;
  white-space: nowrap;
}

.logo {
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  width: 43px;
  height: 43px;
  margin-right: 10px;
  font-size: 21px;
  color: white;
  background: var(--blue);
  border-radius: 12px;
}

.dot {
  color: var(--blue);
}

.contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  font-size: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 30px;
}

/* PORTADA */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 65px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 65px;
}

.hero > * {
  min-width: 0;
}

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--blue);
}

h1 {
  margin: 25px 0;
  font-size: clamp(44px, 5.7vw, 76px);
  line-height: 1.04;
  letter-spacing: -4px;
}

h1 em {
  font-style: normal;
  color: var(--blue);
}

.lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
}

.button {
  display: inline-block;
  margin-top: 16px;
  padding: 16px 23px;
  font-weight: 700;
  text-align: center;
  color: white;
  background: var(--blue);
  border-radius: 30px;
}

.hero-photo {
  position: relative;
  display: block;
  height: 440px;
  overflow: hidden;
  background: #e0e7ef;
  border-radius: 28px;
  box-shadow: 0 20px 45px #182d4412;
}

.hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo span {
  position: absolute;
  right: 20px;
  bottom: 20px;
  left: 20px;
  padding: 17px;
  font-size: 14px;
  font-weight: 700;
  background: #fffef5ed;
  border-radius: 14px;
}

/* TÍTULO DEL CATÁLOGO */
.catalog {
  padding-top: 35px;
}

.section-heading {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  justify-content: space-between;
}

h2 {
  margin: 10px 0 25px;
  font-size: 37px;
  letter-spacing: -1.5px;
}

.section-heading > p {
  padding-bottom: 15px;
  font-size: 13px;
  color: var(--muted);
}

/* BUSCADOR Y ORDEN */
.tools {
  display: flex;
  gap: 18px;
  margin: 8px 0 20px;
}

.tools > * {
  min-width: 0;
}

.tools label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}

.search {
  flex: 1;
}

/* CATEGORÍAS */
#categorias {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

#categorias button {
  padding: 11px 18px;
  color: var(--ink);
  cursor: pointer;
  background: white;
  border: 1px solid var(--line);
  border-radius: 25px;
}

#categorias button[aria-pressed="true"] {
  color: white;
  background: var(--ink);
  border-color: var(--ink);
}

#resultados {
  margin: 24px 0;
  font-size: 13px;
  color: var(--muted);
}

/* TARJETAS DE PRODUCTOS */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.photo {
  display: block;
  padding: 12px;
  background: #eceff3;
}

.photo img {
  display: block;
  width: 100%;
  height: 290px;
  object-fit: contain;
  border-radius: 10px;
}

.details {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 22px;
}

.meta {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}

h3 {
  margin: 13px 0 7px;
  font-size: 20px;
  line-height: 1.3;
}

.description {
  flex: 1;
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

/* SELECTOR DE COLOR */
.variant {
  display: grid;
  gap: 7px;
  font-size: 12px;
}

.variant select {
  width: 100%;
  min-height: 44px;
  padding: 10px;
}

/* PRECIO Y BOTÓN DE CONSULTA */
.purchase {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}

.price {
  font-size: 23px;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  background: #eef3ff;
  border-radius: 10px;
}

/* MENSAJE CUANDO NO HAY RESULTADOS */
.empty {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  background: white;
  border-radius: 18px;
}

/* SECCIÓN DE CONTACTO */
.closing {
  margin-top: 70px;
  padding-top: 55px;
  padding-bottom: 55px;
  text-align: center;
  border-top: 1px solid var(--line);
}

.closing p {
  line-height: 1.7;
}

.closing h2 {
  margin-bottom: 10px;
}

/* PIE DE PÁGINA */
footer {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding-top: 25px;
  padding-bottom: 30px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ACCESO DIRECTO PARA TECLADO */
.skip {
  position: absolute;
  top: -80px;
  left: 15px;
  z-index: 20;
  padding: 15px;
  background: white;
}

.skip:focus {
  top: 10px;
}

/* EFECTOS PARA COMPUTADORAS CON MOUSE */
@media (hover: hover) {
  .buy:hover,
  .button:hover {
    filter: brightness(0.92);
  }

  .card:hover {
    border-color: #a3b6d6;
  }
}

/* TABLETS */
@media (max-width: 950px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    gap: 30px;
  }

  .hero-photo {
    height: 360px;
  }

  h1 {
    letter-spacing: -2px;
  }
}

/* TABLETS PEQUEÑAS Y CELULARES */
@media (max-width: 760px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .hero-photo {
    height: 300px;
  }

  .tools {
    flex-direction: column;
  }

  .tools input,
  .tools select {
    width: 100%;
  }
}

/* CELULARES */
@media (max-width: 600px) {
  .wrap {
    padding-right: 16px;
    padding-left: 16px;
  }

  .header {
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .brand {
    font-size: 20px;
    letter-spacing: -0.6px;
  }

  .logo {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }

  .contact {
    padding: 10px 14px;
    font-size: 13px;
  }

  .hero {
    padding-top: 12px;
    padding-bottom: 30px;
  }

  h1 {
    margin: 18px 0;
    font-size: clamp(36px, 9.5vw, 52px);
    line-height: 1.1;
    letter-spacing: -1.8px;
  }

  .lead {
    font-size: 16px;
    line-height: 1.65;
  }

  .hero .button {
    display: block;
    text-align: center;
  }

  .hero-photo {
    height: 280px;
    border-radius: 20px;
  }

  .hero-photo span {
    right: 14px;
    bottom: 14px;
    left: 14px;
    line-height: 1.5;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    padding: 0;
  }

  h2 {
    font-size: 31px;
  }

  #categorias {
    flex-wrap: nowrap;
    gap: 7px;
    overflow-x: auto;
    padding: 5px 4px 12px;
  }

  #categorias button {
    flex: 0 0 auto;
    padding: 10px 13px;
    font-size: 14px;
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .photo img {
    height: clamp(240px, 78vw, 350px);
  }

  .details {
    padding: 18px;
  }

  .description {
    font-size: 15px;
  }

  .variant {
    font-size: 13px;
  }

  .variant select {
    min-height: 48px;
    font-size: 16px;
  }

  .purchase {
    gap: 12px;
  }

  .buy {
    min-height: 48px;
    padding: 12px 18px;
    font-size: 15px;
  }

  .closing {
    margin-top: 40px;
  }

  footer {
    flex-wrap: wrap;
    line-height: 1.6;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}

/* CELULARES MUY PEQUEÑOS */
@media (max-width: 360px) {
  .header .contact {
    width: 100%;
  }

  .hero-photo {
    height: 240px;
  }
}

/* RESPETAR PREFERENCIAS DE MOVIMIENTO */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}