:root {
  --gallery-navy: #081632;
  --gallery-blue: #122b5b;
  --gallery-gold: #cda349;
  --gallery-cream: #f9edd7;
  --gallery-wine: #7b1b36;
}

.gallery-feature *,
.gallery-lightbox *,
.gallery-page * {
  box-sizing: border-box;
}

.gallery-feature button,
.gallery-lightbox button,
.gallery-page button {
  font: inherit;
}

.gallery-feature {
  position: relative;
  overflow: hidden;
  padding: clamp(4.5rem, 8vw, 7rem) 0;
  color: var(--gallery-cream);
  background:
    radial-gradient(circle at 12% 18%, rgba(205, 163, 73, 0.18), transparent 26rem),
    linear-gradient(135deg, #081632 0%, #122b5b 100%);
}

.gallery-feature::before {
  position: absolute;
  inset: 0;
  content: '';
  pointer-events: none;
  opacity: 0.28;
  background-image: linear-gradient(rgba(249, 237, 215, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(249, 237, 215, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

.gallery-feature__inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 1240px);
  margin: 0 auto;
}

.gallery-feature__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.gallery-feature__tag,
.gallery-page__tag {
  display: inline-block;
  margin-bottom: 0.65rem;
  color: var(--gallery-gold);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.gallery-feature__title {
  max-width: 750px;
  margin: 0;
  color: var(--gallery-cream);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 500;
  line-height: 0.98;
}

.gallery-feature__intro {
  max-width: 690px;
  margin: 1rem 0 0;
  color: rgba(249, 237, 215, 0.72);
  font-size: 1.05rem;
  line-height: 1.65;
}

.gallery-feature__all,
.gallery-page__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1.15rem;
  color: var(--gallery-navy);
  background: var(--gallery-gold);
  border: 1px solid var(--gallery-gold);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 180ms ease, background-color 180ms ease;
}

.gallery-feature__all:hover,
.gallery-feature__all:focus-visible,
.gallery-page__back:hover,
.gallery-page__back:focus-visible {
  background: #dbb75c;
  transform: translateY(-2px);
}

.gallery-carousel {
  position: relative;
}

.gallery-carousel__track {
  display: grid;
  grid-auto-columns: minmax(270px, calc((100% - 3rem) / 3));
  grid-auto-flow: column;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 0.25rem 0.25rem 1.5rem;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-color: rgba(205, 163, 73, 0.55) rgba(249, 237, 215, 0.08);
  scrollbar-width: thin;
}

.gallery-carousel__controls {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.gallery-carousel__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: var(--gallery-cream);
  background: rgba(249, 237, 215, 0.06);
  border: 1px solid rgba(249, 237, 215, 0.22);
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.gallery-carousel__arrow:hover,
.gallery-carousel__arrow:focus-visible {
  color: var(--gallery-gold);
  border-color: var(--gallery-gold);
  transform: translateY(-2px);
}

.gallery-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  color: var(--gallery-navy);
  background: #fffdf8;
  border: 1px solid rgba(205, 163, 73, 0.2);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.16);
  scroll-snap-align: start;
}

.gallery-card__image-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: #050b17;
  border: 0;
  cursor: zoom-in;
}

.gallery-card__image {
  display: block;
  width: 100%;
  height: 310px;
  object-fit: cover;
  transition: transform 500ms ease, opacity 300ms ease;
}

.gallery-card__image-button:hover .gallery-card__image,
.gallery-card__image-button:focus-visible .gallery-card__image {
  opacity: 0.82;
  transform: scale(1.025);
}

.gallery-card__zoom {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  padding: 0.45rem 0.75rem;
  color: #fff;
  background: rgba(8, 22, 50, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.gallery-card__image-button:hover .gallery-card__zoom,
.gallery-card__image-button:focus-visible .gallery-card__zoom {
  opacity: 1;
  transform: translateY(0);
}

.gallery-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.35rem;
}

.gallery-card__eyebrow {
  margin: 0 0 0.35rem;
  color: var(--gallery-wine);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-card__title {
  margin: 0 0 1rem;
  color: var(--gallery-navy);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.08;
}

.gallery-card__details {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1.2rem;
  color: #34415a;
  font-size: 0.84rem;
  line-height: 1.4;
}

.gallery-card__details div { display: grid; gap: 0.05rem; }
.gallery-card__details dt { color: #7b8496; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.gallery-card__details dd { margin: 0; }

.gallery-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(8, 22, 50, 0.1);
}

.gallery-card__price {
  color: var(--gallery-wine);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
}

.gallery-card__whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.55rem 0.85rem;
  color: #fff;
  background: #167c52;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms ease;
}

.gallery-card__whatsapp:hover,
.gallery-card__whatsapp:focus-visible { background: #0d6541; transform: translateY(-1px); }

.gallery-modal-open { overflow: hidden; }

.gallery-lightbox {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.gallery-lightbox.is-open { display: flex; }
.gallery-lightbox__backdrop { position: absolute; inset: 0; background: rgba(2, 7, 18, 0.94); backdrop-filter: blur(8px); }

.gallery-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  max-height: calc(100vh - 2rem);
}

.gallery-lightbox__figure {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.65fr);
  max-height: calc(100vh - 2rem);
  margin: 0;
  overflow: hidden;
  color: var(--gallery-navy);
  background: #fffdf8;
  border-radius: 8px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox__art { display: flex; align-items: center; justify-content: center; min-height: 72vh; padding: 1.25rem; background: #050b17; }
.gallery-lightbox__art img { display: block; max-width: 100%; max-height: calc(100vh - 4.5rem); object-fit: contain; }
.gallery-lightbox__info { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.5rem, 4vw, 3rem); }
.gallery-lightbox__eyebrow { margin: 0 0 0.6rem; color: var(--gallery-wine); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.gallery-lightbox__info h2 { margin: 0 0 1.25rem; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 600; line-height: 1; }
.gallery-lightbox__info > p:not(.gallery-lightbox__eyebrow) { margin: 0.2rem 0; color: #526078; line-height: 1.5; }
.gallery-lightbox__action { display: grid; gap: 1rem; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid rgba(8, 22, 50, 0.12); }
.gallery-lightbox__action strong { color: var(--gallery-wine); font-family: 'Cormorant Garamond', Georgia, serif; font-size: 2rem; }
.gallery-lightbox__action a { display: inline-flex; justify-content: center; padding: 0.8rem 1rem; color: #fff; background: #167c52; border-radius: 999px; font-weight: 600; text-decoration: none; }

.gallery-lightbox__close,
.gallery-lightbox__nav {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(8, 22, 50, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  cursor: pointer;
}

.gallery-lightbox__close { top: 0.8rem; right: 0.8rem; width: 42px; height: 42px; font-size: 1.65rem; }
.gallery-lightbox__nav { top: 50%; width: 46px; height: 46px; font-size: 2rem; transform: translateY(-50%); }
.gallery-lightbox__nav--prev { left: 0.8rem; }
.gallery-lightbox__nav--next { right: 0.8rem; }
.gallery-lightbox__close:hover, .gallery-lightbox__close:focus-visible, .gallery-lightbox__nav:hover, .gallery-lightbox__nav:focus-visible { color: var(--gallery-gold); border-color: var(--gallery-gold); }

/* Página completa */
.gallery-page {
  min-height: 100vh;
  margin: 0;
  color: var(--gallery-navy);
  background: #f7f1e7;
  font-family: 'Source Sans 3', system-ui, sans-serif;
}

.gallery-page__header { position: sticky; z-index: 20; top: 0; background: rgba(8, 22, 50, 0.96); border-bottom: 1px solid rgba(205, 163, 73, 0.25); backdrop-filter: blur(12px); }
.gallery-page__nav { display: flex; align-items: center; justify-content: space-between; width: min(100% - 2rem, 1240px); min-height: 78px; margin: 0 auto; }
.gallery-page__brand { display: flex; align-items: center; gap: 0.75rem; color: var(--gallery-cream); font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.4rem; font-weight: 600; text-decoration: none; }
.gallery-page__brand img { width: 46px; height: 46px; object-fit: contain; }
.gallery-page__nav-links { display: flex; align-items: center; gap: 1.2rem; }
.gallery-page__nav-links > a:not(.gallery-page__back) { color: rgba(249, 237, 215, 0.78); text-decoration: none; }
.gallery-page__hero { padding: clamp(4rem, 9vw, 8rem) 0 clamp(3rem, 6vw, 5rem); color: var(--gallery-cream); background: radial-gradient(circle at 75% 10%, rgba(205, 163, 73, 0.23), transparent 28rem), linear-gradient(145deg, #081632, #122b5b); }
.gallery-page__hero-inner, .gallery-page__collection { width: min(100% - 2rem, 1240px); margin: 0 auto; }
.gallery-page__hero h1 { max-width: 880px; margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(3.3rem, 9vw, 7.5rem); font-weight: 500; line-height: 0.86; letter-spacing: -0.03em; }
.gallery-page__hero p { max-width: 650px; margin: 1.5rem 0 0; color: rgba(249, 237, 215, 0.72); font-size: 1.1rem; line-height: 1.7; }
.gallery-page__collection { padding: clamp(4rem, 8vw, 7rem) 0; }
.gallery-page__collection-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2.5rem; }
.gallery-page__collection h2 { margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 600; }
.gallery-page__count { color: var(--gallery-wine); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; align-items: stretch; }
.gallery-card--full { box-shadow: 0 15px 45px rgba(8, 22, 50, 0.1); }
.gallery-card--full .gallery-card__image { height: 360px; }
.gallery-page__footer { padding: 2.2rem 1rem; color: rgba(249, 237, 215, 0.65); background: var(--gallery-navy); text-align: center; }
.gallery-page__footer a { color: var(--gallery-gold); }

@media (max-width: 859px) {
  .gallery-feature__header, .gallery-page__collection-head { align-items: flex-start; flex-direction: column; }
  .gallery-carousel__track { grid-auto-columns: minmax(82vw, 82vw); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-lightbox__figure { display: block; overflow-y: auto; }
  .gallery-lightbox__art { min-height: 52vh; }
  .gallery-lightbox__art img { max-height: 56vh; }
  .gallery-lightbox__info { padding: 1.4rem; }
  .gallery-page__nav-links > a:not(.gallery-page__back) { display: none; }
}

@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-card__image, .gallery-card--full .gallery-card__image { height: 330px; }
  .gallery-card__footer { align-items: flex-start; flex-direction: column; }
  .gallery-card__whatsapp { width: 100%; }
  .gallery-lightbox__nav { top: 45%; width: 40px; height: 40px; }
  .gallery-page__brand span { font-size: 1.15rem; }
  .gallery-page__back { min-height: 40px; padding: 0.5rem 0.8rem; font-size: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-carousel__track { scroll-behavior: auto; }
  .gallery-card__image, .gallery-card__zoom, .gallery-card__whatsapp, .gallery-feature__all { transition: none; }
}
