/* The same public card serves the landing page, marketplace lists and detail previews. */
.refined-market-card{--market-accent:var(--primary);display:flex;flex-direction:column;gap:0;padding:20px;border:1px solid var(--border);border-radius:22px;background:var(--surface);box-shadow:0 4px 18px #00000005;transition:transform .18s,border-color .18s,box-shadow .18s;min-width:0}
.refined-market-card.capacity-card{--market-accent:#3b82f6}.refined-market-card.business-card{--market-accent:#10b981}
.refined-market-card:hover{transform:translateY(-3px);border-color:color-mix(in srgb,var(--market-accent) 40%,var(--border));box-shadow:0 10px 26px #0000000b}
.refined-market-card:focus-within{border-color:var(--market-accent)}
.refined-market-card .market-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:0 0 12px}
.refined-market-card .market-type{display:inline-flex;align-items:center;gap:6px;min-width:0;max-width:100%;padding:5px 9px;border-radius:9px;color:var(--text-2);background:var(--surface-2,var(--bg));font-size:12px;line-height:1.8}
.refined-market-card .market-type .mi{font-size:17px;color:var(--market-accent);flex-shrink:0}
.refined-market-card .market-date{font-size:11px;line-height:1.8;color:var(--text-3);white-space:nowrap}
.refined-market-card h3{margin:0 0 16px;font-size:17px;line-height:1.9;overflow-wrap:anywhere}
.refined-market-card h3 a{color:var(--text);display:block}
.refined-market-card .refined-market-route{display:grid;grid-template-columns:minmax(0,1fr) 72px minmax(0,1fr);gap:6px;align-items:center;min-height:105px;padding:12px;border:1px solid var(--border);border-radius:15px;background:var(--bg);margin:0 0 16px}
.refined-market-route .market-route-stop{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0}
.refined-market-route .market-route-stop.destination{align-items:flex-end;text-align:left}
.market-stop-label{display:inline-flex;align-items:center;gap:5px;font-size:11px;color:var(--text-3)}
.market-stop-label i{display:inline-block;width:6px;height:6px;border-radius:50%;flex-shrink:0}
.market-origin-dot{background:#f97316}.market-destination-dot{background:#10b981}
.refined-market-route .market-route-stop strong{font:17px/1.8 VazirBold,Vazir,sans-serif;color:var(--text);overflow-wrap:anywhere;max-width:100%}
.market-province{color:var(--text-2);font-size:12px;line-height:1.8;overflow-wrap:anywhere}
.refined-market-route .market-route-journey{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0}
.market-route-journey::before{content:"";position:absolute;left:-7px;right:-7px;top:20px;border-top:1px dashed color-mix(in srgb,var(--market-accent) 45%,var(--border))}
.market-route-journey::after{content:"";position:absolute;left:-7px;top:17px;border-top:3px solid transparent;border-bottom:3px solid transparent;border-right:4px solid var(--market-accent)}
.market-route-vehicle{position:relative;z-index:1;width:44px;height:40px;border-radius:13px;display:grid;place-items:center;color:var(--market-accent);background:color-mix(in srgb,var(--market-accent) 12%,var(--surface));border:3px solid var(--bg)}
.market-route-vehicle svg{width:29px;height:23px;stroke:currentColor;stroke-width:1.6;fill:none;stroke-linejoin:round;stroke-linecap:round}
.market-route-vehicle circle{fill:var(--bg)}
.market-route-journey small{position:relative;color:var(--text-3);font-size:10px;line-height:1.6;text-align:center}
.refined-market-card .market-card-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:13px;border-top:1px solid var(--border);flex-wrap:wrap}
.refined-market-card .market-price{font:13px/1.9 VazirMedium,Vazir,sans-serif;color:var(--text-2)}
.refined-market-card .market-detail-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;padding:5px 12px;border-radius:10px;background:color-mix(in srgb,var(--market-accent) 12%,var(--surface));color:var(--market-accent);font:13px/1.8 VazirBold,Vazir,sans-serif}
.refined-market-card .business-cover{position:relative;display:block;aspect-ratio:2/1;height:auto;overflow:hidden;margin:-20px -20px 16px;border-radius:21px 21px 0 0;background:radial-gradient(circle at 20% 20%,#10b98128,transparent 70%),var(--bg)}
.business-cover-fallback{position:absolute;inset:0;display:grid;place-items:center;color:#10b981}
.business-cover-fallback svg{width:66px;height:66px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;opacity:.7}
.refined-market-card .business-cover img{position:relative;display:block;width:100%;height:100%;object-fit:cover}
.business-cover-label{position:absolute;bottom:10px;right:12px;padding:4px 9px;background:#092f29d9;color:#fff;font-size:11px;border-radius:8px;backdrop-filter:blur(6px)}
.market-business-summary{display:flex;align-items:center;gap:8px;padding:12px;margin-bottom:16px;border:1px solid var(--border);border-radius:14px;background:var(--bg)}
.market-business-pin{font-size:23px;color:#10b981}
.market-business-summary>div{display:flex;flex-direction:column;gap:2px;min-width:0}.market-business-summary strong{font-size:15px;color:var(--text)}.market-business-summary small{font-size:12px;color:var(--text-2)}
.market-business-active{display:inline-flex;align-items:center;gap:5px;margin-inline-start:auto;white-space:nowrap;font-size:11px;color:var(--text-2)}.market-business-active i{width:5px;height:5px;border-radius:50%;background:#10b981}
@media(max-width:380px){.refined-market-card{padding:16px}.refined-market-card h3{font-size:16px}.refined-market-card .refined-market-route{grid-template-columns:minmax(0,1fr) 58px minmax(0,1fr);padding:10px 8px}.refined-market-route .market-route-stop strong{font-size:16px}.refined-market-card .business-cover{margin:-16px -16px 14px}.market-business-summary{flex-wrap:wrap}.market-business-active{font-size:10px}}
@media(prefers-reduced-motion:reduce){.refined-market-card{transition:none}.refined-market-card:hover{transform:none}}
.market-grid .refined-market-card:last-child:nth-child(3),.marketplace-page .market-grid .refined-market-card:last-child:nth-child(3){display:flex}
.refined-market-card .business-cover img[hidden]{display:none}
