/**
 * Hi-Kataloog Advanced Features Styles v0.6.0
 * CSS for all 18 advanced features
 * 
 * @package Hi-Kataloog
 * @since 0.6.0
 */

/* ============================================
   LIGHTBOX GALLERY
   ============================================ */
.hk-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
}

.hk-lightbox.is-active {
  display: flex;
}

.hk-lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
}

.hk-lightbox__container {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  animation: lightboxZoomIn 0.3s ease-out;
}

.hk-lightbox__content {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
}

.hk-lightbox__image {
  width: 600px;
  height: 800px;
  max-width: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 8px;
  margin-bottom: 20px;
}

.hk-lightbox__close,
.hk-lightbox__prev,
.hk-lightbox__next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 32px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hk-lightbox__close {
  top: 20px;
  right: 20px;
}

.hk-lightbox__close:hover {
  background: rgba(244, 67, 54, 0.9);
  transform: rotate(90deg);
}

.hk-lightbox__prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.hk-lightbox__next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.hk-lightbox__prev:hover,
.hk-lightbox__next:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.hk-lightbox__counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
}

@keyframes lightboxZoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================
   QUICK PREVIEW - REMOVED
   Hover preview popup removed for cleaner UX
   ============================================ */
/* .hk-quick-preview - REMOVED */

/* ============================================
   FAVORITES / WISHLIST - OLD STYLES (REMOVED)
   Now using hover overlay buttons instead
   ============================================ */
/* .hk-favorite-btn - REMOVED - top-right button replaced with hover overlay footer button */

.hk-tab--favorites {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hk-favorites-count {
  background: #e91e63;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  min-width: 20px;
  text-align: center;
}

.hk-empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #999;
}

.hk-empty-state p {
  font-size: 18px;
  margin: 0;
}

/* ============================================
   SORTING
   ============================================ */
.hk-sort-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  margin-bottom: 20px;
}

.hk-sort-bar label {
  font-weight: 600;
  color: #333;
}

.hk-sort-select {
  flex: 1;
  max-width: 250px;
  padding: 10px 16px;
  border: 2px solid #e1e4e8;
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hk-sort-select:hover {
  border-color: #111;
}

.hk-sort-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ============================================
   BADGES
   ============================================ */
.hk-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  background: #4CAF50;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: badgeBounce 0.6s ease;
}

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

/* ============================================
   MICRO-INTERACTIONS
   ============================================ */
.hk-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  to {
    transform: scale(2);
    opacity: 0;
  }
}

/* Toast notifications */
.hk-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 10000;
  background: #333;
  color: #fff;
  padding: 16px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

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

.hk-toast--success {
  background: #4CAF50;
}

.hk-toast--error {
  background: #f44336;
}

.hk-toast--info {
  background: #2196F3;
}

/* ============================================
   SHARING - OLD STYLES (REMOVED)
   Now using hover overlay buttons instead
   ============================================ */
/* .hk-share-btn - REMOVED - top-right button replaced with hover overlay footer button */
/* .hk-share-menu - REMOVED - old dropdown replaced with .hk-share-dropdown in hk-styles.css */

/* ============================================
   LOADING SKELETONS
   ============================================ */
.hk-grid.is-loading .hk-card {
  position: relative;
  overflow: hidden;
}

.hk-grid.is-loading .hk-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.5) 50%,
    rgba(255,255,255,0) 100%
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* ============================================
   PARALLAX
   ============================================ */
.hk-card .hk-thumb {
  will-change: transform;
  transition: transform 0.1s ease-out;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .hk-lightbox__image {
    width: 100%;
    height: 500px;
  }

  .hk-lightbox__prev,
  .hk-lightbox__next {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .hk-sort-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .hk-sort-select {
    max-width: 100%;
  }

  .hk-toast {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
/* .hk-favorite-btn and .hk-share-btn removed - using hover overlay buttons */
.hk-lightbox__close:focus-visible,
.hk-lightbox__prev:focus-visible,
.hk-lightbox__next:focus-visible {
  outline: 3px solid #667eea;
  outline-offset: 3px;
}

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