.header-cart-trigger {
    position: relative;
}

.header-cart-trigger > a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.header-cart-trigger__badge {
    position: absolute;
    top: -6px;
    left: 14px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #5ac791;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

.cart-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(15, 23, 20, 0.58);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1201;
    display: flex;
    flex-direction: column;
    width: min(420px, 100%);
    height: 100vh;
    background: #fff;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.14);
    transform: translateX(100%);
    transition: transform 0.28s ease;
}

.cart-sidebar.is-open {
    transform: translateX(0);
}

.cart-sidebar-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar__content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cart-sidebar__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #5a6b61;
    font-weight: 600;
}

.cart-sidebar__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid #edf1ed;
}

.cart-sidebar__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 6px 18px rgba(32, 39, 35, 0.12);
    color: #22382c;
    font-size: 18px;
}

.cart-sidebar__title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2d4537;
    font-size: 16px;
    font-weight: 700;
}

.cart-sidebar__count {
    color: #6e7d73;
    font-size: 14px;
    font-weight: 600;
}

.cart-sidebar__icon {
    color: #2f7c56;
    font-size: 22px;
}

.cart-sidebar__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-sidebar__item {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 32px;
    gap: 14px;
    align-items: start;
    padding: 14px 0;
    border-bottom: 1px solid #eef2ef;
}

.cart-sidebar__thumb {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    background: #f3f6f4;
}

.cart-sidebar__thumb img {
    width: 100%;
    height: 84px;
    object-fit: cover;
}

.cart-sidebar__item-title {
    display: block;
    color: #20362b;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
}

.cart-sidebar__meta {
    margin: 6px 0 8px;
    color: #708177;
    font-size: 13px;
}

.cart-sidebar__price {
    color: #1b2e24;
    font-size: 15px;
}

.cart-sidebar__remove {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #f2f4f3;
    color: #6d7d74;
}

.cart-sidebar__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    text-align: center;
    color: #69796f;
}

.cart-sidebar__empty strong {
    margin-top: 14px;
    color: #24392d;
}

.cart-sidebar__empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: #eef6f1;
    color: #2f7c56;
    font-size: 28px;
}

.cart-sidebar__footer {
    padding: 18px 20px 22px;
    border-top: 1px solid #edf1ed;
    background: #fff;
}

.cart-sidebar__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    color: #34493d;
    font-size: 15px;
    font-weight: 700;
}

.cart-sidebar__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.cart-sidebar__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 700;
}

.cart-sidebar__button:hover,
.cart-sidebar__button:focus {
    color: inherit;
}

.cart-sidebar__button--ghost {
    background: #f3f5f4;
    color: #244133;
}

.cart-sidebar__button--primary {
    background: #2f7250;
    color: #fff;
}

.cart-sidebar__button--primary:hover,
.cart-sidebar__button--primary:focus {
    color: #fff;
    background: #265d42;
}

body.cart-sidebar-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .cart-sidebar {
        width: 100%;
    }

    .cart-sidebar__actions {
        grid-template-columns: 1fr;
    }
}
