/* Animación de Resaltado (Pulsación) para búsqueda */
@keyframes pulse-highlight {
  0% {
    box-shadow: 0 0 0 0 rgba(236, 91, 19, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(236, 91, 19, 0);
    transform: scale(1.02);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(236, 91, 19, 0);
    transform: scale(1);
  }
}

.highlight-product {
  animation: pulse-highlight 1.5s ease-in-out 2;
  border-color: #ec5b13 !important;
}

/* Transiciones del Panel del Carrito */
#cart-drawer-container {
  transition: opacity 0.3s ease-in-out;
}

#cart-drawer-panel {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-closed #cart-drawer-container {
  opacity: 0;
  pointer-events: none;
}

.cart-closed #cart-drawer-panel {
  transform: translateX(100%);
}

.cart-open #cart-drawer-container {
  opacity: 1;
  pointer-events: auto;
}

.cart-open #cart-drawer-panel {
  transform: translateX(0);
}

/* Transiciones del Buscador Modal */
#search-modal-container {
  transition: opacity 0.25s ease-in-out;
}

.search-closed #search-modal-container {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
}

.search-open #search-modal-container {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* Barra de Scroll Fina Estética */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(143, 185, 150, 0.3);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(143, 185, 150, 0.6);
}

/* Animación de checkmark para envío de formulario */
.checkmark-circle {
  width: 80px;
  height: 80px;
  position: relative;
  display: inline-block;
  vertical-align: top;
  border-radius: 50%;
  border: 4px solid #8FB996;
  box-sizing: content-box;
}

.checkmark-circle::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: inset 0px 0px 0px 40px #8FB996;
  animation: fill-checkmark 0.4s ease-in-out 0.4s forwards, scale-checkmark 0.3s ease-in-out 0.9s both;
}

.checkmark-stem {
  width: 4px;
  height: 18px;
  background-color: #fff;
  position: absolute;
  z-index: 10;
  left: 36px;
  top: 36px;
  border-radius: 2px;
  transform: rotate(-45deg);
  transform-origin: 0 0;
  opacity: 0;
  animation: draw-stem 0.2s ease-in-out 0.8s forwards;
}

.checkmark-kick {
  width: 32px;
  height: 4px;
  background-color: #fff;
  position: absolute;
  z-index: 10;
  left: 23px;
  top: 48px;
  border-radius: 2px;
  transform: rotate(45deg);
  transform-origin: 0 0;
  opacity: 0;
  animation: draw-kick 0.2s ease-in-out 0.6s forwards;
}

@keyframes fill-checkmark {
  100% {
    box-shadow: inset 0px 0px 0px 40px #8FB996;
  }
}

@keyframes scale-checkmark {
  0%, 100% {
    transform: none;
  }
  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

@keyframes draw-kick {
  0% {
    width: 0;
    opacity: 0;
  }
  100% {
    width: 18px;
    opacity: 1;
  }
}

@keyframes draw-stem {
  0% {
    height: 0;
    opacity: 0;
  }
  100% {
    height: 32px;
    opacity: 1;
  }
}

/* Transición suave de cambio de tema */
body, header, footer, section, div, p, a, h1, h2, h3, h4, h5, h6, span, button, input, select, textarea {
  transition-property: background-color, border-color, text-decoration-color, fill, stroke, opacity;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
