/* JABAA Shop V3.1 — product presentation, responsive touch targets and details.
   This stylesheet is intentionally loaded after shop-v3.css and does not alter checkout, favicons or Supabase data. */
:root{--j-shop-green:#35ec86;--j-shop-lime:#a7ff53;--j-shop-muted:#a3b8aa}
html{scroll-padding-top:84px}
.catalog-section{scroll-margin-top:80px}
.product-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,190px),1fr))!important;
  gap:14px!important;align-items:stretch
}
.product-grid>.product-card{min-width:0!important;min-height:0!important}
.product-card{
  display:flex!important;flex-direction:column!important;overflow:hidden!important;
  isolation:isolate;position:relative;
  border:1px solid rgba(121,243,158,.14)!important;
  border-radius:17px!important;background:linear-gradient(156deg,#13251a,#0b150e 78%)!important;
  box-shadow:0 9px 28px rgba(0,0,0,.16)!important;transition:box-shadow .2s,border-color .2s,transform .2s!important
}
.product-card:hover,.product-card:focus-within{border-color:rgba(96,252,144,.46)!important;box-shadow:0 13px 38px rgba(0,0,0,.32)!important}
.product-card .product-media{
  width:100%!important;min-width:0!important;max-height:none!important;
  flex:0 0 auto;position:relative;display:flex;align-items:center;justify-content:center;
  overflow:hidden;cursor:pointer;outline-offset:-4px;
  background:radial-gradient(ellipse at 50% 40%,#1b3b28 0%,#10231a 48%,#0a160f 100%)!important
}
.product-card.is-ebook .product-media{
  aspect-ratio:5/5.8!important;padding:17px 14px!important;
  perspective:850px;
}
.product-card.is-digital .product-media{aspect-ratio:5/4.7!important;padding:12px!important}
.product-card.is-video .product-media{
  aspect-ratio:16/10!important;padding:0!important;background:#071910!important
}
.product-card .product-media:focus-visible{outline:3px solid var(--j-shop-lime)!important;outline-offset:-4px}
.product-card.is-ebook .jabaa-book-3d{
  display:block;position:relative;width:auto;height:100%;max-width:86%;aspect-ratio:2/3;
  transform:rotateY(-9deg) rotateZ(-1.4deg) translateX(3px);
  transform-style:preserve-3d;filter:drop-shadow(11px 12px 11px rgba(0,0,0,.52));
  transition:transform .24s ease,filter .24s ease;
}
.product-card.is-ebook:hover .jabaa-book-3d,.product-card.is-ebook .product-media:focus-visible .jabaa-book-3d{
  transform:rotateY(-3deg) rotateZ(0deg) translateY(-3px);
  filter:drop-shadow(12px 14px 15px rgba(0,0,0,.6))
}
.product-card.is-ebook .jabaa-book-3d::before{
  content:"";position:absolute;top:3px;left:-10px;bottom:5px;width:12px;
  transform:skewY(-13deg);transform-origin:right center;
  background:linear-gradient(90deg,#08140e,#47624e 35%,#183023 75%,#07180e);
  border-radius:3px 0 0 3px;box-shadow:inset 1px 0 rgba(255,255,255,.18)
}
.product-card.is-ebook .jabaa-book-3d::after{
  content:"";pointer-events:none;position:absolute;z-index:3;top:0;bottom:0;left:0;width:10%;
  background:linear-gradient(90deg,rgba(0,0,0,.37),rgba(255,255,255,.1) 48%,transparent)
}
.product-card.is-ebook .jabaa-book-3d img{
  display:block;width:100%!important;height:100%!important;padding:0!important;
  object-fit:cover!important;position:relative;z-index:2;transform:none!important;
  border-radius:2px 6px 6px 2px;border:1px solid rgba(255,255,255,.13);
  box-shadow:3px 0 0 #233d2a,7px 0 0 #0a160f,0 2px 12px rgba(0,0,0,.4);
  filter:none!important
}
.product-card.is-ebook .jabaa-book-3d>.image-fallback{height:100%;width:100%;display:grid;place-items:center}
.product-card.is-video .product-media>img{
  display:block;width:100%!important;height:100%!important;object-fit:cover!important;
  padding:0!important;transform:none!important;filter:brightness(.8) saturate(1.08)!important;
  transition:filter .2s!important
}
.product-card.is-video:hover .product-media>img{filter:brightness(.96) saturate(1.12)!important}
.jabaa-video-play{
  position:absolute;z-index:2;left:50%;top:50%;transform:translate(-50%,-50%);
  width:45px;height:45px;border-radius:50%;display:grid;place-items:center;
  background:rgba(12,25,18,.85);border:1px solid rgba(203,255,214,.68);box-shadow:0 6px 24px #0008;
  color:#baff8f;pointer-events:none
}
.jabaa-video-play::after{content:"";margin-left:3px;border-top:8px solid transparent;border-bottom:8px solid transparent;border-left:12px solid currentColor}
.jabaa-video-tag{
  position:absolute;z-index:2;left:10px;bottom:10px;border-radius:7px;
  background:rgba(1,19,11,.88);border:1px solid rgba(90,240,141,.32);
  padding:5px 8px;color:#d3ffdf;font-weight:800;font-size:.64rem;pointer-events:none
}
.product-card .product-body{
  display:flex!important;flex-direction:column!important;flex:1 1 auto!important;
  min-width:0!important;padding:13px 12px 12px!important;gap:0!important
}
.product-card .product-card-heading{gap:8px!important;margin-bottom:7px!important}
.product-card .product-type{font-size:.66rem!important;line-height:1.45!important;color:#70eaa2!important;font-weight:750}
.product-card .favorite-button{min-width:40px!important;width:40px!important;height:40px!important;border-radius:11px!important}
.product-card .product-category{display:block!important;color:#92b29e!important;font-size:.67rem!important;line-height:1.35!important;margin-bottom:5px}
.product-card .product-title{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;
  min-height:2.55em!important;max-height:2.55em!important;overflow:hidden!important;
  font-size:.90rem!important;line-height:1.28!important;font-weight:820!important;color:#f4fff5!important}
.product-card .product-desc{
  display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;
  max-height:3em!important;overflow:hidden!important;white-space:normal!important;
  color:#a6bcad!important;font-size:.72rem!important;line-height:1.5!important;margin:7px 0 1px!important;
}
.product-card .readmore-button{
  display:inline-flex!important;align-items:center;gap:5px;
  align-self:flex-start;min-height:40px!important;cursor:pointer;
  padding:8px 2px!important;font-size:.73rem!important;color:#92ffb2!important;
  font-weight:850!important;text-decoration:underline;text-decoration-color:transparent;
  text-underline-offset:3px
}
.product-card .readmore-button:hover,.product-card .readmore-button:focus-visible{text-decoration-color:currentColor}
.product-card .readmore-button[hidden]{display:none!important}
.product-card .product-footer{display:flex!important;flex-direction:column!important;
  gap:8px!important;align-items:stretch!important;padding-top:9px!important;margin-top:auto!important}
.product-card .product-price{font-size:1.06rem!important;color:#fff!important;line-height:1.25;font-weight:900!important}
.product-card .product-button{
  display:flex;align-items:center;justify-content:center;gap:6px;
  width:100%!important;min-height:44px!important;border-radius:10px!important;
  font-size:.79rem!important;font-weight:850!important;padding:10px!important;
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;
}
.product-card .preview-button{align-self:flex-start;min-height:38px;display:inline-flex;align-items:center;gap:5px}
/* Product-detail overlay: a genuine modal rather than clipped in-card expansion. */
.jabaa-details-root[hidden]{display:none!important}
.jabaa-details-root{position:fixed;z-index:9999;inset:0;display:grid;align-items:center;justify-items:center;padding:16px;overscroll-behavior:contain}
.jabaa-details-shade{position:absolute;inset:0;background:rgba(0,10,6,.83);backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px)}
.jabaa-details-dialog{
  isolation:isolate;position:relative;z-index:1;width:min(860px,100%);
  max-height:min(90dvh,920px);overflow-y:auto;overscroll-behavior:contain;
  background:linear-gradient(150deg,#152b1e,#081810 75%);
  border:1px solid rgba(120,255,162,.24);border-radius:23px;
  box-shadow:0 25px 80px rgba(0,0,0,.72);color:#f2fff5
}
.jabaa-details-topbar{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;
  padding:12px 18px;background:rgba(7,32,18,.94);border-bottom:1px solid rgba(118,228,151,.14);backdrop-filter:blur(12px)}
.jabaa-details-topbar span{font-size:.73rem;font-weight:850;letter-spacing:.11em;color:#aff5bf;text-transform:uppercase}
.jabaa-details-close{height:44px;width:44px;display:grid;place-items:center;border:1px solid #385946;border-radius:12px;
  font-size:1.45rem;line-height:1;color:#eaffef;background:#123324;cursor:pointer}
.jabaa-details-layout{display:grid;grid-template-columns:minmax(220px,.78fr) minmax(0,1.22fr);gap:26px;padding:26px}
.jabaa-details-art{position:relative;min-height:320px;display:grid;place-items:center;align-self:start;
  border-radius:17px;background:radial-gradient(circle at 50% 45%,#254a32,#0c2014 73%);overflow:hidden;padding:25px}
.jabaa-details-art.is-book img{width:min(76%,240px);aspect-ratio:2/3;object-fit:contain;
  transform:perspective(880px) rotateY(-7deg);border-radius:3px 7px 7px 3px;
  box-shadow:-9px 0 0 #183324,-13px 0 0 #0a170f,15px 17px 25px #0008}
.jabaa-details-art.is-video{min-height:210px;aspect-ratio:16/10;padding:0}
.jabaa-details-art.is-video img{width:100%;height:100%;object-fit:cover}
.jabaa-details-art.is-video::after{content:'▶';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:68px;height:68px;display:grid;place-items:center;background:#061810dc;border:1px solid #b8ff9b;border-radius:50%;font-size:1.6rem;color:#aaff81}
.jabaa-details-art.is-digital{min-height:245px}
.jabaa-details-art.is-digital img{max-width:95%;max-height:250px;object-fit:contain}
.jabaa-details-art img{display:block}
.jabaa-details-meta{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin-bottom:12px}
.jabaa-details-chip{background:#163c26;color:#b5f9c7;font-size:.7rem;padding:5px 9px;border:1px solid #286a3f;border-radius:7px;font-weight:780}
.jabaa-details-title{font-size:clamp(1.32rem,2.6vw,2rem)!important;line-height:1.19!important;letter-spacing:-.03em;font-weight:900;color:#fff;margin-bottom:17px;overflow-wrap:anywhere}
.jabaa-details-subheading{font-size:.77rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#b3eec2;margin-bottom:8px}
.jabaa-details-description{color:#c7d8c9;white-space:pre-line;overflow-wrap:anywhere;line-height:1.69;font-size:.91rem;max-width:65ch}
.jabaa-details-facts{display:flex;flex-wrap:wrap;gap:8px;margin:19px 0;padding:0;list-style:none}
.jabaa-details-facts li{font-size:.72rem;padding:7px 10px;border:1px solid #29523a;background:#10271b;border-radius:9px;color:#d8eedc}
.jabaa-details-bottom{border-top:1px solid rgba(130,243,155,.16);padding-top:15px;margin-top:5px}
.jabaa-details-price-label{display:block;font-size:.72rem;color:#a7baaa;font-weight:750}
.jabaa-details-price{font-size:1.55rem;color:#d8ffb9;font-weight:950;margin:2px 0 14px}
.jabaa-details-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.jabaa-details-buy{flex:1 1 180px;min-height:48px;background:linear-gradient(90deg,#8dfa4d,#2ce87a);color:#082313;
  border:0;border-radius:12px;padding:10px 18px;font-weight:900;cursor:pointer;touch-action:manipulation}
.jabaa-details-buy:disabled{opacity:.55;cursor:not-allowed}
.jabaa-details-preview{min-height:48px;display:inline-flex;align-items:center;justify-content:center;gap:5px;
  border:1px solid #52795d;border-radius:12px;padding:10px 14px;color:#e8ffe9;text-decoration:none;font-weight:750;font-size:.79rem}
.jabaa-details-footer{font-size:.72rem;color:#93a99a;margin-top:14px;line-height:1.5}
@media(max-width:767px){
 .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:11px!important}
 .product-card{flex-direction:column!important;border-radius:15px!important}
 .product-card.is-ebook .product-media{aspect-ratio:4/4.9!important;padding:12px!important}
 .product-card.is-ebook .jabaa-book-3d{max-width:83%;height:94%}
 .product-card .product-body{padding:11px 9px!important}
 .product-card .product-type{font-size:.61rem!important}
 .product-card .product-category{font-size:.62rem!important}
 .product-card .product-title{font-size:.82rem!important}
 .product-card .product-desc{font-size:.68rem!important}
 .product-card .favorite-button{width:40px!important;height:40px!important;min-width:40px!important}
 .product-card .product-price{font-size:.99rem!important}
 .product-card .product-button{min-height:44px!important;font-size:.76rem!important}
 .jabaa-details-root{padding:0;align-items:end}
 .jabaa-details-dialog{width:100%;max-height:94dvh;max-height:94svh;border-radius:22px 22px 0 0;border-bottom:0}
 .jabaa-details-layout{grid-template-columns:1fr;gap:16px;padding:17px}
 .jabaa-details-art{min-height:230px;padding:13px}
 .jabaa-details-art.is-book img{width:min(56%,185px)}
 .jabaa-details-art.is-video{min-height:190px}
 .jabaa-details-title{font-size:1.36rem!important;margin-bottom:12px}
 .jabaa-details-topbar{padding:9px 15px}
 .jabaa-details-actions{display:grid;grid-template-columns:1fr}
 .jabaa-details-preview{width:100%}
}
@media(max-width:365px){
 .product-grid{gap:8px!important}
 .product-card .product-body{padding:9px 7px!important}
 .product-card.is-ebook .product-media{aspect-ratio:4/5.2!important}
 .product-card .product-title{font-size:.78rem!important}
 .product-card .product-type{font-size:.57rem!important}
 .product-card .readmore-button{font-size:.70rem!important}
}
@media(hover:none){.product-card:active{border-color:#52e891!important}.product-card .product-media{touch-action:manipulation}}
@media(prefers-reduced-motion:reduce){.product-card,.jabaa-book-3d{transition:none!important}}
