/* =================================================
   SIDE CART – KRYSTALSPACE PREMIUM
================================================= */

/* --- OVERLAY --- */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
    z-index: 9998;
}

body.side-cart-open .cart-overlay {
    opacity: 1;
    visibility: visible;
}

/* --- DRAWER --- */
.side-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 100%);
    height: 100vh;
    background: #ffffff;
    z-index: 9999;
    box-shadow: -20px 0 50px rgba(0,0,0,.18);
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.165,.84,.44,1);
    display: flex;
    flex-direction: column;
}

body.side-cart-open .side-cart-drawer {
    transform: translateX(0);
}

/* --- HEADER --- */
.side-cart-header {
    padding: 22px 26px;
    border-bottom: 1px solid rgba(0,0,0,.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.side-cart-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

/* Badge ilości */
.side-cart-title span {
    font-size: .75rem;
    padding: 3px 9px;
    border-radius: 20px;
    background: #000;
    color: #fff;
    font-weight: 600;
}

/* Close */
.close-side-cart {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: all .25s ease;
}

.close-side-cart:hover {
    background: #000;
    color: #fff;
    transform: rotate(90deg);
}

/* --- CONTENT WRAPPER --- */
.side-cart-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.side-cart-content .widget_shopping_cart_content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* --- PRODUCT LIST --- */
.side-cart-content .cart_list {
    list-style: none;
    margin: 0;
    padding: 0 26px;
    overflow-y: auto;
    flex-grow: 1;
}

.side-cart-content .cart_list li {
    display: flex;
    gap: 14px;
    padding: 18px 0;
    position: relative;
}

.side-cart-content .cart_list li:not(:last-child) {
    border-bottom: 1px solid rgba(0,0,0,.05);
}

/* Product image */
.side-cart-content .cart_list li img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
}

/* Product title */
.side-cart-content .cart_list li a {
    font-size: .9rem;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
}

.side-cart-content .cart_list li .quantity {
    display: block;
    font-size: .8rem;
    color: #64748b;
    margin-top: 4px;
}

/* Remove button */
.side-cart-content .cart_list li .remove {
    position: absolute;
    top: 18px;
    right: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fef2f2;
    color: #ef4444 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: background .2s ease;
}

.side-cart-content .cart_list li .remove:hover {
    background: #fee2e2;
}

/* --- TOTAL --- */
.side-cart-content .total {
    padding: 22px 26px;
    border-top: 1px solid rgba(0,0,0,.06);
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    font-size: .95rem;
    color: #0f172a;
}

/* --- BUTTONS --- */
.side-cart-content .buttons {
    padding: 20px 26px 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.side-cart-content .buttons a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all .25s ease;
}

/* View cart */
.side-cart-content .buttons a.cart {
    background: #f1f5f9;
    color: #475569;
}

.side-cart-content .buttons a.cart:hover {
    background: #e2e8f0;
}

/* Checkout */
.side-cart-content .buttons a.checkout {
    background: #000;
    color: #fff !important;
}

.side-cart-content .buttons a.checkout:hover {
    background: #111;
    transform: translateY(-1px);
}
