/* Paleta viva — galería de antigüedades (marfil, latón, vino y madera) */
:root {
  --color-bg: #e8f3e4;
  --color-bg-glow: #c5dfc0;
  --color-surface: #fff9f0;
  --color-surface-soft: #fff3e3;
  --color-media-bg: #edd9b8;
  --color-ink: #3a2214;
  --color-muted: #6f4a32;
  --color-accent: #c17f3a;
  --color-accent-dark: #8b3d28;
  --color-border: #e2b888;
  --color-on-accent: #fffaf3;
  --color-buy: #2d9f50;
  --color-buy-dark: #268a44;
  --color-buy-hover: #34b35c;
  --color-whatsapp: #176329;
  --color-whatsapp-dark: #125222;
  --color-whatsapp-hover: #1a7330;
  --color-info-btn-bg: #ebe0d0;
  --color-info-btn-border: #d4bc98;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-ui: "Source Sans 3", system-ui, sans-serif;
  --shadow-soft: 0 8px 28px rgba(90, 45, 20, 0.12);
  --shadow-warm: 0 4px 16px rgba(139, 61, 40, 0.18);
  --radius: 10px;
  /* Hueco lateral del panel de ficha: flecha (2.5rem) + margen del carrusel + respiro */
  --carousel-edge-clearance: 3.65rem;
  /* Zona de imagen: priorizar altura en el escaparate */
  --product-media-aspect: 4 / 3.05;
  /* Ancho máximo del bloque principal (cabecera + catálogo) */
  --layout-content-max: 1100px;
  --mobile-nav-bar-height: 3.35rem;
  /* Espacio reservado arriba del catálogo (logo integrado en columna izquierda) */
  --catalog-top-space: 0;
}

@media (min-width: 1024px) {
  :root {
    --layout-content-max: 1420px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--color-ink);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(ellipse 120% 85% at 50% -15%, rgba(186, 220, 175, 0.28) 0%, transparent 58%),
    linear-gradient(rgba(240, 248, 236, 0.82), rgba(225, 242, 220, 0.88)),
    url("img/fondo_salon.jpg");
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: center top, center, center;
  background-size: auto, cover, cover;
  background-attachment: scroll, fixed, fixed;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

@media (min-width: 961px) {
  body {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(255, 249, 240, 0.38);
  backdrop-filter: blur(2px);
}

.lang-switcher-wrap {
  flex-shrink: 0;
  width: min(100%, 11.5rem);
  margin: 0;
}

@media (min-width: 961px) {
  .lang-switcher-wrap {
    justify-self: end;
    width: 10.5rem;
  }
}

.lang-switcher {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-ink);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.28rem 1.65rem 0.28rem 0.65rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(58, 34, 20, 0.16);
  width: 100%;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%238b3d28' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lang-switcher:hover {
  border-color: var(--color-accent);
}

.lang-switcher:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.site-logo {
  display: block;
  margin: 0;
  padding: 0;
  background: transparent;
  line-height: 0;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo__img {
  display: block;
  width: auto;
  height: clamp(2.6rem, 5.2dvh, 3.6rem);
  max-width: min(100%, 14rem);
  object-fit: contain;
  object-position: left center;
}

.site-tagline {
  margin: 0;
  min-width: 0;
  font-family: var(--font-display);
  font-size: clamp(0.82rem, 1.5dvh, 0.95rem);
  font-style: italic;
  color: var(--color-muted);
  line-height: 1.2;
}

.catalog-header {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem 1rem;
  padding: 0 0 0.2rem;
  margin-bottom: 0.1rem;
}

@media (max-width: 960px) {
  .catalog-header {
    grid-template-columns: 1fr;
    grid-template-areas: "tagline";
    gap: 0.25rem;
    padding-bottom: 0.3rem;
  }

  .site-tagline {
    grid-area: tagline;
    text-align: center;
    font-size: 0.78rem;
  }
}

.catalog {
  position: relative;
  z-index: 8;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: var(--layout-content-max);
  margin: 0 auto;
  padding: 0.15rem 0.85rem 0.05rem;
}

@media (min-width: 961px) {
  .catalog {
    height: auto;
    min-height: 0;
  }
}

@media (min-width: 1024px) {
  .catalog {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
}

.catalog-intro {
  max-width: 42rem;
  margin: 0 auto 2.5rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 1.05rem;
}

.product-grid {
  display: none;
}

/* Escaparate: pequeño (izq), grande (centro), dos pequeños (der) */
.showcase {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.56fr) minmax(0, 0.68fr);
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas:
    "left center right"
    "footer footer footer";
  column-gap: 0.65rem;
  align-items: stretch;
  position: relative;
  z-index: 1;
  --showcase-side-gap: 0.4rem;
}

.showcase__col {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.showcase__col--left {
  grid-area: left;
  gap: 0;
  justify-content: stretch;
  min-height: 0;
}

.showcase__col--right {
  grid-area: right;
  gap: var(--showcase-side-gap);
  justify-content: stretch;
  min-height: 0;
}

.showcase__slot {
  min-width: 0;
  display: flex;
  position: relative;
  z-index: 2;
  transition: width 0.45s ease, transform 0.45s ease, opacity 0.45s ease;
}

.showcase__slot > .product {
  width: 100%;
  min-height: 0;
}

.showcase__slot[data-slot="left-bottom"],
.showcase__slot[data-slot="right-top"],
.showcase__slot[data-slot="right-bottom"] {
  width: 100%;
  max-width: 100%;
}

.showcase__slot--queue,
.showcase__slot[data-slot="left-top"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

/* Centro: ocupa todo el alto visible */
.showcase__slot--center,
.showcase__slot[data-slot="center"] {
  grid-area: center;
  justify-self: stretch;
  align-self: stretch;
  width: 100%;
  max-width: none;
  margin: 0;
  z-index: 2;
  position: relative;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
}

.showcase__slot[data-slot="center"] > .product {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.showcase__col--left .showcase__slot[data-slot="left-bottom"] {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  margin-top: 0;
  display: flex;
}

.showcase__col--right .showcase__slot {
  flex: 1 1 0;
  height: auto;
  min-height: 0;
  display: flex;
}

.showcase__ring-nav {
  --ring-nav-size: 2.65rem;
  position: absolute;
  top: 50%;
  z-index: 6;
  cursor: pointer;
  width: var(--ring-nav-size);
  height: var(--ring-nav-size);
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 249, 240, 0.94);
  color: var(--color-accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-warm);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.showcase__ring-nav:hover {
  background: var(--color-surface);
  box-shadow: 0 4px 18px rgba(139, 61, 40, 0.22);
}

.showcase__ring-nav:active {
  transform: translateY(-50%) scale(0.96);
}

.showcase__ring-nav:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.showcase__ring-nav--prev {
  left: calc(0px - var(--ring-nav-size) / 2);
  right: auto;
  transform: translateY(-50%);
}

.showcase__ring-nav--next {
  left: calc(100% - var(--ring-nav-size) / 2);
  right: auto;
  transform: translateY(-50%);
}

.showcase.showcase--animating .showcase__ring-nav {
  pointer-events: none;
  opacity: 0.55;
}

.showcase.showcase--animating .showcase__slot > .product {
  position: relative;
  z-index: 4;
}

.showcase.showcase--animating .showcase__slot > .product.product--featured {
  z-index: 5;
}

.showcase.showcase--animating .showcase__slot > .product.product--showcase-enter {
  opacity: 0;
  transition: opacity 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .showcase.showcase--animating .showcase__slot > .product.product--showcase-enter {
    transition-duration: 0.01ms;
  }
}

.showcase__footer {
  grid-area: footer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.12rem 0 0.05rem;
  flex-shrink: 0;
}

.showcase__piece-label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-accent-dark);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.showcase__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.32rem;
}

.showcase__dot {
  width: 0.48rem;
  height: 0.48rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: rgba(255, 249, 240, 0.85);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.showcase__dot:hover {
  transform: scale(1.15);
  border-color: var(--color-accent);
}

.showcase__dot.is-active {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: scale(1.2);
}

.showcase__dot:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.product-pool {
  display: none !important;
}

@media (max-width: 960px) {
  body {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .catalog {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    padding: 0.3rem 0.65rem 0.15rem;
    display: flex;
    flex-direction: column;
  }

  .catalog-header {
    flex-shrink: 0;
    padding-bottom: 0.25rem;
    margin-bottom: 0;
  }

  .site-tagline {
    font-size: 0.78rem;
    line-height: 1.15;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
  }

  .showcase {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    grid-template-rows: none;
    grid-template-areas: none;
    height: auto;
    max-height: none;
    row-gap: 0.28rem;
    column-gap: 0;
  }

  .showcase__col--left,
  .showcase__col--right {
    display: none;
  }

  .showcase__slot[data-slot="center"] {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    grid-area: unset;
  }

  .showcase__footer {
    flex-shrink: 0;
    padding-top: 0.08rem;
  }

  .showcase__ring-nav--prev {
    right: auto;
    left: 0.35rem;
  }

  .showcase__ring-nav--next {
    left: auto;
    right: 0.35rem;
  }

  .site-logo__img {
    height: clamp(2.35rem, 6.5vw, 2.85rem);
    max-width: min(100%, 10rem);
  }

  .site-footer {
    flex-shrink: 0;
    padding: 0.22rem 0.45rem 0.3rem;
    font-size: 0.72rem;
    gap: 0.35rem 0.55rem;
  }

  .site-footer .js-contact,
  .site-footer .btn--whatsapp,
  .site-footer .btn--catalog,
  .site-footer .btn--showcase {
    min-width: 7.5rem;
    padding: 0.36rem 0.65rem;
    font-size: 0.78rem;
  }

  .product--featured {
    flex: 1 1 auto;
    min-height: 0;
  }

  .product--featured .product__media {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.14rem;
  }

  .product--featured .product__body {
    flex: 0 0 auto;
    padding: 0.18rem 0.38rem 0.22rem;
  }

  .product--featured .product__title {
    font-size: 1rem;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product--featured .product__summary {
    -webkit-line-clamp: 1;
    font-size: 0.8rem;
  }

  .product--featured .product__card-price {
    font-size: 1.22rem;
    margin-top: 0.12rem;
  }

  .product--featured .product__row {
    gap: 0.28rem 0.45rem;
    align-items: center;
  }

  .product--featured .product__actions {
    flex-wrap: nowrap;
    gap: 0.35rem;
  }

  .product--featured .product__actions .btn {
    min-width: 0;
    flex: 1 1 0;
    padding: 0.42rem 0.55rem;
    font-size: 0.78rem;
  }

  .product--featured .btn--primary {
    min-width: 0;
    padding: 0.46rem 0.65rem;
    font-size: 0.82rem;
  }

  .product--featured .carousel__btn {
    display: flex;
    width: 2.15rem;
    height: 2.15rem;
  }

  .product--featured .carousel__slide > img,
  .product--featured .carousel__slide .carousel__slide-fg {
    object-fit: contain;
    object-position: center;
  }

  .product--featured .carousel__slide--fill-bg .carousel__slide-fg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .product--featured:hover .carousel__slide.is-active img:not(.carousel__slide-fg),
  .product--featured .carousel__slide--fill-bg.is-active .carousel__slide-fg {
    transform: none;
  }

  .product--featured.product--swipe-dragging {
    transition: none !important;
    will-change: transform;
    z-index: 6;
  }

  .product--featured.product--swipe-exit-left,
  .product--featured.product--swipe-exit-right {
    transition:
      transform 0.26s cubic-bezier(0.4, 0, 0.85, 0.2),
      opacity 0.26s ease;
    pointer-events: none;
  }

  .product--featured.product--swipe-exit-left {
    transform: translateX(-108%) rotate(-7deg);
    opacity: 0.25;
  }

  .product--featured.product--swipe-exit-right {
    transform: translateX(108%) rotate(7deg);
    opacity: 0.25;
  }

  .product--featured.product--swipe-enter {
    transition:
      transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.32s ease;
  }

  .product--featured.product--swipe-enter.enter-from-right {
    transform: translateX(108%) rotate(7deg);
    opacity: 0.45;
  }

  .product--featured.product--swipe-enter.enter-from-left {
    transform: translateX(-108%) rotate(-7deg);
    opacity: 0.45;
  }

  .showcase__slot[data-slot="center"] > .product {
    touch-action: pan-y pinch-zoom;
  }
}

@media (max-width: 960px) and (prefers-reduced-motion: reduce) {
  .product--featured.product--swipe-exit-left,
  .product--featured.product--swipe-exit-right,
  .product--featured.product--swipe-enter {
    transition-duration: 0.01ms;
  }
}

.product--featured {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(90, 45, 20, 0.16);
  border-color: rgba(193, 127, 58, 0.45);
}

.product--featured .product__media {
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: unset;
  height: auto;
}

.product--featured .js-carousel,
.product--featured .carousel__slides {
  height: 100%;
}

.product--featured .product__body {
  flex: 0 0 auto;
  padding: 0.22rem 0.42rem 0.28rem;
}

.product--featured .product__title {
  font-size: 1.08rem;
  line-height: 1.15;
}

.product--featured .product__summary {
  font-size: 0.84rem;
  margin-top: 0.15rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.product--featured .product__card-price {
  font-size: 1.35rem;
  margin-top: 0.18rem;
}

.product--featured .product__row {
  gap: 0.35rem 0.55rem;
}

.product--featured .product__actions .btn {
  padding: 0.38rem 0.72rem;
  font-size: 0.8rem;
  min-width: 8.25rem;
}

.product--featured .btn--primary {
  padding: 0.48rem 0.95rem;
  font-size: 0.86rem;
  min-width: 9.5rem;
}

/* Laterales: mismo tamaño en los cuatro huecos */
.product--side-far,
.product--side-near {
  height: 100%;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}

.showcase__slot > .product.product--side-far:hover,
.showcase__slot > .product.product--side-near:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(90, 45, 20, 0.18);
}

.product--side-far .carousel__btn,
.product--side-near .carousel__btn,
.product--featured .carousel__btn {
  display: none;
}

.product--side-far .product__details.is-open,
.product--side-near .product__details.is-open {
  max-height: 86%;
}

.product--side-far .product__media,
.product--side-near .product__media {
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: unset;
  height: auto;
}

.product--side-far .js-carousel,
.product--side-near .js-carousel,
.product--side-far .carousel__slides,
.product--side-near .carousel__slides {
  height: 100%;
}

.product--side-far .product__summary,
.product--side-near .product__summary {
  font-size: 0.76rem;
  margin-top: 0.12rem;
  display: none;
}

.product--side-far .product__card-price,
.product--side-near .product__card-price {
  font-size: 0.98rem;
  margin-top: 0.15rem;
}

.product--side-far .product__title,
.product--side-near .product__title {
  font-size: 0.98rem;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.product--side-far .product__body,
.product--side-near .product__body {
  flex: 0 0 auto;
  padding: 0.24rem 0.34rem 0.28rem;
}

.product--side-far .product__actions .btn,
.product--side-near .product__actions .btn {
  min-width: 0;
  font-size: 0.78rem;
  padding: 0.4rem 0.52rem;
}

.product--side-far .product__actions,
.product--side-near .product__actions {
  gap: 0.34rem;
}

.product--side-far .product__details-inner,
.product--side-near .product__details-inner {
  padding: 0.5rem 0.58rem 0.68rem;
}

.product--side-far .product__details-title,
.product--side-near .product__details-title {
  font-size: 0.98rem;
}

.product--side-far .product__details-lede,
.product--side-far .product__details-inner p,
.product--side-near .product__details-lede,
.product--side-near .product__details-inner p {
  font-size: 0.77rem;
}

.product--side-far .product__row,
.product--side-near .product__row {
  gap: 0.38rem 0.45rem;
}

@media (max-width: 480px) {
  .product--side-far .product__row,
  .product--side-near .product__row {
    flex-direction: column;
    align-items: stretch;
  }

  .product--side-far .product__actions,
  .product--side-near .product__actions {
    align-self: flex-end;
  }
}

.product {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product__media {
  aspect-ratio: var(--product-media-aspect);
  overflow: hidden;
  background: linear-gradient(155deg, #f3e4cc 0%, var(--color-media-bg) 55%, #e6cfaa 100%);
  position: relative;
  padding: 0.2rem;
  box-shadow: inset 0 0 0 1px rgba(255, 249, 240, 0.65);
}

.product__media .js-carousel {
  height: 100%;
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  border: 1px solid rgba(139, 61, 40, 0.14);
  box-shadow: inset 0 0 28px rgba(58, 34, 20, 0.07);
}

.product__media::after {
  content: none;
}

.carousel__slides::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 0 36px rgba(58, 34, 20, 0.1);
}

/* Carrusel de imágenes */
.js-carousel {
  isolation: isolate;
}

.carousel__slides {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  cursor: pointer;
}

.carousel__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.65s ease, visibility 0.65s step-end;
  z-index: 0;
}

.carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
  transition: opacity 0.65s ease, visibility 0s step-start;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.5s ease;
}

/* Diapositivas contain: fondo difuminado de la misma foto en los márgenes */
.carousel__slide--fill-bg {
  background: var(--color-media-bg);
}

.carousel__slide--fill-bg .carousel__slide-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.carousel__slide--fill-bg .carousel__slide-bg img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%) scale(1.28);
  filter: blur(32px) brightness(0.96) saturate(1.06);
}

.carousel__slide--fill-bg .carousel__slide-fg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.product[data-product-id="1"]:hover .carousel__slide--fill-bg.is-active .carousel__slide-fg,
.product[data-product-id="2"]:hover .carousel__slide--fill-bg.is-active .carousel__slide-fg,
.product[data-product-id="6"]:hover .carousel__slide--fill-bg.is-active .carousel__slide-fg {
  transform: scale(1.02);
}

.product:hover .carousel__slide.is-active img:not(.carousel__slide-fg) {
  transform: scale(1.03);
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 249, 240, 0.92);
  color: var(--color-accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-warm);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.carousel__btn:hover {
  background: var(--color-surface);
  box-shadow: 0 4px 18px rgba(139, 61, 40, 0.22);
}

.carousel__btn:active {
  transform: translateY(-50%) scale(0.96);
}

.carousel__btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.carousel__btn--prev {
  left: 0.5rem;
}

.carousel__btn--next {
  right: 0.5rem;
}

.carousel__btn[hidden] {
  display: none;
}

.carousel__footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.22rem;
  padding: 0.28rem 0.4rem 0.32rem;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(58, 34, 20, 0.42) 100%);
}

.carousel__footer[hidden] {
  display: none;
}

.carousel__counter {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 249, 240, 0.95);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.carousel__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.28rem;
  max-width: 100%;
}

.product--side-far .carousel__dots,
.product--side-near .carousel__dots {
  display: none;
}

.carousel__dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 249, 240, 0.45);
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.carousel__dot.is-active {
  background: #fff9f0;
  transform: scale(1.2);
}

.carousel__icon {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .carousel__slide,
  .carousel__slide.is-active {
    transition-duration: 0.01ms;
  }

  .carousel__slide img {
    transition-duration: 0.01ms;
  }
}

.product__body {
  padding: 0.28rem 0.45rem 0.32rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.product__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.product__text {
  flex: 1;
  min-width: 0;
}

.product__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-accent-dark);
}

.product__summary {
  margin: 0.35rem 0 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.product__card-price {
  margin: 0.4rem 0 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-accent-dark);
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.product--featured .product__card-price {
  font-size: 1.55rem;
}

.product--side-far .product__card-price,
.product--side-near .product__card-price {
  font-size: 1.05rem;
  margin-top: 0.28rem;
}

.product__card-price[hidden] {
  display: none;
}

.product__details-price {
  margin: 0.6rem 0 0;
  font-size: 1.05rem;
  color: var(--color-accent-dark);
}

.product__details-price strong {
  color: var(--color-ink);
}

.modal__price {
  margin: 0.2rem 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-accent-dark);
  letter-spacing: 0.01em;
}

.product__actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  align-self: flex-start;
  margin-left: auto;
}

.product__actions .btn {
  width: 100%;
  min-width: 10.5rem;
  text-align: center;
}

@media (max-width: 480px) {
  .product__row {
    flex-direction: column;
    align-items: stretch;
  }

  .product__actions {
    margin-left: auto;
    align-self: flex-end;
  }
}

.btn {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--color-accent-dark);
  color: var(--color-on-accent);
  border-color: var(--color-accent-dark);
}

.btn--primary:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.btn--primary.js-buy,
.catalog-card .btn--primary {
  background: var(--color-buy);
  color: #fff;
  border-color: var(--color-buy-dark);
}

.btn--primary.js-buy:hover,
.catalog-card .btn--primary:hover {
  background: var(--color-buy-hover);
  border-color: var(--color-buy);
  color: #fff;
}

.btn--secondary {
  background: transparent;
  color: var(--color-accent-dark);
  border-color: var(--color-border);
}

.btn--secondary:hover {
  background: var(--color-surface-soft);
  border-color: var(--color-accent);
}

.product__actions .btn--secondary {
  background: var(--color-info-btn-bg);
  color: var(--color-accent-dark);
  border-color: var(--color-info-btn-border);
  text-decoration: none;
}

.product__actions .btn--secondary:hover {
  background: #f3e8d8;
  border-color: var(--color-accent);
  color: var(--color-accent-dark);
}

/* Panel de ficha: se despliega desde abajo sobre la imagen (sin empujar la pagina) */
.product__details {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.48s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(
    180deg,
    rgba(246, 228, 204, 0.9) 0%,
    rgba(255, 249, 240, 0.97) 28%,
    var(--color-surface) 100%
  );
  backdrop-filter: blur(5px);
  border-top: 1px solid transparent;
  box-shadow: 0 -10px 28px rgba(139, 61, 40, 0.14);
  pointer-events: none;
}

.product__details.is-open {
  max-height: 76%;
  border-top-color: var(--color-border);
  overflow-y: auto;
  overflow-x: hidden;
  pointer-events: auto;
  -webkit-overflow-scrolling: touch;
}

.product__details-inner {
  padding: 0.7rem var(--carousel-edge-clearance) 1rem;
}

.product__details-head {
  margin: 0 0 0.55rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--color-border);
}

.product__details-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-accent-dark);
}

.product__details-lede {
  margin: 0.3rem 0 0;
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.45;
}

.product:has(.product__details.is-open) .product__text {
  visibility: hidden;
  pointer-events: none;
}

.product__details-inner p {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  color: var(--color-muted);
}

.product__details-inner p:last-child {
  margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .product__details {
    transition-duration: 0.01ms;
  }
}

.site-footer {
  text-align: center;
  padding: 0.35rem 1rem 0.45rem;
  font-size: 0.78rem;
  color: var(--color-muted);
  background: transparent;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 0.85rem;
  position: relative;
  z-index: 8;
  flex-shrink: 0;
}

.site-footer__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.site-footer .js-contact,
.site-footer .btn--whatsapp,
.site-footer .btn--catalog,
.site-footer .btn--showcase {
  min-width: 8.5rem;
  padding: 0.42rem 0.85rem;
  font-size: 0.82rem;
}

.btn--whatsapp {
  background: var(--color-whatsapp);
  color: #fff;
  border-color: var(--color-whatsapp-dark);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn--whatsapp:hover {
  background: var(--color-whatsapp-hover);
  border-color: var(--color-whatsapp);
  color: #fff;
}

.btn--catalog {
  background: var(--color-accent);
  color: var(--color-on-accent);
  border-color: #a8682a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn--catalog:hover {
  background: #d4924f;
  border-color: var(--color-accent);
  color: var(--color-on-accent);
}

.btn--showcase {
  background: #5f8a72;
  color: var(--color-on-accent);
  border-color: #4d7260;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn--showcase:hover {
  background: #6f9a82;
  border-color: #5f8a72;
  color: var(--color-on-accent);
}

.site-footer p {
  margin: 0;
}

.modal__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.modal__thumbs[hidden] {
  display: none;
}

.modal__thumb {
  width: 3.25rem;
  height: 2.45rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  cursor: pointer;
  background: var(--color-media-bg);
  opacity: 0.72;
  transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.modal__thumb:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.modal__thumb.is-active {
  opacity: 1;
  border-color: var(--color-accent-dark);
}

.modal__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal__thumb:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(58, 34, 20, 0.58);
  backdrop-filter: blur(2px);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 940px);
  max-height: min(92vh, 860px);
  overflow: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(90, 45, 20, 0.22);
  animation: modal-in 0.28s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: rgba(255, 249, 240, 0.95);
  color: var(--color-ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius);
  z-index: 2;
  transition: background 0.2s;
}

.modal__close:hover {
  background: var(--color-surface-soft);
}

.modal__content {
  padding: 1.85rem 1.65rem 1.65rem;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.88fr);
  gap: 1.35rem 1.75rem;
  align-items: start;
}

.modal__media-col {
  min-width: 0;
}

.modal__text {
  min-width: 0;
  align-self: center;
}

/* Modo contacto: sin imagen, una sola columna y texto antes que los datos */
.modal--contact .modal__content {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.modal--contact .modal__figure {
  display: none;
}

.modal--contact .modal__text {
  order: 1;
  align-self: start;
}

.modal--contact .modal__media-col {
  order: 2;
}

.modal--contact .modal__contact {
  padding-top: 0.25rem;
  border-top: 1px solid var(--color-border);
}

.modal--contact .modal__contact-item {
  margin-top: 0.6rem;
}

.modal__figure {
  position: relative;
  margin: 0 0 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-media-bg);
  aspect-ratio: 4 / 3.05;
  min-height: 16rem;
}

.modal__figure-bg {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.modal__figure-bg-img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%) scale(1.28);
  filter: blur(32px) brightness(0.96) saturate(1.06);
}

.modal__figure--fill-bg .modal__figure-bg {
  display: block;
}

.modal__figure--fill-bg .modal__img {
  position: relative;
  z-index: 1;
  object-fit: contain;
  object-position: center;
}

.modal__figure .carousel__btn {
  z-index: 2;
}

.modal__figure .carousel__btn[hidden] {
  display: none;
}

.modal__img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.modal__heading {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--color-accent-dark);
}

.modal__message {
  margin: 0;
  color: var(--color-muted);
  font-size: 1rem;
}

.modal__contact {
  margin: 0;
}

.modal__contact-item {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--color-ink);
}

.modal__contact-item:last-child {
  margin-bottom: 0;
}

.modal__contact-item a {
  color: var(--color-accent-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal__contact-item a:hover {
  color: var(--color-accent);
}

@media (max-width: 640px) {
  .modal__content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .modal__text {
    align-self: start;
  }
}

body.modal-open {
  overflow: hidden;
}

/* ——— Página de catálogo en grid ——— */
body.catalog-page {
  height: auto;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
}

.catalog-page__header {
  position: relative;
  z-index: 8;
  flex-shrink: 0;
  max-width: var(--layout-content-max);
  width: 100%;
  margin: 0 auto;
  padding: 0.45rem 0.85rem 0.25rem;
}

.catalog-main {
  position: relative;
  z-index: 8;
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--layout-content-max);
  margin: 0 auto;
  padding: 0.15rem 0.85rem 1.75rem;
}

.catalog-main__title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  color: var(--color-accent-dark);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
  gap: 1.1rem;
  align-items: stretch;
}

.catalog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 24.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.catalog-card__media {
  flex: 0 0 auto;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(155deg, #f3e4cc 0%, var(--color-media-bg) 55%, #e6cfaa 100%);
  padding: 0.15rem;
  cursor: pointer;
}

.catalog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid rgba(139, 61, 40, 0.12);
  transition: transform 0.35s ease;
}

.catalog-card__media--contain img {
  object-fit: contain;
  object-position: center;
}

.catalog-card:hover .catalog-card__media img {
  transform: scale(1.03);
}

.catalog-card__media--contain:hover img {
  transform: none;
}

.catalog-card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 0.65rem 0.75rem 0.85rem;
  gap: 0.35rem;
  min-height: 0;
}

.catalog-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-accent-dark);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.catalog-card__summary {
  margin: 0;
  font-size: 0.84rem;
  color: var(--color-muted);
  line-height: 1.4;
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.catalog-card__price {
  margin: 0.1rem 0 0.4rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-accent-dark);
}

.catalog-card .btn {
  width: 100%;
  margin-top: auto;
}


@media (max-width: 719px) {
  .catalog-main {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  .catalog-main__title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .catalog-card {
    min-height: 0;
  }

  .catalog-card__media {
    padding: 0.1rem;
  }

  .catalog-card__body {
    padding: 0.42rem 0.48rem 0.52rem;
    gap: 0.18rem;
  }

  .catalog-card__title {
    font-size: 0.8rem;
    line-height: 1.15;
    -webkit-line-clamp: 2;
  }

  .catalog-card__summary {
    font-size: 0.7rem;
    line-height: 1.3;
    -webkit-line-clamp: 2;
  }

  .catalog-card__price {
    font-size: 0.88rem;
    margin: 0.05rem 0 0.25rem;
  }

  .catalog-card .btn {
    font-size: 0.72rem;
    padding: 0.36rem 0.4rem;
  }
}

@media (min-width: 720px) {
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 1.25rem;
  }

  .catalog-card {
    min-height: 26rem;
  }
}

@media (max-width: 960px) {
  .catalog-page__header {
    padding-bottom: 0.35rem;
  }

  .catalog-main {
    padding-bottom: 1.25rem;
  }

  body.catalog-page.catalog-has-more::after {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6rem;
    pointer-events: none;
    z-index: 11;
    background: linear-gradient(
      to top,
      rgba(232, 243, 228, 0.94) 0%,
      rgba(232, 243, 228, 0.72) 38%,
      rgba(232, 243, 228, 0.2) 72%,
      transparent 100%
    );
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    mask-image: linear-gradient(to top, #000 0%, #000 42%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, #000 0%, #000 42%, transparent 100%);
    transition: opacity 0.35s ease;
  }

  body.catalog-page.modal-open.catalog-has-more::after {
    opacity: 0;
  }
}

/* Barra de navegación móvil */
.mobile-nav {
  display: none;
}

@media (max-width: 960px) {
  .mobile-nav {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 24;
  }

  body {
    padding-top: var(--mobile-nav-bar-height);
  }

  .mobile-nav__bar {
    min-height: var(--mobile-nav-bar-height);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.35rem 0.45rem;
    padding: 0.2rem 0.5rem;
    background: rgba(255, 249, 240, 0.97);
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(90, 45, 20, 0.08);
  }

  .mobile-nav__brand {
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .mobile-nav__brand .site-logo {
    margin: 0;
    line-height: 0;
  }

  .mobile-nav__brand .site-logo__img {
    height: 2.35rem;
    max-width: min(100%, 9.5rem);
    object-position: center;
  }

  .mobile-nav__lang {
    width: 6.85rem;
    flex-shrink: 0;
  }

  .mobile-nav__lang .lang-switcher-wrap {
    width: 100%;
    margin: 0;
  }

  .mobile-nav__lang .lang-switcher {
    width: 100%;
    font-size: 0.72rem;
    padding: 0.24rem 1.35rem 0.24rem 0.48rem;
  }

  .mobile-nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-accent-dark);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
  }

  .mobile-nav__toggle:hover {
    border-color: var(--color-accent);
    background: var(--color-surface-soft);
  }

  .mobile-nav__icon {
    display: block;
  }

  .mobile-nav__icon--close {
    display: none;
  }

  .mobile-nav--open .mobile-nav__icon--menu {
    display: none;
  }

  .mobile-nav--open .mobile-nav__icon--close {
    display: block;
  }

  .mobile-nav__panel {
    background: rgba(255, 249, 240, 0.98);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 22px rgba(90, 45, 20, 0.12);
  }

  .mobile-nav__actions {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.55rem 0.65rem 0.65rem;
  }

  .mobile-nav__actions .btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
    padding: 0.48rem 0.85rem;
    font-size: 0.82rem;
  }

  .site-footer__actions {
    display: none;
  }
}
