.haroone-sticky-atc {
    --haroone-sticky-atc-surface: #fff;
    --haroone-sticky-atc-text: #111827;
    --haroone-sticky-atc-muted: #6b7280;
    --haroone-sticky-atc-border: #e5e7eb;
    --haroone-sticky-atc-image-surface: #f3f4f6;
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    color: var(--haroone-sticky-atc-text);
    background: var(--haroone-sticky-atc-surface);
    border-top: 1px solid var(--haroone-sticky-atc-border);
    box-shadow: 0 -8px 24px rgb(17 24 39 / 12%);
}

.haroone-sticky-atc[x-cloak] {
    display: none;
}

.haroone-sticky-atc__inner {
    width: 100%;
    max-width: 1280px;
    min-height: 80px;
    margin: 0 auto;
    padding: 10px 24px calc(10px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 16px;
}

.haroone-sticky-atc__image {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 0.5rem;
    object-fit: cover;
    background: var(--haroone-sticky-atc-image-surface);
}

.haroone-sticky-atc__summary {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    gap: 2px;
}

.haroone-sticky-atc__summary strong {
    overflow: hidden;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.haroone-sticky-atc__price {
    font-size: 1.125rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.haroone-sticky-atc__quantity {
    flex: 0 0 auto;
    margin-left: auto;
    height: 46px;
    display: grid;
    grid-template-columns: 38px 38px 38px;
    align-items: center;
    border: 1px solid var(--haroone-sticky-atc-border);
    border-radius: 0.5rem;
}

.haroone-sticky-atc__quantity button,
.haroone-sticky-atc__quantity output {
    min-width: 0;
    height: 100%;
    border: 0;
    display: grid;
    place-items: center;
    color: inherit;
    background: transparent;
}

.haroone-sticky-atc__quantity button {
    cursor: pointer;
}

.haroone-sticky-atc__quantity button:focus-visible,
.haroone-sticky-atc__button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.haroone-sticky-atc__button {
    flex: 0 0 min(230px, 24vw);
    min-height: 48px;
    padding: 0.625rem 0.75rem 0.625rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.haroone-sticky-atc__button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.haroone-sticky-atc__button-icon {
    display: grid;
    place-items: center;
}

.haroone-sticky-atc__button-icon svg {
    display: block;
}

@media (max-width: 767px) {
    .haroone-sticky-atc__inner {
        min-height: 72px;
        padding: 7px 12px calc(7px + env(safe-area-inset-bottom));
        gap: 10px;
    }

    .haroone-sticky-atc__image {
        width: 46px;
        height: 46px;
        border-radius: 0.4375rem;
    }

    .haroone-sticky-atc__summary strong {
        font-size: 0.875rem;
    }

    .haroone-sticky-atc__price {
        font-size: 1.1875rem;
    }

    .haroone-sticky-atc__quantity {
        display: none;
    }

    .haroone-sticky-atc__button {
        flex: 0 0 48px;
        width: 48px;
        min-width: 48px;
        min-height: 48px;
        padding: 0;
        justify-content: center;
        border-radius: 0.4375rem;
    }

    .haroone-sticky-atc[data-mobile-button-mode="icon"]
    .haroone-sticky-atc__button-label {
        display: none;
    }

    .haroone-sticky-atc[data-mobile-button-mode="label"]
    .haroone-sticky-atc__button {
        flex-basis: auto;
        width: auto;
        padding: 0.625rem 0.75rem 0.625rem 1rem;
        justify-content: space-between;
    }
}

@media (prefers-reduced-motion: reduce) {
    .haroone-sticky-atc {
        scroll-behavior: auto;
    }
}

@media (max-width: 767px) {
    .haroone-sticky-atc[data-mobile-options-action="true"] .haroone-sticky-atc__button {
        flex: 0 0 45%;
        width: auto;
        max-width: 45%;
        padding: 0.625rem 0.75rem;
        justify-content: center;
        font-size: 0.875rem;
        line-height: 1.2;
        gap: 0.75rem;
        white-space: nowrap;
    }
    .haroone-sticky-atc[data-mobile-options-action="true"] .haroone-sticky-atc__button-label {
        display: block;
        white-space: nowrap;
        text-align: center;
    }
    .haroone-sticky-atc[data-mobile-options-action="true"] .haroone-sticky-atc__button-icon {
        display: grid;
    }
}

/* Keep progress visible even when the mobile purchase button normally uses an icon. */
@media (max-width: 767px) {
    .haroone-sticky-atc .haroone-sticky-atc__button[aria-busy="true"] {
        flex-basis: auto;
        width: auto;
        max-width: none;
        padding: 0.625rem 0.75rem;
        gap: 0.75rem;
    }
    .haroone-sticky-atc .haroone-sticky-atc__button[aria-busy="true"] .haroone-sticky-atc__button-label {
        display: block;
    }
}
@media (prefers-reduced-motion: reduce) {
    [data-hh-atc-spinner], .haroone-sticky-atc__button .animate-spin {
        animation: none;
    }
}
