/* JABAA Shop V2 — targeted, production-safe presentation enhancements. */
[hidden] { display: none !important; }
html { scroll-padding-top: 76px; }
/* HOMEPAGE */
.hero { padding-block: clamp(2.1rem, 5vw, 4.9rem) 1rem; }
.hero-copy-wrap { max-width: 970px; }
.hero-kicker, .browse-eyebrow { color:#5df8a3; font-weight:850; font-size:.68rem; letter-spacing:.20em; text-transform:uppercase; }
.hero-title { max-width: 860px; font-size:clamp(2.6rem, 5.3vw, 5.3rem); line-height:1.065; letter-spacing:-.049em; overflow-wrap:break-word; }
.hero-copy { max-width:665px; font-size:clamp(.95rem,1.3vw,1.075rem);line-height:1.7;color:#b1c3b7; }
.hero-categories { display:flex; flex-wrap:wrap; gap:.65rem; margin:1.5rem 0 0; }
.hero-categories span { display:inline-flex;align-items:center;gap:.48rem;background:linear-gradient(135deg,#101e16,#0a130e);border:1px solid rgba(47,244,136,.13);border-radius:13px;color:#d7eade;padding:.8rem 1rem;font-size:.78rem;font-weight:650; }
.hero-categories svg {width:18px;height:18px;color:#37ef91}
.hero-signoff {font-size:.79rem;color:#97a99c;margin-top:1.05rem}
.marketplace-toolbar{padding:1.45rem 0 .5rem;scroll-margin-top:77px;}
.marketplace-topline{display:flex;align-items:end;justify-content:space-between;gap:1rem;margin-bottom:1rem;}
.marketplace-topline h2{font-size:clamp(1.28rem,2.2vw,1.7rem);font-weight:850;letter-spacing:-.035em;line-height:1.23;margin-top:.25rem}
.catalog-count{font-size:.76rem;color:#8da298;white-space:nowrap}
.catalog-searchbox{border:1px solid rgba(76,238,146,.22);background:linear-gradient(100deg,#101d15,#0b150f);border-radius:15px;min-height:51px;padding:.4rem .8rem;display:flex;align-items:center;gap:.7rem}
.catalog-searchbox svg{width:21px;height:21px;flex-shrink:0;color:#87bfa0}
.catalog-searchbox input{border:none;outline:none;background:transparent;color:#f5fff8;font-size:.95rem;width:100%;min-width:0}
.catalog-searchbox input::placeholder{color:#728f7f}
.catalog-searchbox button{border:0;border-radius:9px;background:#1b3022;color:#a0d9b7;padding:.45rem .7rem;font-size:.72rem}
.catalog-controls,.catalog-types{display:flex;overflow-x:auto;gap:.5rem;scrollbar-width:none; padding:.85rem 0 .15rem;}
.catalog-types{padding-top:.58rem;padding-bottom:.5rem}
.catalog-controls::-webkit-scrollbar,.catalog-types::-webkit-scrollbar{display:none}
.market-tab,.type-tab{border:1px solid rgba(255,255,255,.12);white-space:nowrap;flex-shrink:0;color:#c4d3c9;background:#111c15;font-size:.81rem;font-weight:720;min-height:40px;padding:.55rem .95rem;border-radius:999px;display:inline-flex;align-items:center;gap:.3rem}
.type-tab{min-height:32px;font-size:.73rem;padding:.4rem .75rem}
.market-tab svg{width:15px;height:15px}
.market-tab.active,.type-tab.active{background:#27ed80;border-color:#27ed80;color:#06140b}
.catalog-empty,.favorites-notice{margin:.5rem 0 1rem;border:1px dashed rgba(68,222,130,.3);background:#112218;border-radius:14px;padding:1.2rem;color:#c5ebd2;text-align:center;font-size:.88rem}
.catalog-section{padding:1.4rem 0 0}
.catalog-head{margin-bottom:1rem}
.catalog-head p{font-size:.81rem;color:#90a59a}
.product-grid{grid-template-columns:repeat(auto-fill,minmax(240px,310px));gap:1rem}
.product-card{border-radius:16px;background:linear-gradient(160deg,#101d15,#08110c);min-width:0}
.product-media{aspect-ratio:16/10;background:linear-gradient(145deg,#0a140d,#17251a);display:flex;align-items:center;justify-content:center}
.product-media img{object-fit:contain;}
.product-card.is-video .product-media{aspect-ratio:16/9}
.product-card.is-ebook .product-media{aspect-ratio:2/3;max-height:315px}
.product-card.is-digital .product-media{aspect-ratio:16/10}
.product-body{padding:1.05rem;gap:.15rem;min-width:0}
.product-card-heading{display:flex;align-items:center;justify-content:space-between;gap:.55rem;margin-bottom:.35rem}
.product-type{font-size:.72rem;color:#59e897; margin:0;min-width:0;overflow-wrap:anywhere}
.product-title{font-size:1.03rem;font-weight:820;line-height:1.34;overflow-wrap:anywhere}
.product-category{font-size:.7rem;color:#859b8c;line-height:1.4}
.product-desc{font-size:.79rem;line-height:1.58;color:#b0bdb5;margin-top:.4rem;overflow-wrap:anywhere;white-space:normal}
.clamp-3{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.readmore-button{align-self:flex-start;font-size:.75rem;color:#53f39d;font-weight:750;padding:.35rem 0;border:0;background:none;text-align:left}
.favorite-button{width:34px;height:34px;flex-shrink:0;display:grid;place-items:center;border-radius:10px;color:#9cae9f;border:1px solid rgba(255,255,255,.12);background:#142219;cursor:pointer}
.favorite-button svg{height:17px;width:17px;pointer-events:none}
.favorite-button.is-saved{color:#39f18b;border-color:rgba(57,241,139,.42);background:#153b25}
.favorite-button.is-saved svg{fill:currentColor}
.favorite-button:disabled{opacity:.55}
.product-price{font-size:1.03rem}
.product-price span{font-size:.73rem;color:#a6c2b0}
.product-footer{gap:.7rem;min-width:0;margin-top:auto;padding-top:.9rem}
.product-button{min-width:0;flex:1;min-height:43px;font-size:.78rem;border-radius:11px}
.preview-button{font-size:.75rem;min-height:36px;margin-top:.5rem}
.product-grid .product-card[hidden]{display:none!important}
/* DASHBOARD */
body.dashboard-v2{overflow-x:hidden}
.dashboard-v2 .dash-stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.dashboard-v2 .stat-card{min-width:0;padding:1.15rem 1rem;border-radius:18px}
.dashboard-v2 .stat-number{font-size:clamp(1.35rem,3vw,2.3rem);overflow-wrap:anywhere;line-height:1.3}
.dashboard-v2 .stat-label{line-height:1.4;letter-spacing:.05em}
.dashboard-v2 .dash-tabbar{display:flex;gap:.55rem;overflow-x:auto;scrollbar-width:none}
.dashboard-v2 .dash-tabbar .tab-btn{flex-shrink:0;white-space:nowrap;min-height:42px}
.dashboard-v2 .dash-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(255px,1fr));gap:1rem}
.dashboard-v2 .dash-product-card{display:flex;flex-direction:column;min-width:0;overflow:hidden;border-radius:16px;border:1px solid rgba(70,165,95,.18);background:#0e1a13}
.dashboard-v2 .dash-product-media{aspect-ratio:16/10;display:flex;align-items:center;justify-content:center;background:#101b14;overflow:hidden}
.dashboard-v2 .dash-product-card[data-kind="video"] .dash-product-media{aspect-ratio:16/9}
.dashboard-v2 .dash-product-card[data-kind="ebook"] .dash-product-media{aspect-ratio:2/3;max-height:300px}
.dashboard-v2 .dash-product-media img{width:100%;height:100%;object-fit:contain}
.dashboard-v2 .dash-product-body{padding:1rem;flex:1;display:flex;flex-direction:column;gap:.5rem}
.dashboard-v2 .dash-product-type{font-size:.72rem;color:#63e79c;font-weight:700}
.dashboard-v2 .dash-product-title{font-size:1rem;font-weight:800;color:#fff;line-height:1.3;overflow-wrap:anywhere}
.dashboard-v2 .dash-product-desc{color:#a6b4aa;font-size:.79rem;line-height:1.52;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.dashboard-v2 .dash-product-actions{margin-top:auto;padding-top:.4rem;display:grid;gap:.55rem}
.dashboard-v2 .dash-product-price{font-size:1.05rem;font-weight:850;color:#effff2}
.dashboard-v2 .dash-product-actions .btn-primary,.dashboard-v2 .dash-product-actions .btn-outline{justify-content:center;width:100%;min-height:42px}
.dashboard-v2 .transactions-shell{overflow-x:auto;}
.dashboard-v2 .transactions-shell table{min-width:580px}
/* COURSE */
body.course-v2 .pdf-cover-container{aspect-ratio:2/3;max-width:370px}
body.course-v2 .pdf-cover-container img{object-fit:contain}
body.course-v2 .video-container{aspect-ratio:16/9;height:auto;padding-bottom:0}
body.course-v2 .video-container iframe{position:absolute;inset:0;width:100%;height:100%}
@media (max-width: 767px){
 .page-shell{width:calc(100% - 32px)}
 .site-nav{height:62px}
 .hero{padding:2.15rem 0 .4rem}
 .hero-title{font-size:clamp(2.12rem,9.7vw,3.18rem);line-height:1.095;max-width:540px;letter-spacing:-.045em}
 .hero-copy{font-size:.92rem;line-height:1.65;margin-top:1.05rem}
 .hero-actions{display:flex;flex-direction:column;gap:.65rem;margin-top:1.35rem}
 .cta{width:100%;min-height:47px;font-size:.83rem;max-width:530px}
 .hero-categories{gap:.55rem;margin-top:1.25rem}
 .hero-categories span{font-size:.7rem;padding:.6rem .67rem;flex:1 1 115px;justify-content:center;text-align:center}
 .hero-categories svg{width:15px;height:15px;flex-shrink:0}
 .hero-signoff{margin-top:.9rem;font-size:.76rem}
 .catalog-section{padding-top:1.1rem}
 .catalog-head h2{font-size:1.2rem}
 .catalog-head p{font-size:.75rem;line-height:1.5}
 .marketplace-toolbar{padding:1.65rem 0 .25rem}
 .marketplace-topline{align-items:center}
 .marketplace-topline h2{font-size:1.2rem}
 .product-grid{grid-template-columns:minmax(0,1fr);gap:.82rem}
 .product-card{display:flex;flex-direction:row;align-items:stretch;border-radius:17px;min-height:185px}
 .product-media,.product-card.is-ebook .product-media,.product-card.is-digital .product-media{aspect-ratio:auto;width:35%;min-width:108px;flex-shrink:0;border-radius:0;background:linear-gradient(135deg,#0b150e,#15251a)}
 .product-card.is-ebook .product-media img,.product-card.is-digital .product-media img{object-fit:contain;padding:.32rem}
 .product-body{padding:.8rem .82rem;gap:0}
 .product-title{font-size:.92rem;line-height:1.35}
 .product-desc{font-size:.76rem;line-height:1.42;margin-top:.28rem}
 .product-footer{gap:.5rem;padding-top:.55rem;flex-wrap:wrap}
 .product-price{font-size:.87rem}
 .product-button{min-height:37px;font-size:.73rem;padding:.48rem .55rem}
 .favorite-button{width:30px;height:30px}
 .product-card.is-video{flex-direction:column}
 .product-card.is-video .product-media{width:100%;aspect-ratio:16/9;min-height:0}
 .product-card.is-video .product-body{padding:.9rem}
 .product-card.is-video .product-title{font-size:1rem}
 .dashboard-v2 main{padding-left:1rem;padding-right:1rem;padding-top:5.75rem}
 .dashboard-v2 .dash-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;margin-bottom:1.25rem}
 .dashboard-v2 .stat-card{padding:.95rem .55rem;border-radius:15px}
 .dashboard-v2 .stat-number{font-size:clamp(1.5rem,6.2vw,2rem);white-space:nowrap;letter-spacing:-.025em}
 .dashboard-v2 .stat-label{font-size:.7rem}
 .dashboard-v2 .stat-card:last-child{grid-column:1 / -1;text-align:left;padding:1rem 1.1rem}
 .dashboard-v2 .stat-card:last-child .stat-number{font-size:clamp(1.5rem,7vw,2rem);margin-top:.3rem}
 .dashboard-v2 .dash-tabbar{margin-bottom:1.15rem;padding-bottom:.8rem}
 .dashboard-v2 .dash-tabbar .tab-btn{font-size:.75rem;padding:.55rem .76rem}
 .dashboard-v2 .dash-product-grid{grid-template-columns:1fr;gap:.8rem}
 .dashboard-v2 .dash-product-card{flex-direction:row;min-height:155px}
 .dashboard-v2 .dash-product-media,.dashboard-v2 .dash-product-card[data-kind="video"] .dash-product-media,.dashboard-v2 .dash-product-card[data-kind="ebook"] .dash-product-media{width:35%;min-width:110px;aspect-ratio:auto;flex-shrink:0}
 .dashboard-v2 .dash-product-body{padding:.75rem;min-width:0;gap:.35rem}
 .dashboard-v2 .dash-product-title{font-size:.89rem}
 .dashboard-v2 .dash-product-desc{font-size:.73rem;-webkit-line-clamp:2}
 .dashboard-v2 .dash-product-actions .btn-primary,.dashboard-v2 .dash-product-actions .btn-outline{min-height:37px;font-size:.73rem}
 .dashboard-v2 .transactions-shell table{min-width:unset;width:100%}
 .dashboard-v2 .transactions-shell thead{display:none}
 .dashboard-v2 .transactions-shell tbody{display:grid;gap:.65rem;padding:.7rem}
 .dashboard-v2 .transactions-shell tr{display:grid;grid-template-columns:1fr 1fr;border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:.55rem;background:#112018}
 .dashboard-v2 .transactions-shell td{font-size:.77rem;padding:.45rem;overflow-wrap:anywhere}
 .dashboard-v2 .transactions-shell td:first-child{grid-column:1/-1;font-weight:700}
 .dashboard-v2 .transactions-shell td::before{content:attr(data-label);display:block;color:#8caa99;font-size:.67rem;font-weight:600;margin-bottom:.2rem}
 body.course-v2 main{padding-left:1rem;padding-right:1rem}
 body.course-v2 .pdf-cover-container{max-width:min(75vw,310px)}
}
@media(max-width:355px){
 .product-media,.product-card.is-ebook .product-media,.product-card.is-digital .product-media{min-width:94px;width:32%}
 .product-body{padding:.68rem}
 .product-button{font-size:.67rem}
 .product-price{font-size:.8rem}
 .market-tab{padding:.5rem .7rem;font-size:.75rem}
}
@media(prefers-reduced-motion: reduce){.product-card,.favorite-button{transition:none!important}}

/* Media fallback should only appear for invalid or broken covers */
.image-fallback.hidden { display:none !important; }
@media (max-width:767px) {
  /* Portrait book cover at left, but allow horizontal mobile card height to follow content */
  .product-card.is-ebook .product-media {max-height:none;aspect-ratio:auto;}
  .dashboard-v2 .dash-product-card[data-kind="ebook"] .dash-product-media {max-height:none;aspect-ratio:auto;}
}

/* Preserve 16:9 video course artwork on mobile dashboards. */
@media(max-width:767px) {
 .dashboard-v2 .dash-product-card[data-kind="video"] {flex-direction:column;}
 .dashboard-v2 .dash-product-card[data-kind="video"] .dash-product-media {width:100%;min-width:0;aspect-ratio:16/9;}
}
