/**
 * File: assets/css/frontend/header-widgets/cart-widget.css
 * Purpose: Split piece of a larger source file (1.0.191 file-size programme; cascade/build order unchanged). Split from assets/css/frontend/header-widgets/widgets.css (1.0.191, 300-line standard): cascade order is preserved by the enqueue chain; this file holds lines 436-1020 of the original file, verbatim.
 * Scope: Same feature scope as the source file named in the provenance line; not a standalone design source.
 * Package: HyperDAF Engine
 */
/* RC.13 premium cart dropdown and AJAX feedback. */
.hdf-header-action--cart .hdf-header-action__widget {
    width: min(25rem, calc(100vw - 2rem));
    max-height: min(34rem, calc(100vh - 7rem));
    overflow: auto;
    border-color: color-mix(in srgb, var(--hdf-engine-color-border) 88%, transparent);
    border-radius: 16px;
    box-shadow: none;
}

.hdf-header-cart-panel {
    overflow: hidden;
    background: var(--hdf-engine-color-surface);
}

.hdf-header-cart-panel__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--hdf-engine-color-border-subtle);
    background: linear-gradient(180deg, var(--hdf-engine-color-surface), var(--hdf-engine-color-surface-subtle));
}

.hdf-header-cart-panel__icon,
.hdf-header-cart-empty__icon {
    display: grid;
    width: 2.55rem;
    height: 2.55rem;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--hdf-engine-color-primary-strong) 28%, var(--hdf-engine-color-border));
    border-radius: 12px;
    background: var(--hdf-engine-color-surface-selected);
    color: var(--hdf-engine-color-primary-strong);
}

.hdf-header-cart-panel__icon svg,
.hdf-header-cart-empty__icon svg {
    width: 1.25rem;
    height: 1.2rem;
}

.hdf-header-cart-panel__heading {
    display: grid;
    gap: .12rem;
    min-width: 0;
}

.hdf-header-cart-panel__heading strong {
    color: var(--hdf-engine-color-text);
    font-size: .94rem;
    line-height: 1.2;
}

.hdf-header-cart-panel__heading small {
    color: var(--hdf-engine-color-text-muted);
    font-size: .74rem;
}

.hdf-header-cart-panel__count {
    display: inline-flex;
    min-width: 1.7rem;
    height: 1.7rem;
    align-items: center;
    justify-content: center;
    padding-inline: .35rem;
    border-radius: 999px;
    background: var(--hdf-engine-color-primary-strong);
    color: var(--hdf-engine-color-surface);
    font-size: .72rem;
    font-weight: 750;
}

.hdf-header-cart-lines {
    display: grid;
    margin: 0;
    padding: .35rem 0;
    list-style: none;
}

.hdf-header-cart-line {
    border-bottom: 1px solid var(--hdf-engine-color-border-subtle);
}

.hdf-header-cart-line:last-child {
    border-bottom: 0;
}

.hdf-header-cart-line__link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
    padding: .72rem 1rem;
    color: inherit;
    text-decoration: none;
    transition: background-color .16s ease;
}

.hdf-header-cart-line__link:hover,
.hdf-header-cart-line__link:focus-visible {
    background: var(--hdf-engine-color-surface-subtle);
    outline: none;
}

.hdf-header-cart-line__mark {
    display: grid;
    width: 2.2rem;
    height: 2.2rem;
    place-items: center;
    border: 1px solid var(--hdf-engine-color-border);
    border-radius: 9px;
    background: var(--hdf-engine-color-surface);
    color: var(--hdf-engine-color-primary-strong);
    font-size: .72rem;
    font-weight: 800;
}

.hdf-header-cart-line__copy {
    display: grid;
    min-width: 0;
    gap: .18rem;
}

.hdf-header-cart-line__copy strong {
    overflow: hidden;
    color: var(--hdf-engine-color-text);
    font-size: .8rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hdf-header-cart-line__copy small {
    color: var(--hdf-engine-color-text-muted);
    font-size: .69rem;
}

.hdf-header-cart-line__link b {
    color: var(--hdf-engine-color-text);
    font-size: .76rem;
    white-space: nowrap;
}

.hdf-header-cart-panel__more {
    margin: 0;
    padding: .55rem 1rem;
    border-top: 1px solid var(--hdf-engine-color-border-subtle);
    color: var(--hdf-engine-color-text-muted);
    font-size: .7rem;
    text-align: center;
}

.hdf-header-cart-panel .hdf-header-cart-total {
    padding: .85rem 1rem .55rem;
    border-top: 1px solid var(--hdf-engine-color-border);
    background: var(--hdf-engine-color-surface-subtle);
}

.hdf-header-cart-panel .hdf-header-cart-total span {
    color: var(--hdf-engine-color-text-secondary);
    font-size: .8rem;
    font-weight: 600;
}

.hdf-header-cart-panel .hdf-header-cart-total strong {
    color: var(--hdf-engine-color-text);
    font-size: 1rem;
}

.hdf-header-cart-panel .hdf-header-cart-actions {
    padding: .55rem 1rem .65rem;
    background: var(--hdf-engine-color-surface-subtle);
}

.hdf-header-cart-panel .hdf-header-widget-button {
    min-height: 2.55rem;
    border-radius: 8px;
}

.hdf-header-cart-panel .hdf-header-widget-button:hover,
.hdf-header-cart-panel .hdf-header-widget-button:focus-visible {
    border-color: var(--hdf-engine-color-primary-strong);
    color: var(--hdf-engine-color-primary-strong);
}

.hdf-header-cart-panel .hdf-header-widget-button--primary:hover,
.hdf-header-cart-panel .hdf-header-widget-button--primary:focus-visible {
    background: var(--hdf-engine-color-primary-hover);
    color: var(--hdf-engine-color-surface);
}

.hdf-header-cart-panel__secure {
    margin: 0;
    padding: 0 1rem .9rem;
    background: var(--hdf-engine-color-surface-subtle);
    color: var(--hdf-engine-color-text-muted);
    font-size: .66rem;
    text-align: center;
}

.hdf-header-cart-empty {
    display: grid;
    justify-items: start;
    gap: .55rem;
    padding: 1.45rem 1.2rem;
    text-align: left;
}

.hdf-header-cart-empty strong {
    color: var(--hdf-engine-color-text);
    font-size: .92rem;
}

.hdf-header-cart-empty p {
    max-width: 32ch;
    margin: 0 0 .35rem;
    color: var(--hdf-engine-color-text-muted);
    font-size: .76rem;
    line-height: 1.5;
}

.hdf-header-action__badge.is-updated {
    animation: hdf-cart-badge-pop .5s ease;
}

.hdf-header-action--cart.is-cart-updated .hdf-header-action__button {
    color: var(--hdf-engine-color-primary-strong);
}

.hdf-cart-toast {
    position: fixed;
    z-index: 100000;
    right: 1rem;
    bottom: 1rem;
    max-width: min(22rem, calc(100vw - 2rem));
    padding: .78rem 1rem;
    border: 1px solid color-mix(in srgb, var(--hdf-engine-color-primary-strong) 35%, var(--hdf-engine-color-border));
    border-radius: 10px;
    background: var(--hdf-engine-color-surface);
    color: var(--hdf-engine-color-text);
    box-shadow: none;
    font-size: .82rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transform: translateY(.65rem);
    transition: opacity .18s ease, transform .18s ease;
}

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

.hdf-cart-toast.is-error {
    border-color: var(--hdf-engine-color-danger);
    color: var(--hdf-engine-color-danger-text);
}

@keyframes hdf-cart-badge-pop {
    0% { transform: scale(.72); }
    60% { transform: scale(1.22); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .hdf-header-action__badge.is-updated,
    .hdf-product-card__cart-button.is-added .hdf-engine-icon {
        animation: none;
    }
    .hdf-cart-toast {
        transition: none;
    }
}

/* RC.44 cart popover shell bridge: crisp premium geometry and a stable hover corridor. */
.hdf-header-action--cart {
    position: relative;
}

.hdf-header-action--cart::after {
    position: absolute;
    z-index: 1;
    top: 100%;
    right: 0;
    width: min(26rem, calc(100vw - 2rem));
    height: .9rem;
    content: "";
}

