/* Desktop-first product-card system. The original product data and purchase handlers remain unchanged. */
body.home-page #marketplace .container{max-width:1480px}
body.home-page #marketplace .section-title{align-items:flex-end;gap:18px;margin-bottom:22px}
body.home-page #marketplace .section-title h2{font-size:clamp(26px,2.4vw,38px);letter-spacing:-.035em}
body.home-page #marketplace .section-title p{max-width:680px;font-size:14px;line-height:1.65}
body.home-page #marketplace .marketplace-controls{display:grid;grid-template-columns:minmax(280px,1fr) minmax(170px,220px) minmax(150px,180px);gap:12px;align-items:center;margin:18px 0 10px}
body.home-page #marketplace .marketplace-controls .input,body.home-page #marketplace .marketplace-controls .select{min-height:46px;border-radius:12px;font-size:14px}
body.home-page #marketplace #productGrid.grid-products{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,248px),1fr));gap:22px;align-items:stretch;margin-top:16px}
body.home-page #marketplace #productGrid .product-card{position:relative;display:flex;min-width:0;min-height:100%;flex-direction:column;overflow:hidden;border:1px solid var(--tb-outline,rgba(148,163,184,.4));border-radius:18px;background:var(--tb-surface,#fff);color:var(--tb-ink,#182235);box-shadow:var(--tb-shadow,0 12px 28px rgba(15,23,42,.08));transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}
body.home-page #marketplace #productGrid .product-card::before{content:"";position:absolute;z-index:2;top:0;left:0;width:100%;height:3px;background:linear-gradient(90deg,var(--tb-accent-red,#bf1833),var(--tb-accent-gold,#c69a46),transparent)}
body.home-page #marketplace #productGrid .product-card:hover{transform:translateY(-5px);border-color:var(--tb-accent-gold,#c69a46);box-shadow:0 18px 42px rgba(15,23,42,.15)}
body.home-page #marketplace #productGrid .product-detail-link{display:block;min-width:0;text-decoration:none}
body.home-page #marketplace #productGrid .product-img{position:relative;width:100%;height:auto;min-height:0;aspect-ratio:16/10;overflow:hidden;border:0;border-bottom:1px solid var(--tb-outline,rgba(148,163,184,.4));border-radius:0;background-color:#e9edf3;background-size:cover;background-position:center;background-repeat:no-repeat}
body.home-page #marketplace #productGrid .product-img::after{content:"";position:absolute;inset:45% 0 0;background:linear-gradient(180deg,transparent,rgba(4,9,18,.26));pointer-events:none}
body.home-page #marketplace #productGrid .product-img>b{position:absolute;z-index:1;inset:0;display:grid;place-items:center;padding:20px;color:#64748b;font-size:clamp(13px,1.3vw,18px);font-weight:900;letter-spacing:.14em;text-align:center}
body.home-page #marketplace #productGrid .product-body{display:flex;flex:1;min-width:0;flex-direction:column;gap:11px;padding:17px 17px 16px;color:var(--tb-ink,#182235)}
body.home-page #marketplace #productGrid .product-body>.pill{align-self:flex-start;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:6px 9px;font-size:9px;font-weight:900;letter-spacing:.07em}
body.home-page #marketplace #productGrid .product-name-link{text-decoration:none;color:var(--tb-ink,#182235)}
body.home-page #marketplace #productGrid .product-body h3{display:-webkit-box;min-height:2.55em;margin:0;overflow:hidden;color:var(--tb-ink,#182235);font-size:clamp(15px,1.05vw,17px);font-weight:900;line-height:1.28;letter-spacing:-.02em;-webkit-box-orient:vertical;-webkit-line-clamp:2}
body.home-page #marketplace #productGrid .product-description{display:-webkit-box;min-height:3.9em;margin:0;overflow:hidden;color:var(--tb-muted,#5b6678);font-size:12.5px;line-height:1.55;-webkit-box-orient:vertical;-webkit-line-clamp:3}
body.home-page #marketplace #productGrid .product-buyline{display:flex;flex-direction:column;align-items:stretch;gap:13px;margin-top:auto;padding-top:14px;border-top:1px solid var(--tb-outline,rgba(148,163,184,.35))}
body.home-page #marketplace #productGrid .product-buyline>div:first-child{display:flex;flex-direction:column;gap:5px;min-width:0}
body.home-page #marketplace #productGrid .product-price{color:var(--tb-price,#9f1932);font-size:clamp(17px,1.4vw,21px);font-weight:950;line-height:1.18;letter-spacing:-.02em;overflow-wrap:anywhere}
body.home-page #marketplace #productGrid .product-price del{display:block;margin-top:3px;color:var(--tb-muted,#64748b);font-size:11px;font-weight:650}
body.home-page #marketplace #productGrid .product-buyline small{font-size:10px;font-weight:650;color:var(--tb-muted,#64748b)}
body.home-page #marketplace #productGrid .product-actions{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:8px;width:100%}
body.home-page #marketplace #productGrid .product-actions .btn{display:flex;min-width:0;min-height:40px;align-items:center;justify-content:center;padding:9px 10px;border-radius:10px;font-size:11px;font-weight:850;white-space:nowrap}
body.home-page #marketplace #productGrid .product-actions .btn-primary{border:1px solid rgba(255,215,120,.35);background:linear-gradient(135deg,#d02c49,#92132a);color:#fff;box-shadow:0 6px 14px rgba(160,24,52,.18)}
body.home-page #marketplace #productGrid .product-flashsale-badge{z-index:3;top:12px;right:12px;left:auto;padding:7px 10px;border:1px solid rgba(255,255,255,.3);border-radius:9px;background:linear-gradient(135deg,#d02c49,#8f1027);color:#fff;font-size:9px;font-weight:950;letter-spacing:.08em;box-shadow:0 8px 18px rgba(143,16,39,.25)}
body.home-page #marketplace #productGrid .product-card.has-flashsale{border-color:rgba(191,24,51,.55)}
body.home-page #marketplace .market-result-count{margin:8px 0;color:var(--tb-muted,#64748b);font-size:12px;font-weight:650}
body.home-page #marketplace .market-pagination{display:flex;align-items:center;justify-content:center;gap:14px;margin:26px 0 8px}
html[data-theme="light"] body.home-page #marketplace #productGrid .product-card{background:linear-gradient(155deg,#fff,#f8fafc);color:#182235}
html[data-theme="light"] body.home-page #marketplace #productGrid .product-description,html[data-theme="light"] body.home-page #marketplace #productGrid .product-buyline small{color:#586579}
html[data-theme="dark"] body.home-page #marketplace #productGrid .product-card,html:not([data-theme="light"]) body.home-page #marketplace #productGrid .product-card{background:linear-gradient(155deg,#1a2230,#111722);color:#f5f7fb}
html[data-theme="dark"] body.home-page #marketplace #productGrid .product-body h3,html:not([data-theme="light"]) body.home-page #marketplace #productGrid .product-body h3{color:#f5f7fb}
html[data-theme="dark"] body.home-page #marketplace #productGrid .product-description,html:not([data-theme="light"]) body.home-page #marketplace #productGrid .product-description{color:#b8c2d2}
html[data-theme="dark"] body.home-page #marketplace #productGrid .product-buyline small,html:not([data-theme="light"]) body.home-page #marketplace #productGrid .product-buyline small{color:#aab5c6}
@media(min-width:1500px){body.home-page #marketplace #productGrid.grid-products{gap:24px}}
@media(max-width:1100px) and (min-width:761px){body.home-page #marketplace #productGrid.grid-products{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}body.home-page #marketplace #productGrid .product-body{padding:14px}}
@media(max-width:760px){body.home-page #marketplace .marketplace-controls{display:flex;gap:8px}body.home-page #marketplace .marketplace-search{flex:1 1 100%}body.home-page #marketplace .marketplace-category,body.home-page #marketplace .marketplace-pagesize{flex:1 1 0;min-width:0}body.home-page #marketplace #productGrid.grid-products{grid-template-columns:repeat(var(--jb-grid-mobile,2),minmax(0,1fr));gap:10px}body.home-page #marketplace #productGrid .product-card{border-radius:14px}body.home-page #marketplace #productGrid .product-body{gap:8px;padding:10px}body.home-page #marketplace #productGrid .product-body h3{font-size:12px;min-height:2.5em}body.home-page #marketplace #productGrid .product-description{font-size:10px;min-height:3.1em;-webkit-line-clamp:2}body.home-page #marketplace #productGrid .product-price{font-size:14px}body.home-page #marketplace #productGrid .product-actions{gap:5px}body.home-page #marketplace #productGrid .product-actions .btn{min-height:35px;padding:7px 5px;font-size:9px}}
@media(prefers-reduced-motion:reduce){body.home-page #marketplace #productGrid .product-card{transition:none}body.home-page #marketplace #productGrid .product-card:hover{transform:none}}
