/* Portal 2026 rev7: estabilización de la maqueta y los listados. */
/* No tocar el espacio de cabecera ni la portada; eliminar el margen superior legacy de 209px en listados. */
body.portal26-listing #content { margin-top:0 !important; padding-top:12px !important; }
body.portal26-listing #listado-resultados { margin-top:0 !important; }
body.portal26-listing #contenedor_menu_listado { display:none !important; }
body.portal26-listing #subir { display:none !important; }
body.portal26-listing #muestra_filtros { top:0; }
/* La hoja legacy no debe esconder fotografías de tarjetas nuevas. */
body.portal26-active #cResultados .portal26-product-card .product-image,
body.portal26-active #cResultados .portal26-product-card .imagen-container,
body.portal26-active #cResultados .portal26-product-card .imagen-content,
body.portal26-active #cResultados .portal26-product-card .imagen-content a {
  display:flex !important; flex-direction:column !important; justify-content:center !important;
  align-items:center !important; width:100% !important; min-width:0 !important;
  height:auto !important; min-height:145px !important; visibility:visible !important; opacity:1 !important;
  position:relative; overflow:visible; margin:0 !important; padding:0 !important;
}
body.portal26-active #cResultados .portal26-product-card .imagen-content img {
  display:block !important; visibility:visible !important; opacity:1 !important;
  width:auto !important; height:auto !important; max-width:100% !important;
  max-height:145px !important; object-fit:contain !important;
}
/* Retener las tarjetas como unidades completas con controles dentro de ellas. */
body.portal26-active #cResultados .portal26-product-card {max-width:none !important; width:100% !important; min-height:100%;}
body.portal26-active #cResultados .portal26-product-card .product-data-name {margin-bottom:6px !important;}
body.portal26-active #cResultados .portal26-product-card .product-mobile-add-to-cart-wrapper {margin-top:auto !important; padding-top:12px !important;}
/* Restablecer jerarquía: datos de cabecera en todas las páginas. */
body.portal26-listing .portal26-header #cab-center {display:block !important;}
/* El selector principal usa los mismos tamaños que en portada. */
@media(min-width:1200px){
 body.portal26-active .portal26-header #cab-center {flex:0 1 440px !important; width:440px !important; max-width:440px !important;}
 body.portal26-active .portal26-header .portal26-context-slot {flex:0 0 210px !important; width:210px !important; max-width:210px !important; min-width:0 !important;}
}
/* Rejilla de seis: las acciones conservan espacio sin desbordar la tarjeta. */
@media (min-width:1200px) {
 body.portal-home #cResultados .portal26-product-card {padding:9px !important;}
 body.portal-home #cResultados .portal26-product-card .product-mobile-add-to-cart-wrapper {gap:4px !important;}
 body.portal-home #cResultados .portal26-product-card .btn-add-cesta-controls-controls {width:21px !important; flex:0 0 21px !important;}
 body.portal-home #cResultados .portal26-product-card .btn-add-cesta-input {width:33px !important; flex:0 0 33px !important;}
 body.portal-home #cResultados .portal26-product-card .quantity-input {width:33px !important;}
 body.portal-home #cResultados .portal26-product-card :is(.btn_sumar,.btn_restar) {width:21px !important;}
 body.portal-home #cResultados .portal26-product-card .product-actions .fa-heart,
 body.portal-home #cResultados .portal26-product-card .anadir_cesta {width:30px !important; height:34px !important; line-height:34px !important;}
 body.portal-home #cResultados .portal26-product-card .btn-add-cesta {height:34px !important;}
 body.portal-home #cResultados .portal26-product-card .product-data-name {font-size:12px !important;}
}
