/* ======================================
   Lookbook Page Styles
   BEM naming with .jbz- prefix
   ====================================== */

/* -- Hero -- */
.jbz-lookbook-hero {
  padding: var(--jbz-space-16) 0 var(--jbz-space-12);
  background: var(--jbz-dark);
  color: var(--jbz-white);
  text-align: center;
}

.jbz-lookbook-hero .jbz-breadcrumb {
  margin-bottom: var(--jbz-space-6);
}

.jbz-lookbook-hero__title {
  color: var(--jbz-white);
  margin-bottom: var(--jbz-space-4);
}

.jbz-lookbook-hero__subtitle {
  max-width: 560px;
  margin: 0 auto;
  opacity: 0.85;
}

/* -- Filter Tabs -- */
.jbz-lookbook-filters {
  padding: var(--jbz-space-8) 0;
  background: var(--jbz-white);
  border-bottom: 1px solid var(--jbz-grey-200);
  position: sticky;
  top: 0;
  z-index: var(--jbz-z-dropdown);
}

.jbz-lookbook-filters__tabs {
  display: flex;
  gap: var(--jbz-space-2);
  justify-content: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--jbz-space-2);
}

.jbz-lookbook-filters__tabs::-webkit-scrollbar {
  display: none;
}

.jbz-lookbook-filters__tab {
  flex-shrink: 0;
  padding: var(--jbz-space-2) var(--jbz-space-5);
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--jbz-grey-700);
  font-family: var(--jbz-font-body);
  font-size: var(--jbz-font-size-sm);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition:
    color var(--jbz-transition-fast),
    border-color var(--jbz-transition-fast);
}

.jbz-lookbook-filters__tab:hover {
  color: var(--jbz-dark);
  border-bottom-color: var(--jbz-grey-300);
}

.jbz-lookbook-filters__tab--active {
  color: var(--jbz-dark);
  border-bottom-color: #C9A84C;
}

.jbz-lookbook-filters__tab--active:hover {
  color: var(--jbz-dark);
  border-bottom-color: #C9A84C;
}

/* -- Image Grid -- */
.jbz-lookbook-grid-section {
  padding: var(--jbz-space-12) 0 var(--jbz-space-16);
}

.jbz-lookbook-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 250px;
  gap: var(--jbz-space-4);
}

.jbz-lookbook-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--jbz-radius-lg);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.jbz-lookbook-item--tall {
  grid-row: span 2;
}

.jbz-lookbook-item--hidden {
  display: none;
}

.jbz-lookbook-item--fade-in {
  animation: jbzLookbookFadeIn 0.4s ease forwards;
}

@keyframes jbzLookbookFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.jbz-lookbook-item__link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: var(--jbz-white);
}

.jbz-lookbook-item__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.jbz-lookbook-item:hover .jbz-lookbook-item__image {
  transform: scale(1.05);
}

/* Category badge */
.jbz-lookbook-item__badge {
  position: absolute;
  top: var(--jbz-space-3);
  left: var(--jbz-space-3);
  padding: var(--jbz-space-1) var(--jbz-space-3);
  background: var(--jbz-white);
  color: var(--jbz-dark);
  font-size: var(--jbz-font-size-xs, 0.75rem);
  font-weight: 700;
  border-radius: var(--jbz-radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 2;
}

/* Hover overlay */
.jbz-lookbook-item__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: var(--jbz-space-6);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.65) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.jbz-lookbook-item:hover .jbz-lookbook-item__overlay,
.jbz-lookbook-item:focus-within .jbz-lookbook-item__overlay {
  opacity: 1;
}

.jbz-lookbook-item__name {
  font-family: var(--jbz-font-heading);
  font-size: var(--jbz-font-size-lg);
  font-weight: 700;
  margin-bottom: var(--jbz-space-2);
  text-align: center;
}

.jbz-lookbook-item__cta {
  font-size: var(--jbz-font-size-sm);
  font-weight: 600;
  opacity: 0.9;
}

/* Empty state */
.jbz-lookbook-empty {
  text-align: center;
  padding: var(--jbz-space-16) 0;
}

/* -- Hotspot Styles -- */
.jbz-lookbook-hotspot {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -50%);
}

.jbz-lookbook-hotspot__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 2px solid #C9A84C;
  border-radius: 50%;
  background: var(--jbz-white);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform var(--jbz-transition-fast), box-shadow var(--jbz-transition-fast);
  position: relative;
}

.jbz-lookbook-hotspot__dot:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.jbz-lookbook-hotspot__dot:focus-visible {
  outline: 2px solid #C9A84C;
  outline-offset: 3px;
}

/* Pulsing ring animation */
.jbz-lookbook-hotspot__dot::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #C9A84C;
  opacity: 0;
  animation: jbzHotspotPulse 2s ease-out infinite;
}

@keyframes jbzHotspotPulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  70% {
    transform: scale(1.8);
    opacity: 0;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* Hotspot card */
.jbz-lookbook-hotspot__card {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 200px;
  padding: var(--jbz-space-4);
  background: var(--jbz-white);
  border-radius: var(--jbz-radius-lg);
  box-shadow: var(--jbz-shadow-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--jbz-transition-fast),
    transform var(--jbz-transition-fast),
    visibility var(--jbz-transition-fast);
  text-align: center;
}

/* Triangle pointer */
.jbz-lookbook-hotspot__card::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--jbz-white);
}

/* Active state */
.jbz-lookbook-hotspot--active .jbz-lookbook-hotspot__card {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.jbz-lookbook-hotspot__card-name {
  display: block;
  font-family: var(--jbz-font-heading);
  font-size: var(--jbz-font-size-sm);
  font-weight: 700;
  color: var(--jbz-dark);
  margin-bottom: var(--jbz-space-1);
  line-height: var(--jbz-line-height-heading);
}

.jbz-lookbook-hotspot__card-category {
  display: inline-block;
  font-size: var(--jbz-font-size-xs, 0.75rem);
  font-weight: 600;
  color: var(--jbz-grey-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--jbz-space-3);
}

.jbz-lookbook-hotspot__card-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--jbz-space-1);
  padding: var(--jbz-space-2) var(--jbz-space-3);
  background: #25D366;
  color: var(--jbz-white);
  font-size: var(--jbz-font-size-xs, 0.75rem);
  font-weight: 700;
  border-radius: var(--jbz-radius-full);
  text-decoration: none;
  transition: background var(--jbz-transition-fast);
}

.jbz-lookbook-hotspot__card-btn:hover {
  background: #1da851;
}

/* -- CTA -- */
.jbz-lookbook-cta {
  padding: var(--jbz-space-16) 0;
  background: var(--jbz-dark);
  color: var(--jbz-white);
  text-align: center;
}

.jbz-lookbook-cta__inner {
  max-width: 640px;
  margin: 0 auto;
}

.jbz-lookbook-cta__title {
  color: var(--jbz-white);
  margin-bottom: var(--jbz-space-3);
}

.jbz-lookbook-cta__text {
  color: var(--jbz-grey-300);
  margin-bottom: var(--jbz-space-8);
}

.jbz-lookbook-cta__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--jbz-space-4);
  flex-wrap: wrap;
}

/* -- Responsive -- */
@media (max-width: 1024px) {
  .jbz-lookbook-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  .jbz-lookbook-hero {
    padding: var(--jbz-space-12) 0 var(--jbz-space-8);
  }

  .jbz-lookbook-filters__tabs {
    justify-content: flex-start;
    padding-left: var(--jbz-space-4);
    padding-right: var(--jbz-space-4);
  }

  .jbz-lookbook-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 300px;
  }

  .jbz-lookbook-item--tall {
    grid-row: span 1;
  }

  .jbz-lookbook-cta__actions {
    flex-direction: column;
  }

  /* Ensure hotspot card does not overflow on mobile */
  .jbz-lookbook-hotspot__card {
    width: 170px;
  }
}

/* -- Reduced Motion -- */
@media (prefers-reduced-motion: reduce) {
  .jbz-lookbook-hotspot__dot::before {
    animation: none;
  }

  .jbz-lookbook-item--fade-in {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .jbz-lookbook-item__image {
    transition: none;
  }

  .jbz-lookbook-item__overlay {
    transition: none;
  }

  .jbz-lookbook-hotspot__card {
    transition: none;
  }

  .jbz-lookbook-hotspot__dot {
    transition: none;
  }
}
