/**
 * MINIMALIST ENHANCEMENTS
 * Professional hover effects, micro-interactions, and conversion optimization
 */

/* ===================================
   PROFESSIONAL HOVER EFFECTS
   =================================== */

/* Product Cards - Subtle lift with shadow */
.woocommerce ul.products li.product,
.category-card,
.promo-card {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.woocommerce ul.products li.product::before,
.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(45, 95, 63, 0);
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.woocommerce ul.products li.product:hover::before,
.category-card:hover::before {
  box-shadow: 0 20px 40px -10px rgba(45, 95, 63, 0.15);
}

.woocommerce ul.products li.product:hover,
.category-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-primary);
}

/* Image zoom on hover */
.woocommerce ul.products li.product:hover img,
.category-card:hover img {
  transform: scale(1.08);
}

/* ===================================
   BUTTON MICRO-INTERACTIONS
   =================================== */

/* Ripple effect on click */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

/* Add to Cart Button - Pulsing attention grabber */
.single_add_to_cart_button {
  position: relative;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(217, 119, 6, 0);
  }
}

.single_add_to_cart_button:hover {
  animation: none;
}

/* Success state when added to cart */
.added_to_cart {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--color-success) !important;
  color: var(--color-white) !important;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  margin-left: 0.5rem;
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===================================
   PRICE ANIMATION
   =================================== */

.price {
  position: relative;
}

.price ins {
  animation: priceHighlight 0.5s ease-out;
}

@keyframes priceHighlight {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ===================================
   TRUST BADGES - Subtle floating
   =================================== */

.product-guarantee-badge {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* ===================================
   FORM INPUTS - Professional Focus States
   =================================== */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
select,
textarea {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45, 95, 63, 0.1);
  outline: none;
}

/* Floating label effect */
.form-row {
  position: relative;
}

.form-row input:focus + label,
.form-row input:not(:placeholder-shown) + label {
  transform: translateY(-1.5rem) scale(0.85);
  color: var(--color-primary);
}

/* ===================================
   LOADING STATES
   =================================== */

.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===================================
   STAR RATINGS - Animated
   =================================== */

.star-rating {
  position: relative;
  overflow: hidden;
}

.star-rating span {
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product:hover .star-rating span {
  animation: starGlow 0.5s ease-in-out;
}

@keyframes starGlow {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.3);
  }
}

/* ===================================
   SALE BADGE - Attention grabber
   =================================== */

.onsale {
  position: relative;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ===================================
   SCROLL REVEAL ANIMATIONS
   =================================== */

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

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

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

/* ===================================
   CONVERSION OPTIMIZATION ELEMENTS
   =================================== */

/* Urgency indicator */
.stock-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #FEF3C7;
  border-left: 3px solid var(--color-warning);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: #92400E;
  margin: 1rem 0;
}

.stock-indicator.low-stock::before {
  content: '⚠️';
  animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Social proof tooltip */
.social-proof-tooltip {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-lg);
  max-width: 300px;
  animation: slideInLeft 0.4s ease-out, fadeOut 0.4s ease-out 4.6s forwards;
  z-index: 999;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(-20px);
  }
}

/* Trust seal shimmer */
.trust-seal {
  position: relative;
  overflow: hidden;
}

.trust-seal::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  to {
    left: 100%;
  }
}

/* ===================================
   QUANTITY SELECTOR - Enhanced
   =================================== */

.quantity.buttons_added {
  display: inline-flex;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}

.quantity.buttons_added:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45, 95, 63, 0.1);
}

.quantity .minus,
.quantity .plus {
  width: 40px;
  height: 44px;
  background-color: var(--color-background-alt);
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--color-text);
  transition: all 0.2s;
  font-weight: 600;
}

.quantity .minus:hover,
.quantity .plus:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  transform: scale(1.1);
}

.quantity .minus:active,
.quantity .plus:active {
  transform: scale(0.95);
}

.quantity input.qty {
  width: 60px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  font-weight: 600;
}

/* ===================================
   PROGRESS INDICATORS
   =================================== */

.checkout-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
  position: relative;
}

.checkout-progress::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-border);
  z-index: -1;
}

.checkout-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.checkout-step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-background-alt);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: all 0.3s;
}

.checkout-step.active .checkout-step-circle {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
  transform: scale(1.1);
}

.checkout-step.completed .checkout-step-circle {
  background-color: var(--color-success);
  border-color: var(--color-success);
  color: var(--color-white);
}

/* ===================================
   RESPONSIVE OPTIMIZATIONS
   =================================== */

@media (max-width: 768px) {
  /* Reduce animation intensity on mobile */
  .woocommerce ul.products li.product:hover,
  .category-card:hover {
    transform: translateY(-4px);
  }

  /* Disable some hover effects on touch devices */
  @media (hover: none) {
    .product:hover .star-rating span {
      animation: none;
    }

    .onsale {
      animation: none;
    }
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn::after {
    display: none;
  }
}
