/* ===================================
   Brocantes Page Styles
   =================================== */

/* ---- Hero ---- */
.brocantes-hero {
  padding: 110px 0 90px;
  background: linear-gradient(150deg, var(--color-cream) 0%, #f0e8d8 60%, #ebe0cc 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.brocantes-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%238b4513' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

/* gold ornament line above title */
.brocantes-hero::after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.brocantes-hero .container {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.brocantes-hero-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 24px;
}

.brocantes-hero h1 {
  font-family: 'Great Vibes', cursive;
  font-size: 4.5rem;
  font-weight: 400;
  color: var(--color-primary);
  line-height: 1.25;
  margin: 0 0 28px;
}

.brocantes-hero-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
}

.brocantes-hero-ornament span {
  display: block;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold));
}

.brocantes-hero-ornament span:last-child {
  background: linear-gradient(90deg, var(--color-gold), transparent);
}

.brocantes-hero-ornament-diamond {
  width: 8px;
  height: 8px;
  border: 1px solid var(--color-gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.brocantes-hero-text {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--color-text);
  max-width: 680px;
  margin: 0 auto;
}

/* ---- Carousel Section ---- */
.brocantes-carousel-section {
  padding: 90px 0 100px;
  background: var(--color-white);
  position: relative;
}

.brocantes-carousel-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, var(--color-gold) 30%, var(--color-secondary) 70%, transparent 100%);
}

.brocantes-section-header {
  text-align: center;
  margin-bottom: 60px;
}

.brocantes-section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 14px;
}

.brocantes-section-title {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 14px;
}

.brocantes-section-subtitle {
  font-size: 1rem;
  color: var(--color-text-light);
  margin: 0;
}

/* ---- Main carousel ---- */
.brocantes-carousel-outer {
  position: relative;
  padding: 0 70px;
}

.brocantes-carousel-track-container {
  overflow: hidden;
  border-radius: var(--border-radius-lg);
}

.brocantes-carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* ---- Photo Card ---- */
.brocantes-card {
  flex: 0 0 calc(33.333% - 16px);
  min-width: 0;
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--color-primary);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.brocantes-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

.brocantes-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: zoom-in;
}

.brocantes-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.brocantes-card:hover .brocantes-card-image::after {
  background: rgba(0, 0, 0, 0.12);
}

.brocantes-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.brocantes-card:hover .brocantes-card-image img {
  transform: scale(1.05);
}


/* gold corner accent */
.brocantes-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border-top: 3px solid var(--color-gold);
  border-left: 3px solid var(--color-gold);
  border-radius: 8px 0 0 0;
  z-index: 6;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.brocantes-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 40px;
  border-bottom: 3px solid var(--color-gold);
  border-right: 3px solid var(--color-gold);
  border-radius: 0 0 8px 0;
  z-index: 6;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.brocantes-card:hover::before,
.brocantes-card:hover::after {
  opacity: 1;
}

/* ---- Nav buttons ---- */
.brocantes-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
  z-index: 20;
  color: var(--color-primary);
}

.brocantes-carousel-btn.prev { left: 0; }
.brocantes-carousel-btn.next { right: 0; }

.brocantes-carousel-btn:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--color-white);
}

.brocantes-carousel-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.brocantes-carousel-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- Dots ---- */
.brocantes-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 36px;
}

.brocantes-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-gray);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
}

.brocantes-dot.active {
  background: var(--color-secondary);
  transform: scale(1.3);
}

.brocantes-dot:hover {
  background: var(--color-gray-dark);
}

/* ---- Empty state ---- */
.brocantes-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--color-text-light);
}

.brocantes-empty svg {
  width: 56px;
  height: 56px;
  opacity: 0.35;
  margin: 0 auto 20px;
  display: block;
}

.brocantes-empty h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 8px;
}

/* ---- Bottom info banner ---- */
.brocantes-info {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--color-cream) 0%, #f0e8d8 100%);
  position: relative;
  overflow: hidden;
}

.brocantes-info::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%238b4513' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.brocantes-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  position: relative;
  z-index: 1;
}

.brocantes-info-item {
  text-align: center;
  padding: 32px 24px;
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.brocantes-info-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.brocantes-info-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--color-cream), #ebe0cc);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border: 2px solid rgba(212, 175, 55, 0.3);
}

.brocantes-info-icon .icon {
  width: 24px;
  height: 24px;
  color: var(--color-secondary);
}

.brocantes-info-item h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.brocantes-info-item p {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin: 0;
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 1024px) {
  .brocantes-card {
    flex: 0 0 calc(50% - 12px);
  }
}

@media (max-width: 768px) {
  .brocantes-hero {
    padding: 80px 0 60px;
  }

  .brocantes-hero h1 {
    font-size: 3rem;
  }

  .brocantes-hero-text {
    font-size: 0.95rem;
  }

  .brocantes-carousel-outer {
    padding: 0 50px;
  }

  .brocantes-carousel-btn {
    width: 40px;
    height: 40px;
  }

  .brocantes-card {
    flex: 0 0 calc(100% - 0px);
  }

  .brocantes-section-title {
    font-size: 1.8rem;
  }

  .brocantes-info-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .brocantes-hero h1 {
    font-size: 2.4rem;
  }

  .brocantes-carousel-outer {
    padding: 0 42px;
  }

  .brocantes-carousel-btn {
    width: 36px;
    height: 36px;
  }

  .brocantes-carousel-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* ---- Fade-in animation ---- */
@keyframes brocFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.brocantes-card {
  animation: brocFadeUp 0.6s ease both;
}

.brocantes-card:nth-child(2) { animation-delay: 0.1s; }
.brocantes-card:nth-child(3) { animation-delay: 0.2s; }

/* ===================================
   Lightbox
   =================================== */
.brocantes-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 4, 1, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.brocantes-lightbox-inner {
  position: relative;
  max-width: min(90vw, 1200px);
  max-height: 85vh;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brocantes-lightbox-img {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  pointer-events: auto;
  cursor: default;
}

.brocantes-lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.brocantes-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.08);
}

.brocantes-lightbox-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.brocantes-lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.brocantes-lightbox-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%) scale(1.08);
}

.brocantes-lightbox-nav:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.brocantes-lightbox-nav.lb-prev { left: 16px; }
.brocantes-lightbox-nav.lb-next { right: 16px; }

.brocantes-lightbox-nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brocantes-lightbox-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  letter-spacing: 2px;
  font-family: var(--font-body);
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .brocantes-lightbox-nav {
    width: 40px;
    height: 40px;
  }

  .brocantes-lightbox-nav.lb-prev { left: 8px; }
  .brocantes-lightbox-nav.lb-next { right: 8px; }

  .brocantes-lightbox-img {
    max-height: 80vh;
  }
}
