/**
 * Footer custom — TShop
 * 1. .footer-cta: split teal + imagen (CTA del servicio de importación).
 * 2. .tshop-footer: footer oscuro estilo Dopler (social, columnas de
 *    links, marca + newsletter, copyright).
 *
 * Colores fijos (no tokens): ambas secciones mantienen su color en light
 * y dark mode, igual que la sección oscura del blog.
 */

/* ==========================================================================
   1. CTA de importación (split teal + imagen)
   ========================================================================== */

.footer-cta {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

@media (max-width: 767px) {
  .footer-cta {
    /* minmax(0,…): el mínimo automático de 1fr no encoge bajo el
       min-content del panel y generaba scroll lateral a 320px. */
    grid-template-columns: minmax(0, 1fr);
  }
}

.footer-cta__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1.5rem;
  padding: clamp(2.5rem, 6vw, 6rem);
  background: rgb(0 105 112);
}

.footer-cta__eyebrow {
  margin: 0;
  font-size: 0.9375rem;
  color: rgb(255 255 255 / 0.85);
}

.footer-cta__title {
  margin: 0;
  font-family: var(--font-headline);
  /* Mínimo 2rem (antes 2.5): a 320px "ENCUENTRAS" a 40px medía 320px
     de min-content con el padding y desbordaba el viewport. */
  font-size: clamp(2rem, 5.5vw, 5rem);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  color: rgb(245 245 245);
  overflow-wrap: break-word;
}

.footer-cta__link {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: 1rem;
  /* Área táctil: sin padding el link medía 28px de alto en desktop. */
  padding-block: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
}

.footer-cta__link svg {
  transition: transform 0.3s ease-out;
}

.footer-cta__link:hover {
  color: #fff;
}

.footer-cta__link:hover svg {
  transform: translateX(0.5rem);
}

.footer-cta__link:focus-visible {
  outline: 2px solid rgb(157 240 248);
  outline-offset: 4px;
}

.footer-cta__media {
  min-height: clamp(18rem, 42vw, 42rem);
}

.footer-cta__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ==========================================================================
   2. Footer oscuro (estilo Dopler)
   ========================================================================== */

.tshop-footer {
  background: rgb(10 15 16);
  color: #fff;
}

.tshop-footer__container {
  max-width: 90svw;
  margin-inline: auto;
  padding-block: 0 2rem;
}

/* ---------- Fila social ---------- */

.tshop-footer__social {
  display: grid;
  /* minmax(0,…): con 1fr a secas, los ítems ("Instagram" + icono) fijan
     un min-content mayor que la celda y desbordan la página en móvil. */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid rgb(255 255 255 / 0.12);
}

@media (max-width: 767px) {
  .tshop-footer__social {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Por debajo de ~400px ni dos columnas caben sin apretar: lista apilada.
   :nth-child(n) iguala la especificidad de las reglas de borde de arriba. */
@media (max-width: 400px) {
  .tshop-footer__social {
    grid-template-columns: minmax(0, 1fr);
  }

  .tshop-footer__social-item:nth-child(n) {
    border-right: none;
    border-bottom: 1px solid rgb(255 255 255 / 0.12);
  }

  .tshop-footer__social-item:last-child {
    border-bottom: none;
  }
}

.tshop-footer__social-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.25rem;
  border-right: 1px solid rgb(255 255 255 / 0.12);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease-out;
}

.tshop-footer__social-item:last-child {
  border-right: none;
}

@media (max-width: 767px) {
  .tshop-footer__social-item:nth-child(2n) {
    border-right: none;
  }
  .tshop-footer__social-item:nth-child(-n + 2) {
    border-bottom: 1px solid rgb(255 255 255 / 0.12);
  }
}

.tshop-footer__social-item:hover {
  background: rgb(255 255 255 / 0.06);
  color: #fff;
}

.tshop-footer__social-item:focus-visible {
  outline: 2px solid rgb(128 212 220);
  outline-offset: -2px;
}

.tshop-footer__social-name {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

.tshop-footer__social-item > svg {
  transition: transform 0.3s ease-out;
}

.tshop-footer__social-item:hover > svg {
  transform: translateX(0.25rem);
}

/* ---------- Columnas de links ---------- */

.tshop-footer__columns {
  display: grid;
  /* minmax(0,…): mismo seguro anti-overflow que la fila social — labels
     largos futuros (productos externos) no deben ensanchar la página. */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  padding-block: 3rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.12);
}

@media (max-width: 767px) {
  .tshop-footer__columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tshop-footer__column-title {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  /* 0.55 (antes 0.4): al 40% daba 3.3:1 sobre el fondo — bajo el AA. */
  color: rgb(255 255 255 / 0.55);
}

.tshop-footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tshop-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding-block: 0.3rem;
  color: rgb(255 255 255 / 0.85);
  font-size: 0.9375rem;
  text-decoration: none;
}

.tshop-footer__link:hover {
  color: #fff;
  text-decoration: underline;
}

.tshop-footer__link:focus-visible {
  outline: 2px solid rgb(128 212 220);
  outline-offset: 2px;
}

.tshop-footer__link svg {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}

/* ---------- Marca + newsletter ---------- */

.tshop-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-block: 2.5rem;
}

.tshop-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.tshop-footer__logo-img {
  width: 2.25rem;
  height: auto;
}

.tshop-footer__logo-text {
  font-family: var(--font-title);
  font-size: 1.375rem;
  color: #fff;
}

.tshop-footer__tagline {
  max-width: 34ch;
  margin: 1rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgb(255 255 255 / 0.55);
}

.tshop-footer__newsletter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.tshop-footer__newsletter-input {
  width: min(20rem, 100%);
  padding: 0.8em 1em;
  border: none;
  border-radius: 0.5rem;
  background: #fff;
  color: rgb(23 29 30);
  font-family: var(--font-text);
  font-size: 0.9375rem;
}

.tshop-footer__newsletter-input:focus-visible {
  outline: 2px solid rgb(128 212 220);
  outline-offset: 2px;
}

.tshop-footer__newsletter-btn {
  padding: 0.8em 1.5em;
  border: none;
  border-radius: 0.5rem;
  background: rgb(157 240 248);
  color: rgb(0 54 58);
  font-family: var(--font-text);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s ease-out;
}

/*
 * Fondo y color EXPLÍCITOS también en hover/focus: Astra pinta
 * button:focus con teal oscuro + texto blanco (medido en vivo) y
 * rompía el botón claro del newsletter.
 */
.tshop-footer__newsletter-btn:hover,
.tshop-footer__newsletter-btn:focus {
  background: rgb(157 240 248);
  color: rgb(0 54 58);
  filter: brightness(1.08);
}

.tshop-footer__newsletter-btn:focus-visible {
  outline: 2px solid rgb(128 212 220);
  outline-offset: 2px;
}

/* ---------- Copyright ---------- */

.tshop-footer__copyright {
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 0.12);
  font-size: 0.8125rem;
  /* 0.55 (antes 0.45): 4:1 quedaba bajo el AA para texto de 13px. */
  color: rgb(255 255 255 / 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .footer-cta__link svg,
  .tshop-footer__social-item,
  .tshop-footer__social-item > svg,
  .tshop-footer__newsletter-btn {
    transition: none;
  }
}
