/* Interactive Behaviors CSS */

/* Toast System */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  pointer-events: none;
}

.toast {
  background: #333;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 10px;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-success {
  background: #10b981;
}

.toast-error {
  background: #ef4444;
}

.toast-show {
  transform: translateX(0);
  opacity: 1;
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

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

/* Sticky Header */
.is-sticky {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

/* Mobile Navigation */
.is-open {
  transform: translateX(0) !important;
}

.nav-open {
  overflow: hidden;
}

/* Search Expand */
[data-search].is-expanded {
  width: 300px !important;
  transition: width 0.3s ease;
}

/* Hero Animations */
[data-hero-headline] {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

[data-hero-headline].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-hero-cta] {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

[data-hero-cta].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card Hover Effects */
[data-card] {
  transition: all 0.3s ease;
}

[data-card].is-hovered {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* USP Pulse Animation */
.pulse {
  animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Back to Top Button */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  /* Darkened background color for better contrast with white text */
  background: #0056d3;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

#backToTop.is-visible {
  opacity: 1;
  visibility: visible;
}

#backToTop:hover {
  /* Updated hover color to be even darker for consistency */
  background: #003d99;
  transform: translateY(-2px);
}

/* Filter Buttons */
[data-filter].active,
[data-blog-filter].active {
  background: #0a67ff !important;
  color: white !important;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
  padding: 20px 0;
}

.pagination-btn {
  background: #0a67ff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: #0056d3;
}

.pagination-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.pagination-info {
  font-weight: 500;
  color: #666;
}

/* Quick View Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.is-open .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  z-index: 1;
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 30px;
}

.modal-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
}

.modal-info h3 {
  margin: 0 0 10px 0;
  color: #333;
}

.modal-price {
  font-size: 24px;
  font-weight: bold;
  color: #0a67ff;
  margin: 10px 0;
}

.modal-cta {
  background: #0a67ff;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 20px;
  transition: background 0.3s ease;
}

.modal-cta:hover {
  background: #0056d3;
}

.modal-open {
  overflow: hidden;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .modal-body {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .toast-container {
    left: 20px;
    right: 20px;
  }

  .toast {
    transform: translateY(-100%);
  }

  .toast-show {
    transform: translateY(0);
  }

  [data-search].is-expanded {
    width: 250px !important;
  }
}
