/* BigPaws Smart Gallery 2027
   Capa reversible: el funnel historico permanece intacto y se activa con ?gallery=legacy. */

html.bp-gallery-next {
  --sgn-hero-out: 0;
  --sgn-focus: 0;
  --sgn-focus-out: 0;
  --sgn-deck-in: 0;
  --sgn-deck-out: 0;
  --sgn-deck-opacity: 0;
  --sgn-deck-y: 34px;
  --sgn-deck-scale: .965;
  --sgn-stage-out: 0;
}

html.bp-gallery-next .smart-gallery {
  position: relative;
  min-height: 0 !important;
  overflow: clip;
  isolation: isolate;
}

html.bp-gallery-next .smart-gallery::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: min(1180px, 132svh);
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 34%, color-mix(in srgb, var(--jade) 11%, transparent), transparent 52%),
    radial-gradient(ellipse at 18% 42%, color-mix(in srgb, var(--gold) 10%, transparent), transparent 38%);
  opacity: calc(1 - var(--sgn-stage-out));
}

html.bp-gallery-next .g-wing-clone,
html.bp-gallery-next .sg-card-stage {
  display: none !important;
}

.sgn-intro {
  position: relative;
  height: calc(100svh + clamp(620px, 72svh, 920px));
  min-height: 1240px;
}

.sgn-stage {
  position: sticky;
  top: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100svh;
  min-height: 620px;
  overflow: clip;
  contain: layout paint;
  isolation: isolate;
}

.sgn-stage::before,
.sgn-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.sgn-stage::before {
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(5, 7, 6, .62), transparent 24%, transparent 76%, rgba(5, 7, 6, .62)),
    radial-gradient(ellipse at center, transparent 24%, rgba(5, 7, 6, .52) 88%);
  opacity: calc(.48 + var(--sgn-focus) * .34);
}

.sgn-stage::after {
  left: 50%;
  bottom: clamp(26px, 5vh, 54px);
  z-index: 6;
  width: 1px;
  height: clamp(34px, 6vh, 58px);
  background: linear-gradient(var(--gold), transparent);
  transform: scaleY(calc(1 - var(--sgn-hero-out)));
  transform-origin: top;
  opacity: calc(.68 - var(--sgn-hero-out) * .68);
}

html.bp-gallery-next .sgn-stage #sg-headline {
  position: absolute !important;
  inset: 0;
  left: 0 !important;
  z-index: 5;
  width: 100% !important;
  max-width: none;
  padding: clamp(112px, 15vh, 154px) clamp(22px, 6vw, 84px) clamp(72px, 9vh, 104px);
  transform: none;
  will-change: transform, opacity;
}

html.bp-gallery-next .sgn-stage #sg-headline .hero-frame {
  width: min(720px, 56vw);
}

html.bp-gallery-next .sgn-stage #sg-headline .hero-cta {
  gap: .72rem;
}

html.bp-gallery-next .sgn-priority-cta {
  border-color: color-mix(in srgb, var(--gold) 42%, var(--glass-edge));
  background: color-mix(in srgb, var(--gold) 8%, var(--glass-bg-2));
  color: color-mix(in srgb, var(--gold) 72%, var(--cream));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 12px 34px rgba(0, 0, 0, .22);
}

html.bp-gallery-next .sgn-priority-cta:hover,
html.bp-gallery-next .sgn-priority-cta:focus-visible {
  border-color: color-mix(in srgb, var(--gold) 70%, var(--cream));
  background: color-mix(in srgb, var(--gold) 14%, var(--glass-bg-2));
}

html.bp-gallery-next .sgn-stage #sg-headline .sg-scrollcue {
  display: none;
}

.sgn-visuals {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.sgn-portrait {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cream) 17%, transparent);
  border-radius: clamp(24px, 2.5vw, 38px);
  background: var(--panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 28px 90px rgba(0, 0, 0, .52);
  transform-origin: 50% 50%;
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.sgn-portrait:hover {
  border-color: color-mix(in srgb, var(--gold) 58%, var(--glass-edge));
}

.sgn-portrait:focus-visible {
  outline: 2px solid var(--jade);
  outline-offset: 5px;
}

.sgn-portrait[aria-hidden="true"] {
  pointer-events: none;
}

.sgn-portrait--primary {
  width: clamp(246px, 18vw, 330px);
  aspect-ratio: .79;
  z-index: 3;
  transform: translate3d(-43vw, -4vh, 0) rotate(-4.4deg) scale(.88);
  opacity: .82;
}

.sgn-portrait--secondary {
  width: clamp(220px, 18vw, 310px);
  aspect-ratio: .82;
  z-index: 2;
  transform: translate3d(23vw, -38vh, 0) rotate(2.8deg) scale(.84);
  opacity: .78;
}

.sgn-portrait--tertiary {
  width: clamp(170px, 14vw, 230px);
  aspect-ratio: .86;
  z-index: 4;
  transform: translate3d(23vw, 30vh, 0) rotate(-2.2deg) scale(.88);
  opacity: .9;
}

.sgn-portrait--quaternary {
  width: clamp(200px, 17vw, 285px);
  aspect-ratio: .78;
  z-index: 2;
  transform: translate3d(-43vw, -34vh, 0) rotate(-4.8deg) scale(.78);
  opacity: .82;
}

.sgn-portrait--quinary {
  width: clamp(180px, 15vw, 250px);
  aspect-ratio: .82;
  z-index: 2;
  transform: translate3d(-39vw, 26vh, 0) rotate(3.6deg) scale(.76);
  opacity: .78;
}

.sgn-portrait--senary {
  width: clamp(195px, 16vw, 270px);
  aspect-ratio: .8;
  z-index: 2;
  transform: translate3d(23vw, 2vh, 0) rotate(-2.2deg) scale(.8);
  opacity: .82;
}

.sgn-portrait--septenary {
  width: clamp(168px, 14vw, 235px);
  aspect-ratio: .79;
  z-index: 2;
  transform: translate3d(-47vw, 40vh, 0) rotate(-4.2deg) scale(.74);
  opacity: .72;
}

.sgn-portrait--octonary {
  width: clamp(188px, 15vw, 255px);
  aspect-ratio: .84;
  z-index: 2;
  transform: translate3d(23vw, 46vh, 0) rotate(2.4deg) scale(.76);
  opacity: .74;
}

.sgn-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--sgn-object-position, 50% 50%);
  transform: scale(1.015);
}

.sgn-portrait-caption {
  position: absolute;
  inset: auto 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid rgba(247, 237, 216, .14);
  border-radius: var(--r-pill);
  background: rgba(5, 7, 6, .82);
  color: var(--cream);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .13em;
  line-height: 1.25;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.sgn-portrait-caption::after {
  content: "\2197";
  color: var(--gold);
  font-size: .95rem;
  font-weight: 400;
}

.sgn-portrait-status {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(247, 237, 216, .12);
  border-radius: var(--r-pill);
  background: rgba(5, 7, 6, .72);
  color: color-mix(in srgb, var(--cream) 70%, var(--stone));
  font-size: .54rem;
  font-weight: 600;
  letter-spacing: .11em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.sgn-portrait-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--stone);
}

.sgn-portrait-status.is-available::before {
  background: var(--jade);
}

.sgn-portrait-status.is-reserved::before {
  background: var(--gold);
}

@media (max-width: 1499px) {
  .sgn-portrait--septenary,
  .sgn-portrait--octonary {
    display: none;
  }
}

.sgn-beats {
  position: absolute;
  left: clamp(22px, 3.5vw, 58px);
  bottom: clamp(24px, 4.5vh, 48px);
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  color: var(--stone);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: calc(1 - var(--sgn-stage-out));
}

.sgn-beat {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: color var(--t), opacity var(--t);
  opacity: .52;
}

.sgn-beat::before {
  content: "";
  width: 12px;
  height: 1px;
  background: currentColor;
  transition: width var(--t-fluid), background var(--t);
}

.sgn-beat.is-active {
  color: var(--gold);
  opacity: 1;
}

.sgn-beat.is-active::before {
  width: 30px;
}

html.bp-gallery-next .smart-gallery .gallery-frame {
  position: relative !important;
  top: auto !important;
  display: block !important;
  width: min(1440px, 100%) !important;
  height: auto !important;
  margin: 0 auto;
  padding: clamp(76px, 9vw, 132px) clamp(20px, 4.5vw, 72px) clamp(90px, 11vw, 160px) !important;
  overflow: visible !important;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}

.sgn-catalog-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .62fr);
  align-items: end;
  gap: clamp(28px, 7vw, 110px);
  width: min(1240px, 100%);
  margin: 0 auto clamp(42px, 6vw, 82px);
}

.sgn-catalog-head .label {
  margin-bottom: 1.1rem;
}

.sgn-catalog-head h2 {
  max-width: 13ch;
  font-size: clamp(2.8rem, 6vw, 6.1rem);
  line-height: .94;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.sgn-catalog-head h2 em {
  color: var(--gold);
  font-weight: 400;
}

.sgn-catalog-note {
  align-self: end;
  max-width: 42ch;
  padding: 0 0 .65rem clamp(20px, 2.4vw, 34px);
  border-left: 1px solid color-mix(in srgb, var(--gold) 70%, transparent);
  color: color-mix(in srgb, var(--cream) 68%, var(--slate));
  font-size: clamp(.96rem, 1.25vw, 1.12rem);
  line-height: 1.75;
  text-wrap: pretty;
}

html.bp-gallery-next .sgn-stage > #disp-cards {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(18px, 2.2vw, 30px);
  width: min(1240px, calc(100vw - clamp(100px, 10vw, 180px))) !important;
  margin: 0 !important;
  opacity: var(--sgn-deck-opacity) !important;
  visibility: visible !important;
  transform: translate3d(-50%, calc(-50% + var(--sgn-deck-y)), 0) scale(var(--sgn-deck-scale)) !important;
  transform-origin: center;
  pointer-events: none;
  will-change: transform, opacity;
}

html.bp-gallery-next .sgn-focus-deck .disp-card {
  width: 100%;
  min-width: 0;
  max-width: none;
  border-radius: clamp(28px, 3vw, 42px);
  background: linear-gradient(135deg, rgba(247, 237, 216, .085), rgba(17, 23, 18, .82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 32px 100px rgba(0, 0, 0, .42);
  opacity: 1 !important;
  transform: none !important;
}

@media (min-width: 901px) {
  html.bp-gallery-next .sgn-focus-deck > .disp-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: calc((100% - clamp(18px, 2.2vw, 30px)) / 2);
    justify-self: center;
  }
}

html.bp-gallery-next .gallery-grid {
  display: grid !important;
  grid-auto-flow: dense;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-rows: clamp(190px, 19vw, 278px);
  gap: clamp(12px, 1.4vw, 22px);
  width: min(1280px, 100%) !important;
  margin: 0 auto;
  transform: none !important;
  opacity: 1 !important;
  will-change: auto !important;
  isolation: isolate;
}

html.bp-gallery-next .gallery-grid > .g-tile {
  min-width: 0;
  height: 100%;
  align-self: stretch;
  aspect-ratio: auto;
  overflow: hidden;
  z-index: 0 !important;
  opacity: 0;
  visibility: visible !important;
  transform: translate3d(0, 18px, 0) scale(.985) !important;
  transition:
    opacity .7s cubic-bezier(.22, .61, .36, 1) var(--sgn-delay, 0ms),
    transform .82s cubic-bezier(.22, 1, .36, 1) var(--sgn-delay, 0ms),
    border-color .3s ease,
    box-shadow .45s ease !important;
  will-change: auto !important;
}

html.bp-gallery-next .gallery-grid > .g-tile.sgn-commercial-only {
  display: none !important;
}

html.bp-gallery-next .gallery-grid > .g-tile.sgn-in {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1) !important;
}

html.bp-gallery-next .gallery-grid > .g-tile.g-2x2 {
  grid-column: span 2;
  grid-row: span 2;
}

html.bp-gallery-next .gallery-grid > .g-tile.g-wide {
  grid-column: span 2;
}

html.bp-gallery-next .gallery-grid > .g-tile.g-tall {
  grid-row: span 2;
}

html.bp-gallery-next .gallery-grid .g-tile-inner {
  inset: 0;
  will-change: auto;
}

html.bp-gallery-next .gallery-grid .g-cap {
  background: linear-gradient(180deg, transparent, rgba(5, 7, 6, .88));
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html.bp-gallery-next .gallery-grid .lg-badge {
  background: rgba(5, 7, 6, .86);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html.bp-gallery-next .gallery-grid > .g-tile:hover,
html.bp-gallery-next .gallery-grid > .g-tile:focus-visible {
  transform: translate3d(0, -6px, 0) scale(1.012) !important;
  border-color: color-mix(in srgb, var(--gold) 48%, var(--glass-edge));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 30px 76px rgba(0, 0, 0, .48);
}

html.bp-gallery-next .smart-gallery ~ .breeders {
  margin-top: clamp(32px, 5vw, 82px) !important;
}

body.lbx-open .wa-float,
body.lbx-open .floating-wa {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 760px) {
  html.bp-gallery-next .lbx.lbx--ficha .lbx-stage {
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--gold) 42%, transparent) transparent;
  }

  html.bp-gallery-next .lbx.lbx--ficha .lbx-stage::-webkit-scrollbar {
    width: 5px;
    height: 0;
  }

  html.bp-gallery-next .lbx.lbx--ficha .lbx-stage::-webkit-scrollbar-track {
    background: transparent;
  }

  html.bp-gallery-next .lbx.lbx--ficha .lbx-stage::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in srgb, var(--gold) 42%, transparent);
  }
}

@media (max-width: 1023px) {
  .sgn-intro {
    height: auto;
    min-height: 100svh;
    z-index: 0;
    isolation: isolate;
  }

  .sgn-stage {
    position: relative;
    top: auto;
    display: block;
    height: auto;
    min-height: 100svh;
    overflow: hidden;
    overflow: clip;
    contain: none;
  }

  html.bp-gallery-next .sgn-portrait {
    display: none !important;
  }

  html.bp-gallery-next .sgn-stage #sg-headline {
    position: relative !important;
    min-height: 100svh;
    padding-top: clamp(118px, 16vh, 154px);
    padding-bottom: clamp(112px, 15vh, 148px);
  }

  html.bp-gallery-next .sgn-stage #sg-headline .hero-frame {
    width: min(620px, 84vw);
  }

  html.bp-gallery-next .sgn-stage > #disp-cards {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(920px, calc(100% - 40px)) !important;
    margin: clamp(20px, 4vw, 48px) auto clamp(74px, 10vw, 112px) !important;
    z-index: 1;
    opacity: 1 !important;
    transform: none !important;
    -webkit-transform: none !important;
    pointer-events: auto !important;
    will-change: auto;
  }

  html.bp-gallery-next .sgn-focus-deck .disp-card {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  html.bp-gallery-next .smart-gallery .gallery-frame {
    z-index: 2;
    isolation: isolate;
  }

  .sgn-portrait--primary {
    width: min(40vw, 290px);
    opacity: .23;
    transform: translate3d(-58vw, 18vh, 0) rotate(-5deg) scale(.92);
  }

  .sgn-portrait--secondary {
    width: min(37vw, 270px);
    opacity: .2;
    transform: translate3d(22vw, -34vh, 0) rotate(5deg) scale(.9);
  }

  .sgn-portrait--tertiary,
  .sgn-portrait--quaternary,
  .sgn-portrait--quinary,
  .sgn-portrait--senary,
  .sgn-portrait--septenary,
  .sgn-portrait--octonary,
  .sgn-beats,
  .sgn-stage::after {
    display: none;
  }

  .sgn-catalog-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .sgn-catalog-note {
    max-width: 54ch;
  }

  html.bp-gallery-next .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: clamp(180px, 46vw, 290px);
  }

  html.bp-gallery-next .gallery-grid > .g-tile:not(.sgn-commercial-only) {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  html.sgn-mobile-gallery-ready.bp-gallery-next .gallery-grid > .g-tile:not(.sgn-commercial-only) {
    display: block;
    content-visibility: visible;
  }
}

@media (max-width: 900px) {
  html.bp-gallery-next .sgn-stage > #disp-cards {
    grid-template-columns: 1fr;
    width: min(660px, calc(100% - 36px)) !important;
  }
}

@media (max-width: 600px) {
  .sgn-stage::before {
    background: radial-gradient(ellipse at center, transparent 18%, rgba(5, 7, 6, .54) 88%);
  }

  .sgn-portrait--primary {
    left: 0;
    top: auto;
    bottom: -5vh;
    width: 52vw;
    opacity: .18;
    transform: translate3d(-20vw, 0, 0) rotate(-4deg);
  }

  .sgn-portrait--secondary {
    left: auto;
    right: -15vw;
    top: 10vh;
    width: 48vw;
    opacity: .16;
    transform: rotate(5deg);
  }

  .sgn-portrait-caption {
    display: none;
  }

  html.bp-gallery-next .smart-gallery .gallery-frame {
    padding-inline: 16px !important;
  }

  html.bp-gallery-next .sgn-stage > #disp-cards {
    grid-template-columns: 1fr;
    width: min(560px, calc(100% - 28px)) !important;
  }

  .sgn-catalog-head h2 {
    max-width: 12ch;
    font-size: clamp(2.55rem, 14vw, 4.5rem);
  }

  .sgn-catalog-note {
    padding-left: 18px;
  }

  html.bp-gallery-next .gallery-grid {
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto;
    gap: 14px;
  }

  html.bp-gallery-next .gallery-grid > .g-tile,
  html.bp-gallery-next .gallery-grid > .g-tile.g-2x2,
  html.bp-gallery-next .gallery-grid > .g-tile.g-wide,
  html.bp-gallery-next .gallery-grid > .g-tile.g-tall {
    grid-column: auto;
    grid-row: auto;
    display: block !important;
    width: 100% !important;
    height: min(118vw, 520px) !important;
    min-height: 320px;
    aspect-ratio: auto;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  html.bp-gallery-next .gallery-grid > .g-tile.sgn-commercial-only,
  html.bp-gallery-next .gallery-grid > .g-tile.g-2x2.sgn-commercial-only,
  html.bp-gallery-next .gallery-grid > .g-tile.g-wide.sgn-commercial-only,
  html.bp-gallery-next .gallery-grid > .g-tile.g-tall.sgn-commercial-only {
    display: none !important;
  }

  html.bp-gallery-next .gallery-grid .g-tile-inner {
    position: absolute !important;
    inset: 0 !important;
  }

  html.bp-gallery-next .gallery-grid .g-tile-inner img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sgn-intro {
    height: auto;
    min-height: 100svh;
  }

  .sgn-stage {
    position: relative;
    min-height: 100svh;
  }

  .sgn-portrait {
    will-change: auto;
  }

  html.bp-gallery-next .gallery-grid > .g-tile {
    opacity: 1;
    transform: none !important;
    transition: none !important;
  }
}

html.sgn-static .sgn-intro {
  height: auto;
  min-height: 100svh;
}

html.sgn-static .sgn-stage {
  position: relative;
  top: auto;
  display: block;
  height: auto;
  min-height: 100svh;
  overflow: hidden;
  overflow: clip;
  contain: none;
}

html.sgn-static.bp-gallery-next .sgn-intro {
  z-index: 0;
  isolation: isolate;
}

html.sgn-static.bp-gallery-next .smart-gallery .gallery-frame {
  z-index: 2;
  isolation: isolate;
}

html.sgn-static.bp-gallery-next .sgn-stage #sg-headline {
  position: relative !important;
  min-height: 100svh;
}

html.sgn-static .sgn-portrait {
  will-change: auto;
}

html.sgn-static.bp-gallery-next .sgn-stage > #disp-cards {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: min(1240px, calc(100% - 40px)) !important;
  margin: clamp(20px, 4vw, 48px) auto clamp(74px, 10vw, 112px) !important;
  z-index: 1;
  opacity: 1 !important;
  transform: none !important;
  -webkit-transform: none !important;
  pointer-events: auto !important;
  will-change: auto;
}

html.sgn-static.bp-gallery-next .gallery-grid > .g-tile:not(.sgn-commercial-only) {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

@media (prefers-reduced-transparency: reduce) {
  .sgn-portrait,
  html.bp-gallery-next .sgn-focus-deck .disp-card {
    background: var(--panel);
  }
}
