/* Košarica v skupni glavi */
#cartOffcanvas {
    --bs-offcanvas-width: 440px;
    width: min(100%, var(--bs-offcanvas-width));
    border-left: 1px solid var(--border-line);
    background: var(--surface-subtle);
    color: var(--text-body);
    font-family: var(--font-body);
}

#cartOffcanvas .offcanvas-header {
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    background: var(--action-soft);
    border-bottom: 1px solid var(--border-line);
}

#cartOffcanvas .offcanvas-title {
    color: var(--olive);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: var(--weight-black);
    line-height: 1.15;
}

#cartOffcanvas .offcanvas-header .btn-close {
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border-line);
    border-radius: var(--radius-pill);
    background-color: var(--surface-card);
    opacity: 1;
}

#cartOffcanvas .offcanvas-body {
    display: flex;
    flex-direction: column;
    padding: 0;
    min-height: 0;
    overflow: hidden;
}

.st-cart__items {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--space-4);
    scrollbar-color: var(--neutral-300) transparent;
}

.st-cart__empty {
    padding: clamp(24px, 6vh, 64px) 8px;
    color: var(--text-muted);
    text-align: center;
}

.st-cart__empty svg {
    width: 40px;
    height: 40px;
    color: var(--olive);
    margin-bottom: 12px;
}

.st-cart__empty p {
    margin-bottom: 0;
}

.st-cart__item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 44px;
    gap: var(--space-3);
    align-items: start;
    margin-bottom: var(--space-3);
    padding: var(--space-3);
    background: var(--surface-card);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-md);
}

.st-cart__photo {
    display: block;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    background: var(--surface-subtle);
    overflow: hidden;
}

.st-cart__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.st-cart__name {
    color: var(--text-heading);
    font-weight: var(--weight-bold);
    overflow-wrap: anywhere;
}

.st-cart__price {
    display: grid;
    color: var(--olive);
    font-weight: var(--weight-bold);
    line-height: 1.2;
    margin: 4px 0 8px;
}

.st-cart__price small {
    color: var(--text-muted);
    font-size: .75rem;
    font-weight: var(--weight-regular);
    margin-top: 2px;
}

.st-cart__quantity {
    display: inline-flex;
    max-width: 100%;
    border: 1px solid var(--border-line);
    border-radius: var(--radius-pill);
    background: var(--surface-subtle);
}

.st-cart__quantity button,
.st-cart__remove {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--olive);
    font-size: 1.25rem;
    line-height: 1;
}

.st-cart__quantity button:hover,
.st-cart__remove:hover {
    background: var(--action-soft);
}

.st-cart__quantity input {
    width: 2.5rem;
    min-width: 0;
    padding: 0;
    text-align: center;
    border: 0;
    background: transparent;
    color: var(--text-body);
    font: inherit;
}

.st-cart__footer {
    display: grid;
    gap: 8px;
    background: var(--surface-card);
    border-top: 1px solid var(--border-line);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}

.st-cart__total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 4px;
    font-weight: var(--weight-semibold);
}

.st-cart__total strong {
    color: var(--olive);
    font-size: 1.35rem;
    white-space: nowrap;
}

.st-cart__primary,
.st-cart__secondary {
    display: grid;
    place-items: center;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font: inherit;
    font-weight: var(--weight-bold);
    text-align: center;
    text-decoration: none;
}

.st-cart__primary {
    background: var(--olive);
    color: var(--white);
}

.st-cart__primary:hover {
    background: var(--action-secondary-hover);
    color: var(--white);
}

.st-cart__secondary {
    background: var(--action-soft);
    color: var(--olive);
}

.st-cart__secondary:hover {
    background: var(--action-soft-hover);
}

@media (max-width: 360px) {
    .st-cart__items { padding: 10px; }
    .st-cart__item {
        grid-template-columns: 50px minmax(0, 1fr) 44px;
        gap: 8px;
        padding: 8px;
    }
}

/* ITEMS */
:is(#cartOffcanvas, .et-checkout) .cart-items-container {
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    overflow-y: auto;
    padding: 20px 14px;
    margin-left: 6px;
    margin-right: 6px;
}

/* SINGLE ITEM */
:is(#cartOffcanvas, .et-checkout) .cart-item {
    background: white;
    border-radius: 24px;
    padding: 16px;
    margin-bottom: 16px;

-webkit-box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);

        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* IMAGE */
:is(#cartOffcanvas, .et-checkout) .cart-item img {
    width: 80px;
    height: 80px;
    -o-object-fit: contain;
       object-fit: contain;
}

/* TITLE */
:is(#cartOffcanvas, .et-checkout) .cart-item-title {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    text-decoration: none;
}

/* PRICE */
:is(#cartOffcanvas, .et-checkout) .cart-price {
    font-size: 30px;
    font-weight: 700;
    color: #0c5c59;
}

/* OLD PRICE */
:is(#cartOffcanvas, .et-checkout) .cart-old-price {
    text-decoration: line-through;
    color: #777;
    font-size: 14px;
}
:is(#cartOffcanvas, .et-checkout) .quantity-wrapper {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
   border: 2px solid #ffffff;
    border-radius: 20px;
    color: #555;
    overflow: hidden;
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
}
:is(#cartOffcanvas, .et-checkout) .quantity-wrapper-kosarica {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;

    background: #ffffff;
    border-radius: 999px;
    padding: 6px 14px;

    border: 1px solid #184E51;
    gap: 14px;

    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
:is(#cartOffcanvas, .et-checkout) .quantity-plus-minus {
    background: none;
    border: none;
    font-size: 20px;
    font-weight: 400;
    color: #333;

    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;

    display: -webkit-box;

    display: -ms-flexbox;

    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}

:is(#cartOffcanvas, .et-checkout) .quantity-plus-minus:hover {
    color: #000;
}

:is(#cartOffcanvas, .et-checkout) .quantity-value {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

:is(#cartOffcanvas, .et-checkout) .quantity-input {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    -webkit-box-shadow: none !important;
            box-shadow: none !important;

    -moz-appearance: textfield;
    -webkit-appearance: none;
    appearance: none;

    width: 55px;
    text-align: center;
    padding: 0;
}
:is(#cartOffcanvas, .et-checkout) .qty-btn {
    background: transparent;
    border: none;
    width: 34px;
    height: 34px;
    font-size: 18px;
    font-weight: 600;
    color: #0c5c59;
    cursor: pointer;
}
:is(#cartOffcanvas, .et-checkout) .qty-btn:hover {
    background: rgba(12, 92, 89, 0.08);
}

/* FOOTER */
:is(#cartOffcanvas, .et-checkout) .cart-footer {
    background: white;
    padding: 24px;
    border-top: 1px solid #e5e5e5;
}

/* TOTAL */
:is(#cartOffcanvas, .et-checkout) .cart-total {
    font-size: 22px;
    font-weight: 700;
}

/* SCROLLBAR */
:is(#cartOffcanvas, .et-checkout) .cart-items-container::-webkit-scrollbar {
    width: 6px;
}

:is(#cartOffcanvas, .et-checkout) .cart-items-container::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 20px;
}
