/*
Theme Name: Inhuro Child
Template: extendable
Version: 1.0
/* 1. Global font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

:root {
  --font-family-base: 'Poppins', sans-serif;
}

body {
  font-family: var(--font-family-base);
  color: #333;
  background-color: #fff;
}

/* 2. Produktkort */
.product-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid #eee;
  border-radius: 8px;
  background-color: #fff;
}

/* 3. Pris och typografi */
.product-card h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.product-card p {
  font-size: 16px;
  color: #666;
  margin: 0;
}

.product-card .price {
  font-size: 18px;
  font-weight: 500;
  color: #333;
}

/* 4. Köp-knapp */
.product-card .button.add_to_cart_button {
  background-color: #5fbd74;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.product-card .button.add_to_cart_button:hover {
  background-color: #3a8f5a;
}

/* 5. Hjärtknapp */
.wishlist-heart-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #666;
  transition: color 0.3s ease;
}

.wishlist-heart-btn.added {
  color: #e63946;
}

.wishlist-heart-btn.added i {
  color: #e63946;
}

/* 6. +1-animation */
.wishlist-wrapper {
  position: relative;
  display: inline-block;
}

.wishlist-plus {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #e63946;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.4s ease;
}

.wishlist-plus.show {
  opacity: 1;
  transform: scale(1.2);
  animation: pulse 0.8s ease;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

/* 7. Glittereffekt */
.sparkle-trigger.sparkle {
  animation: sparkle 0.6s ease-in-out;
}

@keyframes sparkle {
  0% { box-shadow: 0 0 0px #e63946; }
  50% { box-shadow: 0 0 8px #e63946; }
  100% { box-shadow: 0 0 0px #e63946; }
}

/* 8. Toast-popup */
.wishlist-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #e63946;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 16px;
  z-index: 9999;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  animation: fadeOut 3s ease forwards;
}

@keyframes fadeOut {
  0% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(20px); }
}

/* 9. Sidopanel */
.wishlist-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: -2px 0 10px rgba(0,0,0,0.2);
  transition: right 0.4s ease;
  z-index: 9999;
  overflow-y: auto;
  padding: 20px;
}

.wishlist-sidebar.open {
  right: 0;
}

.wishlist-sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

.wishlist-items-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.wishlist-items-list img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

.wishlist-sidebar-link {
  display: block;
  margin-top: 20px;
  text-align: center;
  font-weight: 500;
  color: #e63946;
}

.wishlist-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #666;
  cursor: pointer;
  margin-left: auto;
}

#wishlist-toggle {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
  border: none;
  border-radius: 50%;
  padding: 14px;
  font-size: 20px;
  color: #e63946;
  cursor: pointer;
  z-index: 10000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}


/* 10. Mobilanpassning */
@media screen and (max-width: 768px) {
  .product-card {
    padding: 12px;
    gap: 8px;
  }

  .product-card h2 {
    font-size: 18px;
  }

  .product-card p {
    font-size: 14px;
  }

  .product-card .price {
    font-size: 16px;
  }

  #wishlist-sidebar {
    width: 60px;
  }

  #wishlist-sidebar.open {
    width: 100%;
  }

@media screen and (max-width: 768px) {
  .wishlist-sidebar {
    width: 100%;
  }

/* 11. Synk-bekräftelse */
.wishlist-synced {
  font-size: 14px;
  color: #5fbd74;
  margin-top: 10px;

}

/* 12. Pulsanimation på hjärtat i sidopanelen */
.sidebar-heart-icon {
  display: inline-block; /* gör att transform fungerar */
}

.pulse-heart {
  animation: pulse-heart 0.6s ease-out;
  transform-origin: center;
  color: #e63946; /* matchar din aktiva färg */
}

@keyframes pulse-heart {
  0% { transform: scale(1); opacity: 1; color: #e63946; }
  50% { transform: scale(1.4); opacity: 0.8; color: #ff7b7b; }
  100% { transform: scale(1); opacity: 1; color: #e63946; }
}

/* 13. Pulsanimation på ringen runt hjärtat i sidopanelen */
.sidebar-heart-ring {
  display: inline-block;
  padding: 10px;
  border-radius: 50%;
  border: 2px solid rgba(230, 57, 70, 0.3); /* transparent ring */
  transition: box-shadow 0.3s ease;
}

.pulse-ring {
  animation: pulse-ring 0.6s ease-out;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0px rgba(230, 57, 70, 0.4); }
  50% { box-shadow: 0 0 12px rgba(230, 57, 70, 0.6); }
  100% { box-shadow: 0 0 0px rgba(230, 57, 70, 0.4); }
}

/* 13b. Toggle-knappens ring i viloläge */
.toggle-ring {
  border: 2px solid rgba(230, 57, 70, 0); /* helt transparent */
}

/* 13c. Pulsanimation på toggle-knappen */
.toggle-ring.pulse-ring {
  animation: pulse-ring 0.6s ease-out;
  border-color: rgba(230, 57, 70, 0.3); /* synlig under animation */
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0px rgba(230, 57, 70, 0.0); }
  50% { box-shadow: 0 0 12px rgba(230, 57, 70, 0.6); }
  100% { box-shadow: 0 0 0px rgba(230, 57, 70, 0.0); }
}

}