/* C · Box. La banda depende de las filas de la grilla, nunca de una altura medida por JS. */
body.single-product {
  --mm-box-ink: #0a0b09;
  --mm-box-surface: #14160f;
  --mm-box-soft: #c8cbc1;
  --mm-box-line: #30332a;
  --mm-box-control-line: #6f7367;
}

body.single-product :is(.storefront-breadcrumb, .woocommerce-notices-wrapper, .col-full > .woocommerce:has(> :is(.woocommerce-message, .woocommerce-info, .woocommerce-error)), .summary, .woocommerce-product-gallery, .storefront-sticky-add-to-cart, .mm-product-purchase-bar) {
  --mm-enlace: #fff;
  --mm-accion-fondo: var(--mm-lime);
  --mm-accion-texto: var(--mm-box-ink);
  --mm-accion-borde: var(--mm-lime);
  --mm-accion-hover-fondo: var(--mm-yellow);
  --mm-accion-hover-texto: var(--mm-box-ink);
  --mm-accion-hover-borde: var(--mm-yellow);
  --mm-secundario-fondo: transparent;
  --mm-secundario-texto: #fff;
  --mm-secundario-borde: var(--mm-box-control-line);
  --mm-deshabilitado-fondo: #34372e;
  --mm-deshabilitado-texto: #d4d6cd;
  --mm-deshabilitado-borde: var(--mm-box-control-line);
  --mm-focus-color: #fff;
  --mm-focus: 0 0 0 2px #0a0b09, 0 0 0 5px #fff;
}

body.single-product .site-header {
  margin-bottom: 0;
}

body.single-product .storefront-breadcrumb {
  margin: 0;
  padding-block: 14px;
  background: var(--mm-box-ink);
}

body.single-product .storefront-breadcrumb .woocommerce-breadcrumb,
body.single-product .storefront-breadcrumb .woocommerce-breadcrumb a {
  color: var(--mm-box-soft);
}

/* Los avisos quedan sobre el mismo oscuro entre las migas y el producto. */
body.single-product :is(.woocommerce-notices-wrapper, .col-full > .woocommerce:has(> :is(.woocommerce-message, .woocommerce-info, .woocommerce-error))) {
  position: relative;
  margin: 0;
  padding-block: 0 16px;
  background: var(--mm-box-ink);
  box-shadow: 0 0 0 100vmax var(--mm-box-ink);
  clip-path: inset(0 -100vmax);
}

body.single-product .woocommerce-notices-wrapper:empty {
  display: none;
}

body.single-product :is(.woocommerce-notices-wrapper, .col-full > .woocommerce:has(> :is(.woocommerce-message, .woocommerce-info, .woocommerce-error))) :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) {
  margin-block: 0;
  border: 1px solid var(--mm-box-control-line);
  background: var(--mm-box-surface);
  color: #fff;
}

body.single-product :is(.woocommerce-notices-wrapper, .col-full > .woocommerce:has(> :is(.woocommerce-message, .woocommerce-info, .woocommerce-error))) a:not(.button) {
  color: #fff;
  text-decoration: underline;
}

body.single-product :is(.woocommerce-notices-wrapper, .col-full > .woocommerce:has(> :is(.woocommerce-message, .woocommerce-info, .woocommerce-error))) .button {
  background: var(--mm-accion-fondo);
  color: var(--mm-accion-texto);
}

/* El aviso toma el foco al volver de agregar; es un contenedor, no un control: sin recuadro del navegador. */
body.single-product :is(.woocommerce-notices-wrapper, .col-full > .woocommerce:has(> :is(.woocommerce-message, .woocommerce-info, .woocommerce-error))) :is(.woocommerce-message, .woocommerce-info, .woocommerce-error):is(:focus, :focus-visible) {
  outline: 0;
  box-shadow: none;
}

body.single-product :is(.woocommerce-notices-wrapper, .col-full > .woocommerce:has(> :is(.woocommerce-message, .woocommerce-info, .woocommerce-error))) .woocommerce-message .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-block-start: -10px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
}

@media (max-width: 700px) {
  body.single-product :is(.woocommerce-notices-wrapper, .col-full > .woocommerce:has(> :is(.woocommerce-message, .woocommerce-info, .woocommerce-error))) .woocommerce-message .button {
    float: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-block-start: 12px;
    padding-inline: 16px;
    border-radius: 8px;
  }
}

body.storefront-full-width-content.single-product div.product,
body.single-product div.product {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-rows: [box-start] auto [box-end];
  column-gap: clamp(28px, 4vw, 64px);
  align-items: start;
  margin: 0;
  overflow: visible;
}

/* Reemplaza el clearfix de Storefront por un hijo real de la primera fila.
   La sombra no ocupa ancho; el clip la limita a la altura de esa fila. */
body.single-product div.product::before {
  content: "";
  display: block;
  grid-column: 1 / -1;
  grid-row: box-start / box-end;
  align-self: stretch;
  z-index: 0;
  background: var(--mm-box-ink);
  box-shadow: 0 0 0 100vmax var(--mm-box-ink);
  clip-path: inset(0 -100vmax);
  pointer-events: none;
}

body.single-product div.product::after {
  display: none;
}

/* El body suma peso al selector de ancho completo de Storefront (0,4,1).
   Las alternativas sin esa clase conservan la misma grilla. */
body.storefront-full-width-content.single-product div.product .woocommerce-product-gallery,
body.storefront-full-width-content.single-product div.product .images,
body.single-product div.product .woocommerce-product-gallery,
body.single-product div.product .images {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  z-index: 1;
  float: none;
  width: 100%;
  min-width: 0;
  margin: 6px 0 40px;
  border-radius: var(--mm-radius-md);
  background: var(--mm-box-surface);
}

body.single-product div.product .woocommerce-product-gallery.mm-foto-clara {
  --mm-focus-color: #050505;
  --mm-focus: 0 0 0 2px #fff, 0 0 0 5px #050505;
  background: #fff;
}

/* La plancha centra la foto sin cambiar wrappers ni alturas de Flexslider. */
body.single-product div.product .woocommerce-product-gallery.mm-foto-clara:not(:has(.flex-viewport)) {
  display: grid;
  place-items: center;
}

body.single-product div.product .woocommerce-product-gallery.mm-foto-clara:not(:has(.flex-viewport)) .woocommerce-product-gallery__wrapper {
  width: 100%;
  margin: 0;
}

@media (min-width: 811px) {
  body.single-product div.product .woocommerce-product-gallery.mm-foto-clara:not(:has(.flex-viewport)) {
    min-height: 420px;
  }
}

/* Flexslider conserva wrapper, transform, ancho y alto calculados. El zoom conserva .zoomImg. */
body.single-product .woocommerce-product-gallery__image :where(a) {
  display: block;
}

/* El viewport de Flexslider recorta una sombra exterior: el foco de la foto va por dentro. */
body.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__image a:focus-visible {
  outline: 3px solid var(--mm-focus-color);
  outline-offset: -5px;
  box-shadow: none;
}

body.single-product div.product .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__image img:not(.zoomImg) {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 720px;
  margin-inline: auto;
  object-fit: contain;
}

body.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__image img.wp-post-image {
  margin-inline: auto;
}

body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs {
  margin: 0;
  padding: 12px;
}

body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs img {
  min-height: var(--mm-tactil);
  border-radius: var(--mm-radius-sm);
}

body.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__trigger {
  --mm-focus: 0 0 0 2px #fff, 0 0 0 5px #050505;
  display: grid;
  width: var(--mm-tactil);
  height: var(--mm-tactil);
  place-items: center;
  top: 12px;
  right: 12px;
  border-radius: var(--mm-radius-sm);
  background: rgba(255, 255, 255, 0.92);
  color: var(--mm-box-ink);
}

body.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__trigger::before {
  line-height: 1;
}

body.storefront-full-width-content.single-product div.product > .summary,
body.single-product div.product > .summary {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  z-index: 1;
  float: none;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 6px 0 40px;
  color: #fff;
}

body.single-product div.product .summary .product_title {
  margin: 0 0 18px;
  color: #fff;
  font-family: var(--mm-font-display);
  font-size: var(--mm-titulo-1);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.04;
}

body.single-product div.product .summary .price {
  margin: 0 0 14px;
  color: var(--mm-lime);
  font-family: var(--mm-font-display);
  font-size: clamp(38px, 4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

body.single-product div.product .summary .price :where(span, bdi, ins, del, small) {
  color: inherit;
  font: inherit;
}

body.single-product div.product.outofstock .summary .price {
  color: var(--mm-box-soft);
  font-size: var(--mm-titulo-2);
}

body.single-product .summary .woocommerce-product-details__short-description {
  margin: 0 0 14px;
  color: var(--mm-box-soft);
  font-size: 16px;
  line-height: 1.5;
}

body.single-product .summary .woocommerce-product-details__short-description :where(p) {
  margin: 0;
}

body.single-product .summary a:not(.button) {
  color: var(--mm-enlace);
  text-underline-offset: 3px;
}

body.single-product div.product .summary p.stock {
  margin: 0 0 18px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

body.single-product div.product .summary p.stock::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--mm-lime);
  vertical-align: 1px;
}

body.single-product div.product .summary p.stock.out-of-stock::before {
  background: #8a8e82;
}

body.single-product div.product .summary form.cart,
body.single-product .summary .woocommerce-variation-add-to-cart {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
}

body.single-product div.product .summary form.variations_form {
  display: block;
}

body.single-product div.product .summary form.cart::before,
body.single-product div.product .summary form.cart::after,
body.single-product div.product .summary .woocommerce-variation-add-to-cart::before,
body.single-product div.product .summary .woocommerce-variation-add-to-cart::after {
  display: none;
}

body.single-product div.product fieldset,
body.single-product div.product fieldset legend {
  background: transparent;
}

body.single-product .summary .variations :where(th, td) {
  background: transparent;
  color: #fff;
}

body.single-product div.product .summary form.cart .quantity {
  float: none;
  margin: 0;
}

body.single-product .summary .quantity:has(input[type="hidden"]) {
  display: none;
}

body.single-product .summary .quantity input.qty,
body.single-product .summary .variations select {
  min-height: 52px;
  border: 1px solid var(--mm-box-control-line);
  border-radius: var(--mm-radius-sm);
  background: var(--mm-box-surface);
  color: #fff;
}

body.single-product .summary .quantity input.qty {
  width: 68px;
  margin: 0;
  padding-inline: 6px;
  text-align: center;
}

body.single-product div.product .summary button.single_add_to_cart_button {
  flex: 1 1 200px;
  float: none;
  width: auto;
  min-height: 52px;
  margin: 0;
  border: 1px solid var(--mm-accion-borde);
  border-radius: var(--mm-radius-sm);
  background: var(--mm-accion-fondo);
  color: var(--mm-accion-texto);
  font-weight: 800;
  opacity: 1;
}

body.single-product div.product .summary button.single_add_to_cart_button:hover {
  border-color: var(--mm-accion-hover-borde);
  background: var(--mm-accion-hover-fondo);
  color: var(--mm-accion-hover-texto);
}

/* Compiten button.disabled de Storefront y los estados de WooCommerce:
   .woocommerce button.button.disabled, .woocommerce button.button:disabled
   y .woocommerce button.button:disabled[disabled]. El estado conserva contraste. */
body.single-product div.product .summary button.single_add_to_cart_button:is(:disabled, [disabled], .disabled, [aria-disabled="true"]),
body.single-product .summary .mm-installation-summary__submit:is(:disabled, [aria-disabled="true"]),
body.single-product .mm-product-purchase-bar .button:is(:disabled, [aria-disabled="true"]) {
  border-color: var(--mm-deshabilitado-borde);
  background: var(--mm-deshabilitado-fondo);
  color: var(--mm-deshabilitado-texto);
  /* Storefront impone opacidad .5 con !important a los botones deshabilitados. */
  opacity: 1 !important;
}

body.single-product .summary .mm-variant-selector__group {
  --mm-variant-ink: #fff;
  --mm-variant-surface: var(--mm-box-surface);
  --mm-variant-muted: var(--mm-box-soft);
  --mm-variant-border: var(--mm-box-control-line);
  --mm-variant-accent: var(--mm-lime);
  --mm-variant-check-text: var(--mm-box-ink);
  --mm-variant-selected-surface: var(--mm-lime);
  --mm-variant-selected-text: var(--mm-box-ink);
}

body.single-product .summary .mm-variant-selector__group > .mm-variant-selector__option {
  min-height: 48px;
  border-radius: var(--mm-radius-sm);
}

body.single-product .summary .mm-variant-selector__label {
  color: var(--mm-box-soft);
}

body.single-product .summary .mm-variant-selector__hint {
  color: var(--mm-box-soft);
}

body.single-product .summary .mm-variant-selector__message {
  background: var(--mm-box-surface);
  color: var(--mm-box-soft);
}

body.single-product .summary .mm-product-installation {
  --mm-installation-ink: #fff;
  --mm-installation-dark: var(--mm-box-ink);
  --mm-installation-muted: var(--mm-box-soft);
  --mm-installation-line: var(--mm-box-line);
  --mm-installation-lime: var(--mm-lime);
  --mm-installation-soft: var(--mm-box-surface);
  --mm-installation-green: var(--mm-lime);
  --mm-installation-surface: var(--mm-box-surface);
  --mm-installation-paper: var(--mm-box-ink);
  flex: 1 1 100%;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--mm-box-line);
  border-radius: var(--mm-radius-md);
  background: var(--mm-box-surface);
  color: #fff;
}

body.single-product .summary .mm-product-installation__choice {
  min-height: var(--mm-tactil);
  align-items: center;
}

body.single-product .summary .mm-installation-selector {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding-inline: 0;
}

body.single-product .summary .mm-installation-selector__title {
  color: #fff;
  font-size: 26px;
  letter-spacing: -0.02em;
}

/* La anchura útil es la del panel, no la ventana: evita días de menos de 44px
   en las dos columnas justo por encima de 810px. En celular sigue el carrusel flex nativo. */
body.single-product .summary .mm-installation-selector__days {
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
}

body.single-product .summary :is(.mm-installation-selector__nav, .mm-installation-day-card, .mm-installation-slot) {
  min-height: 48px;
  border: 1px solid var(--mm-box-control-line);
  border-radius: var(--mm-radius-sm);
  background: var(--mm-box-ink);
  color: #fff;
  box-shadow: none;
}

body.single-product .summary .mm-installation-day-card :where(span, strong) {
  background: transparent;
  color: inherit;
}

body.single-product .summary :is(.mm-installation-day-card, .mm-installation-slot)[aria-pressed="true"]:not(:disabled) {
  border-color: var(--mm-lime);
  background: var(--mm-lime);
  color: var(--mm-box-ink);
}

body.single-product .summary .mm-installation-slot[aria-pressed="true"]::before {
  color: inherit;
}

body.single-product .summary :is(.mm-installation-selector__nav, .mm-installation-day-card, .mm-installation-slot):disabled {
  border-color: var(--mm-deshabilitado-borde);
  background: var(--mm-deshabilitado-fondo);
  color: var(--mm-deshabilitado-texto);
  opacity: 1;
}

body.single-product .summary .mm-installation-skeleton {
  border-color: var(--mm-box-line);
  background: #34372e;
}

body.single-product .summary .mm-installation-selector__recovery {
  border-radius: var(--mm-radius-sm);
  background: var(--mm-box-ink);
}

body.single-product .summary .mm-installation-selector__recovery a {
  display: inline-flex;
  min-height: var(--mm-tactil);
  align-items: center;
  color: #fff;
}

body.single-product .summary :is(.mm-installation-selector__retry, .mm-installation-summary__submit) {
  min-height: var(--mm-tactil);
  border: 1px solid var(--mm-accion-borde);
  border-radius: var(--mm-radius-sm);
  background: var(--mm-accion-fondo);
  color: var(--mm-accion-texto);
}

body.single-product .summary :is(.mm-installation-selector__skip, .mm-installation-summary__change) {
  min-height: var(--mm-tactil);
  border: 1px solid var(--mm-secundario-borde);
  border-radius: var(--mm-radius-sm);
  background: var(--mm-secundario-fondo);
  color: var(--mm-secundario-texto);
}

body.single-product .summary .mm-installation-summary {
  position: static;
  border: 1px solid var(--mm-lime);
  border-radius: var(--mm-radius-sm);
  background: var(--mm-box-ink);
  color: #fff;
  box-shadow: none;
}

body.single-product .summary .mm-installation-summary__check {
  background: var(--mm-lime);
  color: var(--mm-box-ink);
}

body.single-product .summary .mm-installation-summary__countdown:is([data-level="warning"], [data-level="expired"]) {
  border-color: #e9c96b;
  color: #e9c96b;
}

/* El resumen queda en el panel también en celular: no necesita el hueco de una barra fija. */
body.single-product .summary .mm-installation-mobile-spacer {
  display: none;
}

/* Les gana también a los estados que tienen su propia sombra (día, hora y talla). */
body.single-product div.product .summary :is(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 0;
  box-shadow: var(--mm-focus);
}

body.single-product div.product .summary :is(a, button, input, select, textarea, [tabindex]):focus:not(:focus-visible) {
  outline: 0;
}

body.single-product div.product .summary .product_meta {
  margin-top: 16px;
  padding: 0;
  border: 0;
  color: var(--mm-box-soft);
  font-size: 13px;
}

body.single-product div.product .summary .product_meta a {
  color: inherit;
}

body.single-product div.product :is(.woocommerce-tabs, .related, .upsells) {
  grid-column: 1 / -1;
  float: none;
  width: 100%;
  min-width: 0;
}

/* La grilla ya separa estas cajas: sus clearfix no dependen del recorte del producto. */
body.single-product div.product > :is(.summary, .woocommerce-tabs, .related, .upsells)::before,
body.single-product div.product > :is(.summary, .woocommerce-tabs, .related, .upsells)::after {
  display: none;
}

body.single-product.storefront-full-width-content div.product .related.products > h2:first-child,
body.single-product div.product .related > h2,
body.single-product div.product .related ul.products > li.product {
  text-align: left;
}

body.single-product div.product .woocommerce-tabs h2,
body.single-product div.product :is(.related, .upsells) > h2 {
  color: var(--mm-text);
  font-family: var(--mm-font-display);
  font-size: var(--mm-titulo-2);
  font-weight: 800;
  letter-spacing: -0.03em;
}

body.single-product .storefront-sticky-add-to-cart {
  border: 0;
  background: var(--mm-box-ink);
  color: #fff;
}

body.single-product .storefront-sticky-add-to-cart .storefront-sticky-add-to-cart__content-title {
  color: #fff;
}

body.single-product .storefront-sticky-add-to-cart .storefront-sticky-add-to-cart__content-price,
body.single-product .storefront-sticky-add-to-cart .storefront-sticky-add-to-cart__content-price :where(span, bdi, ins, del),
body.single-product .storefront-sticky-add-to-cart .price {
  color: var(--mm-lime);
  font-weight: 800;
  opacity: 1;
}

body.single-product .storefront-sticky-add-to-cart .button {
  min-height: var(--mm-tactil);
  border: 1px solid var(--mm-accion-borde);
  background: var(--mm-accion-fondo);
  color: var(--mm-accion-texto);
}

body.single-product .storefront-product-pagination {
  display: none;
}

/* B: una sola celda de compra mantiene las filas y el orden móvil del bloque A. */
body.single-product .summary .mm-product-purchase {
  min-width: 0;
}

body.single-product .summary .mm-product-fitment {
  margin-bottom: 18px;
  color: var(--mm-box-soft);
}

body.single-product .summary .mm-product-fitment p {
  margin: 0 0 6px;
  color: #fff;
}

body.single-product .summary .mm-product-fitment ul {
  margin: 0 0 0 20px;
}

body.single-product .summary .mm-product-whatsapp {
  margin-top: 14px;
}

body.single-product .summary .mm-product-whatsapp .button.secondary {
  display: inline-flex;
  min-height: var(--mm-tactil);
  align-items: center;
  justify-content: center;
  border: 1px solid var(--mm-secundario-borde);
  background: var(--mm-secundario-fondo);
  color: var(--mm-secundario-texto);
  text-align: center;
  line-height: 1.4;
}

body.single-product .summary .mm-product-whatsapp .button.secondary:hover {
  border-color: var(--mm-secundario-texto);
}

/* Al ofrecer ayuda de horarios se conserva ese enlace específico, sin otro visible. */
body.single-product .mm-product-purchase:has([data-mm-installation-panel]:not([hidden]) [data-mm-installation-recovery]:not([hidden])) > .mm-product-whatsapp {
  display: none;
}

body.single-product div.product :is(.related, .upsells) .mm-product-card__sold-out {
  display: inline-block;
  margin-block: 8px;
  padding: 4px 10px;
  border: 1px solid var(--mm-text);
  border-radius: var(--mm-radius-sm);
  background: var(--mm-paper);
  color: var(--mm-text);
  font-size: 14px;
  font-weight: 750;
}

body.single-product .mm-product-purchase-bar {
  display: none;
}

@media (max-width: 900px) {
  /* La nativa conserva su uso en escritorio; en móvil solo hay una barra. */
  body.single-product .storefront-sticky-add-to-cart {
    display: none;
  }

  body.single-product .mm-product-purchase-bar:not([hidden]) {
    position: fixed;
    inset: auto 0 0;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    align-items: center;
    gap: 8px 12px;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--mm-box-control-line);
    background: var(--mm-box-ink);
    color: #fff;
    box-shadow: 0 -4px 18px rgb(0 0 0 / 18%);
  }

  body.single-product .mm-product-purchase-bar__price {
    color: var(--mm-lime);
    font-family: var(--mm-font-display);
    font-size: clamp(18px, 4.8vw, 26px);
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  body.single-product .mm-product-purchase-bar__price :where(span, bdi, ins, del, small) {
    color: inherit;
    font: inherit;
  }

  body.single-product .mm-product-purchase-bar .button {
    min-height: 48px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--mm-accion-borde);
    background: var(--mm-accion-fondo);
    color: var(--mm-accion-texto);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
  }

  /* Ya está en el carrito: el botón de añadir se cambia por el enlace al carrito. */
  body.single-product .mm-product-purchase-bar[data-mm-in-cart] :is([data-mm-purchase-submit], .mm-product-purchase-bar__hint) {
    display: none;
  }

  body.single-product .mm-product-purchase-bar__incart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
  }

  body.single-product .mm-product-purchase-bar .button:hover {
    border-color: var(--mm-accion-hover-borde);
    background: var(--mm-accion-hover-fondo);
    color: var(--mm-accion-hover-texto);
  }

  body.single-product .mm-product-purchase-bar .button:focus-visible {
    outline: 0;
    box-shadow: var(--mm-focus);
  }

  body.single-product .mm-product-purchase-bar__hint {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--mm-box-soft);
    font-size: 14px;
    line-height: 1.4;
  }
}

@media (max-width: 810px) {
  body.storefront-full-width-content.single-product div.product,
  body.single-product div.product {
    grid-template-columns: minmax(0, 1fr);
    /* Siete filas para título, precio, foto, valoración, extracto, compra y meta.
       Las filas sin contenido colapsan; las pestañas empiezan en box-end. */
    grid-template-rows: [box-start] repeat(7, auto) [box-end];
  }

  body.single-product div.product::before {
    /* Fuera del auto-placement: el fondo abarca las filas sin desplazarlas. */
    position: absolute;
    inset: 0;
  }

  body.single-product div.product > .onsale {
    position: absolute;
    grid-column: 1;
    grid-row: 3;
    top: 12px;
    left: 12px;
    z-index: 2;
  }

  body.storefront-full-width-content.single-product div.product .woocommerce-product-gallery,
  body.storefront-full-width-content.single-product div.product .images,
  body.single-product div.product .woocommerce-product-gallery,
  body.single-product div.product .images {
    grid-row: auto;
    order: 3;
    margin: 4px 0 16px;
  }

  body.storefront-full-width-content.single-product div.product > .summary,
  body.single-product div.product > .summary {
    display: contents;
  }

  body.single-product div.product > .summary > * {
    position: relative;
    grid-column: 1;
    order: 6;
    z-index: 1;
    min-width: 0;
  }

  body.single-product div.product .summary > .product_title {
    order: 1;
    margin: 6px 0 8px;
    font-size: clamp(26px, 7.2vw, 34px);
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  body.single-product div.product .summary > .price {
    order: 2;
    margin-bottom: 12px;
    font-size: clamp(28px, 8vw, 38px);
    line-height: 1.15;
  }

  /* La valoración precede al extracto también en el DOM: su enlace no hace
     saltar Tab por debajo de la compra para después volver al formulario. */
  body.single-product div.product .summary > .woocommerce-product-rating,
  body.single-product div.product .summary > .woocommerce-product-details__short-description {
    order: 4;
  }

  body.single-product div.product .summary > form.cart {
    order: 5;
  }

  body.single-product div.product .summary > .mm-product-purchase {
    display: flex;
    flex-direction: column;
    order: 5;
  }

  body.single-product .mm-product-purchase > .mm-product-fitment {
    order: 0;
  }

  body.single-product .mm-product-purchase > form.cart {
    order: 1;
  }

  body.single-product .mm-product-purchase > .mm-product-whatsapp {
    order: 2;
  }

  body.single-product div.product .summary > .product_meta {
    order: 6;
    margin-bottom: 32px;
  }

  body.single-product div.product > .woocommerce-tabs {
    grid-row: box-end;
    order: 8;
  }

  body.single-product div.product > .upsells {
    grid-row: 9;
    order: 9;
  }

  body.single-product div.product > .related {
    grid-row: 10;
    order: 10;
  }

  body.single-product div.product .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__image img:not(.zoomImg) {
    max-height: min(72vw, 280px);
  }

  body.single-product div.product .woocommerce-product-gallery .flex-viewport {
    max-height: 220px;
  }

  body.single-product div.product .woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__image img:not(.zoomImg) {
    width: 100%;
    height: clamp(180px, 56vw, 220px);
    object-fit: contain;
  }

  body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px;
  }

  body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li {
    flex: 0 0 44px;
    float: none;
    width: 44px;
    margin: 0;
  }

  body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs img {
    height: 44px;
    object-fit: contain;
  }

  body.single-product div.product .summary button.single_add_to_cart_button {
    flex-basis: 150px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  body.single-product .woocommerce-product-gallery {
    transition: background-color 160ms ease;
  }
}
