/* Portal 2026: tarjetas compartidas, sin cambios en reglas de negocio ni en xajax. */
:root { --p26-card-line:#dbe3ee; --p26-card-ink:#13264a; --p26-card-orange:#ff7f00; }
body.portal26-active .portal26-product-card {
  box-sizing:border-box; width:100%; max-width:260px; margin-inline:auto; min-width:0; height:100%; display:flex; flex-direction:column;
  background:#fff; border:1px solid var(--p26-card-line); border-radius:5px;
  padding:12px; transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  overflow-wrap:break-word;
}
@media(hover:hover){
  body.portal26-active .portal26-product-card:hover {
    border-color:#b5c8df; box-shadow:0 6px 18px rgba(19,38,74,.13); transform:translateY(-2px);
  }
}
body.portal26-active #cResultados .product-box { min-width:0; display:flex; flex-direction:column; margin-bottom:16px !important; padding:0 9px; border:0; }
body.portal26-active .product-box .portal26-product-card > .product {
  display:flex !important; flex-direction:column !important; flex:1 1 auto;
  min-height:0 !important; margin:0 !important; padding:0 !important;
}
body.portal26-active .portal26-product-card .product-image {
  flex:0 0 auto !important; max-width:100% !important; width:100%; margin:0 !important;
}
body.portal26-active .portal26-product-card .imagen-content {
  width:100%; height:154px !important; display:flex !important;
  align-items:center; justify-content:center; margin:0 !important; overflow:hidden;
}
body.portal26-active .portal26-product-card .imagen-content img {
  max-width:100%; max-height:150px !important; width:auto; height:auto; object-fit:contain;
}
body.portal26-active .portal26-product-card .product-info {
  flex:1 1 auto !important; min-width:0; width:100%; height:auto !important;
  margin:0 !important; padding:0 !important; display:block !important;
}
body.portal26-active .portal26-product-card .product-data {
  margin:8px 0 0 !important; padding:0 !important; min-width:0;
  display:flex; flex-direction:column;
}
body.portal26-active .portal26-product-card .product-data-name {
  height:auto !important; min-height:0 !important; margin:0 0 7px !important;
  font-size:14px !important; line-height:1.35 !important; font-weight:700;
  letter-spacing:0; text-transform:none; overflow-wrap:anywhere;
}
body.portal26-active .portal26-product-card .product-data-name a {
  font:inherit !important; text-decoration:none; color:var(--p26-card-ink) !important;
}
body.portal26-active .portal26-product-card .product-data-name a:hover { color:#d96d00 !important; }
body.portal26-active .portal26-product-card .product-data-price {
  margin:0 0 3px !important; padding:0 !important; font-size:18px !important;
  line-height:1.25 !important; color:var(--p26-card-ink) !important; font-weight:750 !important;
}
body.portal26-active .portal26-product-card .div-producto-details {
  margin:0 !important; padding:0 !important; line-height:1.35;
}
body.portal26-active .portal26-product-card .producto-price-details {
  font-size:12px !important; line-height:1.4 !important; color:#61718a !important;
}
body.portal26-active .portal26-product-card .product-data-price-unity {font-size:12px; line-height:1.4; margin:0 !important;}
body.portal26-active .portal26-product-card .product-data-ref,
body.portal26-active .portal26-product-card .product-data-prov {
  margin:3px 0 0 !important; padding:0 !important; font-size:11px !important;
  color:#63718a !important; line-height:1.4 !important;
}
body.portal26-active .portal26-product-card .product-data-prov strong {font-weight:500;}
body.portal26-active .portal26-product-card .product-mobile-add-to-cart-wrapper {
  display:flex !important; flex:0 0 auto !important; flex-wrap:nowrap !important;
  align-items:center !important; justify-content:flex-start !important; gap:6px;
  width:100%; max-width:100%; min-width:0; margin:12px 0 0 !important;
  padding:0 !important;
}
body.portal26-active .portal26-product-card .product-mobile-add-to-cart-wrapper > div {padding:0; margin:0; width:auto !important; max-width:none !important; flex:0 0 auto;}
body.portal26-active .portal26-product-card .div-add-cesta {display:flex; flex-wrap:nowrap; align-items:center;}
body.portal26-active .portal26-product-card .btn-add-cesta {height:36px !important; padding:0 !important; margin:0 !important; width:auto !important;}
body.portal26-active .portal26-product-card .btn-add-cesta-controls-controls {float:none; flex:0 0 25px; width:25px !important;}
body.portal26-active .portal26-product-card .btn-add-cesta-input {float:none; flex:0 0 43px; width:43px !important;}
body.portal26-active .portal26-product-card .quantity-input {width:43px !important; min-width:0; height:36px !important; margin:0; padding:0 2px; font-size:14px !important; border-radius:0 !important; text-align:center; background:#f1f3f5 !important;}
body.portal26-active .portal26-product-card :is(.btn_sumar,.btn_restar) {height:36px !important; width:25px !important; line-height:36px !important; padding:0 !important; border-radius:3px !important; text-align:center; background:#f1f3f5 !important;}
body.portal26-active .portal26-product-card .product-actions {flex:0 0 auto !important; max-width:none !important; width:auto !important; margin:0 !important;}
body.portal26-active .portal26-product-card .product-actions-favourite {display:flex; align-items:center;}
body.portal26-active .portal26-product-card .product-actions-favourite button {margin:0; padding:0; border:0; background:transparent;}
body.portal26-active .portal26-product-card .product-actions .fa-heart {display:grid !important; place-items:center; width:36px; height:36px !important; padding:0 !important; line-height:36px !important; color:var(--p26-card-ink); background:#f0f3f7; border-radius:4px; font-size:17px;}
body.portal26-active .portal26-product-card .product-actions-favourite button:has(.img-fav-mobile) {display:none;}
body.portal26-active .portal26-product-card .btn-add-cesta-controls-btn,body.portal26-active .portal26-product-card .btn-add-cesta-controls-btn a {height:36px; display:block;}
body.portal26-active .portal26-product-card .anadir_cesta {display:grid; place-items:center; width:36px; height:36px; padding:0; margin:0; background:var(--p26-card-orange) !important; color:#fff !important; border-radius:4px;}
body.portal26-active .portal26-product-card .anadir_cesta i {color:#fff !important;}
/* Portada: seis productos por fila en escritorio, sin filtros. */
@media(min-width:992px){
  body.portal-home #cResultados > .product-box,
  body.portal-home #cResultados > .container > .row > .product-box {flex:0 0 16.666667% !important; max-width:16.666667% !important;}
  /* Listado con filtros visibles: cuatro columnas de productos. */
  body.portal26-listing #contenedor-resultados.col-lg-9 #cResultados > .product-box {flex:0 0 25% !important; max-width:25% !important;}
  /* Si el usuario oculta los filtros, se conserva el modo amplio existente. */
  body.portal26-listing #contenedor-resultados.col-lg-12 #cResultados > .product-box {flex:0 0 25% !important; max-width:25% !important;}
}
@media(min-width:576px) and (max-width:991.98px){
  body.portal26-active #cResultados > .product-box,
  body.portal26-active #cResultados > .container > .row > .product-box {flex:0 0 50% !important; max-width:50% !important;}
}
@media(max-width:575.98px){
  body.portal26-active #cResultados > .product-box,
  body.portal26-active #cResultados > .container > .row > .product-box {flex:0 0 100% !important; max-width:100% !important;}
  body.portal26-active .portal26-product-card > .product {flex-direction:column !important;}
}
/* Cabecera: último ajuste fino sobre el tema ya aprobado. */
@media(min-width:1200px){
  body.portal26-active .portal26-header #cab-center {flex-basis:470px !important; width:470px !important; max-width:470px !important;}
  body.portal26-active .portal26-header .portal26-context-slot {flex-basis:198px !important; width:198px !important; max-width:198px !important; min-width:170px !important;}
}
body.portal26-active .portal26-header .portal26-search-field #btn_ir_buscador {font-size:15px !important;}

/* La portada genera grupos de seis dentro de #cResultados > .container > .row. */
@media(min-width:1200px) {
 body.portal-home #cResultados > .container > .row > .product-box,
 body.portal-home #cResultados > .product-box {flex:0 0 16.666667% !important; max-width:16.666667% !important;}
 body.portal26-listing #contenedor-resultados.col-lg-9 #cResultados > .product-box {flex:0 0 25% !important; max-width:25% !important;}
}
@media (min-width:992px) and (max-width:1199.98px) {
 body.portal-home #cResultados > .container > .row > .product-box {flex:0 0 25% !important; max-width:25% !important;}
 body.portal26-listing #contenedor-resultados.col-lg-9 #cResultados > .product-box {flex:0 0 33.333% !important; max-width:33.333% !important;}
}

/* El acceso de visitante necesita texto completo, no el ancho del icono de cesta. */
body.portal26-active .portal26-product-card .p26-card-login-wrap{width:100%!important;max-width:none!important;display:block!important}body.portal26-active .portal26-product-card .p26-card-login,body.portal26-active .portal26-product-card .p26-card-login .anadir_cesta{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-width:0!important;padding:0 10px!important;box-sizing:border-box!important;font-size:12px!important;height:36px!important;white-space:nowrap!important}

body.portal26-active .portal26-product-card .quantity-input{background:#f1f3f5!important}

body.portal26-active .portal26-product-card .anadir_cesta i{font-size:17px!important;line-height:1!important}

/* Una única medida de controles para portada, resultados y recomendaciones. */
body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-actions{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;column-gap:4px!important;row-gap:0!important;width:100%!important;margin:12px 0 0!important;padding:0!important}
body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-actions>div{flex:0 0 auto!important;width:auto!important;min-width:0!important;padding:0!important;margin:0!important}
body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-actions>div:first-child{margin-right:12px!important}
body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-actions .btn-add-cesta{display:flex!important;width:auto!important;height:34px!important;padding:0!important;margin:0!important;float:none!important;background:transparent!important;border:0!important}
body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-actions .div-add-cesta{display:grid!important;grid-template-columns:21px 33px 21px!important;align-items:center!important;justify-content:flex-start!important;gap:3px!important;width:81px!important;min-width:81px!important}
body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-actions .btn-add-cesta-controls-controls{display:flex!important;flex:0 0 21px!important;width:21px!important;height:34px!important;padding:0!important;margin:0!important;float:none!important}
body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-actions .btn-add-cesta-input{display:flex!important;flex:0 0 33px!important;width:33px!important;height:34px!important;padding:0!important;margin:0!important;float:none!important;background:#f1f3f5!important}
body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-actions .quantity-input{flex:0 0 33px!important;width:33px!important;min-width:0!important;height:34px!important;margin:0!important;padding:0!important;text-align:center!important;font-size:14px!important;font-weight:400!important;border:0!important;background:#f1f3f5!important;box-shadow:none!important;border-radius:2px!important}
body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-actions .btn_sumar,body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-actions .btn_restar{display:flex!important;align-items:center!important;justify-content:center!important;width:21px!important;height:34px!important;line-height:34px!important;margin:0!important;padding:0!important;border:0!important;border-radius:2px!important;background:#f1f3f5!important;color:#10264c!important;font-size:14px!important;cursor:pointer}
body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-actions .product-actions{display:flex!important;width:auto!important;margin:0!important;padding:0!important;float:none!important}
body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-actions .product-actions .fa-heart,body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-actions .anadir_cesta{display:flex!important;align-items:center!important;justify-content:center!important;width:30px!important;height:34px!important;line-height:34px!important;padding:0!important;margin:0!important;border-radius:4px!important;font-size:17px!important}
body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-actions .product-actions .fa-heart{background:#f1f3f5!important;color:#10264c!important}
body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-actions .btn-add-cesta-controls-btn,body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-actions .btn-add-cesta-controls-btn a{display:block!important;width:30px!important;height:34px!important;margin:0!important;padding:0!important}

/* El acceso de visitante conserva todo el ancho, también en listados. */
body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-login-wrap,body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-login-wrap .btn-add-cesta-controls-btn,body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-login-wrap .p26-card-login,body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-login-wrap .anadir_cesta{width:100%!important;max-width:none!important;flex:1 1 auto!important}

/* La imagen necesita un enlace con ancho propio para evitar el tamaño cero. */
body.portal26-active :is(#content,#content-index) .portal26-product-card .imagen-container,body.portal26-active :is(#content,#content-index) .portal26-product-card .imagen-content a{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-width:0!important;min-height:145px!important;margin:0!important;padding:0!important}
body.portal26-active :is(#content,#content-index) .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}

body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-actions .product-actions .fas.fa-heart{color:#ff7f00!important}

/* Tipografía común: no depende del tamaño raíz ni de reglas específicas de portada. */
body.portal26-active :is(#content,#content-index) .portal26-product-card .product-data .product-data-name,body.portal26-active :is(#content,#content-index) .portal26-product-card .product-data .product-data-name a{font-family:Arial,Helvetica,sans-serif!important;font-size:13px!important;font-weight:700!important;line-height:1.3!important;letter-spacing:0!important}
body.portal26-active :is(#content,#content-index) .portal26-product-card .product-data .product-data-price{font-family:Arial,Helvetica,sans-serif!important;font-size:16px!important;font-weight:800!important;line-height:1.25!important;letter-spacing:0!important}
/* Una sola superficie de botón y ancho según el texto para el acceso de visitante. */
body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-login-wrap .btn-add-cesta-controls-btn{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:auto!important;background:transparent!important;border:0!important;box-shadow:none!important}
body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-login-wrap .btn-add-cesta-controls-btn .p26-card-login{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 1 auto!important;width:auto!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:36px!important;padding:8px 14px!important;box-sizing:border-box!important;background:#ff7f00!important;border:0!important;border-radius:4px!important;color:#fff!important;text-decoration:none!important;white-space:normal!important}
body.portal26-active :is(#content,#content-index) .portal26-product-card .p26-card-login-wrap .p26-card-login .anadir_cesta{display:block!important;flex:0 1 auto!important;width:auto!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;background:transparent!important;font-family:Arial,Helvetica,sans-serif!important;font-size:13px!important;font-weight:700!important;line-height:1.3!important;color:#fff!important;white-space:normal!important;overflow:visible!important;overflow-wrap:normal!important;word-break:normal!important}
