/* Woo Featured Categories Pro · Woodmart UX skin */
.wfcp-woodmart{
    --wfcp-title-color:var(--wd-title-color,#242424);
    --wfcp-text-color:var(--wd-text-color,#555);
    --wfcp-border-color:var(--brdcolor-gray-300,rgba(0,0,0,.105));
    --wfcp-accent:var(--wd-primary-color,#111);
    width:100%;
    font-family:var(--wfcp-font,inherit);
    color:var(--wfcp-text-color);
}
.wfcp-woodmart *{box-sizing:border-box}
.wfcp-woodmart a,
.wfcp-woodmart a:hover,
.wfcp-woodmart a:focus{text-decoration:none!important;outline:none}

.wfcp-wd-image-grid{
    display:grid;
    grid-template-columns:repeat(var(--wfcp-d-cols,5),minmax(0,1fr));
    gap:var(--wfcp-gap,22px);
    align-items:stretch;
}
.wfcp-wd-item{
    position:relative;
    min-width:0;
}
.wfcp-wd-image-item{
    min-height:calc(var(--wfcp-img-h,180px) + 42px);
    border-bottom:1px solid var(--wfcp-border-color);
    isolation:isolate;
    overflow:hidden;
}
.wfcp-wd-image-item:after{
    content:"";
    position:absolute;
    left:0;right:0;bottom:0;
    height:2px;
    background:var(--wfcp-accent);
    transform:scaleX(0);
    transform-origin:left center;
    transition:transform .28s ease;
    opacity:.9;
}
.wfcp-wd-image-item:hover:after,
.wfcp-wd-image-item:focus-within:after{transform:scaleX(1)}

.wfcp-wd-main{
    position:relative;
    z-index:2;
    display:flex;
    min-height:calc(var(--wfcp-img-h,180px) + 42px);
    flex-direction:column;
    align-items:center;
    justify-content:flex-end;
    gap:12px;
    color:var(--wfcp-title-color)!important;
    padding:0 0 14px;
}
.wfcp-wd-media{
    width:100%;
    height:var(--wfcp-img-h,180px);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:8px 10px 0;
    transition:width .32s cubic-bezier(.2,.8,.2,1),height .32s cubic-bezier(.2,.8,.2,1),transform .32s cubic-bezier(.2,.8,.2,1),padding .32s ease;
}
.wfcp-wd-media img{
    display:block;
    max-width:100%;
    max-height:100%;
    object-fit:contain;
    transition:transform .32s cubic-bezier(.2,.8,.2,1),opacity .22s ease;
    will-change:transform;
}
.wfcp-wd-title{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:3px;
    width:100%;
    text-align:center;
    color:var(--wfcp-title-color);
    font-size:var(--wfcp-font-size,15px);
    font-weight:var(--wfcp-font-weight,600);
    line-height:1.2;
    transition:opacity .2s ease,transform .28s ease,visibility .2s ease;
}
.wfcp-wd-title small{font-size:11px;font-weight:400;color:var(--wfcp-text-color);opacity:.75}

.wfcp-wd-subcats{
    position:absolute;
    z-index:3;
    top:14px;
    right:0;
    bottom:18px;
    width:58%;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:flex-start;
    gap:7px;
    opacity:0;
    transform:translateX(10px);
    pointer-events:none;
    transition:opacity .24s ease,transform .32s cubic-bezier(.2,.8,.2,1);
}
.wfcp-wd-subcat,
.wfcp-wd-more{
    position:relative;
    display:inline-flex;
    align-items:center;
    max-width:100%;
    color:var(--wfcp-title-color)!important;
    font-size:var(--wfcp-sub-font-size,13px);
    font-weight:var(--wfcp-sub-font-weight,500);
    line-height:1.18;
    opacity:.84;
    white-space:normal;
    transition:opacity .18s ease,color .18s ease,transform .18s ease;
}
.wfcp-wd-subcat:after,
.wfcp-wd-more:after{
    content:"";
    position:absolute;
    left:0;
    bottom:-3px;
    width:0;
    height:1px;
    background:currentColor;
    transition:width .18s ease;
}
.wfcp-wd-subcat:hover,
.wfcp-wd-subcat:focus,
.wfcp-wd-more:hover,
.wfcp-wd-more:focus{
    color:var(--wfcp-accent)!important;
    opacity:1;
    transform:translateX(3px);
}
.wfcp-wd-subcat:hover:after,
.wfcp-wd-subcat:focus:after,
.wfcp-wd-more:hover:after,
.wfcp-wd-more:focus:after{width:100%}
.wfcp-wd-more{margin-top:3px;font-weight:700;opacity:1}

.wfcp-wd-image-item.has-subcats:hover .wfcp-wd-main,
.wfcp-wd-image-item.has-subcats:focus-within .wfcp-wd-main{
    align-items:flex-start;
    justify-content:flex-start;
    width:40%;
}
.wfcp-wd-image-item.has-subcats:hover .wfcp-wd-media,
.wfcp-wd-image-item.has-subcats:focus-within .wfcp-wd-media{
    width:100%;
    height:calc(var(--wfcp-img-h,180px) * .44);
    padding:2px 8px 0 0;
    align-items:flex-start;
    justify-content:flex-start;
}
.wfcp-wd-image-item.has-subcats:hover .wfcp-wd-media img,
.wfcp-wd-image-item.has-subcats:focus-within .wfcp-wd-media img{
    transform:scale(.70);
    transform-origin:top left;
}
.wfcp-wd-image-item.has-subcats:hover .wfcp-wd-title,
.wfcp-wd-image-item.has-subcats:focus-within .wfcp-wd-title{
    opacity:0;
    visibility:hidden;
    transform:translateY(8px);
}
.wfcp-wd-image-item.has-subcats:hover .wfcp-wd-subcats,
.wfcp-wd-image-item.has-subcats:focus-within .wfcp-wd-subcats{
    opacity:1;
    transform:translateX(0);
    pointer-events:auto;
}

.wfcp-wd-compact-grid{
    display:grid;
    grid-template-columns:repeat(var(--wfcp-compact-d-cols,6),minmax(0,1fr));
    gap:10px var(--wfcp-gap,22px);
    margin-top:calc(var(--wfcp-gap,22px) * 1.35);
    padding-top:calc(var(--wfcp-gap,22px) * .75);
    border-top:1px solid var(--wfcp-border-color);
}
.wfcp-wd-compact-item{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    min-height:32px;
    color:var(--wfcp-title-color)!important;
    font-size:clamp(13px,calc(var(--wfcp-font-size,15px) - 1px),15px);
    font-weight:var(--wfcp-font-weight,600);
    line-height:1.2;
    padding:3px 0 8px;
    border-bottom:1px solid transparent;
    transition:color .18s ease,border-color .18s ease,transform .18s ease;
}
.wfcp-wd-compact-item:before{
    content:"";
    position:absolute;
    left:0;
    bottom:0;
    width:18px;
    height:1px;
    background:var(--wfcp-border-color);
    transition:width .2s ease,background .2s ease;
}
.wfcp-wd-compact-item small{font-size:11px;font-weight:400;color:var(--wfcp-text-color);opacity:.7}
.wfcp-wd-compact-item:hover,
.wfcp-wd-compact-item:focus{
    color:var(--wfcp-accent)!important;
    transform:translateX(2px);
}
.wfcp-wd-compact-item:hover:before,
.wfcp-wd-compact-item:focus:before{
    width:100%;
    background:var(--wfcp-accent);
}

/* Woodmart compatibility: avoid theme category/product card styles leaking in */
.wfcp-woodmart .wfcp-wd-image-item img{border-radius:0!important;box-shadow:none!important}
.wfcp-woodmart .wfcp-wd-image-item h3,
.wfcp-woodmart .wfcp-wd-image-item .category-title{margin:0!important}

@media(max-width:1024px){
    .wfcp-wd-image-grid{grid-template-columns:repeat(var(--wfcp-t-cols,3),minmax(0,1fr))}
    .wfcp-wd-compact-grid{grid-template-columns:repeat(var(--wfcp-compact-t-cols,4),minmax(0,1fr))}
    .wfcp-wd-image-item{min-height:calc(var(--wfcp-img-h,180px) + 38px)}
    .wfcp-wd-main{min-height:calc(var(--wfcp-img-h,180px) + 38px)}
    .wfcp-wd-subcats{width:57%;right:0}
}
@media(max-width:767px){
    .wfcp-wd-image-grid{grid-template-columns:repeat(var(--wfcp-m-cols,2),minmax(0,1fr));gap:18px 14px}
    .wfcp-wd-image-item{min-height:auto;border-bottom:1px solid var(--wfcp-border-color);overflow:visible}
    .wfcp-wd-image-item:after{display:none}
    .wfcp-wd-main{min-height:auto;padding-bottom:10px;gap:8px}
    .wfcp-wd-media{height:min(var(--wfcp-img-h,180px),135px);padding:0 6px}
    .wfcp-wd-title{font-size:14px;opacity:1!important;visibility:visible!important;transform:none!important}
    .wfcp-wd-subcats{display:none!important}
    .wfcp-wd-image-item.has-subcats:hover .wfcp-wd-main,
    .wfcp-wd-image-item.has-subcats:focus-within .wfcp-wd-main{width:auto;align-items:center;justify-content:flex-end}
    .wfcp-wd-image-item.has-subcats:hover .wfcp-wd-media,
    .wfcp-wd-image-item.has-subcats:focus-within .wfcp-wd-media{height:min(var(--wfcp-img-h,180px),135px);align-items:center;justify-content:center;padding:0 6px}
    .wfcp-wd-image-item.has-subcats:hover .wfcp-wd-media img,
    .wfcp-wd-image-item.has-subcats:focus-within .wfcp-wd-media img{transform:none}
    .wfcp-wd-compact-grid{grid-template-columns:repeat(var(--wfcp-compact-m-cols,2),minmax(0,1fr));gap:8px 14px;margin-top:20px;padding-top:16px}
    .wfcp-wd-compact-item{font-size:13px;min-height:30px;padding-bottom:7px}
}
@media(max-width:380px){
    .wfcp-wd-image-grid{grid-template-columns:1fr 1fr}
    .wfcp-wd-media{height:120px}
}
