/* ============================ */
/*  CARRINHO PERSONALIZADO CSS  */
/* ============================ */

/* ---------- ÍCONE ---------- */
#sg-cart-icon{
    background:none;border:none;cursor:pointer;padding:4px;position:relative;
    display:inline-flex;align-items:center;justify-content:center;
}
#sg-cart-icon .sg-badge{
    position:absolute;top:-5px;right:-5px;background:#ff2850;color:#fff;border-radius:50%;
    min-width:18px;height:18px;font-size:12px;line-height:18px;font-weight:600;
    display:flex;align-items:center;justify-content:center;
}

/* ---------- PAINEL ---------- */
.sg-cart-panel{
    position:fixed;top:0;right:0;width:400px;height:100%;background:#fff;
    box-shadow:-3px 0 20px rgba(0,0,0,.15);transform:translateX(100%);
    transition:transform .35s cubic-bezier(.25,.8,.25,1);z-index:9999;
    display:flex;flex-direction:column;overflow:hidden;
}
.sg-cart-panel.open{transform:translateX(0);}
@media(max-width:767px){
    .sg-cart-panel{width:100vw;height:85vh;border-radius:16px 16px 0 0;
        bottom:0;left:0;top:auto;transform:translate(0,100%);}
    .sg-cart-panel.open{transform:translate(0,0);}
}

/* ---------- SPINNER ---------- */
.sg-cart-panel.sg-loading::before{
    content:'';position:absolute;inset:0;background:rgba(255,255,255,.6);z-index:10000;
}
.sg-cart-panel.sg-loading::after{
    content:'';position:absolute;top:50%;left:50%;width:28px;height:28px;margin:-14px;
    border:3px solid #000;border-top-color:transparent;border-radius:50%;
    animation:sgspin .8s linear infinite;z-index:10001;
}
@keyframes sgspin{to{transform:rotate(360deg);}}

/* ---------- OVERLAY ---------- */
.sg-cart-overlay{
    position:fixed;inset:0;background:rgba(0,0,0,.5);opacity:0;transition:opacity .3s ease;
    pointer-events:none;z-index:9998;
}
.sg-cart-overlay.active{opacity:1;pointer-events:auto;}

/* ---------- CONTENT ---------- */
.sg-cart-content{flex:1;display:flex;flex-direction:column;overflow-y:auto;}
.sg-cart-content header{
    padding:0.01rem 1.4rem;border-bottom:1px solid #eee;display:flex;
    justify-content:space-between;align-items:center;
}
.sg-cart-content header h2{margin:0;font-size:0.9rem;font-weight:700;}
.sg-cart-content header button{background:none;border:none;font-size:1.8rem;cursor:pointer;}

/* ---------- ITEMS ---------- */
.sg-cart-items{flex:1;overflow-y:auto;padding:0.2rem 1.1rem;}
.sg-cart-item{
    display:flex;gap:1rem;border-bottom:1px solid #eee;padding-bottom:1rem;margin-bottom:1rem;
}
.sg-cart-item img{
    width:70px!important;height:70px!important;aspect-ratio:1/1!important;
    object-fit:cover!important;border-radius:8px;flex-shrink:0;
}
.sg-item-info{flex:1;}
.sg-item-info h3{margin:0 0 .25rem;font-size:1rem;font-weight:600;}
.sg-item-info small{display:block;font-size:.85rem;color:#666;margin-bottom:.45rem;}
.sg-qty{
    display:flex;align-items:center;gap:.55rem;margin-bottom:.3rem;
}
.sg-qty button:hover{background:#fafafa; color:#000!important;}
.sg-qty button{
    width:32px;height:32px;border:1px solid #ddd;background:#fafafa;border-radius:50%;
    font-size:1.25rem;font-weight:700;display:flex;align-items:center;justify-content:center;color:#000;
}
.sg-qty-num{min-width:30px;text-align:center;font-size:1rem;}
.sg-price-info{font-size:1rem;font-weight:700;color:#000;}
.sg-remove{background:none;border:none;font-size:1.5rem;color:#999;cursor:pointer;align-self:flex-start;}
.sg-empty{padding:2rem 1.4rem;text-align:center;font-size:1.1rem;color:#999;}

/* ---------- UPSSELL ACCORDION ---------- */
.sg-upsells{border-top:1px solid #eee;width:100%;text-align:center;}

/* Cabeçalho do accordion (parece título, não botão) */
.sg-upsell-toggle{
    all:unset;box-sizing:border-box;width:100%;
    background:#f7f7f7;padding:.9rem 1.4rem;line-height:1;width:100%;
    display:flex;justify-content:space-between;align-items:center;
    font-weight:700;font-size:1rem;color:#000;text-transform:uppercase;
    cursor:default;
}
/* Ícones */
.sg-plus-icon,.sg-minus-icon{
    font-size:1.35rem;line-height:1;margin-left:.5rem;color:#000!important;cursor:pointer;
}
.sg-plus-icon{display:none;}
.sg-upsell-toggle[aria-expanded="false"] .sg-minus-icon{display:none;}
.sg-upsell-toggle[aria-expanded="false"] .sg-plus-icon{display:inline;}

/* Corpo */
.sg-upsell-body{padding:1rem 1.4rem;border-top:1px solid #eee;}

/* Carrossel horizontal */
.sg-upsell-list{
    display:flex;gap:1rem;overflow-x:auto;-webkit-overflow-scrolling:touch;scroll-snap-type:x mandatory;
    padding-bottom:1rem;
}

/* Cartão de upsell */
.sg-upsell{
    flex:0 0 100%;scroll-snap-align:center;background:#fff;border:1px solid #ddd;
    padding:.9rem;border-radius:8px;display:flex;gap:.8rem;align-items:flex-start;
}
.sg-upsell img{
    width:75px!important;height:75px!important;aspect-ratio:1/1!important;
    object-fit:cover!important;border-radius:8px;flex-shrink:0;
}
.sg-upsell-info{flex:1;color:#000;text-align:left!important;}
.sg-upsell-info h4{margin:0 0 .35rem;font-size:.95rem;font-weight:600;text-align:left!important;}
.sg-discount{background:#34a853;color:#fff;font-size:11px;border-radius:4px;padding:2px 5px;margin-right:.45rem;text-align:left!important;}
.sg-upsell-price{font-weight:700;font-size:1rem;}
.sg-upsell-add{
    margin-top:.45rem;background:#000;color:#fff;border:none;border-radius:4px;
    padding:.45rem .9rem;font-size:.8rem;cursor:pointer;display:flex;gap:6px;
    align-items:center;justify-content:center;
}
.sg-upsell-add:hover{background:#222;}

/* Dots */
.sg-bullets{text-align:center;margin-top:.5rem;}
.sg-bullet{
    display:inline-block;width:10px;height:10px;border-radius:50%;background:#ccc;
    margin:0 4px;cursor:pointer;transition:background .3s ease;
}
.sg-bullet.act{background:#000;width:14px;border-radius:7px;}

/* ---------- SUMMARY ---------- */
footer{border-top:1px solid #eee;}
.sg-summary-row,.sg-summary-total{
    display:flex;justify-content:space-between;align-items:center;font-size:1rem;
    padding:.6rem 1.4rem;
}
.sg-summary-total{font-weight:700;padding-top:1rem;padding-bottom:1rem;font-size:1.1rem;}
.sg-checkout-btn{
    display:block;margin:0 1.4rem 1rem;background:#000;color:#fff!important;text-align:center;
    padding:.8rem;border-radius:8px;font-weight:700;font-size:1rem;text-transform:uppercase;text-decoration:none;
}
.sg-continue-link{
    display:block;text-align:center;font-size:.9rem;color:#000;margin-bottom:1.2rem;
}
.sg-continue-link:hover{text-decoration:underline;}

/* =============================================================== */
/*  HARD OVERRIDE contra borda/cor rosa herdada de temas externos  */
/* =============================================================== */
.sg-upsells .sg-upsell-toggle,
.sg-upsells .sg-upsell-toggle:hover,
.sg-upsells .sg-upsell-toggle:focus,
.sg-upsells .sg-upsell-toggle:active,
.sg-upsells .sg-upsell-toggle::before,
.sg-upsells .sg-upsell-toggle::after{
    border:none!important;
    box-shadow:none!important;
    outline:none!important;
    background:#f7f7f7!important;
    color:#000!important;
}
.sg-upsells .sg-upsell-toggle{cursor:default!important;}
.sg-upsells .sg-plus-icon,
.sg-upsells .sg-minus-icon{
    color:#000!important;
}
.sg-upsells .sg-plus-icon:hover,
.sg-upsells .sg-minus-icon:hover{
    color:#000!important;
}

.sg-upsell-button-link {
    text-decoration: none;
    margin-top:.45rem;background:#000;color:#fff!important;border:none;border-radius:4px;
    padding:.45rem .9rem;font-size:.8rem;cursor:pointer;display:flex;gap:6px;
    align-items:center;justify-content:center;
}
.sg-upsell-button-link:hover {
    background: #222;
    color: #fff!important;
}

/* Adicione este código no final do seu arquivo cart.css */

.sg-price-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Garante que quebre a linha se não houver espaço */
    gap: 0.5rem; /* Espaçamento entre os elementos de preço */
}

.sg-item-discount {
    background: #34a853; /* Verde para o desconto */
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    padding: 2px 6px;
    line-height: 1;
}

.sg-regular-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.9em;
}

.sg-sale-price, .sg-price-info .amount {
    font-weight: 700;
    color: #000;
}