/* JABAA Shop V3.2 — compact, editorial digital bookstore presentation.
   Loaded last. Original checkout, databases, favicons and product details remain unchanged. */
:root{--v32-mint:#5aed9b;--v32-gold:#dfc68f}
.product-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,175px),1fr))!important;
  gap:clamp(9px,1.25vw,15px)!important;align-items:stretch!important;
}
.product-grid>.product-card{min-height:0!important;min-width:0!important}
.product-card{
  position:relative;display:flex!important;flex-direction:column!important;
  border-radius:14px!important;border:1px solid rgba(153,210,171,.15)!important;
  background:linear-gradient(162deg,#122019,#0a140e 78%)!important;
  box-shadow:0 5px 16px rgba(0,0,0,.18)!important;overflow:hidden!important;
}
.product-card:hover,.product-card:focus-within{
  border-color:rgba(104,237,159,.4)!important;
  box-shadow:0 12px 30px rgba(0,0,0,.3)!important;
}
/* A real-book shelf presentation: portrait cover within a shallow dark showcase. */
.product-card .product-media,
.product-card.is-ebook .product-media,
.product-card.is-digital .product-media,
.product-card.is-video .product-media{
  width:100%!important;min-width:0!important;max-height:none!important;
  height:clamp(148px,14.7vw,196px)!important;aspect-ratio:auto!important;
  flex:0 0 auto!important;padding:10px 12px!important;
  background:radial-gradient(ellipse at 50% 40%,#23422d 0%,#13271b 40%,#0a140e 82%)!important;
  border-bottom:1px solid rgba(255,255,255,.045);
}
.product-card .product-media::before{content:'';position:absolute;left:12%;right:12%;bottom:7px;height:10px;border-radius:50%;background:#0008;filter:blur(6px);pointer-events:none}
.product-card.is-ebook .jabaa-book-3d{
  height:96%!important;max-width:83%!important;width:auto!important;aspect-ratio:2/3!important;
  transform:perspective(850px) rotateY(-8deg) rotateZ(-.65deg) translateX(2px)!important;
  filter:drop-shadow(7px 7px 6px rgba(0,0,0,.52))!important;
}
.product-card.is-ebook .jabaa-book-3d::before{left:-7px!important;width:9px!important}
.product-card.is-ebook .jabaa-book-3d img{height:100%!important;width:100%!important;object-fit:cover!important}
.product-card.is-video .product-media{padding:8px!important;background:#0a1c14!important}
.product-card.is-video .product-media>img{width:100%!important;height:100%!important;object-fit:contain!important;border-radius:7px!important}
.product-card.is-digital .product-media img{width:100%!important;height:100%!important;object-fit:contain!important}
.jabaa-video-play{width:38px!important;height:38px!important;box-shadow:0 6px 15px #0008!important}
.jabaa-video-tag{left:9px!important;bottom:9px!important;font-size:.56rem!important;padding:4px 6px!important}
/* Remove editorial overflow from cards, retain full description in the details dialog. */
.product-card .product-body{
  padding:10px 10px 11px!important;display:flex!important;flex-direction:column!important;
  flex:1 1 auto!important;min-width:0!important;
}
.product-card .product-card-heading{margin:0 0 5px!important;min-height:15px!important;display:block!important}
.product-card .product-type{
  font-size:.6rem!important;letter-spacing:.015em;line-height:1.15!important;
  margin:0!important;color:#86cfa1!important;font-weight:780!important;
}
.product-card .product-type svg{width:12px!important;height:12px!important}
.product-card .product-category,
.product-card .product-desc,
.product-card .readmore-button{display:none!important}
.product-card .product-title{
  display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;
  overflow:hidden!important;min-height:2.5em!important;max-height:2.5em!important;
  color:#f4fff5!important;font-size:.82rem!important;line-height:1.25!important;
  font-weight:850!important;letter-spacing:-.015em;margin:0!important;
}
/* Wishlist is a corner affordance, not a full-height row. */
.product-card .favorite-button{
  position:absolute!important;z-index:5!important;right:8px!important;top:8px!important;
  min-width:33px!important;width:33px!important;height:33px!important;
  border:1px solid rgba(209,255,224,.2)!important;border-radius:10px!important;
  background:rgba(5,21,12,.82)!important;backdrop-filter:blur(8px);
  box-shadow:0 2px 10px #0005;
}
.product-card .favorite-button svg{width:16px!important;height:16px!important}
.product-card .product-footer{
  display:flex!important;flex-direction:column!important;align-items:stretch!important;
  margin-top:auto!important;padding-top:8px!important;gap:6px!important;
}
.product-card .product-price{
  font-size:.96rem!important;line-height:1.1!important;font-weight:900!important;
  letter-spacing:-.025em!important;color:#f4fff5!important;
}
.product-card .product-price span:not(.shop-free-price){font-size:.73em!important;color:#a7c2ae!important;font-weight:700!important}
.product-card .product-button{
  width:100%!important;min-height:39px!important;border-radius:9px!important;
  padding:7px 8px!important;font-size:.76rem!important;font-weight:880!important;
  background:linear-gradient(110deg,#55e99a,#21cc73)!important;
  box-shadow:none!important;
}
.product-card .product-button:hover{background:linear-gradient(110deg,#7df4af,#34db82)!important}
.product-card .preview-button{display:none!important} /* Available in the details dialog instead. */
.product-card:focus-within .product-media{outline-offset:-3px}
.product-card .product-media{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
/* The full details and previews stay in the accessible product dialog. */
.jabaa-details-description{white-space:pre-line!important}
@media (min-width:1200px){
 .product-grid{grid-template-columns:repeat(auto-fill,minmax(172px,1fr))!important}
}
@media (max-width:767px){
 .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 .product-card{border-radius:12px!important}
 .product-card .product-media,.product-card.is-ebook .product-media,
 .product-card.is-video .product-media,.product-card.is-digital .product-media{
   height:clamp(138px,39vw,160px)!important;aspect-ratio:auto!important;padding:9px!important;
 }
 .product-card .product-body{padding:8px 9px 9px!important}
 .product-card .product-card-heading{margin-bottom:4px!important}
 .product-card .product-type{font-size:.56rem!important}
 .product-card .product-title{font-size:.78rem!important;min-height:2.45em!important;max-height:2.45em!important}
 .product-card .product-footer{padding-top:6px!important;gap:5px!important}
 .product-card .product-price{font-size:.91rem!important}
 .product-card .product-button{min-height:40px!important;font-size:.73rem!important;padding:7px!important}
 .product-card .favorite-button{top:7px!important;right:7px!important;width:32px!important;height:32px!important;min-width:32px!important}
 .product-card.is-ebook .jabaa-book-3d{max-width:84%!important;height:94%!important}
}
@media(max-width:355px){
 .product-grid{gap:8px!important}
 .product-card .product-media,.product-card.is-ebook .product-media,.product-card.is-video .product-media,.product-card.is-digital .product-media{height:141px!important}
 .product-card .product-body{padding:7px!important}
 .product-card .product-title{font-size:.73rem!important}
 .product-card .product-button{font-size:.7rem!important}
}
@media(prefers-reduced-motion:reduce){.product-card,.jabaa-book-3d{transition:none!important}}
