/* -- Overlay & panel basics -- */
#sc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 9998;
}

#sc-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.sc-panel {
    position: fixed;
    right: -520px;
    top: 0;
    height: 100%;
    width: 520px;
    max-width: 100%;
    background: #fff;
    box-shadow: -8px 0 30px rgba(0, 0, 0, .15);
    z-index: 9999;
    transition: right .3s ease;
    display: flex;
    flex-direction: column;
}

.sc-panel.open {
    right: 0;
}

.sc-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.sc-content {
    padding: 1rem;
    overflow: auto;
    flex: 1;
    outline: none;
    display: flex;
    flex-direction: column;
}

.sc-cart-items {
    list-style: none;
    margin: 0;
    padding: 0;
    flex-grow: 1;
    overflow-x: none;
    overflow-y: scroll;
}

button.sc-qty-decrease,
button.sc-qty-increase,
input.sc-qty-input,
button.sc-remove-item {
    background-color: #fff;
    border: 1px solid #ccc;
}

.sc-remove-item {
    font-size: 14px;
    margin-left: auto;
}

.sc-cart-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f2f2f2;
}

.sc-item-details {
    flex: 1;
}

.sc-cont-details-btns {
    width: 80%;
}

.sc-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sc-actions a{
    background-color: #000000 !important;
    padding: 15px;
    color: #fff !important;
    width: 100%;
    display: block;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
}

.sc-subtotal-value {
    margin-bottom: 10px;
}

.sc-cart-totals {
    padding-top: 10px;
    border-top: solid 1px #ccc;
}

.sc-item-title {
    font-size: 1.1em;
    margin-bottom: 5px;
    color: black;
    font-weight: 500;
}

.sc-item-qty {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin-bottom: 10px;
}

input.sc-qty-input {
    width: 56px;
    text-align: center;
    -moz-appearance: textfield;
    /* Firefox */
    -webkit-appearance: none;
    /* Chrome, Safari, Edge, Opera */
    appearance: none;
    margin: 0;
}

input.sc-qty-input::-webkit-outer-spin-button,
input.sc-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sc-item-subtotal {
    min-width: 90px;
    display: flex;
    align-items: center;
}

.sc-item-subtotal span.woocommerce-Price-amount.amount {
    line-height: 1;
}

.sc-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
}

.sc-toggle {
    position: relative;
}

.sc-count {
    background: #222;
    color: #fff;
    padding: .12rem .45rem;
    border-radius: 999px;
    margin-left: .4rem;
}

.cart-button-custom {
    width: 70px;
    height: 70px;
    border-radius: 50px;
    position: fixed;
    top: 300px;
    right: 30px;
    z-index: 9999;
    line-height: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #81d742;
}

.cart-button-custom span.sc-count {
    position: absolute;
    top: -8px;
    right: 0;
    background-color: red;
    border-radius: 50px;
    width: 25px;
    height: 25px;
    line-height: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-button-custom i.fa-cart-shopping {
    font-size: 25px;
}

/* Small screens: full width panel */

@media (max-width:768px){
    .cart-button-custom {
        width: 60px;
        height: 60px;
        border-radius: 50px;
        position: fixed;
        bottom: 20px;
        top: auto;
        right: 20px;
        z-index: 9999;
        line-height: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: #81d742;
    }
}

@media (max-width:480px) {
    .sc-panel {
        width: 100%;
        right: -100%;
    }

    .sc-panel.open {
        right: 0;
    }
}


/* Utilities */
.sc-loading,
.sc-error,
.sc-cart-empty {
    padding: 1rem;
    text-align: center;
    color: #666;
}