/* =========================================================
   KAFF v2.5 — PRODUTOS PREMIUM
========================================================= */

.kaff-product-card{
    position:relative;
}

.kaff-product-media{
    min-height:0;
}

.product-image-link{
    position:relative;
    display:block;
    width:100%;
    height:100%;
}

.product-image-primary,
.product-image-secondary{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    transition:opacity .45s ease,transform .6s ease;
}

.product-image-secondary{
    opacity:0;
    transform:scale(1.04);
}

.kaff-product-card:hover .product-image-primary{
    opacity:0;
    transform:scale(1.03);
}

.kaff-product-card:hover .product-image-secondary{
    opacity:1;
    transform:scale(1.07);
}

.product-badges{
    position:absolute;
    top:14px;
    left:14px;
    z-index:5;
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    max-width:70%;
}

.product-badges .badge{
    position:static;
    display:inline-flex;
    align-items:center;
    min-height:26px;
}

.badge-new{
    background:#fff;
    color:#080808;
}

.badge-featured{
    background:#1e1e1e;
    color:var(--gold);
    border:1px solid rgba(212,175,55,.5);
}

.product-card-tools{
    position:absolute;
    top:14px;
    right:14px;
    z-index:6;
    display:grid;
    gap:8px;
    opacity:0;
    transform:translateX(8px);
    transition:opacity var(--transition),transform var(--transition);
}

.kaff-product-card:hover .product-card-tools,
.kaff-product-card:focus-within .product-card-tools{
    opacity:1;
    transform:none;
}

.kaff-wishlist-button,
.kaff-quick-view-button{
    width:40px;
    height:40px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(255,255,255,.1);
    border-radius:50%;
    background:rgba(10,10,10,.86);
    color:#fff;
    cursor:pointer;
    backdrop-filter:blur(10px);
    transition:background var(--transition),color var(--transition),border-color var(--transition),transform var(--transition);
}

.kaff-wishlist-button:hover,
.kaff-quick-view-button:hover{
    color:var(--gold);
    border-color:rgba(212,175,55,.55);
    transform:translateY(-2px);
}

.kaff-wishlist-button.is-active{
    color:#080808;
    background:var(--gold);
    border-color:var(--gold);
}

.kaff-wishlist-button svg,
.kaff-quick-view-button svg{
    width:20px;
    height:20px;
}

.kaff-product-content{
    display:flex;
    flex-direction:column;
    min-height:250px;
}

.product-card-summary{
    min-height:38px;
    margin:-2px 0 12px;
    color:#888;
    font-size:.78rem;
    line-height:1.5;
}

.product-installments{
    margin:-8px 0 16px;
    color:#aaa;
    font-size:.78rem;
}

.product-installments .woocommerce-Price-amount{
    color:#ddd;
    font-weight:750;
}

.product-card-actions{
    margin-top:auto;
    display:grid;
    gap:10px;
}

.product-details-link{
    display:flex;
    justify-content:center;
    padding:5px;
    color:#aaa;
    font-size:.76rem;
    font-weight:750;
    transition:color var(--transition);
}

.product-details-link:hover{
    color:var(--gold);
}

.kaff-quick-view-modal{
    position:fixed;
    inset:0;
    z-index:99999;
    display:grid;
    place-items:center;
    padding:22px;
}

.kaff-quick-view-modal[hidden]{
    display:none;
}

.kaff-quick-view-backdrop{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.76);
    backdrop-filter:blur(8px);
}

.kaff-quick-view-dialog{
    position:relative;
    z-index:2;
    width:min(920px,96vw);
    max-height:90vh;
    overflow:auto;
    border:1px solid rgba(212,175,55,.28);
    border-radius:24px;
    background:#111;
    box-shadow:0 35px 110px rgba(0,0,0,.7);
}

.kaff-quick-view-close{
    position:absolute;
    top:14px;
    right:14px;
    z-index:4;
    width:42px;
    height:42px;
    border:1px solid rgba(255,255,255,.1);
    border-radius:50%;
    background:rgba(8,8,8,.84);
    color:#fff;
    font-size:1.65rem;
    cursor:pointer;
}

.kaff-quick-view-content{
    min-height:380px;
}

.kaff-quick-view-loading{
    display:grid;
    min-height:380px;
    place-items:center;
    color:#aaa;
}

.kaff-quick-view-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
}

.kaff-quick-view-image{
    min-height:500px;
    background:#181818;
}

.kaff-quick-view-image img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.kaff-quick-view-info{
    padding:56px 42px 42px;
}

.kaff-quick-view-kicker{
    display:block;
    margin-bottom:10px;
    color:var(--gold);
    font-size:.73rem;
    font-weight:900;
    letter-spacing:.18em;
    text-transform:uppercase;
}

.kaff-quick-view-info h2{
    margin-bottom:14px;
    font-size:clamp(1.8rem,3.5vw,3rem);
    line-height:1.05;
}

.kaff-quick-view-rating{
    margin-bottom:14px;
}

.kaff-quick-view-price{
    margin-bottom:18px;
    color:var(--gold);
    font-size:1.65rem;
    font-weight:900;
}

.kaff-quick-view-description{
    color:#aaa;
    line-height:1.75;
}

.kaff-quick-view-stock{
    margin:18px 0;
}

.kaff-quick-view-actions{
    display:grid;
    gap:12px;
    margin-top:24px;
}

.kaff-quick-view-actions .button,
.kaff-quick-view-actions .btn{
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:48px;
}

.kaff-toast{
    position:fixed;
    right:24px;
    bottom:24px;
    z-index:100000;
    max-width:min(360px,calc(100vw - 48px));
    padding:14px 18px;
    border:1px solid rgba(212,175,55,.35);
    border-radius:14px;
    background:#111;
    color:#fff;
    box-shadow:0 20px 60px rgba(0,0,0,.55);
}

.kaff-toast[hidden]{
    display:none;
}

body.kaff-modal-open{
    overflow:hidden;
}

@media(max-width:760px){
    .product-card-tools{
        opacity:1;
        transform:none;
    }

    .kaff-quick-view-grid{
        grid-template-columns:1fr;
    }

    .kaff-quick-view-image{
        min-height:320px;
        max-height:420px;
    }

    .kaff-quick-view-info{
        padding:34px 24px 28px;
    }
}

@media(max-width:520px){
    .product-card-summary{
        min-height:0;
    }

    .kaff-quick-view-modal{
        padding:8px;
    }

    .kaff-quick-view-dialog{
        width:100%;
        border-radius:18px;
    }
}

/* Alpha 3: selos automáticos de conversão */
.badge-bestseller{background:#f3c94f;color:#16120a}.badge-low-stock{background:#b22b2b;color:#fff}.product-badges{max-width:78%}

/* KAFF v3.0 Alpha 4 — página de produto */
.single-product div.product{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(360px,.92fr);gap:clamp(28px,5vw,72px);align-items:start}
.single-product div.product .woocommerce-product-gallery,.single-product div.product .summary{width:auto!important;float:none!important}
.single-product .woocommerce-product-gallery{position:sticky;top:110px}
.single-product .flex-control-thumbs{display:grid!important;grid-template-columns:repeat(5,1fr);gap:10px;margin-top:12px!important}
.single-product .flex-control-thumbs li{width:auto!important;float:none!important}
.single-product .flex-control-thumbs img{border:1px solid rgba(255,255,255,.12);border-radius:12px;transition:.2s}
.single-product .flex-control-thumbs img.flex-active{border-color:var(--gold);opacity:1}
.kaff-product-trust{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:22px 0;padding:16px;border:1px solid rgba(212,175,55,.2);border-radius:18px;background:rgba(212,175,55,.05)}
.kaff-product-trust__item{display:flex;align-items:center;gap:9px;color:#ddd;font-size:.82rem}.kaff-product-trust__item span{font-size:1.1rem}.kaff-product-trust__item strong{font-weight:700}
.kaff-product-shipping{margin:18px 0 0;padding:18px;border:1px solid rgba(255,255,255,.1);border-radius:18px;background:#111}.kaff-product-shipping h3{margin:0 0 12px;font-size:1rem}
.kaff-shipping-form{display:grid;grid-template-columns:1fr auto;gap:9px}.kaff-shipping-form input{min-width:0;padding:13px 14px;border:1px solid rgba(255,255,255,.14);border-radius:10px;background:#080808;color:#fff}.kaff-shipping-form button{padding:0 18px;border:0;border-radius:10px;background:var(--gold);font-weight:850;cursor:pointer}
.kaff-shipping-result{margin-top:12px}.kaff-shipping-result ul{display:grid;gap:8px;margin:0;padding:0;list-style:none}.kaff-shipping-result li{display:flex;justify-content:space-between;gap:16px;padding:10px 12px;border-radius:10px;background:rgba(255,255,255,.04)}.kaff-shipping-error{color:#ff8d8d}
.kaff-sticky-buy{position:fixed;left:0;right:0;bottom:0;z-index:9990;transform:translateY(110%);opacity:0;border-top:1px solid rgba(212,175,55,.25);background:rgba(8,8,8,.94);backdrop-filter:blur(16px);transition:.28s ease;box-shadow:0 -20px 50px rgba(0,0,0,.35)}.kaff-sticky-buy.is-visible{transform:none;opacity:1}.kaff-sticky-buy__inner{min-height:82px;display:flex;align-items:center;justify-content:space-between;gap:24px}.kaff-sticky-buy__product{display:flex;align-items:center;gap:13px;min-width:0}.kaff-sticky-buy__product img{width:54px;height:54px;object-fit:cover;border-radius:10px}.kaff-sticky-buy__product div{display:grid;min-width:0}.kaff-sticky-buy__product strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kaff-sticky-buy__product span{color:var(--gold)}.kaff-sticky-buy__actions{display:flex;gap:10px}.kaff-sticky-buy__actions input{width:68px;height:46px;border-radius:10px;text-align:center}.kaff-sticky-buy__actions button{min-height:46px;border-radius:10px;padding:0 24px}
.kaff-gallery-lightbox{position:fixed;inset:0;z-index:100000;display:grid;place-items:center;padding:28px;background:rgba(0,0,0,.92)}.kaff-gallery-lightbox[hidden]{display:none}.kaff-gallery-lightbox img{max-width:min(1100px,92vw);max-height:88vh;object-fit:contain}.kaff-gallery-lightbox button{position:absolute;top:20px;right:24px;width:48px;height:48px;border:1px solid rgba(255,255,255,.18);border-radius:50%;background:#111;color:#fff;font-size:2rem;cursor:pointer}
.single-product .related.products{grid-column:1/-1;margin-top:50px}.single-product .related.products ul.products{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:20px;padding-bottom:14px}.single-product .related.products ul.products li.product{flex:0 0 min(280px,76vw);scroll-snap-align:start}
@media(max-width:900px){.single-product div.product{grid-template-columns:1fr}.single-product .woocommerce-product-gallery{position:relative;top:auto}.kaff-sticky-buy__product strong{max-width:260px}}
@media(max-width:640px){.kaff-product-trust{grid-template-columns:1fr}.kaff-sticky-buy__inner{min-height:72px}.kaff-sticky-buy__product img,.kaff-sticky-buy__product strong{display:none}.kaff-sticky-buy__actions{width:100%}.kaff-sticky-buy__actions button{flex:1;padding:0 12px}.kaff-shipping-form{grid-template-columns:1fr}.single-product .flex-control-thumbs{grid-template-columns:repeat(4,1fr)}}
