/**
 * DAF Marketplace — Card Styles
 * Location: /assets/front/cards.css
 * Note:
 * - Hover shadow/lift stays for loop cards only.
 * - Single product content cards remain flat and clean.
 */

/* Shared archive loop layouts */
.dafmp-market-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.dafmp-market-list{display:flex;flex-direction:column;gap:18px}

/* Shared loop card base */
.dafmp-item-card,
.dafmp-card--fallback,
.dafmp-market-card,
.dafmp-market-list-item{
background:#fff;
border:1px solid var(--dafmp-border);
border-radius:8px;
overflow:hidden;
transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}

.dafmp-item-card,
.dafmp-card--fallback,
.dafmp-market-card{display:flex;flex-direction:column;box-shadow:var(--dafmp-card-shadow)}

.dafmp-item-card:hover,
.dafmp-card--fallback:hover,
.dafmp-market-card:hover,
.dafmp-market-list-item:hover{
transform:translateY(-2px);
border-color:#d6dee8;
}

.dafmp-item-card:hover,
.dafmp-card--fallback:hover,
.dafmp-market-card:hover{box-shadow:var(--dafmp-card-shadow-hover)}

.dafmp-item-card__media,
.dafmp-card__media,
.dafmp-market-card__media,
.dafmp-market-list-item__media{
position:relative;
background:#f8fafc;
}

.dafmp-item-card__media,
.dafmp-card__media{border-bottom:1px solid var(--dafmp-border)}

.dafmp-item-card__media-link,
.dafmp-card__media-link,
.dafmp-market-card__media-link,
.dafmp-market-list-item__media-link{
display:block;
text-decoration:none;
}

.dafmp-item-card__thumb,
.dafmp-card__image,
.dafmp-market-card__image,
.dafmp-market-list-item__image{
display:block;
width:100%;
background:#eef3f8;
}

.dafmp-item-card__thumb,
.dafmp-card__image{aspect-ratio:16/10;object-fit:cover;transition:transform .24s ease}

.dafmp-market-card__image{aspect-ratio:16/10;object-fit:cover}

.dafmp-market-list-item__image{height:100%;min-height:100%;object-fit:cover}

.dafmp-item-card:hover .dafmp-item-card__thumb,
.dafmp-card--fallback:hover .dafmp-card__image{transform:scale(1.02)}

.dafmp-item-card__thumb--placeholder,
.dafmp-card__image--placeholder{
background:linear-gradient(135deg,rgba(37,99,235,.06),rgba(249,115,22,.06)),#eef3f8;
}

/* Existing item card badges */
.dafmp-item-card__media-top{
position:absolute;
top:10px;
right:10px;
left:10px;
display:flex;
align-items:flex-start;
justify-content:space-between;
gap:10px;
pointer-events:none;
}

.dafmp-item-card__badge,
.dafmp-item-card__pill{
display:inline-flex;
align-items:center;
min-height:24px;
padding:0 8px;
border-radius:999px;
color:#fff;
font-size:10px;
font-weight:800;
pointer-events:auto;
}

.dafmp-item-card__badge{
background:var(--dafmp-primary,#2563eb);
letter-spacing:.08em;
text-transform:uppercase;
}

.dafmp-item-card__pill{
background:rgba(15,23,42,.76);
letter-spacing:.04em;
white-space:nowrap;
}

/* New marketplace card/list badges */
.dafmp-market-card__badges,
.dafmp-market-list-item__badges{
position:absolute;
top:10px;
left:10px;
display:flex;
flex-wrap:wrap;
gap:6px;
}

.dafmp-market-card__type,
.dafmp-market-list-item__type,
.dafmp-market-card__version,
.dafmp-market-list-item__version{
display:inline-flex;
align-items:center;
min-height:24px;
border-radius:4px;
color:#fff;
font-weight:700;
line-height:1.2;
}

.dafmp-market-card__type,
.dafmp-market-list-item__type{
padding:3px 8px;
background:#16A34A;
font-size:12px;
}

.dafmp-market-card__version,
.dafmp-market-list-item__version{
padding:3px 7px;
background:#2563EB;
font-size:11px;
}

/* Shared body/title/meta */
.dafmp-item-card__body,
.dafmp-card__body,
.dafmp-market-card__body{
display:flex;
flex:1 1 auto;
flex-direction:column;
padding:14px;
}

.dafmp-market-list-item__content{
display:flex;
flex-direction:column;
gap:12px;
padding:16px 18px;
min-width:0;
}

.dafmp-item-card__title,
.dafmp-card__title,
.dafmp-market-card__title,
.dafmp-market-list-item__title{
margin:0;
color:var(--dafmp-heading);
font-weight:800;
line-height:1.35;
}

.dafmp-item-card__title,
.dafmp-card__title,
.dafmp-market-card__title{font-size:15px}

.dafmp-market-list-item__title{font-size:18px}

.dafmp-item-card__title a,
.dafmp-card__title a,
.dafmp-market-card__title a,
.dafmp-market-list-item__title a{
color:inherit;
text-decoration:none;
}

.dafmp-item-card__title a:hover,
.dafmp-card__title a:hover,
.dafmp-market-card__title a:hover,
.dafmp-market-list-item__title a:hover{
color:var(--dafmp-primary,#2563eb);
}

.dafmp-item-card__excerpt{
margin:8px 0 0;
color:var(--dafmp-muted);
font-size:13px;
line-height:1.65;
}

.dafmp-market-list-item__excerpt p{
margin:0;
color:#334155;
font-size:14px;
line-height:1.65;
}

.dafmp-item-card__meta,
.dafmp-card__meta{
display:flex;
flex-wrap:wrap;
gap:6px 12px;
margin-top:12px;
padding-top:12px;
border-top:1px solid var(--dafmp-border);
}

.dafmp-market-card__meta,
.dafmp-market-list-item__meta{
color:#64748B;
font-size:13px;
}

.dafmp-item-card__meta-item,
.dafmp-card__type{
display:inline-flex;
align-items:center;
gap:6px;
color:var(--dafmp-muted);
font-size:12px;
font-weight:700;
line-height:1.4;
}

.dafmp-item-card__meta-item--rating{color:var(--dafmp-primary-orange,#f97316)}
.dafmp-market-card__meta-sep,
.dafmp-market-list-item__meta-sep{margin:0 4px}

/* Existing compatibility block */
.dafmp-item-card__compatibility{
display:flex;
flex-wrap:wrap;
align-items:center;
gap:8px;
margin-top:12px;
padding-top:12px;
border-top:1px solid var(--dafmp-border);
}

.dafmp-item-card__compatibility-label{
display:inline-flex;
align-items:center;
min-height:24px;
padding:0 8px;
background:#eff6ff;
border:1px solid #bfdbfe;
border-radius:999px;
color:var(--dafmp-primary,#2563eb);
font-size:10px;
font-weight:800;
letter-spacing:.06em;
text-transform:uppercase;
}

.dafmp-item-card__compatibility-value{
color:var(--dafmp-heading);
font-size:12px;
font-weight:700;
line-height:1.5;
}

/* Shared price/rating/actions */
.dafmp-item-card__price,
.dafmp-market-card__price-wrap,
.dafmp-market-list-item__price-wrap{
display:flex;
flex-wrap:wrap;
align-items:baseline;
gap:6px;
}

.dafmp-item-card__price{min-height:22px}

.dafmp-item-card__price-current,
.dafmp-market-card__price,
.dafmp-market-list-item__price{
color:var(--dafmp-heading);
font-weight:800;
line-height:1;
}

.dafmp-item-card__price-current{font-size:20px}
.dafmp-market-card__price{font-size:16px}
.dafmp-market-list-item__price{font-size:18px}

.dafmp-item-card__price-old,
.dafmp-market-card__old-price,
.dafmp-market-list-item__old-price{
color:var(--dafmp-muted);
font-size:12px;
font-weight:700;
text-decoration:line-through;
}

.dafmp-market-card__stats,
.dafmp-market-list-item__stats{
display:flex;
flex-wrap:wrap;
align-items:center;
color:#64748B;
}

.dafmp-market-card__stats{gap:6px;margin-top:4px;font-size:12px}
.dafmp-market-list-item__stats{gap:8px;font-size:13px}

.dafmp-market-card__star,
.dafmp-market-list-item__star{
color:#CBD5E1;
font-size:13px;
}

.dafmp-market-card__star.is-filled,
.dafmp-market-list-item__star.is-filled{color:#F59E0B}

.dafmp-item-card__footer,
.dafmp-card__actions,
.dafmp-market-card__footer{
display:flex;
align-items:center;
justify-content:space-between;
gap:12px;
margin-top:auto;
padding-top:14px;
}

.dafmp-market-card__footer{margin-top:6px}
.dafmp-card__actions .dafmp-button{width:100%}

.dafmp-item-card__footer-actions,
.dafmp-market-card__actions,
.dafmp-market-list-item__actions{
display:flex;
flex-wrap:wrap;
align-items:center;
gap:8px;
}

.dafmp-item-card__footer-actions{justify-content:flex-end}

.dafmp-market-list-item__actions{
justify-content:flex-end;
flex-wrap:nowrap;
}

.dafmp-market-card__cart,
.dafmp-market-list-item__cart{
width:34px;
height:34px;
display:flex;
align-items:center;
justify-content:center;
flex:0 0 34px;
border:1px solid #E2E8F0;
border-radius:4px;
background:#fff;
color:#334155;
text-decoration:none;
overflow:hidden;
}

.dafmp-market-card__cart:hover,
.dafmp-market-list-item__cart:hover{background:#F8FAFC}

.dafmp-market-card__cart svg,
.dafmp-market-list-item__cart svg{
width:16px;
height:16px;
display:block;
}

.dafmp-market-card__button,
.dafmp-market-list-item__button{
display:inline-flex;
align-items:center;
justify-content:center;
padding:8px 14px;
border:1px solid #2563EB;
border-radius:4px;
background:#fff;
color:#2563EB;
font-size:13px;
font-weight:600;
text-decoration:none;
white-space:nowrap;
}

.dafmp-market-card__button:hover,
.dafmp-market-list-item__button:hover{
background:#2563EB;
color:#fff;
}

/* New marketplace card */
.dafmp-market-card__body{gap:8px}
.dafmp-market-card__left{min-width:0}

/* New marketplace list */
.dafmp-market-list-item{
display:grid;
grid-template-columns:280px minmax(0,1fr);
gap:18px;
align-items:stretch;
}

.dafmp-market-list-item__media{min-height:100%}
.dafmp-market-list-item__top{display:flex;flex-direction:column;gap:6px}
.dafmp-market-list-item__bottom{
display:flex;
justify-content:space-between;
align-items:flex-end;
gap:16px;
margin-top:auto;
}

/* Single product page cards */
.dafmp-single .dafmp-content-card{
background:#fff;
border:1px solid #dfe4ea;
border-radius:8px;
box-shadow:none;
}

.dafmp-single .dafmp-content-card .dafmp-section-head{margin:0 0 14px}
.dafmp-single .dafmp-content-card .dafmp-section-head--compact{margin-bottom:12px}
.dafmp-single .dafmp-content-card .dafmp-section-title{
margin:0;
color:#1f2933;
font-size:18px;
font-weight:800;
line-height:1.25;
letter-spacing:-.02em;
}

.dafmp-single .dafmp-single-content__main .dafmp-content-card,
.dafmp-single .dafmp-single-content__sidebar .dafmp-content-card{padding:16px}

.dafmp-single .dafmp-single-content__sidebar .dafmp-content-card+.dafmp-content-card{margin-top:0}
.dafmp-single .dafmp-single-content__sidebar .dafmp-section-title{font-size:17px}
.dafmp-single .dafmp-author-box{display:grid;gap:10px}
.dafmp-single .dafmp-highlight-card{box-shadow:none}

@media (max-width:1024px){
.dafmp-market-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:767px){
.dafmp-item-card__body,
.dafmp-card__body,
.dafmp-market-card__body{padding:13px}

.dafmp-item-card__title,
.dafmp-card__title,
.dafmp-market-card__title{font-size:14px}

.dafmp-item-card__price-current{font-size:18px}

.dafmp-market-list-item{
grid-template-columns:1fr;
}

.dafmp-market-list-item__image{
height:auto;
min-height:0;
}

.dafmp-market-list-item__bottom{
flex-direction:column;
align-items:flex-start;
}

.dafmp-single .dafmp-single-content__main .dafmp-content-card,
.dafmp-single .dafmp-single-content__sidebar .dafmp-content-card{padding:14px}

.dafmp-single .dafmp-content-card .dafmp-section-title{font-size:17px}
}

@media (max-width:640px){
.dafmp-market-grid{grid-template-columns:1fr}
}

@media (max-width:479px){
.dafmp-item-card__footer,
.dafmp-card__actions,
.dafmp-market-card__footer{
flex-direction:column;
align-items:stretch;
}

.dafmp-item-card__footer-actions{justify-content:stretch}

.dafmp-market-card__actions,
.dafmp-market-list-item__actions{
width:100%;
}

.dafmp-market-card__button,
.dafmp-market-list-item__button{
flex:1 1 auto;
}
}