body.is-locked {
    overflow: hidden;
}

.cart-trigger {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--green-dark);
    border-radius: 999px;
    background: var(--green-dark);
    color: var(--cream);
    padding: 9px 10px 9px 15px;
    font-size: 12px;
    font-weight: 700;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.cart-trigger:hover {
    border-color: var(--green);
    background: var(--green);
    transform: translateY(-1px);
}

.cart-trigger svg {
    width: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.cart-trigger strong {
    display: grid;
    min-width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 50%;
    background: var(--orange);
    color: white;
    font-size: 11px;
}

.drawer-backdrop {
    position: fixed;
    z-index: 80;
    inset: 0;
    visibility: hidden;
    background: rgba(53, 34, 29, 0.45);
    opacity: 0;
    transition: 220ms ease;
}

.drawer-backdrop.is-open {
    visibility: visible;
    opacity: 1;
}

.cart-drawer {
    position: fixed;
    z-index: 90;
    top: 0;
    right: 0;
    display: grid;
    width: min(480px, 100%);
    height: 100dvh;
    grid-template-rows: auto 1fr auto;
    background: var(--white);
    box-shadow: -20px 0 60px rgba(53, 34, 29, 0.2);
    transform: translateX(105%);
    transition: transform 250ms ease;
}

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

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-header {
    border-bottom: 1px solid var(--line);
    padding: 27px 28px;
}

.drawer-header span {
    color: var(--orange);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.drawer-header h2 {
    margin: 2px 0 0;
    font-family: var(--font-serif);
    font-size: 30px;
}

.drawer-header button {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--cream);
    color: var(--ink);
}

.drawer-header button {
    width: 42px;
    height: 42px;
}

.drawer-header svg {
    width: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.6;
}

.drawer-header svg {
    width: 18px;
}

.cart-items {
    overflow-y: auto;
    padding: 10px 28px;
}

.cart-item {
    display: grid;
    align-items: center;
    grid-template-columns: 78px 1fr auto;
    gap: 15px;
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
}

.cart-item img {
    width: 78px;
    height: 78px;
    border-radius: 12px;
    object-fit: cover;
}

.cart-item-name {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
}

.cart-item-price {
    margin-top: 4px;
    color: var(--green);
    font-size: 13px;
    font-weight: 700;
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.quantity-control button {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--cream);
    color: var(--green);
    font-size: 14px;
}

.quantity-control button svg {
    width: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.quantity-control span {
    min-width: 16px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.cart-remove {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(166, 76, 44, 0.2);
    border-radius: 50%;
    background: #fce9e2;
    color: #a64c2c;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.cart-remove:hover {
    background: #a64c2c;
    color: white;
    transform: translateY(-1px);
}

.cart-remove svg {
    width: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.cart-empty {
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 30px;
    text-align: center;
}

.cart-empty[hidden] {
    display: none;
}

.cart-empty > span {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    border-radius: 50%;
    background: var(--sage);
    color: var(--green);
}

.cart-empty svg {
    width: 31px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
}

.cart-empty h3 {
    margin: 17px 0 0;
    font-family: var(--font-serif);
    font-size: 27px;
}

.cart-empty p {
    margin: 8px 0 23px;
    color: var(--muted);
    font-size: 13px;
}

.cart-empty .button,
.cart-summary .button {
    min-height: 50px;
    font-size: 14px;
}

.cart-summary {
    border-top: 1px solid var(--line);
    background: var(--cream);
    padding: 23px 28px 28px;
}

.cart-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-summary span {
    font-size: 14px;
    font-weight: 700;
}

.cart-summary strong {
    color: var(--green);
    font-family: var(--font-serif);
    font-size: 25px;
}

.cart-summary p {
    margin: 7px 0 18px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.button-wide {
    width: 100%;
}

.toast {
    position: fixed;
    z-index: 120;
    right: var(--floating-edge);
    bottom: calc(var(--mobile-nav-height) + var(--floating-edge) + var(--back-to-top-size) + var(--floating-gap));
    max-width: min(360px, calc(100% - (var(--floating-edge) * 2)));
    visibility: hidden;
    border-radius: 999px;
    background: var(--green-dark);
    box-shadow: var(--shadow);
    color: white;
    opacity: 0;
    padding: 15px 22px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    transform: translateY(10px);
    transition: 180ms ease;
}

.toast.is-visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 700px) {
    .cart-trigger span {
        display: none;
    }

    .cart-trigger {
        padding-left: 11px;
    }

    .toast {
        padding: 13px 17px;
        font-size: 12px;
    }

}
