/* Ficha de producto e imágenes de la tienda (inc-base/ficha-producto.php). Tarea 669042, 24-nov. */

/* Imágenes: lienzo cuadrado blanco igual para todas, en la ficha, los listados y los relacionados. El producto se centra y
   nunca se estira por encima de su tamaño real (363 de las 1.253 fotos miden menos de 300 px de lado corto). */
.woocommerce-product-gallery .woocommerce-product-gallery__image > a,
.woocommerce-product-gallery .woocommerce-product-gallery__image:not(:has(a)) { display: flex !important; align-items: center; justify-content: center; aspect-ratio: 1 / 1; background: #fff; padding: 6%; box-sizing: border-box; }
.woocommerce-product-gallery .woocommerce-product-gallery__image img { width: auto !important; height: auto !important; max-width: 100% !important; max-height: 100% !important; object-fit: contain; margin: 0 auto; }
.woocommerce ul.products li.product .image_frame .image_wrapper { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; background: #fff; }
.woocommerce ul.products li.product .image_frame .image_wrapper img { width: auto !important; height: auto !important; max-width: 100%; max-height: 100%; object-fit: contain; }

/* Bloque de información */
.ib-ficha-info { clear: both; flex: 0 0 100%; width: 100%; box-sizing: border-box; margin: 32px 0 40px; padding: 0 10px; }
.ib-ficha-info > h2 { font-size: 22px; margin: 28px 0 12px; color: var(--negro); }
.ib-ficha-info > h2:first-child { margin-top: 0; }
.ib-ficha-texto { max-width: 72ch; color: var(--negro); }
.ib-ficha-texto h2, .ib-ficha-texto h3 { font-size: 20px; line-height: 1.3; margin: 24px 0 8px; color: var(--negro); }
.ib-ficha-plegable.esta-plegada { max-height: 15em; overflow: hidden; position: relative; }
.ib-ficha-plegable.esta-plegada::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5em; background: linear-gradient(rgba(255, 255, 255, 0), #fff); }
.woocommerce .ib-ficha-mas, .woocommerce .ib-ficha-abrir-todo { margin: 12px 0 0; min-height: 44px; padding: 8px 18px; border: 2px solid var(--morado) !important; border-radius: var(--ib-radio); background: #fff !important; color: var(--morado) !important; box-shadow: none !important; font: 700 15px/1 Inter, sans-serif; cursor: pointer; }
.ib-ficha-sec { max-width: 72ch; border-bottom: 1px solid #e4e4e4; }
.ib-ficha-sec > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; cursor: pointer; list-style: none; }
.ib-ficha-sec > summary::-webkit-details-marker { display: none; }
.ib-ficha-sec > summary::after { content: "+"; font-size: 24px; font-weight: 600; color: var(--morado); }
.ib-ficha-sec[open] > summary::after { content: "\2212"; }
.ib-ficha-sec > summary h3 { margin: 10px 0; font-size: 18px; line-height: 1.3; color: var(--negro); }
.ib-ficha-sec > summary:focus-visible { outline: 3px solid var(--morado); outline-offset: 2px; }

/* Documentos como tarjetas */
.ib-ficha-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 640px; }
.ib-ficha-docs li { margin: 0; padding: 0; }
.ib-ficha-docs a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: var(--negro); text-decoration: none; border: var(--ib-borde); border-radius: var(--ib-radio); background: #fff; }
.ib-ficha-docs a:hover .ib-ficha-doc-nombre { text-decoration: underline; text-underline-offset: 3px; }
.ib-ficha-doc-icono { flex: 0 0 auto; min-width: 44px; padding: 6px 4px; border-radius: 6px; background: var(--morado); color: #fff; font-size: 12px; font-weight: 800; text-align: center; letter-spacing: 0.04em; }
.ib-ficha-doc-nombre { flex: 1 1 auto; font-weight: 700; color: var(--morado); }
.ib-ficha-doc-detalle { flex: 0 0 auto; font-size: 13px; color: #4d4f55; }
