/* Product cards V3 — compact 4-column layout matching approved reference */
.pharma-ui .group-body{padding:10px 10px 12px}

.pharma-ui .products-cards{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  align-items:start;
}

.pharma-ui .product-card{
  width:100%;
  min-width:0;
  height:178px!important;
  min-height:178px!important;
  padding:10px!important;
  display:grid!important;
  grid-template-columns:68px minmax(0,1fr)!important;
  grid-template-rows:1fr!important;
  column-gap:9px!important;
  border-radius:11px!important;
  background:
    radial-gradient(circle at 85% 12%,rgba(255,255,255,.026),transparent 30%),
    linear-gradient(145deg,#0b1217 0%,#070c10 100%)!important;
  border:1px solid #25343d!important;
  box-shadow:inset 0 1px rgba(255,255,255,.025),0 7px 18px rgba(0,0,0,.18)!important;
  overflow:hidden;
}
.pharma-ui .product-card:hover{
  transform:translateY(-1px);
  border-color:#3a4d58!important;
  box-shadow:0 10px 24px rgba(0,0,0,.24)!important;
}

/* Vial fills the left side instead of floating in empty space. */
.pharma-ui .product-visual{
  grid-column:1;
  grid-row:1;
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  padding:0;
}

/* All text is packed tightly on the right, like the approved mockup. */
.pharma-ui .product-card-copy{
  grid-column:2;
  grid-row:1;
  display:flex!important;
  flex-direction:column;
  justify-content:flex-start;
  min-width:0;
  height:100%;
  padding:1px 0 0;
}

.pharma-ui .product-title-row{
  display:flex!important;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
  position:static!important;
  min-height:0!important;
  margin:0 0 5px!important;
  padding:0!important;
}
.pharma-ui .product-title-row>div{padding:0!important;width:100%}
.pharma-ui .product-title-row strong{
  display:block;
  width:100%;
  max-width:100%;
  padding:0!important;
  font-size:11px!important;
  line-height:1.13!important;
  font-weight:950!important;
  letter-spacing:.012em!important;
  text-transform:uppercase;
  color:#f5f7f8;
  overflow-wrap:anywhere;
}
.pharma-ui .product-title-row>div>span{
  display:block;
  margin:2px 0 0!important;
  font-size:8.2px!important;
  line-height:1.08!important;
  color:#cbd3d7!important;
  font-weight:700;
}

/* Stock badge sits directly below the title, never in a far corner. */
.pharma-ui .product-title-row>.stock-pill{
  position:static!important;
  transform:none!important;
  align-self:flex-start;
  max-width:none!important;
  margin:0!important;
}

/* SKU is intentionally hidden on the compact card; it remains available elsewhere. */
.pharma-ui .product-sku{display:none!important}

.pharma-ui .product-card-bottom{
  margin-top:auto!important;
  display:flex!important;
  flex-direction:column;
  align-self:stretch;
  gap:6px!important;
}
.pharma-ui .product-price{
  display:block;
  margin:0!important;
  font-size:14px!important;
  line-height:1!important;
  font-weight:950!important;
  color:#fff;
  white-space:nowrap;
}

.pharma-ui .card-action-row{
  display:grid;
  grid-template-columns:70px minmax(0,1fr);
  gap:6px;
  align-items:center;
  width:100%;
}
.pharma-ui .card-qty{
  height:27px;
  display:grid;
  grid-template-columns:22px 26px 22px;
  align-items:center;
  border:1px solid #30404a;
  border-radius:6px;
  background:#081015;
  overflow:hidden;
}
.pharma-ui .card-qty button{
  height:100%;
  border:0;
  padding:0;
  background:transparent;
  color:#e6ecef;
  font-size:10px;
  line-height:1;
  font-weight:900;
  cursor:pointer;
}
.pharma-ui .card-qty button:hover{background:#121d23;color:var(--yellow)}
.pharma-ui .card-qty button:disabled{opacity:.28;cursor:not-allowed}
.pharma-ui .card-qty b{
  height:100%;
  display:grid;
  place-items:center;
  border-left:1px solid #26353e;
  border-right:1px solid #26353e;
  font-size:8px;
  color:#f5f7f8;
}
.pharma-ui .card-add{
  width:100%!important;
  height:27px!important;
  min-height:27px!important;
  padding:0 7px!important;
  border-radius:6px!important;
  font-size:7px!important;
  line-height:1!important;
  font-weight:950!important;
  letter-spacing:.025em!important;
  white-space:nowrap!important;
}

/* Cleaner pharmaceutical vial — large enough to visually anchor the card. */
.pharma-ui .vial-art{
  width:62px!important;
  height:124px!important;
  transform:none!important;
  filter:drop-shadow(0 10px 8px rgba(0,0,0,.5));
}
.pharma-ui .vial-cap{
  width:42px!important;
  height:14px!important;
  border-radius:5px 5px 3px 3px!important;
  box-shadow:inset 0 1px 2px rgba(255,255,255,.68),inset 0 -2px 3px rgba(0,0,0,.55)!important;
}
.pharma-ui .vial-neck{width:30px!important;height:10px!important}
.pharma-ui .vial-glass{
  width:52px!important;
  height:88px!important;
  border-radius:6px 6px 11px 11px!important;
  border-color:#40515b!important;
  background:linear-gradient(90deg,#071014 0%,#111b1f 22%,#081115 62%,#030608 100%)!important;
}
.pharma-ui .vial-label{
  left:4px!important;
  right:4px!important;
  top:29px!important;
  min-height:42px!important;
  padding:0 3px 4px!important;
  display:flex!important;
  flex-direction:column;
  justify-content:flex-start;
  align-items:stretch;
  border:1px solid rgba(255,255,255,.13)!important;
  border-radius:2px!important;
  background:linear-gradient(180deg,#11181a 0%,#080d0f 100%)!important;
  overflow:hidden;
}
.pharma-ui .vial-label:before{
  content:"";
  display:block;
  height:3px;
  margin:0 -3px 3px;
  background:hsl(var(--vial-h) 92% 52%);
  box-shadow:0 0 6px hsl(var(--vial-h) 90% 50% / .45);
}
.pharma-ui .vial-label b{
  display:block;
  margin-bottom:2px;
  color:#faef23!important;
  font-size:5.2px!important;
  line-height:1!important;
  font-weight:950!important;
  letter-spacing:.12em!important;
  text-align:center;
}
.pharma-ui .vial-label strong{
  display:-webkit-box!important;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
  color:#f3f6f7!important;
  font-size:5.2px!important;
  line-height:1.02!important;
  font-weight:900!important;
  text-align:center;
  letter-spacing:.005em!important;
}
.pharma-ui .vial-label small{display:none!important}

.pharma-ui .stock-pill{
  font-size:6.6px!important;
  padding:2px 5px!important;
  line-height:1.05!important;
  border-radius:999px!important;
}

/* Wider centre column is required to reproduce the 4-card desktop reference. */
.pharma-ui .pharma-catalog{max-width:1080px}
.pharma-ui .order-workspace{
  grid-template-columns:220px minmax(0,1080px) 300px;
  gap:18px;
  justify-content:center;
}

@media(max-width:1720px){
  .pharma-ui .order-workspace{grid-template-columns:200px minmax(0,1fr) 280px}
  .pharma-ui .pharma-catalog{max-width:none}
  .pharma-ui .products-cards{grid-template-columns:repeat(4,minmax(0,1fr))}
  .pharma-ui .product-card{grid-template-columns:64px minmax(0,1fr)!important}
  .pharma-ui .vial-art{transform:scale(.94)!important}
}

@media(max-width:1380px){
  .pharma-ui .products-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
  .pharma-ui .order-workspace{grid-template-columns:190px minmax(0,1fr) 270px}
}

@media(max-width:1080px){
  .pharma-ui .products-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pharma-ui .order-workspace{grid-template-columns:180px minmax(0,1fr) 255px}
}

@media(max-width:900px){
  .pharma-ui .order-workspace{grid-template-columns:1fr}
  .pharma-ui .products-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:620px){
  .pharma-ui .products-cards{grid-template-columns:1fr}
  .pharma-ui .product-card{height:172px!important;min-height:172px!important;grid-template-columns:66px minmax(0,1fr)!important}
  .pharma-ui .vial-art{transform:scale(.9)!important}
}
