html.hm-mc-open {
    overflow: hidden;
}

#hm-mini-cart {
    --hm-mc-green: var(--hm-green, #217373);
    --hm-mc-border: #dce7e3;
    position: fixed;
    inset: 0 0 0 auto;
    margin: 0;
    width: min(100%, 460px);
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: none;
    padding: 0;
    border: 0;
    background: #fff;
    color: #183533;
    box-shadow: -12px 0 40px rgb(20 50 48 / 14%);
    overflow: hidden;
    box-sizing: border-box;
}

#hm-mini-cart[open] {
    display: flex;
    flex-direction: column;
    animation: hm-mc-enter 230ms ease-out;
}

#hm-mini-cart::backdrop {
    background: rgb(19 41 40 / 48%);
}

@keyframes hm-mc-enter {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    #hm-mini-cart[open] { animation: none; }
}

#hm-mini-cart [hidden],
.hm-mc-feedback[hidden] {
    display: none !important;
}

#hm-mini-cart .hm-mc-head,
#hm-mini-cart .hm-mc-bottom {
    flex-shrink: 0;
    padding: 16px clamp(14px, 4vw, 24px);
}

#hm-mini-cart .hm-mc-head,
#hm-mini-cart .hm-mc-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#hm-mini-cart .hm-mc-head {
    border-bottom: 1px solid var(--hm-mc-border);
}

#hm-mini-cart h2 {
    margin: 0;
    color: inherit;
    font-size: 24px;
    line-height: 1.2;
}

#hm-mini-cart button {
    color: inherit;
    font: inherit;
    cursor: pointer;
}

#hm-mini-cart button:disabled {
    opacity: .45;
    cursor: default;
}

#hm-mini-cart .hm-mc-close {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--hm-mc-border);
    border-radius: 50%;
    background: #fff;
    font-size: 26px;
    line-height: 1;
}

#hm-mini-cart .hm-mc-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 clamp(14px, 4vw, 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

#hm-mini-cart .hm-mc-items {
    padding: 0;
    margin: 0;
    list-style: none;
}

#hm-mini-cart .hm-mc-empty {
    margin: 22px 0;
}

#hm-mini-cart .hm-mc-item {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--hm-mc-border);
}

#hm-mini-cart .hm-mc-picture {
    background: #f1f6f4;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
}

#hm-mini-cart .hm-mc-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#hm-mini-cart .hm-mc-item-name {
    color: inherit;
    font-weight: 650;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

#hm-mini-cart .hm-mc-item-price {
    font-size: 13px;
    text-align: right;
}

#hm-mini-cart .hm-mc-meta {
    margin-top: 3px;
    color: #506460;
    font-size: 12px;
}

#hm-mini-cart .hm-mc-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

#hm-mini-cart .hm-mc-quantity {
    min-width: 18px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

#hm-mini-cart .hm-mc-action {
    min-width: 34px;
    min-height: 36px;
    padding: 0 6px;
    border: 1px solid var(--hm-mc-border);
    border-radius: 5px;
    background: #fff;
}

#hm-mini-cart [data-hm-mc-action="remove"] {
    padding: 0 2px;
    border: 0;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#hm-mini-cart[aria-busy="true"] .hm-mc-action,
#hm-mini-cart[aria-busy="true"] .hm-mc-links a {
    cursor: wait;
    opacity: .55;
}

#hm-mini-cart .hm-mc-bottom {
    border-top: 1px solid var(--hm-mc-border);
    padding-bottom: max(16px, env(safe-area-inset-bottom));
}

#hm-mini-cart .hm-mc-status {
    margin: 0 0 10px;
    color: var(--hm-mc-green);
    font-size: 13px;
}

#hm-mini-cart .hm-mc-status:empty {
    margin: 0;
}

#hm-mini-cart .hm-mc-error {
    color: #9b2e38;
}

#hm-mini-cart .hm-mc-total {
    margin-bottom: 14px;
}

#hm-mini-cart .hm-mc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#hm-mini-cart .hm-mc-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 130px;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--hm-mc-green);
    border-radius: 5px;
    color: var(--hm-mc-green);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}

#hm-mini-cart .hm-mc-links .hm-mc-checkout-link {
    background: var(--hm-mc-green);
    color: #fff;
}

#hm-mini-cart :focus-visible {
    outline: 2px solid var(--hm-mc-green);
    outline-offset: 2px;
}

.hm-mc-feedback {
    position: fixed;
    z-index: 100000;
    right: 16px;
    bottom: 16px;
    width: max-content;
    max-width: min(380px, calc(100% - 32px));
    margin: 0;
    padding: 12px 16px;
    border-radius: 6px;
    background: #183533;
    color: #fff;
}

@media (max-width: 380px) {
    #hm-mini-cart .hm-mc-item { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px; }
}

.hm-page-content :is(.hm-pt-buy, .add_to_cart_button, .ajax_add_to_cart)[aria-busy="true"] {
    cursor: wait;
    opacity: .65;
}
