/* Portadas de las tres variantes del inicio */

.boton-buscar {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: var(--radio);
  background: var(--petroleo);
  color: var(--blanco);
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}
.boton-buscar:hover {
  background: var(--menta-700);
}
.buscador-grande .resultados {
  top: calc(100% + 10px);
}

.nota-dato {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: var(--size-sm);
  color: var(--gris-700);
}

.bajada {
  font-size: var(--size-lg);
  line-height: 1.5;
  max-width: 46ch;
}

.accesos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
}

/* ================= A: la tapa y la caja ================= */

.portada-a {
  display: grid;
  background: var(--petroleo);
  color: var(--sobre-oscuro);
}
.portada-a .tapa {
  padding: 40px var(--gutter) 44px;
  display: grid;
  align-items: center;
}
.portada-a .tapa-contenido {
  display: grid;
  gap: 22px;
  max-width: 620px;
}
.portada-a h1 {
  font-size: clamp(2.35rem, 7.2vw, var(--size-4xl));
  color: var(--blanco);
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.portada-a .acento {
  color: var(--menta);
}
.portada-a .bajada {
  color: var(--sobre-oscuro-tenue);
}
.portada-a .sugerencias {
  margin-top: -6px;
  color: var(--sobre-oscuro);
}
.portada-a .accesos {
  margin-top: 6px;
}

.portada-a .caja {
  position: relative;
  overflow: hidden;
  background: #c9ab88;
  aspect-ratio: 1200 / 896;
}
.portada-a .caja > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 60% 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .portada-a .caja > img {
    animation: abrir-caja 1.6s var(--ease) both;
  }
  .portada-a .tapa-contenido > * {
    animation: subir 0.9s var(--ease) both;
  }
  .portada-a .tapa-contenido > :nth-child(2) { animation-delay: 0.08s; }
  .portada-a .tapa-contenido > :nth-child(3) { animation-delay: 0.16s; }
  .portada-a .tapa-contenido > :nth-child(4) { animation-delay: 0.22s; }
  .portada-a .tapa-contenido > :nth-child(5) { animation-delay: 0.28s; }
}
@keyframes abrir-caja {
  from {
    transform: scale(1.12);
    filter: brightness(0.7);
  }
  to {
    transform: none;
    filter: none;
  }
}
@keyframes subir {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* Huecos de la caja: cada pieza es un enlace; al pasar, se aísla y lo demás se oscurece */
.hueco {
  position: absolute;
  border-radius: var(--radio);
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: box-shadow 0.45s var(--ease), outline-color 0.3s var(--ease);
  z-index: 1;
}
.hueco .pista {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translate(-50%, 6px);
  opacity: 0;
  display: grid;
  gap: 1px;
  padding: 8px 12px;
  border-radius: var(--radio);
  background: var(--blanco);
  color: var(--petroleo);
  font: 600 var(--size-sm) / 1.2 var(--font-text);
  white-space: nowrap;
  box-shadow: var(--sombra-pieza);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.hueco .pista small {
  font-weight: 500;
  color: var(--gris-500);
}
.hueco[data-activo] {
  box-shadow: 0 0 0 200vmax rgb(0 31 39 / 0.58);
  outline-color: var(--menta);
  z-index: 2;
}
.hueco[data-activo] .pista {
  opacity: 1;
  transform: translate(-50%, 0);
}
.portada-a .leyenda {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  padding: 8px 14px;
  border-radius: var(--radio);
  background: rgb(255 255 255 / 0.92);
  color: var(--petroleo);
  font: 600 var(--size-sm) var(--font-text);
  box-shadow: var(--sombra-pieza);
}
.portada-a .caja > .provisional {
  z-index: 3;
}
@media (hover: none) {
  .portada-a .leyenda {
    display: none;
  }
}

@media (min-width: 1080px) {
  .portada-a {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
    min-height: min(calc(100svh - 114px), 820px);
  }
  .portada-a .tapa {
    padding: 56px 56px 56px max(var(--gutter), calc((100vw - var(--ancho)) / 2));
  }
  .portada-a .caja {
    aspect-ratio: auto;
    height: 100%;
    border-radius: var(--radio-lg) 0 0 var(--radio-lg);
    margin-block: 18px;
    height: calc(100% - 36px);
  }
}

/* ================= B: el mosaico de trabajos ================= */

.portada-b {
  background: var(--petroleo);
  padding-block: 14px 56px;
}
.mosaico {
  position: relative;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 10px;
  border-radius: var(--radio-lg);
  background: var(--petroleo-hondo);
  box-shadow: var(--sombra-hueco), 0 40px 80px -40px rgb(0 0 0 / 0.6);
}
.etiqueta-tapa {
  grid-column: 1 / -1;
  display: grid;
  gap: 18px;
  align-content: center;
  padding: 28px 24px;
  border-radius: var(--radio-lg);
  background: var(--blanco);
  color: var(--petroleo);
}
.etiqueta-tapa h1 {
  font-size: clamp(2.2rem, 6.4vw, var(--size-4xl));
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.etiqueta-tapa .bajada {
  color: var(--gris-700);
}
.obra {
  position: relative;
  overflow: hidden;
  border-radius: var(--radio-lg);
  background: var(--arena);
  box-shadow: var(--sombra-hueco);
  min-height: 180px;
  color: var(--blanco);
  text-decoration: none;
  isolation: isolate;
}
.obra img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease), filter 0.5s var(--ease);
}
.obra::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 31 39 / 0.85), rgb(0 31 39 / 0) 52%);
  z-index: 0;
}
.pie-obra {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  display: grid;
  gap: 2px;
  font-size: var(--size-sm);
}
.pie-obra strong {
  font: 600 var(--size-lg) / 1.15 var(--font-display);
}
.pie-obra small {
  color: rgb(233 242 243 / 0.88);
}
@media (hover: hover) {
  .mosaico:has(.obra:hover) .obra:not(:hover) img {
    filter: saturate(0.4) brightness(0.55);
  }
  .obra:hover img {
    transform: scale(1.05);
  }
}
.aviso-mosaico {
  justify-self: start;
}
.m-kit {
  grid-column: 1 / -1;
  min-height: 260px;
}
@media (min-width: 900px) {
  .portada-b {
    padding-block: 18px 72px;
  }
  .mosaico {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(92px, 1fr));
    gap: 12px;
    padding: 12px;
    height: min(calc(100svh - 150px), 820px);
    min-height: 640px;
  }
  .etiqueta-tapa {
    grid-column: 1 / span 5;
    grid-row: 1 / span 4;
    padding: 40px;
  }
  .m-kit {
    grid-column: 6 / span 4;
    grid-row: 1 / span 4;
  }
  .m-uniforme {
    grid-column: 10 / span 3;
    grid-row: 1 / span 3;
  }
  .m-bordado {
    grid-column: 10 / span 3;
    grid-row: 4 / span 3;
  }
  .m-gen {
    grid-column: 1 / span 3;
    grid-row: 5 / span 2;
  }
  .m-evento {
    grid-column: 4 / span 3;
    grid-row: 5 / span 2;
  }
  .m-coleccion {
    grid-column: 7 / span 3;
    grid-row: 5 / span 2;
  }
  .m-coleccion img {
    object-position: 50% 30%;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .mosaico > * {
    animation: subir 0.9s var(--ease) both;
  }
  .mosaico > :nth-child(2) { animation-delay: 0.06s; }
  .mosaico > :nth-child(3) { animation-delay: 0.12s; }
  .mosaico > :nth-child(4) { animation-delay: 0.18s; }
  .mosaico > :nth-child(5) { animation-delay: 0.24s; }
  .mosaico > :nth-child(6) { animation-delay: 0.3s; }
  .mosaico > :nth-child(7) { animation-delay: 0.36s; }
}

/* ================= C: compartimentos por necesidad ================= */

.portada-c {
  background: var(--arena-claro);
  padding-block: 40px 64px;
}
.encabezado-c {
  display: grid;
  gap: 24px;
  margin-bottom: 28px;
}
.encabezado-c h1 {
  font-size: clamp(2.4rem, 7vw, var(--size-4xl));
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.encabezado-c .bajada {
  margin-top: 14px;
  color: var(--gris-700);
}
.busqueda-c .buscador-grande {
  box-shadow: 0 0 0 1.5px var(--gris-200), 0 14px 30px -20px rgb(0 44 55 / 0.4);
}
.busqueda-c .sugerencias {
  color: var(--petroleo);
}
.busqueda-c .sugerencias a:hover {
  background: var(--blanco);
}
.bandeja-necesidades {
  grid-template-columns: minmax(0, 1fr);
}
.necesidad {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  border-radius: var(--radio);
  overflow: hidden;
  background: var(--blanco);
  box-shadow: var(--sombra-hueco);
  color: var(--petroleo);
  text-decoration: none;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), filter 0.5s var(--ease);
}
.necesidad .foto {
  background: var(--arena);
  overflow: hidden;
}
.necesidad .foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.necesidad .texto {
  display: grid;
  gap: 6px;
  align-content: center;
  justify-items: start;
  padding: 16px;
}
.necesidad h2 {
  font-size: var(--size-lg);
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.necesidad h2 .icono {
  color: var(--menta-700);
  transition: transform 0.3s var(--ease);
}
.necesidad p {
  color: var(--gris-700);
  font-size: var(--size-sm);
}
@media (hover: hover) {
  .bandeja-necesidades:has(.necesidad:hover) .necesidad:not(:hover) {
    filter: saturate(0.5) brightness(0.62);
  }
  .necesidad:hover {
    transform: translateY(-6px);
    box-shadow: var(--sombra-pieza);
    z-index: 2;
  }
  .necesidad:hover .foto img {
    transform: scale(1.05);
  }
  .necesidad:hover h2 .icono {
    transform: translateX(4px);
  }
}
@media (min-width: 720px) {
  .bandeja-necesidades {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .necesidad {
    grid-template-columns: 1fr;
    grid-template-rows: 200px auto;
  }
  .necesidad h2 {
    font-size: var(--size-xl);
  }
}
@media (min-width: 1080px) {
  .portada-c {
    padding-block: 56px 72px;
  }
  .encabezado-c {
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 56px;
    margin-bottom: 36px;
  }
  .bandeja-necesidades {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .necesidad {
    grid-template-rows: clamp(180px, 22vh, 250px) auto;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .bandeja-necesidades > * {
    animation: subir 0.9s var(--ease) both;
  }
  .bandeja-necesidades > :nth-child(2) { animation-delay: 0.06s; }
  .bandeja-necesidades > :nth-child(3) { animation-delay: 0.12s; }
  .bandeja-necesidades > :nth-child(4) { animation-delay: 0.18s; }
  .bandeja-necesidades > :nth-child(5) { animation-delay: 0.24s; }
  .bandeja-necesidades > :nth-child(6) { animation-delay: 0.3s; }
}

/* Ajustes de secciones compartidas */
.seccion-zonas {
  background: var(--gris-50);
}
.seccion-colecciones {
  background: var(--arena-claro);
}
.coleccion-portada .sello {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
}
.seccion-clientes + .seccion-temporada {
  padding-top: 0;
}

.portada-a .enlace-flecha {
  color: var(--menta);
}


.temporada .etiqueta {
  justify-self: start;
}

/* Sobre arena el texto va solo en petróleo o gris 700 (manual de marca) */
.portada-c,
.seccion-colecciones,
.taller .nota {
  --gris-500: var(--gris-700);
}
.portada-c .nota-dato a,
.seccion-colecciones .enlace-flecha,
.taller .nota .enlace-flecha {
  color: var(--petroleo);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
}
.portada-c .sugerencias a,
.seccion-colecciones .enlace-flecha:hover {
  text-decoration: none;
}

/* ===== Ronda de correcciones del revisor ===== */

/* Titular de portada dentro de la escala del manual (máx. 49 px) */
.portada-a h1,
.etiqueta-tapa h1,
.encabezado-c h1 {
  font-size: clamp(2.25rem, 5.4vw, var(--size-4xl));
}

/* Huecos de la caja en pantallas táctiles: marca visible en cada pieza */
.chip-tactil {
  display: none;
}
@media (hover: none) {
  .chip-tactil {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radio);
    background: var(--blanco);
    box-shadow: 0 0 0 4px rgb(94 209 195 / 0.55), var(--sombra-pieza);
    font-size: 0;
  }
  .chip-tactil::before {
    content: "+";
    font: 600 20px/1 var(--font-text);
    color: var(--petroleo);
  }
}

/* Compartimentos del catálogo: pies parejos y sin huecos huérfanos */
.compartimento .texto {
  flex: 1;
  align-content: start;
}
@media (max-width: 899px) {
  .bandeja > .compartimento:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .bandeja > .compartimento:last-child:nth-child(odd) .foto {
    aspect-ratio: 16 / 10;
  }
}

/* Zonas en móvil: el texto va en una banda sólida bajo la foto */
@media (max-width: 899px) {
  .zona {
    min-height: 0;
    grid-template-rows: auto auto;
    background: var(--tinte);
  }
  .zona > img {
    position: relative;
    inset: auto;
    aspect-ratio: 4 / 3;
    height: auto;
    z-index: 0;
  }
  .zona::before {
    display: none;
  }
  .zona .contenido {
    padding: 20px;
  }
}

/* Mosaico B en móvil: una columna, pie de foto debajo */
@media (max-width: 899px) {
  .mosaico {
    grid-template-columns: minmax(0, 1fr);
  }
  .obra {
    display: grid;
    min-height: 0;
    background: var(--blanco);
    color: var(--petroleo);
  }
  .obra img {
    position: relative;
    inset: auto;
    aspect-ratio: 16 / 10;
    height: auto;
  }
  .obra::after {
    display: none;
  }
  .pie-obra {
    position: static;
    padding: 12px 16px 14px;
  }
  .pie-obra small {
    color: var(--gris-700);
  }
}

/* C: compartimentos de distinto tamaño, como un inserto real */
.necesidad .texto {
  background: var(--menta-50);
}
@media (min-width: 1080px) {
  .bandeja-necesidades {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .necesidad {
    grid-template-rows: 170px auto;
  }
  .necesidad.grande {
    grid-column: span 2;
    grid-row: span 2;
    grid-template-rows: 1fr auto;
  }
  .necesidad.grande h2 {
    font-size: var(--size-2xl);
  }
  .necesidad:last-child {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 220px;
  }
  .necesidad:last-child .foto img {
    object-position: 50% 58%;
  }
  .necesidad:last-child .texto {
    padding: 28px 36px;
    background: var(--violeta-50);
  }
  .necesidad:last-child h2 {
    font-size: var(--size-2xl);
  }
}

/* Pestañas de técnicas: se acomodan en varias líneas */
.pestanas {
  flex-wrap: wrap;
  overflow: visible;
}

/* Reseña: sin margen de figura y al ancho de su contenido */
.resena {
  margin: clamp(40px, 5vw, 72px) 0 0;
  width: fit-content;
  max-width: 100%;
}

/* Papel seda: borde menta entre la caja y lo que sigue */
.portada-a,
.portada-b {
  border-bottom: 10px solid var(--menta);
}

.compartimento.grande .texto {
  flex: none;
}

/* ===== C: color por público sobre base arena ===== */
.seg-empresa { --seg: var(--petroleo); --seg-texto: var(--blanco); --seg-flecha: var(--menta); }
.seg-colegio { --seg: var(--menta); --seg-texto: var(--petroleo); --seg-flecha: var(--petroleo); }
.seg-tienda { --seg: var(--violeta); --seg-texto: var(--blanco); --seg-flecha: var(--blanco); }

.bandeja-necesidades {
  background: var(--arena);
  box-shadow: var(--sombra-hueco), 0 30px 60px -36px rgb(0 44 55 / 0.35);
}
.bandeja-necesidades .necesidad {
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.35) inset, 0 6px 14px -10px rgb(0 31 39 / 0.45);
}
.necesidad .texto,
.necesidad:last-child .texto {
  background: var(--seg);
}
.necesidad h2 {
  color: var(--seg-texto);
}
.necesidad h2 .icono {
  color: var(--seg-flecha);
}
.necesidad p {
  color: var(--seg-texto);
  opacity: 0.88;
}

.leyenda-segmentos {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font: 500 var(--size-sm) var(--font-text);
  color: var(--gris-700);
}
.leyenda-segmentos li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.leyenda-segmentos li::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--seg);
  box-shadow: inset 0 0 0 1px rgb(0 44 55 / 0.15);
}

/* La flecha del botón de búsqueda va en blanco, no en el gris de la lupa */
.buscador-grande .boton-buscar .icono {
  color: var(--blanco);
  width: 20px;
  height: 20px;
}
