/* ==========================================================================
   Sandviks Side Cart
   ========================================================================== */

/* --- Overlay --- */
.ssc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ssc-overlay.ssc-open {
    opacity: 1;
    visibility: visible;
}

/* --- Drawer --- */
.ssc-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 100vw;
    height: 100%;
    background: #ffffff;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
}

.ssc-drawer.ssc-open {
    transform: translateX(0);
}

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

.ssc-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.ssc-close {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
    font-size: 22px !important;
    color: #000 !important;
    line-height: 1;
    padding: 4px;
    transition: none !important;
}

.ssc-close:hover,
.ssc-close:focus,
.ssc-close:active {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #000 !important;
}

/* --- Body / scrollable items area --- */
.ssc-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 12px 20px;
}

.ssc-body::-webkit-scrollbar { width: 4px; }
.ssc-body::-webkit-scrollbar-track { background: transparent; }
.ssc-body::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 2px; }

/* --- Empty message --- */
.ssc-empty {
    text-align: center;
    color: #888;
    padding: 40px 0;
    font-size: 15px;
}

/* ==========================================================================
   Cart item
   ========================================================================== */

.ssc-item {
    display: grid;
    grid-template-columns: 110px 1fr;
    column-gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #efefef;
}

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

/* --- Image column --- */
.ssc-item-img-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ssc-item-image {
    width: 100%;
    height: auto;
    max-height: 70px;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

/* --- Details column --- */
.ssc-item-details {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 2px;
}

/* ✕ remove button — top-right of the details column */
.ssc-remove-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
    width: 22px;
    height: 22px;
    border-radius: 0;
    font-size: 14px !important;
    color: #000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: none !important;
}

.ssc-remove-btn:hover,
.ssc-remove-btn:focus,
.ssc-remove-btn:active {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #000 !important;
}



.ssc-item-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.35;
    padding-right: 28px; /* clear the ✕ button */
    display: block;
}



/* price × qty  +  edit link on the same row */
.ssc-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ssc-item-unit {
    font-size: 13px;
    color: #888;
}

.ssc-edit-link {
    font-size: 13px;
    color: #888;
    text-decoration: underline;
}

.ssc-edit-link:hover {
    color: #333;
}

/* ==========================================================================
   Quantity stepper  (sits below the image)
   ========================================================================== */

.ssc-qty-wrap {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d0d0d0 !important;
    border-radius: 6px !important;
    overflow: hidden;
    box-shadow: none !important;
    background: none !important;
}

.ssc-qty-btn {
    background: #f5f5f5 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
    width: 30px;
    height: 30px;
    font-size: 14px !important;
    color: #333 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s !important;
    flex-shrink: 0;
}

.ssc-qty-btn:hover {
    background: #e0e0e0 !important;
    color: #333 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.ssc-qty-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.ssc-qty-input {
    width: 36px;
    height: 30px;
    border: none !important;
    border-left: 1px solid #d0d0d0 !important;
    border-right: 1px solid #d0d0d0 !important;
    box-shadow: none !important;
    text-align: center;
    font-size: 14px !important;
    font-weight: 600;
    color: #1a1a1a !important;
    -moz-appearance: textfield;
    appearance: textfield;
    outline: none !important;
    background: #fff !important;
}

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

/* --- Loading state --- */
.ssc-item.ssc-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ==========================================================================
   Footer — totals + checkout button
   ========================================================================== */

.ssc-footer {
    flex-shrink: 0;
    padding: 16px 20px 24px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Shipping + Total rows */
.ssc-totals {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ssc-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 15px;
    color: #1a1a1a;
}

.ssc-total-row {
    font-weight: 700;
}

/* Checkout button — colors inherited from Elementor's .elementor-button */
.ssc-btn {
    display: block;
    text-align: center;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    letter-spacing: 0.02em;
}

.ssc-btn-checkout {
    width: 100%;
}

/* --- Cart count bubble --- */
.ssc-count-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #c0392b;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    line-height: 1;
    vertical-align: middle;
    margin-left: 4px;
}

.ssc-count-bubble[data-count="0"] {
    display: none;
}

/* --- Suppress Elementor's built-in side cart panel --- */
.elementor-menu-cart__container {
    display: none !important;
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .ssc-drawer {
        width: 80vw;
        max-width: 80vw;
    }
}
