/* ============================================
   TIENDA AYA - ESTILOS GLOBALES (LOGIN / INDEX)
   ============================================ */
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: normal;
  src: url("/librarys/fonts/Noto_Sans/static/NotoSans-Regular.ttf")
    format("truetype");
}
@font-face {
  font-family: "Noto Sans Bold";
  font-style: normal;
  font-weight: bold;
  src: url("/librarys/fonts/Noto_Sans/static/NotoSans-Bold.ttf")
    format("truetype");
}
@font-face {
  font-family: "BeauRivage-Regular";
  font-style: normal;
  font-weight: bold;
  src: url("/librarys/fonts/Beau_Rivage,Damion/Beau_Rivage/BeauRivage-Regular.ttf")
    format("truetype");
}

:root {
  /* Tipografía */
  --font-family: "Noto Sans", sans-serif;
  --font-cursive: "BeauRivage-Regular", "cursive";
  --font-size-sm: 0.85rem;
  --font-size-md: 0.9rem;
  --font-size-xl: x-large;

  /* Colores */
  --color-white: #fff;
  --color-black: #000;
  --color-bg: #f5f5f5;
  --color-text: #4a4a4a;
  --color-accent: #e0388f;
  --color-accent-dark: #a81e6e;
  --color-accent-darker: #c42c7c;
  --color-accent-deep: #9c2278;
  --color-scroll-track: #f1f1f1;
  --color-footer-bg-start: #1a1a1a;
  --color-footer-bg-end: #2d2d2d;
  --color-footer-text: #e0e0e0;

  /* Espaciado */
  --space-xs: 0.3rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;

  /* Bordes */
  --radius-sm: 4px;
  --radius-lg: 12px;

  /* Sombras */
  --shadow-header: 0 4px 20px rgba(0, 0, 0, 0.15);
  --shadow-logo: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-title: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-toTop: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-toTop-hover: 0 6px 25px rgba(224, 56, 143, 0.4);
  --shadow-logo-footer: 0 2px 10px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas:
    "header"
    "title"
    "main"
    "footer";
  font-family: var(--font-family);
  min-height: 100vh;
  width: 100%;
  background: var(--color-bg);
}

/**************************************************************************************************************************************************************/
#header {
  grid-area: header;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(
    135deg,
    rgba(90, 15, 75, 0.94),
    rgba(180, 35, 112, 0.92)
  );
  color: var(--color-white);
  height: 10vh;
  min-height: 70px;
  max-height: 120px;
  width: 100%;
  padding: 0 var(--space-xl);
  box-shadow: var(--shadow-header);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

#logoHead {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

#logoHead > img {
  height: 65px;
  width: auto;
  filter: drop-shadow(var(--shadow-logo));
  transition: transform 0.3s ease;
}

#logoHead > img:hover {
  transform: scale(1.05);
}

#logoHead2 {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

#logoHead2 > img {
  height: 45px;
  width: auto;
  filter: drop-shadow(var(--shadow-logo));
  transition: transform 0.3s ease;
}

#logoHead2 > img:hover {
  transform: scale(1.05);
}

#titleHead img {
  width: 130px;
  height: auto;
  filter: drop-shadow(var(--shadow-title));
  transition: transform 0.3s ease;
}

#titleHead img:hover {
  transform: scale(1.05);
}

/********************************************************************************************************************************************************/
#titlePage {
  grid-area: title;
  display: flex;
  height: 5vh;
  min-height: 30px;
  max-height: 50px;
  width: 100%;
  font-size: var(--font-size-md);
  justify-content: center;
  align-items: center;
  background: linear-gradient(
    90deg,
    rgba(255, 18, 179, 0.2),
    rgba(255, 18, 179, 0.05)
  );
  color: var(--color-text);
  font-weight: 500;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 18, 179, 0.1);
}
#titlePage span {
  font-family: var(--font-cursive);
  /* Tamaño fluido: escala con el viewport y no se desborda en móviles.
     El máximo usa 1.5rem (x-large) porque clamp() solo acepta longitudes,
     no keywords como var(--font-size-xl). */
  font-size: clamp(1rem, 2.5vw + 0.6rem, 1.5rem);
  line-height: 1.2;
  text-align: center;
  max-width: 100%;
}
.fa-gift {
  color: var(--color-black);
  margin-right: var(--space-sm);
  animation: bounce 2s infinite;
}
/********************************************************************************************************************************************************/
#section {
  grid-area: main;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex: 1;
  min-height: 60vh;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.9),
    rgba(245, 245, 245, 0.95)
  );
  padding: var(--space-xl) var(--space-md);
}

/* El componente custom del login ocupa el ancho y centra su tarjeta */
my-login {
  display: block;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
}

/***********************************************************************PIE DE PAGINA********************************************************************/
footer {
  grid-area: footer;
  display: flex;
  flex-direction: row;
  align-items: center;
  background: linear-gradient(
    135deg,
    var(--color-footer-bg-start),
    var(--color-footer-bg-end)
  );
  color: var(--color-white);
  height: 20vh;
  min-height: 150px;
  max-height: 200px;
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  border-top: 3px solid var(--color-accent);
  margin-top: auto;
  justify-content: space-evenly;
}

#logoFooter {
  height: 100%;
  max-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 120px;
}

#logoFooter > img {
  height: 100px;
  width: auto;
  max-width: 100%;
  filter: drop-shadow(var(--shadow-logo-footer));
  transition: transform 0.3s ease;
}

#logoFooter > img:hover {
  transform: scale(1.05);
}

#informationFooter {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--space-xs);
  flex: 1;
  max-width: 40%;
  padding: 0 var(--space-md);
}

#informationFooter > #titleFooter {
  text-align: center;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 1px;
}

#informationFooter > #infoFooter {
  text-align: center;
  color: var(--color-footer-text);
  font-weight: 300;
  font-size: var(--font-size-sm);
}

#informationFooter > #contactFooter {
  text-align: center;
  color: var(--color-footer-text);
  font-weight: 300;
  font-size: var(--font-size-sm);
}

#informationFooter2 {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  flex: 0 0 auto;
  padding: 0 var(--space-md);
  flex-wrap: wrap;
}

/* --- Íconos de redes sociales (solo el logotipo, en tono del header) --- */
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #f0a6cf;
  font-size: 1.35rem;
  text-decoration: none;
  padding: 0.35rem;
  transition: all 0.25s ease;
}

.social-icon:hover {
  transform: translateY(-2px);
  color: var(--color-white);
  text-shadow: 0 2px 10px rgba(240, 166, 207, 0.6);
}

.social-icon:active {
  transform: translateY(0) scale(0.92);
}

#informationFooter2 > img {
  height: 60px;
  width: auto;
  max-width: 100%;
  filter: brightness(0) invert(1);
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

#informationFooter2 > img:hover {
  opacity: 1;
}

/***********************************************/
/* Botón Subir mejorado */
.toTop {
  border: none;
  display: flex;
  cursor: pointer;
  transition: all 0.3s ease;
  position: fixed;
  right: var(--space-xl);
  bottom: var(--space-xl);
  z-index: 9999;
  background: linear-gradient(135deg, #252525, #3d3d3d);
  box-shadow: var(--shadow-toTop);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  color: var(--color-white);
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
}

.toTop:not(.is-visible) {
  pointer-events: none;
  opacity: 0;
  transform: translateY(2rem) scale(0.8);
}

.toTop.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toTop svg {
  stroke-width: 3px;
  stroke: currentColor;
  fill: none;
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.toTop:hover {
  background: linear-gradient(
    135deg,
    var(--color-accent-darker),
    var(--color-accent-deep)
  );
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-toTop-hover);
}

.toTop:hover svg {
  transform: translateY(-2px);
}

.toTop:active {
  transform: translateY(0) scale(0.95);
}

/***********************************************************************RESPONSIVE********************************************************************/
@media (max-width: 1024px) {
  #header {
    padding: 0 1.5rem;
  }

  #titleHead img {
    width: 100px;
  }

  #informationFooter {
    max-width: 50%;
  }
}

@media (max-width: 768px) {
  #header {
    height: 8vh;
    min-height: 60px;
    padding: 0 1rem;
  }

  #titleHead img {
    width: 80px;
  }

  #logoHead > img {
    height: 45px;
  }

  #logoHead2 > img {
    height: 35px;
  }

  #titlePage {
    height: 4vh;
    min-height: 25px;
    font-size: 0.75rem;
    padding: 0 0.5rem;
  }

  #section {
    min-height: 50vh;
    padding: 1rem;
    overflow-x: hidden;
  }

  footer {
    height: auto;
    min-height: 130px;
    padding: 1rem;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: center;
    gap: 0.5rem 1.5rem;
  }

  #logoFooter {
    flex: 0 0 80px;
    height: 80px;
  }

  #logoFooter > img {
    height: 70px;
  }

  #informationFooter {
    max-width: 90%;
    padding: 0.5rem;
  }

  #informationFooter > #titleFooter {
    font-size: 0.85rem;
  }

  #informationFooter > #infoFooter,
  #informationFooter > #contactFooter {
    font-size: 0.75rem;
  }

  #informationFooter2 {
    display: flex;
    flex-basis: 100%;
    justify-content: center;
    flex-direction: row;
    padding: 0.25rem 0;
  }

  .toTop {
    right: 1rem;
    bottom: 1rem;
    width: 44px;
    height: 44px;
    padding: 0.6rem;
  }

  .toTop svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  #header {
    height: 7vh;
    min-height: 50px;
    padding: 0 0.75rem;
  }

  #titleHead img {
    width: 60px;
  }

  #logoHead > img {
    height: 35px;
  }

  #logoHead2 > img {
    height: 28px;
  }

  #titlePage {
    font-size: 0.65rem;
    height: 3.5vh;
    min-height: 20px;
  }

  #section {
    padding: 0.5rem;
  }

  footer {
    min-height: 100px;
    padding: 0.75rem;
  }

  #logoFooter {
    flex: 0 0 60px;
    height: 60px;
  }

  #logoFooter > img {
    height: 50px;
  }

  #informationFooter > #titleFooter {
    font-size: 0.75rem;
  }

  #informationFooter > #infoFooter,
  #informationFooter > #contactFooter {
    font-size: 0.65rem;
  }

  .toTop {
    width: 38px;
    height: 38px;
    padding: 0.5rem;
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .toTop svg {
    width: 18px;
    height: 18px;
  }

  .social-icon {
    font-size: 1.15rem;
  }
}

/* Pantallas muy angostas (p.ej. Galaxy S24 Ultra, ~412px CSS) */
@media (max-width: 420px) {
  /* La barra del slogan crece si el texto fluido necesita más de una línea */
  #titlePage {
    height: auto;
    min-height: 26px;
    max-height: none;
    padding: 4px 0.5rem;
  }

  /* Footer en forma de pirámide invertida: logo y contacto ARRIBA
     (dos columnas) y las redes sociales abajo, centradas en el medio. */
  footer {
    height: auto;
    max-height: none;
    min-height: 90px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "logo info"
      "social social";
    justify-items: center;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.75rem 0.5rem;
  }

  #logoFooter {
    grid-area: logo;
    flex: 0 0 auto;
    height: 55px;
  }

  #logoFooter > img {
    height: 45px;
  }

  #informationFooter {
    grid-area: info;
    max-width: 100%;
    padding: 0 0.5rem;
  }

  #informationFooter2 {
    grid-area: social;
    flex-basis: auto;
    gap: 0.6rem;
    padding: 0;
  }
}

/* Soporte para pantallas muy altas */
@media (min-height: 1200px) {
  #header {
    height: 8vh;
  }

  #section {
    min-height: 70vh;
  }

  footer {
    height: 15vh;
  }
}

/* Animación suave al cargar */
body > * {
  animation: fadeIn 0.6s ease forwards;
}

/* El botón "Subir" NO debe heredar la animación de body > *: su
   opacidad/transform las controla la clase .is-visible (con pointer-events),
   y el fill "forwards" rompería esa mecánica dejándolo visible pero inerte. */
.toTop {
  animation: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scrollbar personalizada (opcional) */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-scroll-track);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    135deg,
    var(--color-accent),
    var(--color-accent-dark)
  );
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    135deg,
    var(--color-accent-darker),
    var(--color-accent-deep)
  );
}