/* =============================================================
   BioBalkan Side Cart – Styles (1:1 aus style.css)
   ============================================================= */

.bb-cart-totals {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.side-cart.no-animation .side-cart-panel{
    animation:none!important;
    transform:translateX(0)!important;
    opacity:1!important;
}

.side-cart.no-animation .side-cart-overlay{
    opacity:1!important;
}

.open-cart{
    cursor:pointer;
}

.sc-item{
    position:relative;
    transition:opacity .25s ease;
}

.sc-item.sc-loading{
    opacity:.45;
    pointer-events:none;
}

.sc-item.sc-loading::after{
    content:"";
    position:absolute;
    inset:0;
    margin:auto;

    width:36px;
    height:36px;

    border:3px solid rgba(0,0,0,.15);
    border-top-color:var(--color-body);

    border-radius:50%;

    animation:scSpin .7s linear infinite;
}

@keyframes scSpin{

    to{
        transform:rotate(360deg);
    }

}

.side-cart{
	position:fixed;
	inset:0;pointer-events:none;
	z-index:9999;
}
.side-cart.active{
	pointer-events:all;
}

/* overlay */

.side-cart-overlay{
position:absolute;
inset:0;
background:rgba(0,0,0,.4);
opacity:0;
backdrop-filter:blur(8px);
-webkit-backdrop-filter:blur(8px);
transition:opacity .24s ease;
}

.side-cart.active .side-cart-overlay{
opacity:.5;
}

.side-cart.closing .side-cart-overlay{
opacity:.5;
}

/* panel */

.side-cart-panel{
position:absolute;
top:4rem;
right:2rem;
bottom:2rem;
width:440px;
background:#fff;
box-shadow:0 0 60px -20px rgba(0,0,0,.2);
transform:translateX(110%);
opacity:0;
display:flex;
flex-direction:column;
border-radius:48px;
padding:2rem 1.4rem 1rem 1.4rem;
overflow:hidden
}

.side-cart.active .side-cart-panel{
animation:sc-in .3s ease-out forwards;
}

.side-cart.closing .side-cart-panel{
animation:sc-out .22s ease-in forwards;
}

@keyframes sc-in{
0%{transform:translateX(110%);opacity:0}
100%{transform:translateX(0);opacity:1}
}

@keyframes sc-out{
0%{transform:translateX(0);opacity:1}
100%{transform:translateX(110%);opacity:0}
}

/* header/footer */

.side-cart-header{
display:flex;
justify-content:space-between;
align-items:center;
padding: 0 .8rem .2rem .8rem;
font-size:var(--fs-h3);
line-height:var(--lh-h3);
font-weight: bold;
flex-shrink:0;
}

.side-cart-close{
cursor:pointer;
display:flex!important;
align-items:center!important;
justify-content:center!important;
width:41px!important;
height:41px!important;
padding:0!important;
border:none!important;
border-radius:50%!important;
background:rgba(120,120,128,.12)!important;
color:var(--color-body)!important;
font-size:1.7rem!important;
line-height:1!important;
transition:background .2s ease!important;
font-weight: normal;
}

.side-cart-close:hover{
background:rgba(120,120,128,.22)!important;
}

/* === GEÄNDERT: side-cart-content ist jetzt der Scroll-Container === */
.side-cart-content{
display:flex;
flex-direction:column;
flex:1;
overflow-y:auto;     /* war: hidden – jetzt scrollt der gesamte Inhalt */
overflow-x:hidden;
min-height:0;
position:relative;
}

/* === items-wrap: wächst mit Inhalt, schiebt Summary nach unten === */
.sc-items-wrap{
flex:0 0 auto;
overflow:visible;
min-height:0;
padding-right:2px;
}

.side-cart-footer{
display:flex;
gap:1rem;
padding: .4em;;
margin-top: .4em;
border-radius: 40px;
flex-shrink:0;
}

.side-cart-footer .btn-cart,
.side-cart-footer .btn-checkout{
flex:1
}

/* list */

.sc-list{
list-style:none;
margin:0;
padding:0!important
}

.sc-price{
align-self:start;
white-space:nowrap;
font-weight:bold;
}

/* image */

.sc-thumb{
width:70px;
height:70px
}

.sc-thumb img{
width:100%!important;
height:100%!important;
object-fit:cover;
border-radius:12px!important;
display:block;
max-width:none!important
}

.sc-title{
font-weight:700;
}

.sc-variation{
font-size:.9rem;
line-height: 1.4;
}

.sc-item{
display:grid;
grid-template-columns:68px 1fr auto;
gap:.8em;
align-items:start;
margin-bottom: 1.2em;
box-shadow: 0 12px 15px -15px rgba(0,0,0,.2);
margin: .4em.2em;
padding: .8em .8em .6em .6em;
border-radius: 24px;
}

.sc-main{
display:flex;
flex-direction:column;
gap:0;
}

.sc-qty{
display:flex;
align-items:center;
gap:6px;
font-weight:700;
margin-top: .4em;
}

.sc-qty button{
all:unset;
width:30px!important;
height:30px!important;
min-width:30px!important;
min-height:30px!important;
flex:0 0 30px!important;
border-radius:50%!important;
border:1px solid #000!important;
background:#fff!important;
color:#000!important;
display:flex!important;
align-items:center!important;
justify-content:center!important;
padding:0!important;
line-height:1!important;
font-size:1rem!important;
cursor:pointer!important;
box-sizing:border-box!important;
}

.sc-qty button:hover{
background:#000!important;
color:#fff!important;
}

.sc-qty img{
width:16px;
height:16px;
display:block;
}

.sc-count{
min-width:24px;
text-align:center;
}

/* states */
.side-cart-content {
    position: relative;
}

.side-cart-content.sc-loading {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.side-cart-content.sc-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #eee;
    border-top-color: #333;
    border-radius: 50%;
    animation: sc-spin 0.6s linear infinite;
    z-index: 10;
}

@keyframes sc-spin {
    to { transform: rotate(360deg); }
}

/* shipping */

.sc-shipping-bar{margin:.8em 0;flex-shrink:0;padding:0 .4em;}

.sc-bar{
height:.44em;
background:#eee;
border-radius:999px;
overflow:hidden;
}

.sc-bar span{
display:block;
height:100%;
background:#d00;
border-radius:999px;
transition:width .4s ease;
}

.sc-shipping-bar.is-full .sc-bar span{
background:#7ed957;
}

.sc-bar-text{
font-size:1rem!important;
	margin-top: .2em
}
.sc-bar-text .woocommerce-Price-amount {
	font-weight: bold;
}

.sc-shipping-option{
display:flex;
align-items:center;
justify-content:flex-start;
min-height:1.6em;
font-size:var(--fs-p);
font-weight:normal;
}

.sc-shipping-label{
flex:1;
font-size:var(--fs-p);
font-weight:normal;
}

.sc-shipping-price{
margin-left:auto;
min-width:3em;
text-align:right;
display:inline-block;
font-size:var(--fs-p);
font-weight:normal;
}

.sc-diff{
font-size:var(--fs-p);
font-weight:normal;
}

.sc-diff-more{
color:var(--color-body);
}

.sc-diff-less{
color:var(--color-body);
}

.sc-free-shipping{
color:var(--color-green);
}

/* summary === Summary klebt unten am Panel-Rand, scrollt erst bei langer Liste mit === */

.sc-summary{
font-size:var(--fs-p);
line-height:var(--lh-p);
padding: 0 .4em;
flex-shrink:0;
margin-top:auto;
}

/* Versand-Loading Spinner im Side Cart */
.sc-summary.sc-loading {
    position: relative;
    pointer-events: none;
}

.sc-summary.sc-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(0,0,0,.15);
    border-top-color: var(--color-body);
    border-radius: 50%;
    animation: scSpin .7s linear infinite;
}

.sc-line{
display:flex;
justify-content:space-between;
margin-bottom:.35rem;
}

.sc-divider{
height:1px;
background:#eee;
margin:.5rem 0;
flex-shrink:0;
}

.sc-total{
font-weight:700;
margin-top:.5rem;
font-size: var(--fs-h4);
line-height: var(--lh-h4);
margin-bottom:0;
}

.sc-summary .bb-tax{
font-size:var(--fs-small);
line-height:1.4;
opacity:.7;
margin-top:3px!important;
text-align:left;
}

.sc-savings{
font-size:var(--fs-p);
color:var(--color-green);
font-weight: bold;
margin-bottom:.15rem;
}

.sc-account-funds{
font-size:var(--fs-p);
color:var(--color-green);
font-weight:bold;
margin-bottom:.15rem;
}

.sc-bulk-badge{
font-size:var(--fs-small);
color:var(--color-green);
font-weight:normal;
margin-bottom:.2em;
line-height:1.3;
}

.sc-item.sc-has-bulk{
background:linear-gradient(to bottom left, rgba(82,161,92,.2) 10%, rgba(255,255,255,0) 40%);
}

/* coupon */

.sc-coupons {
    margin-bottom: 4px;
    padding: .15em .5em .15em .8em;
    border-radius: 60px;
    box-shadow: 0 4px 16px -12px rgba(0,0,0,.4);
    background: #b4e6b4;
    flex-shrink:0;
}

.sc-coupon-item{
display:flex;
justify-content:space-between;
align-items:center;
font-size:1.1rem;
font-weight: bold;
}

.sc-remove-coupon{
background:transparent!important;
border:1px solid var(--color-body)!important;
cursor:pointer;
padding: .4em!important;
margin: .1em 0;
}

.sc-remove-coupon:hover{
background:var(--color-body)!important;
}

.sc-coupon{
display:flex;
gap:1rem;
width:100%;
margin: .5em 0;
flex-shrink:0;
}

.sc-coupon input{
flex:1;
min-width:0;
width:100%;
border-radius:40px!important;
font-size: var(--fs-button-s)!important;
height: 52px!important;
}

#sc-apply-coupon{
flex:0 0 auto;
white-space:nowrap;
border-radius:40px!important;
font-size: var(--fs-button-s)!important;
height: 52px!important;
}

.sc-notices{
opacity:0;
transform:translateY(6px);
transition:opacity .3s ease, transform .3s ease;
pointer-events:none;
flex-shrink:0;
}

.sc-notices.active{
opacity:1;
transform:translateY(0);
pointer-events:auto;
}

.woocommerce-message,
.woocommerce-error,
.woocommerce-info{
    transition:
        opacity .5s ease,
        transform .5s ease;
}

.woocommerce-message[style*="opacity: 0"],
.woocommerce-error[style*="opacity: 0"],
.woocommerce-info[style*="opacity: 0"]{
    transform:translateY(-10px);
}

.sc-notices .woocommerce-message,
.sc-notices .woocommerce-error,
.sc-notices .woocommerce-info,
.sc-notice{
    font-size:0.9rem!important;
    line-height:1.4;
    margin:0;
    padding:.6em 1em!important;
    border:none!important;
    border-radius:8px;
}

.sc-notice-success{
    background:#fff!important;
    color:var(--color-green)!important;
}

.sc-notice-error{
    background:#fff!important;
    color:var(--color-red)!important;
}

.woocommerce-error::before {
	display: none;
}

/* buttons */

.btn-cart,
.btn-checkout,
#sc-apply-coupon{
display:flex;
align-items:center;
justify-content:center;
padding:
    clamp(var(--pad-y-min)*1px, var(--pad-y-fluid), var(--pad-y-max)*1px)
    clamp(var(--pad-x-min)*1px, var(--pad-x-fluid), var(--pad-x-max)*1px) !important;
border-radius:60px;
font-size:var(--fs-button);
line-height:var(--lh-button-s);
border: none;
background:var(--color-body);
color:#fff!important;
cursor:pointer;
white-space:nowrap;
text-decoration:none!important
}

.btn-cart:hover,
.btn-checkout:hover,
#sc-apply-coupon:hover{
background:rgba(43,37,37,.85);
color:#fff!important
}

.sc-remove img{
display:none
}

.sc-remove{
background:#fff;
border:1px solid var(--color-body);
position:relative
}

.sc-remove::before{
content:"";
width:16px;
height:16px;
display:block;
background:#000;
mask:url("https://www.biobalkan.eu/wp-content/uploads/Bin.svg") no-repeat center;
-webkit-mask:url("https://www.biobalkan.eu/wp-content/uploads/Bin.svg") no-repeat center;
mask-size:contain;
-webkit-mask-size:contain
}

.sc-remove:hover{
background:#000
}

.sc-remove:hover::before{
background:#fff
}

.sc-empty{
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
text-align:center;
gap:0px;
padding:160px 0;
font-weight: bold;
color: rgba(0,0,0,.2);
}

.sc-empty img{
width:48px;
height:auto;
opacity:.2;
}

/* Skeleton */

.sc-skeleton{
    padding:16px;
    display:flex;
    flex-direction:column;
    gap:12px;
}

.sc-skeleton-item{
    height:72px;
    border-radius:8px;
    background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);
    background-size:200% 100%;
    animation:sc-shimmer 1.2s infinite;
}

.sc-skeleton-item:nth-child(2){
    height:56px;
    opacity:.7;
}

@keyframes sc-shimmer{
    0%{background-position:200% 0}
    100%{background-position:-200% 0}
}

/* Safari Autofill Fix */

#sc-rabatt::-webkit-search-cancel-button,
#sc-rabatt::-webkit-search-decoration{
    display:none;
}

/* === GEÄNDERT: Scrollbalken ausblenden – greift jetzt auf side-cart-content === */
.side-cart-content::-webkit-scrollbar{
    display:none;
}
.side-cart-content{
    scrollbar-width:none;
    -ms-overflow-style:none;
}

/* Mobile */

@media (max-width:768px){

    /* Panel: von unten, 88vh, oben abgerundet */
    .side-cart-panel{
        top:auto;
        right:0;
        bottom:0;
        left:0;
        width:100%;
        height:88vh;
        border-radius:24px 24px 0 0;
        padding:1.4rem 1rem .8rem 1rem;
        transform:translateY(110%);
        opacity:1;
    }

    /* Animation von unten nach oben */
    .side-cart.active .side-cart-panel{
        animation:sc-in-mobile .3s ease-out forwards;
    }
    .side-cart.closing .side-cart-panel{
        animation:sc-out-mobile .22s ease-in forwards;
    }

    @keyframes sc-in-mobile{
        0%{transform:translateY(110%)}
        100%{transform:translateY(0)}
    }
    @keyframes sc-out-mobile{
        0%{transform:translateY(0)}
        100%{transform:translateY(110%)}
    }

    /* Schließen-Button etwas größer (Touch-Target) */
    .side-cart-close{
        width:46px!important;
        height:46px!important;
        font-size:1.8rem!important;
    }

    /* Dezenter Schatten oberhalb Summen-Bereich */
    .sc-summary{
        box-shadow:0 -12px 16px -8px rgba(0,0,0,.06);
    }

}