/**
 * HyperDAF Core — Homepage Sections Styles
 * Location: /wp-content/themes/hyperdaf-core/assets/css/home-sections.css
 *
 * Purpose:
 * - Styles homepage sections after the hero.
 * - Styles the official theme-owned product card loop.
 * - Keeps homepage layout compact, premium, and performance-safe.
 */

/* Section shell */
.hdaf-homepage > .hdaf-home-section:first-of-type{margin-top:30px}
.hdaf-homepage > .hdaf-home-section + .hdaf-home-section{margin-top:30px}
.hdaf-home-section{padding:0}
.hdaf-home-section__head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 18px}
.hdaf-home-section__title{margin:0;color:#0F172A;font-size:34px;font-weight:800;line-height:1.1;letter-spacing:-.02em}
.hdaf-home-section__link{display:inline-flex;align-items:center;gap:6px;color:#64748B;font-size:13px;font-weight:700;text-decoration:none;white-space:nowrap}
.hdaf-home-section__link:hover{color:#2563EB}
.hdaf-home-section__link::after{content:"›";font-size:16px;line-height:1}

/* Theme official product card */
.hdaf-product-card{
display:flex;
flex-direction:column;
background:#FFFFFF;
border:1px solid #E2E8F0;
border-radius:10px;
overflow:hidden;
box-shadow:0 10px 30px rgba(15,23,42,.05);
transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}

.hdaf-product-card:hover{
transform:translateY(-2px);
border-color:#D7E0EA;
box-shadow:0 16px 34px rgba(15,23,42,.08);
}

.hdaf-product-card__media{
position:relative;
background:#F8FAFC;
}

.hdaf-product-card__media-link{
display:block;
text-decoration:none;
}

.hdaf-product-card__image{
display:block;
width:100%;
aspect-ratio:16/10;
object-fit:cover;
background:#EEF3F8;
}

.hdaf-product-card__image--placeholder{
background:linear-gradient(135deg,rgba(37,99,235,.06),rgba(249,115,22,.06)),#EEF3F8;
}

.hdaf-product-card__badges{
position:absolute;
top:10px;
left:10px;
display:flex;
flex-wrap:wrap;
gap:6px;
}

.hdaf-product-card__type,
.hdaf-product-card__version{
display:inline-flex;
align-items:center;
min-height:24px;
border-radius:4px;
color:#FFFFFF;
font-weight:700;
line-height:1.2;
}

.hdaf-product-card__type{
padding:3px 8px;
background:#16A34A;
font-size:12px;
}

.hdaf-product-card__version{
padding:3px 7px;
background:#2563EB;
font-size:11px;
}

.hdaf-product-card__body{
display:flex;
flex:1 1 auto;
flex-direction:column;
gap:8px;
padding:14px;
}

.hdaf-product-card__title{
margin:0;
color:#0F172A;
font-size:15px;
font-weight:800;
line-height:1.35;
}

.hdaf-product-card__title a{
color:inherit;
text-decoration:none;
}

.hdaf-product-card__title a:hover{
color:#2563EB;
}

.hdaf-product-card__meta{
display:flex;
align-items:center;
justify-content:space-between;
gap:10px;
min-height:18px;
color:#64748B;
font-size:13px;
line-height:1.4;
}

.hdaf-product-card__author,
.hdaf-product-card__sales{
display:inline-flex;
align-items:center;
min-width:0;
}

.hdaf-product-card__author{
font-weight:500;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}

.hdaf-product-card__sales{
flex:0 0 auto;
font-size:12px;
font-weight:500;
white-space:nowrap;
}

.hdaf-product-card__footer{
display:flex;
align-items:flex-start;
justify-content:space-between;
gap:12px;
margin-top:auto;
padding-top:14px;
}

.hdaf-product-card__left{
display:flex;
flex:1 1 auto;
flex-direction:column;
align-items:flex-start;
min-width:0;
}

.hdaf-product-card__price-wrap{
display:flex;
flex-wrap:wrap;
align-items:baseline;
gap:6px;
}

.hdaf-product-card__price{
color:#0F172A;
font-size:16px;
font-weight:800;
line-height:1;
}

.hdaf-product-card__old-price{
color:#64748B;
font-size:12px;
font-weight:700;
text-decoration:line-through;
}

.hdaf-product-card__stats{
display:flex;
flex-wrap:wrap;
align-items:center;
gap:6px;
margin-top:6px;
color:#64748B;
font-size:12px;
line-height:1.2;
}

.hdaf-product-card__rating{
display:inline-flex;
align-items:center;
gap:2px;
}

.hdaf-product-card__star{
color:#CBD5E1;
font-size:13px;
line-height:1;
}

.hdaf-product-card__star.is-filled{
color:#F59E0B;
}

.hdaf-product-card__rating-count{
display:inline-flex;
align-items:center;
font-size:12px;
font-weight:500;
line-height:1;
}

.hdaf-product-card__actions{
display:flex;
flex:0 0 auto;
flex-wrap:nowrap;
align-items:center;
justify-content:flex-end;
gap:8px;
margin-left:auto;
}

.hdaf-product-card__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:#FFFFFF;
color:#334155;
text-decoration:none;
overflow:hidden;
}

.hdaf-product-card__cart:hover{
background:#F8FAFC;
}

.hdaf-product-card__cart svg{
width:16px;
height:16px;
display:block;
}

.hdaf-product-card__button{
display:inline-flex;
align-items:center;
justify-content:center;
min-height:34px;
padding:8px 14px;
border:1px solid #2563EB;
border-radius:4px;
background:#FFFFFF;
color:#2563EB;
font-size:13px;
font-weight:600;
text-decoration:none;
white-space:nowrap;
}

.hdaf-product-card__button:hover{
background:#2563EB;
color:#FFFFFF;
}

@media (max-width:1024px){
.hdaf-home-section__title{font-size:30px}
}

@media (max-width:767px){
.hdaf-home-section__head{align-items:flex-start;flex-direction:column}
.hdaf-home-section__title{font-size:26px}
.hdaf-product-card__body{padding:13px}
.hdaf-product-card__title{font-size:14px}
.hdaf-product-card__footer{align-items:stretch;gap:10px}
.hdaf-product-card__actions{width:100%;justify-content:flex-start;margin-left:0}
}

@media (max-width:479px){
.hdaf-product-card__meta{align-items:flex-start;flex-direction:column}
.hdaf-product-card__footer{flex-direction:column;align-items:stretch}
.hdaf-product-card__actions{width:100%}
.hdaf-product-card__button{flex:1 1 auto}
}