/* Overlay */
.ssc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ssc-open .ssc-overlay {
    opacity: 1;
    visibility: visible;
    display: block !important;
}

/* Side Cart Container */
.ssc-side-cart {
    position: fixed;
    top: 0;
    right: -450px; /* Hidden by default */
    width: 400px;
    max-width: 100%;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
}

.ssc-open .ssc-side-cart {
    right: 0 !important;
}

/* Header */
.ssc-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ssc-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.ssc-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
    color: #000!important;
}

/* Wrapper for Scrollable Content */
.ssc-cart-wrapper {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Shipping Bar */
.ssc-shipping-bar {
    padding: 15px 20px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.ssc-shipping-bar p {
    margin: 0 0 10px;
    font-size: 14px;
}

.ssc-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.ssc-progress-fill {
    height: 100%;
    background: #4caf50;
    transition: width 0.3s ease;
}

/* Items List */
.ssc-items-list {
    padding: 20px;
    flex: 1;
}

.ssc-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    position: relative;
}

.ssc-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ssc-item-img {
    width: 70px;
    height: 70px;
    margin-right: 15px;
    flex-shrink: 0;
}

.ssc-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

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

.ssc-item-title {
    margin: 0 0 5px;
    font-size: 14px;
    line-height: 1.2;
}

.ssc-item-title a {
    text-decoration: none;
    color: inherit;
}

.ssc-item-price {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.ssc-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #e1e1e1;
    border-radius: 50px; /* Rounded pill shape */
    background-color: #f9f9f9;
    overflow: hidden;
    width: max-content;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.ssc-qty-btn {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background 0.2s, color 0.2s;
    font-weight: bold;
}

.ssc-qty-btn:hover {
    background: #eee;
    color: #000!important;
}

.ssc-qty-input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    -moz-appearance: textfield;
}

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

.ssc-remove-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.ssc-remove-btn:hover {
    color: #f00;
}

/* Footer */
.ssc-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fff;
}

.ssc-subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

.ssc-checkout-btn,
.ssc-continue-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.ssc-checkout-btn {
    background: var(--primary-color);
    color: #fff;
    margin-bottom: 10px;
}

.ssc-checkout-btn:hover {
    background: var(--primary-hover);
    color: #fff;
}

.ssc-continue-btn {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
}

.ssc-continue-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.ssc-empty-state {
    text-align: center;
    padding: 40px 0;
}

/* Responsive */
@media (max-width: 480px) {
    .ssc-side-cart {
        width: 100%;
        right: -100%!important;
    }
}
