body.lp-product-detail-page {
  overflow-x: hidden;
  color: var(--lp-text, #163642);
  background: var(--lp-surface, #ffffff);
}

body.lp-product-detail-page .lp-product-detail {
  position: relative;
  width: 100%;
  padding: 28px 0 0;
}

body.lp-product-detail-page .lp-product-detail__section {
  padding: 0 0 54px;
}

body.lp-product-detail-page .lp-product-detail__container {
  width: 100%;
  max-width: 1180px;
  padding-right: 16px;
  padding-left: 16px;
  margin-right: auto;
  margin-left: auto;
}

body.lp-product-detail-page .lp-product-detail__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  width: 100%;
}

body.lp-product-detail-page .lp-product-gallery {
  position: relative;
  z-index: 91;
  width: 100%;
  max-width: 560px;
  min-width: 0;
  margin: 0 auto;
  background: var(--lp-surface, #ffffff);
}

body.lp-product-detail-page .lp-product-gallery__viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--lp-image-surface, #f2f2f0);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

body.lp-product-detail-page .lp-product-gallery__viewport::before {
  display: block;
  padding-top: 133.3333%;
  content: "";
}

body.lp-product-detail-page .lp-product-gallery__viewport:focus-visible {
  outline: 3px solid var(--lp-turquoise, #00bba7);
  outline-offset: 3px;
}

body.lp-product-detail-page .lp-product-gallery__track {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform 280ms ease;
  will-change: transform;
}

body.lp-product-detail-page .lp-product-gallery__slide {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  min-width: 100%;
  flex: 0 0 100%;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--lp-image-surface, #f2f2f0);
}

body.lp-product-detail-page .lp-product-gallery__image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--lp-image-surface, #f2f2f0);
  color: transparent;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
}

body.lp-product-detail-page .lp-product-gallery__slide.is-image-missing .lp-product-gallery__image {
  opacity: 0;
}

body.lp-product-detail-page .lp-product-gallery__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  color: var(--lp-muted, #70777b);
  font-family: Montserrat-Regular, "Montserrat", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

body.lp-product-detail-page .lp-product-gallery__arrow {
  position: absolute;
  z-index: 6;
  top: 50%;
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--lp-navy, #00384f);
  cursor: pointer;
  filter: none;
  font-size: 38px;
  line-height: 1;
  text-shadow: none;
  transform: translateY(-50%);
  transition: color 160ms ease;
}

body.lp-product-detail-page .lp-product-gallery__arrow--prev {
  left: 12px;
}

body.lp-product-detail-page .lp-product-gallery__arrow--next {
  right: 12px;
}

body.lp-product-detail-page .lp-product-gallery__arrow:hover,
body.lp-product-detail-page .lp-product-gallery__arrow:focus-visible {
  color: var(--lp-navy, #00384f);
  background: transparent;
  box-shadow: none;
  filter: none;
  opacity: 1;
  text-shadow: none;
}

body.lp-product-detail-page .lp-product-gallery__arrow:focus-visible {
  outline: 3px solid var(--lp-yellow, #f1e517);
  outline-offset: 2px;
}

body.lp-product-detail-page .lp-product-gallery__indicators {
  display: flex;
  width: max-content;
  max-width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 2px 0 0;
  margin: 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

body.lp-product-detail-page .lp-product-gallery__indicators::-webkit-scrollbar {
  display: none;
}

body.lp-product-detail-page .lp-product-gallery__indicator {
  position: relative;
  display: inline-flex;
  width: 30px;
  min-width: 30px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

body.lp-product-detail-page .lp-product-gallery__indicator::before {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(0, 56, 79, 0.65);
  border-radius: 50%;
  background: #ffffff;
  content: "";
  transition: background-color 160ms ease, transform 160ms ease;
}

body.lp-product-detail-page .lp-product-gallery__indicator[aria-current="true"]::before {
  background: var(--lp-navy, #00384f);
  transform: scale(1.3);
}

body.lp-product-detail-page .lp-product-gallery__indicator:focus-visible {
  outline: 2px solid var(--lp-turquoise, #00bba7);
  outline-offset: -5px;
}

body.lp-product-detail-page .lp-product-detail__info {
  position: relative;
  z-index: 91;
  min-width: 0;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  background: var(--lp-surface, #ffffff);
}

body.lp-product-detail-page .lp-product-detail__title {
  margin: 0 0 22px;
  color: var(--lp-navy, #00384f);
  font-family: Montserrat-Regular, "Montserrat", Arial, sans-serif;
  font-size: clamp(25px, 7vw, 34px);
  font-weight: 400;
  line-height: 1.15;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

body.lp-product-detail-page .lp-product-detail__meta {
  display: grid;
  gap: 9px;
  padding: 0 0 20px;
  margin: 0;
  border-bottom: 1px solid var(--lp-border, #e4e8e9);
}

body.lp-product-detail-page .lp-product-detail__meta-row {
  display: grid;
  grid-template-columns: minmax(86px, 0.34fr) minmax(0, 0.66fr);
  gap: 10px;
  align-items: start;
  margin: 0;
}

body.lp-product-detail-page .lp-product-detail__meta-row--season {
  display: none;
}

body.lp-product-detail-page .lp-product-detail__meta-term,
body.lp-product-detail-page .lp-product-detail__meta-value {
  min-width: 0;
  margin: 0;
  color: var(--lp-navy, #00384f);
  font-family: Montserrat-Regular, "Montserrat", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

body.lp-product-detail-page .lp-product-detail__meta-term {
  font-family: Montserrat-Bold, "Montserrat", Arial, sans-serif;
  font-weight: 700;
}

body.lp-product-detail-page .lp-product-detail__meta-value > a:not(.tag) {
  display: inline;
  margin-right: 7px;
  color: var(--lp-navy, #00384f);
  text-decoration: none;
}

body.lp-product-detail-page .lp-product-detail__meta-value > a:not(.tag):hover,
body.lp-product-detail-page .lp-product-detail__meta-value > a:not(.tag):focus-visible {
  color: var(--lp-turquoise, #00bba7);
  text-decoration: underline;
}

body.lp-product-detail-page .lp-product-detail__meta-value .tag {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 3px 6px;
  margin: 0;
  line-height: 1.15;
  vertical-align: top;
}

body.lp-product-detail-page .lp-product-detail__meta-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 5px;
}

body.lp-product-detail-page .lp-product-detail__price {
  position: relative;
  z-index: 91;
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px 16px;
  padding: 24px 0 18px;
  background: var(--lp-surface, #ffffff);
}

body.lp-product-detail-page .lp-product-detail__price-old {
  color: var(--lp-muted, #70777b);
  font-family: Montserrat-Regular, "Montserrat", Arial, sans-serif;
  font-size: clamp(29px, 8vw, 38px);
  font-weight: 400;
  line-height: 1.08;
  white-space: nowrap;
}

body.lp-product-detail-page .lp-product-detail__price-final {
  color: var(--lp-navy, #00384f);
  font-family: Montserrat-Bold, "Montserrat", Arial, sans-serif;
  font-size: clamp(29px, 8vw, 38px);
  font-weight: 700;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

body.lp-product-detail-page .lp-product-detail__offer-note {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  align-self: center;
  justify-content: center;
  padding: 5px 8px;
  margin-left: 2px;
  border-radius: 4px;
  background: #c62828;
  color: #ffffff;
  font-family: Montserrat-Bold, "Montserrat", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

body.lp-product-detail-page .lp-product-detail__availability {
  position: relative;
  z-index: 91;
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  background: var(--lp-navy, #00384f);
  color: #ffffff;
  font-family: "Oswald", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

body.lp-product-detail-page .lp-product-detail__actions {
  position: relative;
  z-index: 91;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  width: 100%;
  background: var(--lp-surface, #ffffff);
}

body.lp-product-detail-page .lp-product-detail__action {
  display: inline-flex !important;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  margin: 0 !important;
  border-radius: 2px;
  font-size: 15px;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

body.lp-product-detail-page .lp-product-detail__action[style*="display: none"] {
  display: none !important;
}

body.lp-product-detail-page .lp-product-detail__action:focus-visible {
  outline: 3px solid var(--lp-yellow, #f1e517);
  outline-offset: 3px;
}

body.lp-product-detail-page .lp-product-detail__description {
  max-width: 66ch;
  padding: 0 0 22px;
  color: #46575e;
  font-family: Montserrat-Regular, "Montserrat", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.75;
}

body.lp-product-detail-page .lp-product-detail__description p {
  padding: 0;
  margin: 0;
  border: 0;
  white-space: pre-line;
}

body.lp-product-detail-page .lp-product-detail__whatsapp {
  padding: 22px 0 0;
  margin-top: 24px;
  border-top: 1px solid var(--lp-border, #e4e8e9);
}

body.lp-product-detail-page .lp-product-detail__whatsapp-copy {
  max-width: 38ch;
  margin: 0 0 8px;
  color: #2a2a2a;
  font-family: "Oswald", Arial, sans-serif;
  font-size: 20px;
  line-height: 1.25;
}

body.lp-product-detail-page .lp-product-detail__whatsapp .whatsapp {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  font-family: "Oswald", Arial, sans-serif;
  font-size: 21px;
  line-height: 1;
}

body.lp-product-detail-page .lp-product-related {
  padding: 0 0 62px;
}

body.lp-product-detail-page .lp-product-related__heading {
  margin: 0 0 24px;
  color: var(--lp-navy, #00384f);
  font-family: "Oswald", Arial, sans-serif;
  font-size: clamp(28px, 7vw, 40px);
  font-weight: 400;
  line-height: 1.1;
}

body.lp-product-detail-page .lp-product-related .lp-product-grid--related {
  margin-top: 0;
}

body.lp-product-detail-page .lp-whatsapp-float.float {
  position: fixed !important;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 120;
  overflow: visible;
  transform: none;
  pointer-events: auto;
}

@media (min-width: 600px) {
  body.lp-product-detail-page .lp-product-detail {
    padding-top: 34px;
  }

  body.lp-product-detail-page .lp-product-detail__container {
    padding-right: 24px;
    padding-left: 24px;
  }

  body.lp-product-detail-page .lp-product-detail__layout {
    gap: 34px;
  }

  body.lp-product-detail-page .lp-product-detail__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  body.lp-product-detail-page .lp-product-detail__section {
    padding-bottom: 66px;
  }

  body.lp-product-detail-page .lp-product-gallery {
    max-width: 560px;
  }

  body.lp-product-detail-page .lp-product-detail__title {
    font-size: 34px;
  }

  body.lp-product-detail-page .lp-product-detail__meta-row {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  body.lp-product-detail-page .lp-product-related {
    padding-bottom: 74px;
  }
}

@media (min-width: 992px) {
  body.lp-product-detail-page .lp-product-detail {
    padding-top: 26px;
  }

  /* Solo el contenedor de la seccion principal del detalle.
     El de Productos Relacionados (detalle.php:585) reutiliza la misma clase y
     NO debe estrecharse: conserva su max-width generico. */
  body.lp-product-detail-page .lp-product-detail__section .lp-product-detail__container {
    max-width: 1040px;
  }

  /* Galeria desktop adaptativa a la altura disponible del viewport.
     Reserva de 160px = 80px de .header_content (styles/main_styles.css:397)
     + ~67px de #submenuSection (ambos sticky desde 1200px) + ~13px de holgura.
     El factor 0.75 es el inverso exacto de padding-top: 133.3333% (3/4): al
     limitar solo el ANCHO, la altura la sigue derivando el mecanismo 3:4
     existente, que no se toca.
     La expresion se escribe literal y NO a traves de var(): un clamp() no
     soportado se descarta en tiempo de parseo y gana la declaracion estatica
     inmediatamente anterior. Con var() fallaria en tiempo de valor computado y
     max-width caeria a "none". */
  body.lp-product-detail-page .lp-product-detail__layout {
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    grid-template-columns: clamp(300px, calc((100vh - 160px) * 0.75), 420px) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }

  body.lp-product-detail-page .lp-product-gallery {
    max-width: 420px;
    max-width: clamp(300px, calc((100vh - 160px) * 0.75), 420px);
    margin: 0;
  }

  body.lp-product-detail-page .lp-product-gallery__arrow {
    width: 40px;
    height: 40px;
    font-size: 30px;
  }

  body.lp-product-detail-page .lp-product-detail__info {
    max-width: none;
    margin: 0;
  }

  body.lp-product-detail-page .lp-product-detail__title {
    margin-bottom: 15px;
    font-size: 26px;
    line-height: 1.2;
  }

  body.lp-product-detail-page .lp-product-detail__meta {
    gap: 6px;
    padding-bottom: 15px;
  }

  body.lp-product-detail-page .lp-product-detail__meta-row {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 9px;
  }

  body.lp-product-detail-page .lp-product-detail__meta-term,
  body.lp-product-detail-page .lp-product-detail__meta-value {
    font-size: 13px;
    line-height: 1.4;
  }

  body.lp-product-detail-page .lp-product-detail__meta-value .tag {
    min-height: 20px;
    padding: 2px 6px;
    font-size: 12px;
  }

  body.lp-product-detail-page .lp-product-detail__price {
    padding: 16px 0 12px;
  }

  body.lp-product-detail-page .lp-product-detail__price-old,
  body.lp-product-detail-page .lp-product-detail__price-final {
    font-size: 28px;
  }

  body.lp-product-detail-page .lp-product-detail__offer-note {
    min-height: 22px;
    padding: 4px 7px;
    font-size: 11px;
  }

  body.lp-product-detail-page .lp-product-detail__description {
    padding-bottom: 16px;
    font-size: 14px;
    line-height: 1.65;
  }

  body.lp-product-detail-page .lp-product-detail__actions {
    gap: 10px;
  }

  body.lp-product-detail-page .lp-product-detail__action {
    min-height: 42px;
    padding: 9px 14px;
    font-size: 14px;
  }

  body.lp-product-detail-page .lp-product-detail__availability {
    min-height: 42px;
    padding: 10px 18px;
    font-size: 15px;
  }

  body.lp-product-detail-page .lp-product-detail__whatsapp {
    padding-top: 16px;
    margin-top: 18px;
  }

  body.lp-product-detail-page .lp-product-detail__whatsapp-copy {
    font-size: 16px;
    line-height: 1.3;
  }

  body.lp-product-detail-page .lp-product-detail__whatsapp .whatsapp {
    font-size: 17px;
  }

  body.lp-product-detail-page .lp-product-detail__section {
    padding-bottom: 44px;
  }

  body.lp-product-detail-page .lp-product-related {
    padding-bottom: 52px;
  }

  body.lp-product-detail-page .lp-product-related__heading {
    margin-bottom: 18px;
    font-size: 30px;
  }
}

@media (min-width: 1200px) {
  /* Sin cambios: este contenedor lo sigue usando Productos Relacionados. */
  body.lp-product-detail-page .lp-product-detail__container {
    max-width: 1240px;
    padding-right: 28px;
    padding-left: 28px;
  }

  /* Mas especifico (0,3,1): solo la seccion principal del detalle se estrecha. */
  body.lp-product-detail-page .lp-product-detail__section .lp-product-detail__container {
    max-width: 1040px;
  }

  body.lp-product-detail-page .lp-product-detail__layout {
    gap: 40px;
  }

  body.lp-product-detail-page .lp-product-detail__title {
    font-size: 26px;
  }
}

@media (max-width: 599.98px) {
  body.lp-product-detail-page .lp-product-gallery__arrow {
    width: 44px;
    height: 44px;
    font-size: 34px;
  }

  body.lp-product-detail-page .lp-product-detail__price-old,
  body.lp-product-detail-page .lp-product-detail__price-final {
    font-size: clamp(28px, 7.5vw, 34px);
    line-height: 1.08;
  }

  body.lp-product-detail-page .lp-product-gallery__arrow--prev {
    left: 8px;
  }

  body.lp-product-detail-page .lp-product-gallery__arrow--next {
    right: 8px;
  }

  body.lp-product-detail-page .lp-product-detail__meta-value {
    overflow-wrap: anywhere;
  }

  body.lp-product-detail-page .lp-product-detail__whatsapp {
    margin-top: 20px;
  }
}

@media (max-width: 359.98px) {
  body.lp-product-detail-page .lp-product-detail {
    padding-top: 22px;
  }

  body.lp-product-detail-page .lp-product-detail__container {
    padding-right: 12px;
    padding-left: 12px;
  }

  body.lp-product-detail-page .lp-product-detail__layout {
    gap: 22px;
  }

  body.lp-product-detail-page .lp-product-detail__title {
    margin-bottom: 18px;
    font-size: 24px;
  }

  body.lp-product-detail-page .lp-product-detail__meta-row {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 7px;
  }

  body.lp-product-detail-page .lp-product-detail__meta-term,
  body.lp-product-detail-page .lp-product-detail__meta-value {
    font-size: 13px;
  }

  body.lp-product-detail-page .lp-product-detail__price-final {
    font-size: 28px;
  }

  body.lp-product-detail-page .lp-product-detail__offer-note {
    min-height: 24px;
    padding: 4px 7px;
    font-size: 11px;
  }

  body.lp-product-detail-page .lp-product-detail__action {
    padding-right: 9px;
    padding-left: 9px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.lp-product-detail-page .lp-product-gallery__track,
  body.lp-product-detail-page .lp-product-gallery__arrow,
  body.lp-product-detail-page .lp-product-gallery__indicator::before {
    transition: none !important;
  }
}
