#uptrend-mini-cart {
    position: fixed;
    top: 0;
    right: 0;
    width: 650px;
    height: 100%;
    background-color: #FFFCF9;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateX(100%); /* Ukryty poza ekranem */
    transition: transform 0.3s ease-in-out;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

#uptrend-mini-cart.side-cart-visible {
    transform: translateX(0); /* Widoczny */
}

/* Opcjonalny Overlay/Tło */
#side-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(25, 20, 17, 0.2);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out;
}

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

/* Opcjonalne: Blokowanie scrolla na body, gdy koszyk jest otwarty */
.uptrend-cart-open {
    overflow: hidden;
}

/* ========================================= */
/* 1. NAGŁÓWEK */
/* ========================================= */

.side-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* padding-bottom: 25px; */
    /* border-bottom: 1px solid #E0E0E0; */
    /* margin-bottom: 25px; */
}

.side-cart-header h2 {
    font-size: 21px !important;
    font-weight: 400; /* Lżejsza czcionka, jak na obrazku */
    color: #191411;
    margin: 0;
    /* text-transform: uppercase; */
    letter-spacing: 0.5px;
}

#side-cart-close-btn {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
    color: #191411;
    box-shadow: unset;
    padding: 0;
    margin: 0;
}

/* ========================================= */
/* 3. ZAWARTOŚĆ KOSZYKA I PRODUKTY */
/* ========================================= */

#side-cart-content {
    flex-grow: 1; /* Wypełnia całą wolną przestrzeń pionową */
    /* WAŻNE: W tym przypadku to nie #side-cart-content, a jego dziecko (lista) będzie scrollować */
    /* Upewnij się, że nie ma tu overflow-y: auto! */
    overflow: hidden; /* Zapobieganie niechcianym scrollbarom na tym poziomie */
    display: flex; /* Dodatkowy flex, aby item-list mogła użyć 100% wysokości */
    flex-direction: column;
}

#side-cart-item-list {
    overflow-y: auto; /* SCROLLOWANIE TYLKO DLA PRODUKTÓW */
    min-height: 0;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    /* align-items: flex-start; */
    /* Brakuje width: 100%; — warto dodać, by być pewnym */
    width: 100%; 
    margin-bottom: 10px;
}

.cart-item:last-of-type {
    border-bottom: none;
}

.item-image {
    /* Użyj właściwości flex w skróconej formie */
    flex: 0 0 190px; 
    margin-right: 20px;
    background-color: #efebe0;
}

.item-image img {
    display: block;
    width: 100%;
    height: auto;
}

/* Kolumna 2: Wszystkie szczegóły + akcje */
.item-info-wrapper {
    flex: 1 1 0%; 
  min-width: 0;   
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    padding: 3px 0; /* Minimalny padding dla wyglądu */
    min-height: 100px; /* Wysokość musi pasować do obrazka, aby flex-grow zadziałał */
}

/* --- Wiersz 1: Nazwa i Usuń (Top Row) --- */
.item-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px; /* Odstęp od opisu */
    padding-top: 40px;
}

.item-name {
    font-size: 24px; 
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
}

.remove-item {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: #5E5B58; /* Kolor jak na wzorze */
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline; /* Usuń domyślne podkreślenie */
    padding: 0;
    margin-left: 20px;
}

.remove-item .remove-icon {
    font-size: 16px;
    margin-right: 5px;
    line-height: 1;
}

/* --- Wiersz 2: Opis i Kolor (Middle Section) --- */
.item-description {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.item-color {
    font-size: 14px;
}
.item-color strong {
    font-weight: 500;
}

/* --- Wiersz 3: Ilość i Cena (Bottom Row) --- */
.item-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Opcjonalnie, jeśli chcemy wypchnąć na sam dół */
    padding-bottom: 40px;
}

.item-qty {
    font-size: 14px;
    margin: 0;
}
.item-qty strong {
    font-weight: 500;
}

.item-total {
    font-size: 18px; 
    font-weight: 500;
    margin: 0;
}

/* ========================================= */
/* 4. PODSUMOWANIE */
/* ========================================= */

.side-cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #191411;
    margin-top: 10px;
    /* position: sticky;
    bottom: 0;
    z-index: 10; */
}

.side-cart-summary p {
    font-size: 21px;
    font-weight: 500;
    margin: 0;
}

.side-cart-total {
    font-weight: 500;
}

/* ========================================= */
/* 5. PRZYCISKI AKCJI */
/* ========================================= */

.side-cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
    padding-top: 10px; /* Opcjonalnie: Dodatkowy odstęp od podsumowania, jeśli jest potrzebny */
}

.button-secondary,
.button-primary {
    display: block;
    width: 100%;
    padding: 10px 20px;
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}

.button-primary {
    background-color: #191411;
    color: #FFF !important;
    border: 1px solid #191411;
}

.button-primary:hover {
    background-color: #333;
    border-color: #333;
}

.button-secondary {
    background-color: #FFF;
    color: #191411;
    border: 1px solid #191411;
}

.button-secondary:hover {
    background-color: #F5F5F5;
}

/* ========================================= */
/* 6. DODATKOWE LINKI I INFO */
/* ========================================= */

.side-cart-additional-links {
    font-size: 14px;
    color: #5E5B58;
    line-height: 1;
}

.side-cart-additional-links p {
    margin: 0;
}

.side-cart-additional-links a {
    color: #5E5B58 !important;
    text-decoration: underline;
}

.side-cart-additional-links a:hover {
    color: #5E5B58;
}

/* ========================================= */
/* 7. LOADER */
/* ========================================= */

/* Warstwa Loadera (nakładka) */
.cart-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 252, 249, 0.8); /* Jasne tło + przezroczystość */
    z-index: 1001; /* Wyżej niż cała zawartość koszyka */
    display: none;
    align-items: center;
    justify-content: center;
}

/* Aktywacja Loadera */
#uptrend-mini-cart.loading-action .cart-loader {
    display: flex;
}

/* Prosty Spinner (Dostosowany do kolorów motywu) */
.spinner {
    border: 4px solid #f3f3f3; 
    border-top: 4px solid #191411; /* Kolor motywu (czarny/ciemny) */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================= */
/* 8. RESPONSIVE                             */
/* ========================================= */

@media (max-width: 720px) {
    #uptrend-mini-cart {
        padding: 20px 20px;
        max-width: 100%;
    }
    
    .side-cart-header {
        padding-bottom: 20px;
    }

    .item-image {
        flex: 0 0 160px; 
    }

    .item-header-row {
        padding-top: 20px;
    }

    .item-footer-row {
        padding-bottom: 20px;
    }
}