/* ORSIVAN · V4 · Alineacion de tarjetas, tipografia y acceso flotante.
   Solamente CSS. La logica, precios, descuentos, inventario y acciones quedan intactos. */

/* 1 · Fichas del catalogo: todos los bloques en la misma linea */
#orsivan-preview .product-grid{
  align-items:stretch!important;
  grid-auto-flow:row;
}
#orsivan-preview .product-card{
  display:flex!important;
  flex-direction:column!important;
  height:100%!important;
  min-height:0;
}
#orsivan-preview .product-card .product-image{flex:0 0 auto;}
#orsivan-preview .product-card .product-info{
  display:flex!important;
  flex-direction:column!important;
  flex:1 1 auto!important;
  min-height:0;
}
#orsivan-preview .product-card .product-category{
  display:block;
  min-height:16px;
  font-size:9px!important;
  line-height:16px!important;
}
#orsivan-preview .product-card .product-name{
  display:block;
  margin:5px 0 9px!important;
  width:100%;
}
#orsivan-preview .product-card .product-name h3{
  font-size:17px!important;
  font-weight:750!important;
  line-height:1.45!important;
  letter-spacing:-.022em!important;
  min-height:48px!important;
  margin:0!important;
  color:#10224a!important;
  display:-webkit-box!important;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
#orsivan-preview .product-card .product-price-row{
  margin-top:auto!important;
  min-height:64px!important;
  align-items:flex-end!important;
  padding-bottom:1px;
}
#orsivan-preview .product-card .price-stack{
  display:grid!important;
  grid-template-rows:27px 32px!important;
  gap:3px!important;
  justify-items:start!important;
  align-items:end!important;
  min-height:62px!important;
}
#orsivan-preview .product-card .product-price-old{
  grid-row:1;
  align-self:start!important;
  margin:0!important;
}
#orsivan-preview .product-card .product-price{
  grid-row:2;
  align-self:end!important;
  line-height:1.1!important;
  margin:0!important;
}
#orsivan-preview .product-card .product-stock{
  display:flex!important;
  min-height:20px!important;
  line-height:18px;
  margin:7px 0 0!important;
}
#orsivan-preview .product-card .premium-card-actions{
  width:100%;
  margin-top:10px!important;
  flex:0 0 auto;
}

/* Control Ver producto: sustituye el icono circular poco claro por una accion legible */
#orsivan-preview .premium-card-actions .premium-view-button{
  width:64px!important;
  min-width:64px!important;
  min-height:43px!important;
  flex:0 0 64px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0 8px!important;
  border:1px solid #c1d3f4!important;
  background:#f8faff!important;
  border-radius:11px!important;
  color:#0d3fad!important;
}
#orsivan-preview .premium-card-actions .premium-view-button .icon{display:none!important}
#orsivan-preview .premium-card-actions .premium-view-button::after{
  content:'Ver';
  font:750 11px/1 Poppins,Arial,sans-serif;
}
#orsivan-preview .premium-card-actions .premium-view-button:hover{
  background:#edf3ff!important;
  border-color:#769ce5!important;
}

/* 2 · Productos recomendados en detalle: alineacion estricta,
   incluso si un articulo no tiene descuento ni precio anterior. */
#orsivan-preview .related-grid{
  align-items:stretch!important;
}
#orsivan-preview .related-card{
  display:flex!important;
  flex-direction:column!important;
  align-self:stretch!important;
  height:auto!important;
  min-height:0;
  content-visibility:visible!important;
  border-radius:15px!important;
  border-color:#e1e8f3!important;
  transition:border-color .17s ease,box-shadow .17s ease,transform .17s ease;
}
#orsivan-preview .related-card:hover{
  border-color:#bfd0f4!important;
  box-shadow:0 12px 30px rgba(14,39,92,.12)!important;
  transform:translateY(-2px);
}
#orsivan-preview .related-card-image{
  flex:0 0 auto!important;
  overflow:hidden;
}
#orsivan-preview .related-card-image img{
  object-fit:contain!important;
}
#orsivan-preview .related-card-body{
  display:flex!important;
  flex:1 1 auto!important;
  flex-direction:column!important;
  align-items:stretch;
  min-width:0;
  padding:11px 3px 2px!important;
}
#orsivan-preview .related-card-category{
  font-size:8.5px!important;
  line-height:1.45!important;
  min-height:13px;
  color:#2b5dbe!important;
  font-weight:750!important;
}
#orsivan-preview .related-card-title{
  color:#12234a!important;
  font-family:Poppins,Arial,sans-serif!important;
  font-size:15.5px!important;
  font-weight:750!important;
  line-height:1.42!important;
  min-height:46px!important;
  margin:6px 0 10px!important;
  text-align:left;
  letter-spacing:-.018em;
  display:-webkit-box!important;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
#orsivan-preview .related-card-price-wrap{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:27px 30px!important;
  align-items:end!important;
  justify-items:start!important;
  gap:2px!important;
  min-height:59px!important;
  margin-top:auto!important;
  margin-bottom:10px!important;
}
#orsivan-preview .related-card-old{
  grid-row:1;
  align-self:start!important;
  margin:0!important;
  max-width:100%;
}
#orsivan-preview .related-card-price{
  grid-row:2;
  align-self:end!important;
  font-size:20px!important;
  line-height:1.12!important;
  letter-spacing:-.035em;
  margin:0!important;
}
#orsivan-preview .related-add{
  flex:0 0 auto!important;
  margin-top:0!important;
  min-height:41px!important;
  border-radius:11px!important;
  font-size:11px!important;
  font-weight:750!important;
  gap:7px;
  background:#1049d6!important;
  transition:background .17s ease,transform .17s ease;
}
#orsivan-preview .related-add:hover:not(:disabled){background:#093bb8!important;transform:translateY(-1px)}
#orsivan-preview .related-add .icon{height:15px!important;width:15px!important}

/* 3 · Control flotante alternativo: pastilla de carrito, en vez del circulo aislado */
#orsivan-preview .floating-cart:not([hidden]){
  display:flex!important;
  width:auto!important;
  min-width:135px!important;
  height:53px!important;
  padding:0 20px 0 14px!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  border:1px solid #ffffff30!important;
  border-radius:16px!important;
  background:#1044c7!important;
  box-shadow:0 10px 29px rgba(5,38,127,.24)!important;
}
#orsivan-preview .floating-cart::after{
  content:'Mi carrito';
  font:750 12px Poppins,Arial,sans-serif;
  white-space:nowrap;
  color:#fff;
}
#orsivan-preview .floating-cart .icon{
  flex:none;
  width:22px!important;
  height:22px!important;
}
#orsivan-preview .floating-cart-badge{
  top:-8px!important;
  right:-8px!important;
  border:2px solid #fff!important;
  min-width:24px!important;
  height:24px!important;
  font-size:11px!important;
}
#orsivan-preview .floating-cart:hover:not([hidden]){
  background:#0a329e!important;
  transform:translateY(-3px)!important;
}
#orsivan-preview .floating-cart-copy{right:151px!important;}

@media(max-width:980px){
  #orsivan-preview .product-card .product-name h3{font-size:16px!important;min-height:46px!important}
  #orsivan-preview .related-card-title{font-size:15px!important;min-height:44px!important}
}
@media(max-width:760px){
  #orsivan-preview .product-card .product-name h3{font-size:15px!important;line-height:1.42!important;min-height:44px!important}
  #orsivan-preview .product-card .product-price-row{min-height:60px!important}
  #orsivan-preview .product-card .price-stack{grid-template-rows:26px 30px!important;min-height:57px!important}
  #orsivan-preview .premium-card-actions .premium-view-button{
    width:45px!important;
    min-width:45px!important;
    flex-basis:45px!important;
    min-height:39px!important;
  }
  #orsivan-preview .premium-card-actions .premium-view-button::after{font-size:10px!important}
  #orsivan-preview .related-card{
    flex:0 0 158px!important;
    min-width:158px!important;
  }
  #orsivan-preview .related-card-title{
    font-size:14px!important;
    line-height:1.42!important;
    min-height:44px!important;
    margin-bottom:8px!important;
  }
  #orsivan-preview .related-card-category{font-size:8px!important;min-height:12px}
  #orsivan-preview .related-card-price{font-size:18px!important}
  #orsivan-preview .related-add{font-size:10px!important;min-height:39px!important}
  #orsivan-preview .floating-cart:not([hidden]){
    width:53px!important;
    min-width:53px!important;
    height:53px!important;
    padding:0!important;
    border-radius:16px!important;
  }
  #orsivan-preview .floating-cart::after{content:none;}
}
@media(max-width:380px){
  #orsivan-preview .product-card .product-name h3{font-size:14px!important;min-height:42px!important}
  #orsivan-preview .related-card{flex-basis:152px!important;min-width:152px!important}
  #orsivan-preview .related-card-title{font-size:13.5px!important}
}
@media(prefers-reduced-motion:reduce){
  #orsivan-preview .related-card,#orsivan-preview .related-add,#orsivan-preview .floating-cart{transition:none!important}
}
