/* Fixed brand palette across mobile engines; preserves user page zoom. */
html {
  color-scheme: only light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Tablet widths retain every navigation link without crowding the actions. */
@media (min-width: 761px) and (max-width: 1100px) {
  html[data-ns-ui]:root body[data-ns-site="global"] .global-header {
    height: auto;
    flex-wrap: wrap;
    row-gap: 8px;
  }
  html[data-ns-ui]:root body[data-ns-site="global"] .global-header > nav {
    order: 2;
    flex-basis: 100%;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
  }
  html[data-ns-ui]:root body[data-ns-site="global"] .header-actions {
    margin-left: auto;
    min-width: 0;
  }
  /* Add to the existing 105px page offset for the two-row tablet header. */
  html[data-ns-ui]:root body[data-ns-site="global"] #destacados,
  html[data-ns-ui]:root body[data-ns-site="global"] #resultados,
  html[data-ns-ui]:root body[data-ns-site="global"] #colecciones,
  html[data-ns-ui]:root body[data-ns-site="global"] #personalizar {
    scroll-margin-top: 80px;
  }
}

/* Keep the initial loading reservation until a valid child height arrives. */
.config-host iframe[data-measured-height="true"] {
  min-height: 0;
}

/* Product names and action copy may shrink within their existing layout. */
.config-heading-first > div,
.config-purchase-bar > p,
.config-purchase-actions {
  min-width: 0;
}

/* Textiles uses image cards, unlike the text-only tabs styled by embed.css. */
html[data-ns-ui] body[data-family="textiles"] .background-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
html[data-ns-ui] body[data-family="textiles"] .background-options > .background-option {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  padding: 5px 5px 9px;
  text-align: center;
}
html[data-ns-ui] body[data-family="textiles"] .background-option img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  margin: 0;
  aspect-ratio: 1.65;
  object-fit: cover;
}
html[data-ns-ui] body[data-family="textiles"] .background-option span {
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  html[data-ns-ui] body[data-family="textiles"] .background-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
