/* Producer profile modal + image lightbox (home + shop) */

.producer-modal-intro {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}
.producer-modal-main-link {
  display: flex;
  justify-content: center;
  cursor: zoom-in;
}
/* Desktop: image and description side by side */
@media (min-width: 768px) {
  .producer-modal-intro.has-both {
    flex-direction: row;
    align-items: flex-start;
  }
  .producer-modal-intro.has-both .producer-modal-main-link {
    flex: 0 1 50%;
    min-width: 0;
  }
  .producer-modal-intro.has-both .producer-modal-main {
    max-height: 380px;
  }
  .producer-modal-intro.has-both .producer-thought {
    flex: 1 1 50%;
    min-width: 0;
  }
}
/* Keep the original aspect ratio — scale down instead of cropping */
.producer-modal-main {
  display: block;
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}
.producer-modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.producer-modal-gallery a { cursor: zoom-in; }
.producer-modal-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}
.producer-modal-locs {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.producer-modal-locs .material-icons { font-size: 1rem; }

/* Fullscreen image view (above the Bootstrap modal) */
.producer-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3.5rem 1rem 1rem;
  background: rgba(0, 0, 0, 0.88);
}
.producer-lightbox[hidden] { display: none; }
.producer-lightbox-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.producer-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}
/* Reset the global button styles (app.css) for lightbox controls */
.producer-lightbox button {
  margin: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  cursor: pointer;
}
.producer-lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}
.producer-lightbox-close:hover { background: rgba(255, 255, 255, 0.3); }
.producer-lightbox-close .material-icons {
  font-size: 28px;
  color: #fff;
}
/* Same look as the Bootstrap carousel controls on the item detail page */
.producer-lightbox-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15%;
  max-width: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border-radius: 0;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.producer-lightbox-nav:hover { opacity: 1; }
.producer-lightbox-nav[hidden] { display: none; }
.producer-lightbox-nav.prev { left: 0; }
.producer-lightbox-nav.next { right: 0; }
.producer-lightbox-nav span { width: 2.5rem; height: 2.5rem; }
.producer-lightbox-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.producer-lightbox-thumbs[hidden] { display: none; }
.producer-lightbox-thumbs img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid transparent;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.15s;
}
.producer-lightbox-thumbs img.active {
  opacity: 1;
  border-color: var(--accent);
}

/* Producer description as a "thought" bubble */
.producer-thought {
  position: relative;
  margin: 0;
  padding: 0.85rem 1.1rem 0.75rem;
  background: var(--bg-secondary, #f6f6f3);
  border-radius: 18px;
}
.producer-thought-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.producer-thought-author {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: right;
  color: var(--text-muted);
}

/* Clickable producer name in the shop (opens the profile modal) */
.producer-name-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.producer-name-link:hover { color: var(--primary); }
.producer-name-link .material-icons {
  font-size: 1.1rem;
  color: var(--text-muted);
}
.producer-name-link:hover .material-icons { color: var(--primary); }
