.knot-quick-tile { position: relative; min-width: 0; }
.knot-quick-tile > a { display: block; }
.knot-quick-add, .knot-quick-close {
    display: grid; place-items: center; width: 44px; height: 44px;
    padding: 0; border: 0; color: var(--ds-text, #161616); background: transparent; cursor: pointer;
}
.knot-quick-add { position: absolute; z-index: 2; inset: auto 4px 4px auto; }
.knot-quick-add svg { width: 22px; height: 22px; padding: 2px; background: var(--ds-panel, #fff); border-radius: 50%; }
.knot-quick-add:focus-visible { outline: 2px solid var(--ds-text, #161616); outline-offset: -2px; }
.knot-carousel-link { color: inherit; text-decoration: none; }
.knot-carousel-link:focus-visible { outline: 2px solid var(--knot-focus); outline-offset: -2px; }
.knot-carousel-slide:focus-within .knot-carousel-meta { transform: none; }
.knot-carousel-group { margin: 4px 0 0; font-size: 14px; }
@media (hover: hover) and (pointer: fine) {
    .knot-quick-tile:not(:hover):not(:focus-within) .knot-quick-add { opacity: 0; pointer-events: none; }
}
@media (min-width: 561px) and (hover: hover) {
    .knot-carousel-link { height: 100%; }
    .knot-carousel-slide:has(.knot-quick-add) .knot-carousel-meta { padding-inline: 50px; }
}

html:has(.knot-quick-view[open]) { overflow: hidden; scrollbar-gutter: stable; }
.knot-quick-view {
    --quick-panel: var(--ds-deep, #30253d);
    --quick-ink: var(--sf-ink, #241a2d);
    --quick-text: var(--sf-cream, #fff3e2);
    --quick-accent: var(--sf-pink, #dea4b7);
    --quick-muted: var(--ds-muted, #e4c8d4);
    --quick-line: var(--ds-metal, #a5899e);
    position: fixed; inset: 0; margin: auto; padding: 0;
    width: min(628px, calc(100vw - 32px)); height: min(488px, calc(100dvh - 32px));
    max-width: none; max-height: none; overflow: hidden; border: 1px solid var(--ds-metal, #765f7a); border-radius: var(--sf-radius, 8px); corner-shape: var(--t-corner, round);
    background: var(--quick-panel); color: var(--quick-text); font: 400 14px/1.4 var(--font-body, sans-serif);
}
.knot-quick-view :focus-visible { outline: 2px solid var(--quick-text); outline-offset: -2px; }
.knot-quick-view::backdrop { background: rgb(20 20 24 / 46%); }
.knot-quick-view[open] { animation: knot-quick-appear 140ms ease-out; }
@keyframes knot-quick-appear { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .knot-quick-view[open] { animation: none; } }
.knot-quick-close {
    position: sticky; top: 0; z-index: 1; margin-inline-start: auto; margin-bottom: -44px;
    background: var(--quick-panel); color: var(--quick-text); border-radius: 0 7px 0 4px;
}
.knot-quick-close svg { width: 20px; height: 20px; }
.knot-quick-add svg, .knot-quick-close svg { stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.knot-quick-content { height: 100%; display: grid; grid-template-columns: 55% minmax(0, 1fr); }
.knot-quick-loading { grid-column: 1 / -1; align-self: center; text-align: center; padding: 16px; }
.knot-quick-gallery {
    min-width: 0; min-height: 0; overflow: hidden auto; overscroll-behavior-y: contain;
    scrollbar-width: none; background: #19161f;
}
.knot-quick-gallery::-webkit-scrollbar { display: none; }
.knot-quick-gallery img { display: block; width: 100%; height: auto; }
.knot-quick-gallery img + img { margin-top: 4px; }
.knot-quick-gallery:has(img:only-child) { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; overflow: hidden; }
.knot-quick-gallery img:only-child { height: 100%; max-height: 100%; object-fit: contain; }
.knot-quick-details { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 44px 16px 16px; overflow: auto; }
.knot-quick-copy { overflow-wrap: anywhere; }
.knot-quick-copy h2 { margin: 0; font: 600 19px/1.2 "Dx Neuegrid", var(--font-body), sans-serif; letter-spacing: 0; }
.knot-quick-price { margin: 10px 0 0; font-family: var(--font-mono, monospace); font-variant-numeric: tabular-nums; }
.knot-quick-price s { color: var(--quick-muted); margin-inline-start: 4px; }
.knot-quick-offer { display: inline-block; color: var(--quick-accent); font-size: 12px; margin-top: 5px; text-underline-offset: 2px; }
.knot-quick-description { margin: 15px 0 0; font-size: 13px; color: var(--quick-muted); }
.knot-quick-details form { margin-top: auto; padding-top: 14px; }
.knot-quick-quantity { display: flex; width: max-content; background: var(--ds-panel, #fff); color: var(--ds-text, #161616); border: 1px solid var(--ds-line, #bcbcbc); border-radius: calc(var(--t-r, 8px) * .75); corner-shape: var(--t-corner, round); }
.knot-quick-quantity button, .knot-quick-quantity input {
    min-width: 34px; min-height: 36px; padding: 0; border: 0; background: transparent; color: inherit; text-align: center; font: inherit;
}
.knot-quick-quantity :focus-visible { outline-color: var(--ds-text, #161616); }
.knot-quick-quantity input { appearance: textfield; width: 4ch; }
.knot-quick-quantity input::-webkit-inner-spin-button, .knot-quick-quantity input::-webkit-outer-spin-button { appearance: none; }
.knot-quick-quantity button:disabled { opacity: .45; }
.knot-quick-options { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; border: 0; margin: 2px 0 0; min-width: 0; }
.knot-quick-options legend { margin-bottom: 3px; font-size: 12px; }
.knot-quick-options label { display: grid; position: relative; }
.knot-quick-options input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.knot-quick-options span {
    display: grid; place-items: center; min-width: 44px; min-height: 34px; padding: 3px 6px;
    border: 1px solid var(--quick-line); border-radius: calc(var(--t-r, 8px) * .75); corner-shape: var(--t-corner, round); font-size: 13px; overflow-wrap: anywhere;
}
.knot-quick-options input:checked + span { background: var(--quick-accent); color: var(--quick-ink); border-color: var(--quick-accent); }
.knot-quick-options input:focus-visible + span { outline: 2px solid var(--quick-text); outline-offset: 2px; }
.knot-quick-options input:disabled { cursor: default; }
.knot-quick-options input:disabled + span { color: var(--quick-muted); border-color: var(--ds-metal, #765f7a); text-decoration: line-through; opacity: .72; }
.knot-quick-soldout { margin: 0 0 6px; font-weight: 600; }
.knot-quick-status { min-height: 1.4em; margin: 4px 0; font-size: 12px; }
.knot-quick-status[data-error] { font-weight: 600; }
.knot-quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.knot-quick-actions button {
    padding: 4px; min-height: 40px; border-radius: calc(var(--t-r, 8px) * .75); corner-shape: var(--t-corner, round); border: 1px solid var(--quick-text);
    background: transparent; color: var(--quick-text); font: inherit; line-height: 1.2; cursor: pointer;
}
.knot-quick-actions button:last-child { background: var(--quick-text); color: var(--quick-ink); }
.knot-quick-actions button:last-child:focus-visible { outline-color: var(--quick-ink); outline-offset: -4px; }
.knot-quick-actions button:is(:disabled, [aria-disabled="true"], [data-quick-added]) { opacity: .56; cursor: default; }
@media (hover: hover) and (pointer: fine) {
    .knot-quick-close:hover, .knot-quick-options input:enabled:not(:checked):hover + span,
    .knot-quick-actions button:first-child:not(:disabled, [aria-disabled="true"], [data-quick-added]):hover { background: var(--sf-lean, #393251); }
    .knot-quick-actions button:last-child:not(:disabled, [aria-disabled="true"], [data-quick-added]):hover { background: var(--sf-paper, #fff9f4); }
    .knot-quick-quantity button:enabled:hover { background: var(--ds-hover, #f2f2f2); }
}
@media (max-width: 620px) {
    .knot-quick-view { width: min(420px, calc(100vw - 16px)); height: fit-content; max-height: calc(100dvh - 16px); overflow: auto; }
    .knot-quick-content { display: block; height: auto; }
    .knot-quick-loading { min-height: 190px; display: grid; place-items: center; }
    .knot-quick-gallery { height: min(32dvh, 310px); overscroll-behavior-y: auto; }
    .knot-quick-gallery img { height: 100%; object-fit: contain; }
    .knot-quick-details { overflow: visible; padding: 14px 14px 12px; }
    .knot-quick-description { margin-top: 8px; }
    .knot-quick-details form { padding-top: 8px; }
    .knot-quick-options span, .knot-quick-actions button, .knot-quick-quantity button { min-height: 44px; }
    .knot-quick-quantity button { min-width: 44px; }
}
