.ficha {
  background: var(--web-gris);
  color: var(--web-tinta);
  font-family: var(--web-letra);
  font-size: var(--web-tam-texto);
  line-height: 1.5;
  text-align: left;
}

.ficha :where(.ficha__arriba, .ficha__principal, .ficha__detalle--propio, .ficha__relacionados, .ventajas, .ficha__ampliada) :where(*, *::before, *::after) {
  box-sizing: border-box;
}

.ficha :where(.ficha__arriba, .ficha__principal, .ficha__detalle--propio, .ficha__relacionados, .ventajas) :where(h1, h2, h3, h4, p, ul, ol, li:not(.tarjeta), table) {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ficha :where(.ficha__arriba, .ficha__principal, .ficha__relacionados) :where(a) {
  color: inherit;
  text-decoration: none;
}

.ficha__arriba {
  display: grid;
  gap: 12px;
  padding: var(--web-hueco-titulo) var(--web-lado) 0;
}

.ficha__migas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--web-tinta-suave);
  font-size: var(--web-tam-pequeno);
}

.ficha__migas a:hover {
  color: var(--web-marca-oscura);
}

.ficha .woocommerce-message,
.ficha .woocommerce-error,
.ficha .woocommerce-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--web-marca);
  border-radius: var(--web-radio-caja);
  background: #fff;
  font-size: var(--web-tam-pequeno);
  list-style: none;
}

.ficha .woocommerce-error {
  border-color: #c9381d;
}

.ficha .woocommerce-message::before,
.ficha .woocommerce-error::before,
.ficha .woocommerce-info::before {
  display: none;
}

.ficha .woocommerce-message .button {
  order: 2;
  text-decoration: underline;
}

.ficha__principal {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--web-seccion) calc(var(--web-hueco-rejilla) * 2);
  padding: var(--web-hueco-titulo) var(--web-lado) var(--web-seccion);
}

.ficha__galeria {
  display: grid;
  gap: 12px;
}

.ficha__visor {
  position: relative;
}

.ficha__flecha {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--web-marca);
  border-radius: 50%;
  background: rgb(255 255 255 / 80%);
  color: var(--web-marca-oscura);
  cursor: pointer;
  translate: 0 -50%;
  transition: background-color var(--web-transicion), color var(--web-transicion);
}

.ficha__flecha:hover {
  background: var(--web-marca);
  color: var(--web-tinta);
}

.ficha__flecha .icono {
  width: 20px;
  height: 20px;
}

.ficha__flecha--anterior {
  left: 16px;
}

.ficha__flecha--anterior .icono {
  transform: rotate(90deg);
}

.ficha__flecha--siguiente {
  right: 16px;
}

.ficha__flecha--siguiente .icono {
  transform: rotate(-90deg);
}

.ficha__foto {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--web-radio-caja);
  background: #fff;
  cursor: zoom-in;
}

.ficha__imagen {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.ficha__oferta {
  top: 16px;
  left: 16px;
  padding: 10px 14px;
  font-size: var(--web-tam-pequeno);
}

.ficha__miniaturas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ficha__miniaturas button {
  display: block;
  width: 72px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color var(--web-transicion);
}

.ficha__miniaturas button[aria-pressed="true"] {
  border-color: var(--web-marca);
}

.ficha__miniaturas img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ficha__compartir {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--web-tam-pequeno);
  font-weight: 600;
}

.ficha__compartir ul {
  display: flex;
  gap: 6px;
}

.ficha__compartir a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--web-radio-control);
  background: var(--web-marca);
  color: var(--web-tinta);
  transition: background-color var(--web-transicion);
}

.ficha__compartir a:hover {
  background: var(--web-marca-oscura);
}

.ficha__compartir .icono {
  width: 20px;
  height: 20px;
}

.ficha__compra {
  display: grid;
  justify-items: start;
  gap: 16px;
}

.ficha .co-cuenta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  margin: 0;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--web-marca);
  color: var(--web-tinta);
  font-size: var(--web-tam-pequeno);
}

.ficha .co-cuenta b {
  color: var(--web-tinta);
}

.ficha__titulo {
  font-size: var(--web-tam-titulo);
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

.ficha__intro {
  color: var(--web-tinta-suave);
  font-size: var(--web-tam-subtitulo);
  line-height: 1.6;
}

.ficha__intro p {
  margin: 0;
}

.ficha__documento {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--web-tam-pequeno);
  font-weight: 600;
  text-decoration: underline;
}

.ficha__documento:hover {
  color: var(--web-marca-oscura);
}

.ficha__documento .icono {
  width: 20px;
  height: 20px;
}

.ficha__tamanos {
  display: grid;
  gap: 8px;
}

.ficha__etiqueta {
  font-size: var(--web-tam-pequeno);
  font-weight: 700;
  line-height: 1.35;
}

.ficha__opciones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ficha__opciones .current-size,
.ficha__opciones .button-size {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid #d6d6d6;
  border-radius: var(--web-radio-control);
  background: #fff;
  font-size: var(--web-tam-pequeno);
  font-weight: 600;
  transition: border-color var(--web-transicion);
}

.ficha__opciones .current-size {
  border-color: var(--web-marca);
  background: var(--web-marca);
}

.ficha__opciones .button-size:hover {
  border-color: var(--web-marca-oscura);
}

.ficha__fila,
.ficha__accion {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.ficha__fila {
  column-gap: 24px;
}

.ficha__ir-galeria {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid #d6d6d6;
  border-radius: var(--web-radio-control);
  background: #fff;
  font: 600 var(--web-tam-texto) / 1 var(--web-letra);
  transition: border-color var(--web-transicion);
}

.ficha__ir-galeria:hover {
  border-color: var(--web-marca-oscura);
}

.ficha__precio {
  color: var(--web-marca-oscura);
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 700;
  line-height: 1.2;
}

.ficha__precio del {
  margin-right: 8px;
  color: var(--web-tinta-suave);
  font-size: var(--web-tam-subtitulo);
  font-weight: 400;
}

.ficha__precio ins {
  background: none;
  text-decoration: none;
}

.ficha form.cart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.ficha .stock.in-stock {
  display: none;
}

.ficha .stock.out-of-stock {
  color: #c9381d;
  font-weight: 600;
}

.ficha form.cart .qty {
  width: 80px;
  height: 48px;
  padding: 0 12px;
  border: 1px solid #d6d6d6;
  border-radius: var(--web-radio-control);
  background: #fff;
  color: var(--web-tinta);
  font: 600 var(--web-tam-texto) / 1 var(--web-letra);
  text-align: center;
}

.ficha form.cart .single_add_to_cart_button {
  min-height: 48px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--web-radio-control);
  background: var(--web-marca);
  color: var(--web-tinta);
  font: 600 var(--web-tam-texto) / 1 var(--web-letra);
  cursor: pointer;
  transition: background-color var(--web-transicion);
}

.ficha form.cart .single_add_to_cart_button:hover {
  background: var(--web-marca-oscura);
}

.ficha__envio {
  display: grid;
  gap: 4px;
  width: 100%;
  padding-top: 16px;
  border-top: 1px solid #e2e2e2;
  color: var(--web-tinta-suave);
  font-size: var(--web-tam-pequeno);
}

.ficha__envio p {
  margin: 0;
}

.ficha__detalle {
  padding: var(--web-seccion) var(--web-lado);
}

.ficha__cabeza {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.ficha__relacionados .carrusel__pista {
  grid-auto-columns: calc((100% - 3 * var(--web-hueco-rejilla)) / 4);
}

.ficha__ampliada {
  max-width: min(92vw, 1100px);
  max-height: 92vh;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--web-radio-caja);
  background: #fff;
}

.ficha__ampliada::backdrop {
  background: rgb(0 0 0 / 80%);
}

.ficha__ampliada img {
  display: block;
  max-width: 100%;
  max-height: 92vh;
  object-fit: contain;
  cursor: zoom-out;
}

.ficha__cerrar {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--web-radio-control);
  background: #fff;
  color: var(--web-tinta);
  cursor: pointer;
}

.ficha__detalle--propio {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--web-seccion) calc(var(--web-hueco-rejilla) * 2);
  background: #fff;
}

.ficha__detalle--propio > :only-child {
  grid-column: 1 / -1;
  max-width: 72ch;
}

.ficha__video {
  overflow: hidden;
  border-radius: var(--web-radio-caja);
  background: var(--web-oscuro);
  aspect-ratio: 16 / 9;
}

.ficha__video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.ficha__video--foto {
  background: var(--web-gris);
  aspect-ratio: auto;
}

.ficha__video--foto img {
  display: block;
  width: 100%;
  height: auto;
}

.desplegables {
  border-top: 1px solid #e2e2e2;
}

.desplegable {
  border-bottom: 1px solid #e2e2e2;
}

.desplegable__titulo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-size: var(--web-tam-subtitulo);
  font-weight: 700;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

.desplegable__titulo::-webkit-details-marker {
  display: none;
}

.desplegable__titulo:hover {
  color: var(--web-marca-oscura);
}

.desplegable__signo {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--web-marca-oscura);
  border-radius: var(--web-radio-control);
}

.desplegable__signo::before,
.desplegable__signo::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  background: currentColor;
  content: "";
  transform: translate(-50%, -50%);
}

.desplegable__signo::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform var(--web-transicion);
}

.desplegable[open] .desplegable__signo::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.desplegable__contenido {
  display: grid;
  gap: 12px;
  padding-bottom: 22px;
  font-size: var(--web-tam-texto);
  line-height: 1.6;
}

.desplegable__ingredientes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.desplegable__ingredientes li {
  padding: 6px 14px;
  border: 1px solid #d6d6d6;
  border-radius: var(--web-radio-control);
  background: #fff;
  font-size: var(--web-tam-pequeno);
  line-height: 1.4;
}

.desplegable__ingredientes .desplegable__alergeno {
  border: 2px solid var(--web-marca-oscura);
  font-weight: 600;
}

.desplegable__nota {
  color: var(--web-tinta-suave);
  font-size: var(--web-tam-pequeno);
}

.desplegable__tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--web-tam-pequeno);
}

.desplegable__tabla caption {
  padding-bottom: 8px;
  color: var(--web-tinta-suave);
  text-align: left;
}

.desplegable__tabla th,
.desplegable__tabla td {
  padding: 8px 0;
  border-bottom: 1px solid #ececec;
  text-align: left;
}

.desplegable__tabla th {
  font-weight: 400;
}

.desplegable__tabla td {
  font-weight: 700;
  text-align: right;
}

.desplegable__sub th {
  padding-left: 16px;
  color: var(--web-tinta-suave);
}

.desplegable__datos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px var(--web-hueco-rejilla);
}

.desplegable__subtitulo {
  margin-bottom: 4px !important;
  font-size: var(--web-tam-pequeno);
  font-weight: 700;
  line-height: 1.4;
}

.desplegable__receta {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.desplegable__receta img {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: calc(var(--web-radio-caja) - 6px);
  object-fit: cover;
}

.desplegable__plato {
  font-size: var(--web-tam-subtitulo);
  font-weight: 700;
  line-height: 1.35;
}

.ficha .desplegable__lista {
  padding-left: 1.25em;
}

.ficha .desplegable__lista--ul {
  list-style: disc;
}

.ficha .desplegable__lista--ol {
  list-style: decimal;
}

.ficha .desplegable__lista li {
  list-style: inherit;
}

.ficha .desplegable__lista li + li {
  margin-top: 4px;
}

.desplegable__consejo {
  padding: 12px 16px;
  border-radius: calc(var(--web-radio-caja) - 8px);
  background: var(--web-fondo-suave);
  font-size: var(--web-tam-pequeno);
}

@media (max-width: 1200px) {
  .ficha__relacionados .carrusel__pista {
    grid-auto-columns: calc((100% - 2 * var(--web-hueco-rejilla)) / 3);
  }
}

@media (max-width: 900px) {
  .ficha__detalle--propio {
    grid-template-columns: minmax(0, 1fr);
  }

  .ficha__principal {
    grid-template-columns: minmax(0, 1fr);
  }

  .ficha__relacionados .carrusel__pista {
    grid-auto-columns: calc((100% - var(--web-hueco-rejilla)) / 2);
  }
}
