/* Product card: image, back image that wipes in, a placeholder panel that slides away once, caption row, tag. No box. */
.kv-card { position: relative; display: block; min-width: 0; }
.kv-card__fig { display: block; position: relative; overflow: hidden; aspect-ratio: var(--ar, 3 / 4); }
.kv-card__fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kv-card__fig img.is-contain { object-fit: contain; mix-blend-mode: multiply; filter: contrast(1.04); }
html[data-theme="gece"] .kv-card__fig:has(img.is-contain), html[data-theme="lacivert"] .kv-card__fig:has(img.is-contain) { background: var(--photo); }
html[data-theme="gece"] .kv-card__fig img.is-contain, html[data-theme="lacivert"] .kv-card__fig img.is-contain { mix-blend-mode: normal; padding: 6%; }
.kv-card__fig .kv-card__front { transition: opacity 900ms var(--e-out), transform 1.4s var(--e-out); }
.kv-card__fig .kv-card__back { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); transform: scale(1.06); transition: clip-path var(--d-hover) var(--e-hover), transform var(--d-hover) var(--e-hover); }
/* The hover image always covers the whole card, cutout or not: no contain, no blend, no padding. */
.kv-card__fig img.kv-card__back, .kv-card__fig img.kv-card__back.is-contain, html[data-theme="gece"] .kv-card__fig img.kv-card__back.is-contain, html[data-theme="lacivert"] .kv-card__fig img.kv-card__back.is-contain { object-fit: cover; mix-blend-mode: normal; filter: none; padding: 0; }
.kv-card:hover .kv-card__back, .kv-card:focus-visible .kv-card__back { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); transform: none; }
.kv-card__panel { display: none; }
/* Entrance: the photo settles in place, no wipe. */
.js .kv-card:not(.is-in) .kv-card__front { opacity: 0; transform: scale(1.04); }
.js .kv-card:not(.is-in) .kv-card__row, .js .kv-card:not(.is-in) .kv-card__tag { opacity: 0; }
.kv-card__row, .kv-card__tag { transition: opacity 600ms var(--e-out) 200ms; }
.kv-card__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 12px; font-size: var(--t-card); line-height: 1.1; min-width: 0; }
.kv-card__row > * { min-width: 0; }
.kv-card__price { font-variant-numeric: tabular-nums; }
@media (max-width: 767px) { .kv-card__row { font-size: 14px; } .kv-card__tag { font-size: 10px; } }
.kv-card__row del { color: var(--ink-2); margin-right: 0.4em; } .kv-card__row ins { text-decoration: none; }
.kv-card__tag { margin-top: 6px; }
@media (hover: none) { .kv-card__back { display: none; } }

/* Masonry: random widths and ratios from PHP; JS packs cards densely on an 8px row grid. */
.kv-masonry { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); column-gap: var(--gut); row-gap: var(--gut); align-items: start; margin-bottom: var(--block); }
.kv-masonry > .kv-card { grid-column: var(--col, span 4); --ar: var(--ratio, 3 / 4); }
.js .kv-masonry { grid-auto-rows: 8px; grid-auto-flow: dense; row-gap: 0; }
.js .kv-masonry > .kv-card { padding-bottom: 56px; }
@media (max-width: 767px) {
  .kv-masonry { grid-template-columns: repeat(8, minmax(0, 1fr)); column-gap: 16px; }
  .kv-masonry > .kv-card { grid-column: var(--col-m, var(--col)); }
  .js .kv-masonry > .kv-card { padding-bottom: 40px; }
}
/* Legacy names */
.kv-collage, .kv-row4 { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: var(--gut); }

/* Variant chips: plain text, selected is inverted, hover shows a 1px ring. */
.kv-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 20px; }
.kv-chip { font-size: var(--t-ui); line-height: 1.5; padding: 0 8px; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow 300ms var(--e-io), background 200ms var(--e-io), color 200ms var(--e-io); }
.kv-chip:hover { box-shadow: inset 0 0 0 1px currentColor; }
.kv-chip.is-selected, .kv-chip[aria-checked="true"] { background: var(--ink); color: var(--paper); cursor: default; }
.kv-chip.has-swatch { background: var(--sw); color: var(--sw-ink); padding: 2px 10px; }
.kv-chip.has-swatch:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.kv-chip.has-swatch.is-selected, .kv-chip.has-swatch[aria-checked="true"] { background: var(--sw); color: var(--sw-ink); box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.kv-chip.has-frame { box-shadow: inset 0 -4px 0 var(--sw2); }
.kv-chip.has-frame:hover { box-shadow: inset 0 -4px 0 var(--sw2), inset 0 0 0 2px var(--ink); }
.kv-chip.has-frame.is-selected, .kv-chip.has-frame[aria-checked="true"] { box-shadow: inset 0 -4px 0 var(--sw2), inset 0 0 0 2px var(--ink), 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.kv-chip.is-disabled { opacity: 0.35; text-decoration: line-through; pointer-events: none; }

/* Quantity: text buttons. */
.kv-qty { display: inline-flex; align-items: center; gap: 24px; font-size: var(--t-cta); line-height: 1.1; }
.kv-qty button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: inherit; line-height: 1; transition: opacity 100ms, transform 100ms; }
.kv-qty button:hover { opacity: 0.8; } .kv-qty button:active { transform: scale(0.9); }
.kv-qty input { width: 2ch; text-align: center; border: 0; background: transparent; font: inherit; padding: 0; -moz-appearance: textfield; }
.kv-qty input::-webkit-outer-spin-button, .kv-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Rolling digit: a column of 0-9 that translates to the new value, 900ms. */
.kv-count { display: inline-flex; vertical-align: baseline; height: 1.2em; line-height: 1.2; clip-path: inset(0); }
.kv-count__col { display: flex; flex-direction: column; transition: transform 900ms cubic-bezier(.2, 1, .3, 1); }
.kv-count__col span { display: block; height: 1.2em; line-height: 1.2; }

/* Cursor: 8px ink dot that lags; a 100px disc with a word over product images. The native cursor stays. */
/* Cursor: a smiley sticker in place of the arrow. Hidden native cursor on fine pointers only (html.kv-smiley is set by JS). */
html.kv-smiley, html.kv-smiley * { cursor: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%272%27 height=%272%27%3E%3C/svg%3E") 1 1, none !important; }
html.kv-smiley input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]), html.kv-smiley textarea, html.kv-smiley [contenteditable="true"] { cursor: text !important; }
.kv-cursor { position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none; transition: opacity 200ms var(--e-io); }
.kv-cursor__face { position: absolute; left: 0; top: 0; width: 28px !important; height: 28px !important; max-width: none; margin: -14px 0 0 -14px; overflow: visible; transform: translate3d(var(--x, -100px), var(--y, -100px), 0) rotate(var(--tilt, 0deg)); will-change: transform; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.18)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.16)); transition: scale 240ms var(--e-out); }
.kv-cursor__face * { transform-origin: 60px 60px; transition: transform 240ms var(--e-out), opacity 120ms; }
.kv-cursor__all { transform: scale(var(--s, 1)); }
.kv-cursor__shut, .kv-cursor__hearts, .kv-cursor__grin, .kv-cursor__tongue { opacity: 0; }
.kv-cursor__hearts path { transform: scale(0.6); }
/* Link or button: a wink. */
.kv-cursor.is-link .kv-cursor__face { --s: 1.25; }
.kv-cursor.is-link .kv-cursor__eyes ellipse:last-child { opacity: 0; }
.kv-cursor.is-link .kv-cursor__shut { opacity: 1; }
.kv-cursor.is-link .kv-cursor__shut path:first-child { opacity: 0; }
.kv-cursor.is-link .kv-cursor__mouth { transform: rotate(-8deg) translate(2px, 1px); }
/* Card (image link): heart eyes and a wide grin. */
.kv-cursor.is-big .kv-cursor__face { --s: 1.6; }
.kv-cursor.is-big .kv-cursor__eyes, .kv-cursor.is-big .kv-cursor__mouth { opacity: 0; }
.kv-cursor.is-big .kv-cursor__hearts, .kv-cursor.is-big .kv-cursor__grin, .kv-cursor.is-big .kv-cursor__tongue { opacity: 1; }
.kv-cursor.is-big .kv-cursor__hearts path { transform: none; animation: kv-heart 900ms ease-in-out infinite; }
.kv-cursor.is-big .kv-cursor__hearts path:last-child { animation-delay: 150ms; }
@keyframes kv-heart { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.18); } }
.kv-cursor.is-text .kv-cursor__face { --s: 0.55; opacity: 0.6; }
/* Click: eyes shut, bigger smile. */
.kv-cursor.is-down .kv-cursor__face { --s: 0.86; }
.kv-cursor.is-down .kv-cursor__eyes, .kv-cursor.is-down .kv-cursor__hearts, .kv-cursor.is-down .kv-cursor__grin, .kv-cursor.is-down .kv-cursor__tongue { opacity: 0; }
.kv-cursor.is-down .kv-cursor__shut, .kv-cursor.is-down .kv-cursor__shut path:first-child, .kv-cursor.is-down .kv-cursor__mouth { opacity: 1; }
.kv-cursor.is-down .kv-cursor__mouth { transform: scaleY(1.25) translateY(-3px); }
.kv-cursor.is-hidden { opacity: 0; }
.kv-cursor.is-idle .kv-cursor__all { animation: kv-rock 2.2s ease-in-out infinite; }
@keyframes kv-rock { 0%, 100% { transform: rotate(-6deg) scale(var(--s, 1)); } 50% { transform: rotate(6deg) scale(var(--s, 1)); } }
/* Links lean toward the pointer. */
.is-mag { transition: transform 320ms var(--e-out); }
.is-mag:not(:hover) { transform: none !important; }
/* Image links: tint overlay with the word, on hover. */
.kv-card__over { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: color-mix(in srgb, var(--ink) 22%, transparent); opacity: 0; transition: opacity 320ms var(--e-out); pointer-events: none; }
.kv-card__over > span { color: var(--paper); font-size: clamp(22px, 2.4vw, 40px); font-weight: 500; letter-spacing: -0.025em; line-height: 1; padding: 0.35em 0.6em; background: var(--ink); transform: translateY(10px) rotate(-3deg); transition: transform 420ms var(--e-out); }
@media (hover: hover) { .kv-card:hover .kv-card__over, .kv-card:focus-visible .kv-card__over { opacity: 1; } .kv-card:hover .kv-card__over > span, .kv-card:focus-visible .kv-card__over > span { transform: none; } }

/* Accordion rows with 2px rules. */
.kv-acc__item { border-bottom: 2px solid currentColor; }
.kv-acc__item:first-child { border-top: 2px solid currentColor; }
.kv-acc__btn { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 16px 0; font-size: var(--t-ui); letter-spacing: -0.025em; text-align: left; }
.kv-acc__btn::after { content: "+"; font-size: 1.2em; font-weight: 400; transition: transform 300ms var(--e-io); }
.kv-acc__item.is-open .kv-acc__btn::after { transform: rotate(45deg); }
.kv-acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 400ms var(--e-io); }
.kv-acc__panel > div { overflow: hidden; }
.kv-acc__item.is-open .kv-acc__panel { grid-template-rows: 1fr; }
.kv-acc__panel .kv-prose { font-size: 16px; line-height: 1.5; letter-spacing: 0; padding-bottom: 20px; max-width: 60ch; }
.kv-spec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px 24px; font-size: 16px; padding-bottom: 20px; }
.kv-spec dt { font-weight: 700; font-size: 12px; line-height: 24px; }

/* Theme dots: 18px circles, a 4px indicator that slides. */
.kv-themes { position: fixed; top: 41px; right: var(--margin); z-index: 1100; display: flex; gap: 4px; align-items: center; }
.kv-themes button { position: relative; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 0.8px rgba(0, 0, 0, 0.35); transition: transform 200ms var(--e-out); }
.kv-themes button:hover { transform: scale(1.1); }
[data-theme-set="bordo"] { background: #6B1E2C; } [data-theme-set="murekkep"] { background: #181310; } [data-theme-set="gece"] { background: linear-gradient(135deg, #6B1E2C 50%, #EFE7DF 50%); } [data-theme-set="kobalt"] { background: #1F3BE6; } [data-theme-set="lacivert"] { background: linear-gradient(135deg, #1F3BE6 50%, #EFE7DF 50%); }
.kv-themes__dot { position: absolute; top: 50%; left: 7px; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: var(--paper); mix-blend-mode: difference; transition: transform 350ms var(--e-out); pointer-events: none; }
@media (max-width: 1023px) { .kv-themes { display: none; } }
.kv-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 200%); z-index: 1150; font-size: 16px; padding: 8px 0; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; background: var(--paper); color: var(--ink); transition: transform 500ms var(--e-out); white-space: nowrap; }
.kv-toast.is-on { transform: translate(-50%, 0); }

/* Bag drawer: an ink panel from the right, 480px, rows with 2px rules, text CTAs. */
.kv-scrim { position: fixed; inset: 0; z-index: 1140; background: rgba(0, 0, 0, 0.25); opacity: 0; visibility: hidden; transition: opacity 500ms var(--e-io), visibility 0s 500ms; }
.kv-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); z-index: 1150; background: var(--ink); color: var(--paper); display: grid; grid-template-rows: auto 1fr; padding: 32px var(--margin) 32px; transform: translateX(102%); transition: transform 700ms var(--e-wipe); overflow: auto; }
.drawer-open .kv-drawer { transform: none; }
.drawer-open .kv-scrim { opacity: 1; visibility: visible; transition: opacity 500ms var(--e-io); }
.drawer-open .kv-themes { opacity: 0; pointer-events: none; }
.kv-drawer__head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 16px; border-bottom: 2px solid currentColor; margin-bottom: 24px; }
.kv-drawer__body { display: grid; grid-template-rows: 1fr auto auto; gap: 24px; min-height: 0; }
.kv-drawer__items { display: grid; align-content: start; }
.kv-drawer__item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 2px solid currentColor; transition: opacity 250ms var(--e-io); }
.kv-drawer__item.is-removing { opacity: 0; }
.kv-drawer__img { display: block; aspect-ratio: 1; background: var(--photo); overflow: hidden; }
.kv-drawer__img img { width: 100%; height: 100%; object-fit: cover; }
.kv-drawer__img img.is-contain { object-fit: contain; padding: 6px; }
.kv-drawer__text { display: grid; gap: 4px; min-width: 0; }
.kv-drawer__name { font-size: var(--t-ui); line-height: 1.1; letter-spacing: -0.025em; }
.kv-drawer__meta { font-size: 14px; opacity: 0.7; font-variant-numeric: tabular-nums; }
.kv-drawer__remove { font-size: 14px; align-self: start; }
.kv-drawer__total { display: flex; justify-content: space-between; align-items: baseline; font-size: 36px; line-height: 1; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.kv-drawer__foot { display: grid; gap: 16px; justify-items: start; }
.kv-drawer__empty { font-size: clamp(40px, 5vw, 64px); line-height: 0.95; align-self: start; letter-spacing: -0.03em; }
.kv-drawer .kv-cursor { display: none; }

/* Project photos on the project page: same masonry, no captions needed. */
.kv-masonry--photos { margin-top: var(--block); }
.kv-masonry--photos .kv-card__fig img { object-fit: cover; }

/* Transparent cut-outs float on the page colour: no blend, no tile, no frame, on every theme. */
img.is-alpha { object-fit: contain !important; mix-blend-mode: normal !important; filter: none !important; background: none !important; padding: 4% !important; }
.kv-drawer__img:has(img.is-alpha) { background: none; }

/* upgrade marker on premium options */
.kv-chip__tag { margin-left: 8px; font-size: 0.72em; letter-spacing: 0.08em; text-transform: uppercase; padding: 1px 6px; box-shadow: inset 0 0 0 1px currentColor; }
