/* Cross-selling popup, shared by every site. Brand colour set inline via --xsell-accent.
   Only buttons inside: the sites' global a:hover rules change font-size and colours. */
.xsell-overlay {
    --xsell-accent: #2e7d17;
    --xsell-ink: #14181f;
    --xsell-muted: #5b6472;
    --xsell-line: #e6e8ec;
    --xsell-surface: #fff;
    --xsell-soft: #f5f6f8;
    --xsell-tint: color-mix(in srgb, var(--xsell-accent) 8%, #fff);
    --xsell-ease-out: cubic-bezier(.23, 1, .32, 1);
    --xsell-ease-drawer: cubic-bezier(.32, .72, 0, 1);
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 24px 16px;
    background: rgba(20, 24, 31, .48);
    opacity: 0;
    transition: opacity 240ms ease;
    font-family: inherit;
    line-height: 1.4;
    -webkit-tap-highlight-color: transparent;
}
.xsell-overlay *, .xsell-overlay *::before, .xsell-overlay *::after { box-sizing: border-box; }
.xsell-overlay.is-open { opacity: 1; }
.xsell-overlay.is-closing { opacity: 0; transition-duration: 160ms; }

.xsell-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    max-height: calc(100dvh - 48px);
    border-radius: 16px;
    background: var(--xsell-surface);
    color: var(--xsell-ink);
    box-shadow: 0 2px 6px rgba(20, 24, 31, .06), 0 24px 64px -12px rgba(20, 24, 31, .32);
    opacity: 0;
    transform: translateY(8px) scale(.97);
    transition: transform 280ms var(--xsell-ease-out), opacity 200ms ease;
}
.xsell-overlay.is-open .xsell-dialog { opacity: 1; transform: none; }
.xsell-overlay.is-closing .xsell-dialog { opacity: 0; transform: scale(.98); transition-duration: 160ms; }

.xsell-overlay button {
    margin: 0;
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
}
.xsell-overlay button:focus-visible {
    outline: 2px solid var(--xsell-accent);
    outline-offset: 2px;
}
.xsell-icon { flex: none; width: 16px; height: 16px; }

.xsell-head { position: relative; padding: 24px 64px 18px 24px; }
.xsell-title {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--xsell-ink);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.02em;
    text-align: left;
    text-wrap: balance;
}
.xsell-sub { margin: 6px 0 0; color: var(--xsell-muted); font-size: 14px; }
.xsell-close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--xsell-muted);
    transition: background-color 150ms ease, color 150ms ease, transform 120ms ease-out;
}
.xsell-close .xsell-icon { width: 18px; height: 18px; }
.xsell-close:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) {
    .xsell-close:hover { background: var(--xsell-soft); color: var(--xsell-ink); }
}

.xsell-list {
    flex: 1;
    min-height: 0;
    margin: 0;
    padding: 0 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
}
.xsell-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin: 0 -12px;
    padding: 14px 12px;
    border-radius: 12px;
    transition: background-color 200ms ease;
    animation: xsell-in 360ms var(--xsell-ease-out) both;
    animation-delay: calc(80ms + var(--i, 0) * 45ms);
}
.xsell-item + .xsell-item { box-shadow: inset 0 1px 0 var(--xsell-line); }
.xsell-item.is-added { background: var(--xsell-tint); box-shadow: none; }
.xsell-item.is-added + .xsell-item { box-shadow: none; }
@keyframes xsell-in {
    from { opacity: 0; transform: translateY(6px); }
}

.xsell-thumb {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    background: var(--xsell-soft);
    overflow: hidden;
}
.xsell-thumb img { width: 60px; height: 60px; object-fit: contain; mix-blend-mode: multiply; }

.xsell-info { min-width: 0; }
.xsell-badge {
    display: block;
    margin-bottom: 3px;
    color: var(--xsell-accent);
    font-size: 12.5px;
    font-weight: 600;
}
.xsell-name {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--xsell-ink);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.xsell-pitch { margin: 4px 0 0; color: var(--xsell-muted); font-size: 13px; line-height: 1.45; }

.xsell-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.xsell-price {
    color: var(--xsell-ink);
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.xsell-add {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 108px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--xsell-line);
    border-radius: 999px;
    background: var(--xsell-surface);
    color: var(--xsell-ink);
    font-size: 13.5px !important;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 120ms ease-out;
}
.xsell-add:active { transform: scale(.96); }
.xsell-add .xsell-icon { width: 15px; height: 15px; }
@media (hover: hover) and (pointer: fine) {
    .xsell-add:not(.is-added):hover { border-color: var(--xsell-accent); color: var(--xsell-accent); }
}
.xsell-add.is-loading { cursor: progress; }
.xsell-add.is-loading > * { opacity: .45; }
.xsell-add.is-added {
    border-color: var(--xsell-accent);
    background: var(--xsell-accent);
    color: #fff;
    cursor: default;
}
.xsell-add.is-error { border-color: #c2410c; color: #c2410c; }
.xsell-add-content { display: inline-flex; align-items: center; gap: 6px; transition: filter 180ms ease, opacity 180ms ease; }
.xsell-add.is-swapping .xsell-add-content { filter: blur(2px); opacity: 0; }

.xsell-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--xsell-line);
}
.xsell-total { margin: 0; color: var(--xsell-muted); font-size: 13.5px; }
.xsell-total strong {
    display: block;
    color: var(--xsell-ink);
    font-size: 19px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    transition: opacity 160ms ease;
}
.xsell-total strong.is-updating { opacity: .35; }

.xsell-continue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 12px;
    background: var(--xsell-accent);
    color: #fff;
    font-size: 15px !important;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(20, 24, 31, .12), inset 0 1px 0 rgba(255, 255, 255, .14);
    transition: background-color 180ms ease, transform 120ms ease-out;
}
.xsell-continue:active { transform: scale(.97); }
.xsell-continue .xsell-icon { transition: transform 200ms var(--xsell-ease-out); }
@media (hover: hover) and (pointer: fine) {
    .xsell-continue:hover { background: color-mix(in srgb, var(--xsell-accent) 88%, #000); }
    .xsell-continue:hover .xsell-icon { transform: translateX(3px); }
}

@media (max-width: 560px) {
    .xsell-overlay { place-items: end stretch; padding: 0; }
    .xsell-dialog {
        max-width: none;
        max-height: 90dvh;
        border-radius: 16px 16px 0 0;
        opacity: 1;
        transform: translateY(100%);
        transition: transform 360ms var(--xsell-ease-drawer);
    }
    .xsell-overlay.is-closing .xsell-dialog { opacity: 1; transform: translateY(100%); transition-duration: 220ms; }
    .xsell-head { padding: 20px 56px 14px 16px; }
    .xsell-title { font-size: 19px; }
    .xsell-close { top: 12px; right: 10px; }
    .xsell-list { padding: 0 16px; }
    .xsell-item {
        grid-template-columns: 60px minmax(0, 1fr);
        align-items: start;
        gap: 4px 12px;
        margin: 0 -8px;
        padding: 12px 8px;
    }
    .xsell-thumb { grid-row: span 2; width: 60px; height: 60px; }
    .xsell-thumb img { width: 50px; height: 50px; }
    .xsell-side { flex-direction: row; align-items: center; justify-content: space-between; margin-top: 6px; }
    .xsell-foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
    .xsell-continue { flex: 1; max-width: 240px; }
}

@media (prefers-reduced-motion: reduce) {
    .xsell-dialog, .xsell-overlay.is-closing .xsell-dialog { transform: none !important; transition: opacity 200ms ease; }
    .xsell-item { animation: none; }
    .xsell-continue .xsell-icon { transition: none; }
}
