body.cart-open {
    overflow: hidden;
}

.cart-toggle {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: white;
    color: #111;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.cart-toggle img,
.cart-add-btn img {
    width: 19px;
    height: 19px;
}

.cart-panel {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 10000;
    width: min(420px, 100vw);
    display: flex;
    flex-direction: column;
    background: white;
    color: #111;
    box-shadow: -12px 0 36px rgba(0, 0, 0, .2);
    transform: translateX(105%);
    transition: transform .25s ease;
}

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

.cart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px;
    border-bottom: 1px solid #e2e2e2;
}

.cart-header h2 {
    font-size: 1.35rem;
}

.cart-header p {
    margin-top: 4px;
    color: #666;
    font-size: .9rem;
}

.cart-close {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 0;
    border-radius: 12px;
    background: #f1f1f1;
    color: #111;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
}

.cart-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.cart-item > img {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
}

.cart-item-no-image {
    grid-template-columns: minmax(0, 1fr);
}

.cart-item-body {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.cart-item-body a {
    overflow-wrap: anywhere;
    font-weight: 700;
}

.cart-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-quantity button {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 9px;
    background: #f7f7f7;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.cart-quantity button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.cart-empty {
    padding: 40px 16px;
    color: #666;
    text-align: center;
}

.cart-footer {
    display: grid;
    gap: 14px;
    padding: 20px;
    border-top: 1px solid #ddd;
    background: #fafafa;
    overflow-y: auto;
}

.cart-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cart-total {
    font-size: 1.35rem;
}

.cart-clear {
    min-height: 46px;
    border: 1px solid #ccc;
    border-radius: 12px;
    background: white;
    color: #222;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.cart-share {
    display: grid;
    gap: 9px;
    padding-top: 14px;
    border-top: 1px solid #ddd;
}

.cart-share.hidden {
    display: none;
}

.cart-share > span {
    font-size: .84rem;
    font-weight: 800;
    text-transform: uppercase;
}

.cart-code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.cart-share-code {
    min-width: 0;
    max-height: 72px;
    overflow: auto;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: white;
    font-size: .76rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
    user-select: all;
}

.cart-copy-code {
    padding: 0 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.cart-copy-code:disabled {
    cursor: wait;
    opacity: .55;
}

.cart-share-help {
    color: #666;
    font-size: .83rem;
    line-height: 1.45;
}

.cart-contact-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cart-contact-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 11px;
    border-radius: 10px;
    color: white;
    font-size: .86rem;
    font-weight: 750;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
}

.cart-contact-btn.is-disabled {
    pointer-events: none;
    opacity: .5;
}

.cart-email-btn {
    background: #111;
}

.cart-messenger-btn {
    background: #0866ff;
}

.cart-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    background: #111;
    color: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 560px) {
    .cart-toggle {
        padding: 10px;
    }

    .cart-toggle-label {
        display: none;
    }

    .cart-header {
        padding: 16px;
    }

    .cart-footer {
        max-height: 58vh;
        padding: 16px;
    }

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