/* === PREMIUM E-COMMERCE PRODUCT CAROUSEL === */

/* Product Grid - Native scrolling carousel container */
.product-grid {
  margin-top: var(--space-xl);
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  max-width: 100%;
  scroll-behavior: auto;
  /* Hide scrollbar for cleaner appearance */
  scrollbar-width: none;
  padding-right: 40px;
}

/* Hide scrollbar in Chrome/Safari */
.product-grid::-webkit-scrollbar {
  display: none;
}

/* Carousel Track - Flex container for product cards */
.product-track {
  display: flex;
  gap: var(--grid-gap-lg);
  min-width: min-content;
  padding-right: var(--grid-gap-lg);
  list-style: none;
  padding-left: 0;
  margin: 0;
}

/* Product Card Container */
.product-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  height: 100%;
  flex: 0 0 280px;
  min-width: 280px;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(118,211,255,0.15);
  border-color: rgba(118,211,255,0.2);
}

/* Product Image Section */
.product-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: transparent;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.product-card:hover .product-image {
  transform: scale(1.08);
}

/* Product Badge */
.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(118,211,255,0.9) 0%, rgba(182,119,255,0.9) 100%);
  color: #0b071a;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10;
  animation: slideInRight 0.4s ease-out;
}

.product-badge.in-stock {
  background: linear-gradient(135deg, rgba(76,193,101,0.9) 0%, rgba(76,193,101,0.8) 100%);
}

.product-badge.limited {
  background: linear-gradient(135deg, rgba(255,152,0,0.9) 0%, rgba(255,87,34,0.9) 100%);
  animation: pulse-badge 2s ease-in-out infinite;
}

.product-badge.out-of-stock {
  background: linear-gradient(135deg, rgba(128,128,128,0.9) 0%, rgba(105,105,105,0.9) 100%);
}

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

@keyframes pulse-badge {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255,152,0,0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255,152,0,0);
  }
}

/* Quick Add Overlay — reveals actions on hover */
.product-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9, 6, 15, 0.85) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 15;
}

.product-card:hover .product-image-wrapper::after {
  opacity: 1;
}

/* Product Content Section */
.product-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-md) var(--space-md) var(--space-md) var(--space-md);
  gap: var(--space-sm);
  justify-content: space-between;
}

/* Product Header (Title + Rating) */
.product-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-strong);
  line-height: 1.3;
}

/* Product Rating - Show on hover only */
.product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  max-height: 0;
  overflow: hidden;
}

.product-card:hover .product-rating {
  opacity: 1;
  max-height: 2rem;
}

.product-rating .stars {
  color: var(--accent-1);
  letter-spacing: -2px;
  font-size: 0.8rem;
}

.product-rating .rating-count {
  color: var(--muted);
  font-size: 0.8rem;
}

/* Product Description */
.product-description {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
  flex: 0 0 auto;
}

/* Product Footer (Price + Actions) */
.product-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* Price Section */
.price-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.price {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.original-price {
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(255,255,255,0.3);
}

/* Product Actions */
.product-actions {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
}

/* Add to Cart Button */
.btn-add-to-cart {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #0b071a;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-add-to-cart:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(118,211,255,0.3);
}

.btn-add-to-cart:active:not(:disabled) {
  transform: translateY(-1px);
}

.btn-add-to-cart:disabled {
  opacity: 1;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(255,152,0,0.7), rgba(255,87,34,0.7));
  transition: all 0.2s ease;
}

.btn-add-to-cart:disabled:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(255,152,0,0.3);
}

.btn-add-to-cart.in-cart {
  background: linear-gradient(135deg, rgba(76,193,101,0.8), rgba(76,193,101,0.6));
}

.btn-add-to-cart.notified {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Favorite Button — overlays image top-right on hover */
.btn-favorite {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(118,211,255,0.3);
  background: rgba(9, 6, 15, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--accent-1);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  opacity: 0;
  transform: scale(0.85);
}

.product-card:hover .btn-favorite,
.btn-favorite.liked {
  opacity: 1;
  transform: scale(1);
}

.btn-favorite:hover {
  background: rgba(118,211,255,0.15);
  border-color: rgba(118,211,255,0.5);
  transform: scale(1.15);
}

.btn-favorite.liked {
  color: #ff6b9d;
  background: rgba(255,107,157,0.1);
  border-color: rgba(255,107,157,0.5);
}

/* Featured Card Styling */
.product-card.featured {
  grid-column: span 1;
  border-color: rgba(118,211,255,0.3);
  background: linear-gradient(135deg, rgba(118,211,255,0.08) 0%, rgba(182,119,255,0.06) 100%);
}

.product-card.featured:hover {
  box-shadow: 0 30px 60px rgba(118,211,255,0.2);
  border-color: rgba(118,211,255,0.5);
}

/* === RESPONSIVE DESIGN === */

/* Desktop - 280px cards */
@media (max-width: 1024px) {
  .product-card {
    flex: 0 0 260px;
    min-width: 260px;
  }
}

@media (max-width: 768px) {
  .product-card {
    flex: 0 0 240px;
    min-width: 240px;
  }

  .product-content {
    padding: var(--space-sm);
  }

  .price {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .product-card {
    flex: 0 0 200px;
    min-width: 200px;
  }

  .product-header {
    gap: 0.25rem;
  }

  .product-card h3 {
    font-size: 0.9rem;
  }

  .product-description {
    font-size: 0.8rem;
  }

  .price {
    font-size: 1rem;
  }

  .btn-add-to-cart {
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
  }

}

/* === ACCESSIBILITY === */

.product-card:focus-within {
  outline: 2px solid rgba(118,211,255,0.5);
  outline-offset: 2px;
}

.btn-add-to-cart:focus,
.btn-favorite:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .product-card,
  .product-image,
  .btn-add-to-cart {
    transition: none;
  }
}

/* === ANIMATED FILTER TEASER === */

/* === FILTER TEASER: CENTERED CLICK-TO-OPEN === */

.filter-teaser-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 2rem;
  gap: 0.5rem;
}

/* (D) Micro-label above the pill */
.filter-teaser-container::before {
  content: "Browse by";
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, #b9b4d0);
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

/* Fade the micro-label when a selection is active */
.filter-teaser-container:has(.filter-control.has-selection)::before {
  content: "Filtered by";
  color: var(--accent1, #76d3ff);
  opacity: 0.5;
}

/* (C) Bigger, more inviting pill */
.filter-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(118, 211, 255, 0.04), rgba(182, 119, 255, 0.04));
  border: 1px solid rgba(118, 211, 255, 0.18);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
  user-select: none;
}

.filter-control:hover {
  background: linear-gradient(135deg, rgba(118, 211, 255, 0.1), rgba(182, 119, 255, 0.08));
  border-color: rgba(118, 211, 255, 0.4);
  box-shadow: 0 4px 20px rgba(118, 211, 255, 0.12),
              inset 0 0 20px rgba(118, 211, 255, 0.03);
}

/* (A) Gradient text, larger, bolder */
.teaser-text {
  font-weight: 700;
  font-size: var(--text-lg, 1.125rem);
  background: linear-gradient(135deg, var(--accent1, #76d3ff), var(--accent2, #b677ff));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  transition: opacity 0.2s ease, text-shadow 0.4s ease;
}

/* (B) Glow pulse during idle animation — applied via JS class */
@keyframes teaserGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(118, 211, 255, 0.0)); }
  50%      { filter: drop-shadow(0 0 14px rgba(118, 211, 255, 0.35)); }
}

.teaser-text.glow {
  animation: teaserGlow 2s ease-in-out;
}

/* (E) Selection state — solid accent, slightly larger */
.filter-control.has-selection .teaser-text {
  font-size: var(--text-xl, 1.25rem);
  background: linear-gradient(135deg, var(--accent1, #76d3ff) 30%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.filter-control.has-selection {
  border-color: rgba(118, 211, 255, 0.3);
  background: linear-gradient(135deg, rgba(118, 211, 255, 0.06), rgba(182, 119, 255, 0.05));
}

/* Dropdown Arrow - hidden by default, appears on hover */
.teaser-arrow {
  font-size: 0.85rem;
  color: rgba(118, 211, 255, 0.5);
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

.filter-control:hover .teaser-arrow {
  opacity: 1;
  transform: translateY(0);
  color: rgba(118, 211, 255, 0.9);
}

/* Rotate arrow when dropdown is open */
.filter-control.open .teaser-arrow {
  opacity: 1;
  transform: rotate(180deg);
  color: rgba(118, 211, 255, 1);
}

/* Hover hint - "Click to filter" */
.teaser-hint {
  font-size: 0.7rem;
  color: rgba(118, 211, 255, 0.5);
  white-space: nowrap;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: opacity 0.3s ease 0.1s, max-width 0.3s ease 0.1s;
  pointer-events: none;
}

.filter-control:hover .teaser-hint {
  opacity: 1;
  max-width: 120px;
}

/* Hide hint once dropdown has been opened */
.filter-control.open .teaser-hint,
.filter-control.has-selection .teaser-hint {
  display: none;
}

/* === BADGE PILLS — row beneath the pill, revealed after category selection === */

.teaser-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-height 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              opacity 0.3s ease 0.05s,
              margin 0.3s ease;
  margin-top: 0;
}

.teaser-badges.visible {
  max-height: 60px;
  opacity: 1;
  pointer-events: auto;
  overflow: visible;
  margin-top: 0.45rem;
}

.teaser-badges .badge {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid rgba(182, 119, 255, 0.25);
  background: rgba(182, 119, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  transform: scale(0.8) translateX(-6px);
  opacity: 0;
}

.teaser-badges.visible .badge {
  transform: scale(1) translateX(0);
  opacity: 1;
}

.teaser-badges.visible .badge:nth-child(1) { transition-delay: 0.06s; }
.teaser-badges.visible .badge:nth-child(2) { transition-delay: 0.12s; }
.teaser-badges.visible .badge:nth-child(3) { transition-delay: 0.18s; }

.teaser-badges .badge:hover {
  background: rgba(182, 119, 255, 0.25);
  border-color: rgba(182, 119, 255, 0.5);
  transform: translateY(-2px) scale(1.04);
}

.teaser-badges .badge.active {
  background: linear-gradient(135deg, rgba(182, 119, 255, 0.9), rgba(118, 211, 255, 0.9));
  color: #0b071a;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(182, 119, 255, 0.4);
}

/* === CATEGORY DROPDOWN (click-to-open) === */

.filter-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.75rem;
  background: linear-gradient(135deg, rgba(11, 7, 26, 0.98), rgba(20, 10, 35, 0.98));
  border: 1px solid rgba(118, 211, 255, 0.3);
  border-radius: 12px;
  padding: 0.75rem;
  min-width: 220px;
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.filter-dropdown.visible {
  display: flex;
  animation: slideDown 0.3s ease;
}

.filter-option {
  padding: 0.7rem 1.2rem;
  border: 1px solid rgba(118, 211, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
}

.filter-option:hover {
  background: rgba(118, 211, 255, 0.15);
  border-color: rgba(118, 211, 255, 0.5);
  transform: translateX(4px);
}

.filter-option.active {
  background: linear-gradient(135deg, rgba(118, 211, 255, 0.9), rgba(182, 119, 255, 0.9));
  color: #0b071a;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(118, 211, 255, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
  .filter-teaser-container {
    margin-bottom: 1.5rem;
  }

  .filter-dropdown {
    min-width: 180px;
  }

  .teaser-text {
    font-size: 0.9rem;
  }

  .teaser-hint {
    display: none;
  }

  .teaser-badges .badge {
    padding: 0.3rem 0.6rem;
    font-size: 0.65rem;
  }
}
