/*!
 * Kora Store — catalogue, product page, checkout, orders, live preview.
 * Class-scoped (.ko-*) so it is safe inside the block editor too.
 */

/* ---------- Shared bits ---------- */
.ko-container--narrow { max-width: calc(820px + var(--ko-gutter, 32px) * 2); }
.ko-center { text-align: center; }
.ko-muted { color: var(--ko-muted); font-size: .92em; }
.ko-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.ko-alert { margin: 0 0 20px; padding: 14px 18px; border-radius: var(--ko-radius); background: var(--ko-surface); border-left: 4px solid var(--ko-primary); box-shadow: var(--ko-shadow-sm, 0 2px 8px rgb(0 0 0 / .05)); }
.ko-alert--ok { border-left-color: #1f9d55; }
.ko-alert--warn { border-left-color: #e0a526; }
.ko-alert--error { border-left-color: #ce1126; background: color-mix(in srgb, #ce1126 6%, var(--ko-surface)); }
.ko-badge { display: inline-block; padding: 5px 10px; border-radius: 999px; font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1; vertical-align: middle; }
.ko-badge--sale { background: var(--ko-sale); color: var(--ko-on-sale); }
.ko-badge--custom { background: var(--ko-accent); color: var(--ko-on-accent); }
.ko-price { display: inline-flex; align-items: baseline; gap: 8px; font-weight: 800; color: var(--ko-heading); }
.ko-price del { color: var(--ko-muted); font-weight: 500; font-size: .85em; }
.ko-price ins { text-decoration: none; }
.ko-btn--light { --_bg: #fff; --_fg: #111; background: #fff; color: #111; border-color: #fff; }
.ko-btn--light:hover { --_bg: #fff; color: #111; }
.ko-btn.is-busy { opacity: .7; pointer-events: none; }

/* ---------- Theme cards ---------- */
.ko-tgrid { display: grid; grid-template-columns: repeat(var(--ko-cols, 3), minmax(0, 1fr)); gap: clamp(18px, 2.6vw, 32px); }
@media (max-width: 1023px) { .ko-tgrid { grid-template-columns: repeat(min(var(--ko-cols, 3), 2), minmax(0, 1fr)); } }
@media (max-width: 639px) { .ko-tgrid { grid-template-columns: minmax(0, 1fr); } }
.ko-tcard { display: flex; flex-direction: column; min-width: 0; background: var(--ko-surface); border-radius: calc(var(--ko-radius) * 1.2); overflow: hidden; transition: transform .35s var(--ko-ease, ease), box-shadow .35s; }
.ko-card-boxed .ko-tcard { box-shadow: 0 1px 2px rgb(0 0 0 / .05), 0 10px 30px -18px rgb(0 0 0 / .35); }
.ko-card-classic .ko-tcard { border: 1px solid var(--ko-border); }
.ko-card-minimal .ko-tcard { background: transparent; border-radius: 0; }
.ko-tcard:hover { transform: translateY(-5px); box-shadow: 0 24px 50px -24px rgb(0 0 0 / .45); }
.ko-tcard__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: color-mix(in srgb, var(--ko-primary) 8%, var(--ko-bg)); border-bottom: 1px solid var(--ko-border); }
.ko-tcard__media::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 22px; z-index: 1; background: color-mix(in srgb, var(--ko-heading) 92%, transparent); background-image: radial-gradient(circle at 12px 11px, #ff5f57 4px, transparent 5px), radial-gradient(circle at 26px 11px, #febc2e 4px, transparent 5px), radial-gradient(circle at 40px 11px, #28c840 4px, transparent 5px); }
.ko-tcard__media img, .ko-tcard__media .ko-placeholder { width: 100%; height: 100%; object-fit: cover; object-position: top; padding-top: 22px; transition: object-position 3.5s ease; }
.ko-tcard:hover .ko-tcard__media img { object-position: bottom; }
.ko-tcard__badges { position: absolute; top: 32px; left: 12px; z-index: 2; display: flex; gap: 6px; }
.ko-tcard__actions { position: absolute; inset: 22px 0 0 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 10px; background: color-mix(in srgb, var(--ko-heading) 55%, transparent); opacity: 0; transition: opacity .3s; }
.ko-tcard:hover .ko-tcard__actions, .ko-tcard:focus-within .ko-tcard__actions { opacity: 1; }
@media (hover: none) { .ko-tcard__actions { position: static; opacity: 1; background: none; padding: 12px 18px 0; justify-content: flex-start; } .ko-tcard__actions .ko-btn--light { --_bg: var(--ko-heading); --_fg: var(--ko-bg); background: var(--ko-heading); color: var(--ko-bg); border-color: var(--ko-heading); } }
.ko-tcard__body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; flex: 1; }
.ko-card-minimal .ko-tcard__body { padding-inline: 2px; }
.ko-tcard__cat { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ko-primary); }
.ko-tcard__title { margin: 0; font-size: var(--ko-h5); }
.ko-tcard__title a { color: var(--ko-heading); text-decoration: none; }
.ko-tcard__excerpt { margin: 0; color: var(--ko-muted); font-size: .92rem; }
.ko-tcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--ko-border); }
.ko-tcard__sales { display: inline-flex; gap: 6px; align-items: center; color: var(--ko-muted); font-size: .8rem; }

/* Toolbar */
.ko-store-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 28px; }
.ko-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ko-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--ko-border); background: var(--ko-surface); color: var(--ko-heading); font-size: .88rem; font-weight: 600; text-decoration: none; }
.ko-chip span { color: var(--ko-muted); font-size: .8em; }
.ko-chip.is-active, .ko-chip:hover { background: var(--ko-heading); color: var(--ko-bg); border-color: var(--ko-heading); }
.ko-chip.is-active span, .ko-chip:hover span { color: inherit; opacity: .7; }
.ko-sort select { width: auto; min-width: 200px; }

/* Category chips block */
.ko-tcats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.ko-tcat { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 14px; border-radius: calc(var(--ko-radius) * 1.2); background: var(--t-card); border: 1px solid var(--t-border); color: var(--t-heading); text-decoration: none; text-align: center; transition: transform .3s, border-color .3s; }
.ko-tcat:hover { transform: translateY(-4px); border-color: var(--t-accent); }
.ko-tcat__icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: color-mix(in srgb, var(--t-accent) 14%, transparent); color: var(--t-accent); }
.ko-tcat__name { font-weight: 700; font-family: var(--ko-font-heading); }
.ko-tcat__count { font-size: .8rem; color: var(--t-muted); }

/* Steps block */
.ko-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; counter-reset: s; }
.ko-step { position: relative; padding: 28px 24px; border-radius: calc(var(--ko-radius) * 1.3); background: var(--t-card); border: 1px solid var(--t-border); }
.ko-step__num { position: absolute; top: 18px; right: 20px; font-family: var(--ko-font-heading); font-size: 2.6rem; font-weight: 800; line-height: 1; color: color-mix(in srgb, var(--t-accent) 30%, transparent); }
.ko-step__icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: var(--ko-radius); background: var(--t-accent); color: var(--ko-btn-text); margin-bottom: 16px; }
.ko-tone-dark .ko-step__icon, .ko-tone-secondary .ko-step__icon { color: var(--ko-on-accent); }
.ko-step__title { margin: 0 0 8px; font-size: var(--ko-h5); }
.ko-step__text { margin: 0; color: var(--t-muted); font-size: .95rem; }

/* FAQ */
.ko-faq { display: grid; gap: 10px; }
.ko-faq__item { border-radius: var(--ko-radius); background: var(--t-card); border: 1px solid var(--t-border); }
.ko-faq__item summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; cursor: pointer; list-style: none; font-weight: 700; color: var(--t-heading); }
.ko-faq__item summary::-webkit-details-marker { display: none; }
.ko-faq__item summary svg { flex: none; transition: rotate .25s; color: var(--t-accent); }
.ko-faq__item[open] summary svg { rotate: 45deg; }
.ko-faq__item p { margin: 0; padding: 0 20px 18px; color: var(--t-muted); }

/* Lookup */
.ko-lookup { display: flex; flex-wrap: wrap; gap: 10px; }
.ko-lookup input[type="email"] { flex: 1 1 240px; }
.ko-lookup .ko-alert { flex-basis: 100%; }
.ko-lookup-wrap { text-align: center; }
.ko-lookup-wrap .ko-lookup { justify-content: center; max-width: 560px; margin: 24px auto 0; }

/* ---------- Payment method cards ---------- */
.ko-paymethods { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.ko-paymethod { position: relative; overflow: hidden; padding: 20px 22px; border-radius: calc(var(--ko-radius) * 1.2); background: var(--ko-surface); color: var(--ko-text); border: 1px solid var(--ko-border); box-shadow: 0 10px 30px -22px rgb(0 0 0 / .5); }
.ko-paymethod::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--pm); }
.ko-paymethod__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--ko-heading); }
.ko-paymethod__logo { display: grid; place-items: center; min-width: 52px; height: 36px; padding: 0 8px; border-radius: 8px; background: var(--pm); color: var(--pm-ink); font-weight: 900; font-size: .8rem; letter-spacing: .02em; }
.ko-paymethod__number { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--ko-radius); background: color-mix(in srgb, var(--pm) 14%, var(--ko-surface)); font-family: var(--ko-font-heading); font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 800; letter-spacing: .03em; color: var(--ko-heading); font-variant-numeric: tabular-nums; }
.ko-paymethod__name, .ko-paymethod__amount { margin: 10px 0 0; font-size: .9rem; color: var(--ko-muted); }
.ko-paymethod__amount { color: var(--ko-heading); font-weight: 700; }
.ko-paymethod__steps { margin: 14px 0 0; padding-left: 20px; font-size: .88rem; color: var(--ko-muted); }
.ko-paymethod__steps li { margin-bottom: 4px; }
.ko-copy { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border: 0; border-radius: 10px; background: var(--ko-heading); color: var(--ko-bg); cursor: pointer; transition: transform .2s, background-color .2s; }
.ko-copy:hover { transform: scale(1.06); }
.ko-copy.is-copied { background: #1f9d55; }
.ko-copy--text { width: auto; height: auto; padding: 6px 12px; margin-left: 8px; gap: 6px; display: inline-flex; font-weight: 700; font-size: .82rem; }

/* ---------- Product page ---------- */
.ko-product-hero { position: relative; padding-block: clamp(28px, 4vw, 48px) clamp(40px, 6vw, 72px); background: color-mix(in srgb, var(--ko-primary) 7%, var(--ko-bg)); isolation: isolate; }
.ko-product-hero.has-pattern::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--ko-pattern-primary); opacity: var(--ko-pattern-opacity); }
.ko-product-hero .ko-breadcrumbs { justify-content: flex-start; margin-bottom: 22px; }
.ko-product-hero__grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 960px) { .ko-product-hero__grid { grid-template-columns: minmax(0, 1fr); } }
.ko-browser { border-radius: calc(var(--ko-radius) * 1.2); overflow: hidden; background: var(--ko-surface); box-shadow: 0 30px 60px -30px rgb(0 0 0 / .45); border: 1px solid var(--ko-border); }
.ko-browser__bar { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; background: var(--ko-heading); }
.ko-browser__bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.ko-browser__bar i:nth-child(2) { background: #febc2e; }
.ko-browser__bar i:nth-child(3) { background: #28c840; }
.ko-browser__bar span { margin-left: 12px; padding: 3px 14px; border-radius: 999px; background: rgb(255 255 255 / .12); color: rgb(255 255 255 / .75); font-size: .75rem; }
.ko-browser__screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.ko-browser__screen img, .ko-browser__screen .ko-placeholder { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ko-browser__cta { position: absolute; left: 50%; bottom: 20px; translate: -50% 0; display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; background: var(--ko-heading); color: var(--ko-bg); font-weight: 700; text-decoration: none; box-shadow: 0 10px 30px -10px rgb(0 0 0 / .6); transition: transform .25s; }
.ko-browser__cta:hover { color: var(--ko-bg); transform: translateY(-3px); }
.ko-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; margin-top: 14px; }
.ko-thumb { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; opacity: .65; transition: opacity .2s, border-color .2s; }
.ko-thumb img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: top; }
.ko-thumb.is-active, .ko-thumb:hover { opacity: 1; border-color: var(--ko-primary); }

.ko-buybox { position: sticky; top: calc(var(--ko-admin-bar, 0px) + 24px); display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 3vw, 32px); border-radius: calc(var(--ko-radius) * 1.3); background: var(--ko-surface); border: 1px solid var(--ko-border); box-shadow: 0 20px 50px -30px rgb(0 0 0 / .4); }
.ko-buybox .ko-eyebrow { margin-bottom: 0; text-decoration: none; }
.ko-buybox__title { margin: 0; font-size: var(--ko-h2); }
.ko-buybox__lead { margin: 0; color: var(--ko-muted); }
.ko-buybox__price .ko-price { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.ko-buybox__actions { display: grid; gap: 10px; }
.ko-buybox__actions .ko-btn { width: 100%; }
.ko-buybox__meta { list-style: none; margin: 4px 0 0; padding: 16px 0 0; border-top: 1px solid var(--ko-border); display: grid; gap: 10px; font-size: .9rem; }
.ko-buybox__meta li { display: flex; gap: 10px; align-items: center; }
.ko-buybox__meta svg { flex: none; color: var(--ko-primary); }
.ko-ask { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #1f9d55; text-decoration: none; }

.ko-product-body__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 960px) { .ko-product-body__grid { grid-template-columns: minmax(0, 1fr); } }
.ko-product-desc .ko-entry > * { width: 100%; max-width: 100%; }
.ko-checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 20px; }
.ko-checklist li { display: flex; gap: 10px; align-items: flex-start; }
.ko-checklist svg { flex: none; margin-top: 3px; padding: 3px; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--ko-primary) 14%, transparent); color: var(--ko-primary); }
.ko-sidecard { margin-bottom: 18px; padding: 22px 24px; border-radius: calc(var(--ko-radius) * 1.1); background: var(--ko-surface); border: 1px solid var(--ko-border); }
.ko-sidecard h3 { margin: 0 0 10px; font-size: 1.05rem; }
.ko-sidecard ul { margin: 0; padding-left: 18px; }
.ko-sidecard summary { cursor: pointer; list-style: none; }
.ko-sidecard summary h3 { display: inline; }
.ko-changelog { white-space: pre-wrap; margin: 12px 0 0; padding: 12px; font-size: .82rem; }

/* ---------- Checkout ---------- */
.ko-checkout__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 44px); align-items: start; }
.ko-checkout__grid.is-free { grid-template-columns: minmax(0, 640px); justify-content: center; }
@media (max-width: 960px) { .ko-checkout__grid { grid-template-columns: minmax(0, 1fr); } }
.ko-checkout__step { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-size: var(--ko-h4); }
.ko-checkout__step span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ko-heading); color: var(--ko-bg); font-size: 1rem; }
.ko-amount { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; padding: 16px 20px; border-radius: var(--ko-radius); background: var(--ko-heading); color: var(--ko-bg); }
.ko-amount strong { font-family: var(--ko-font-heading); font-size: 1.6rem; color: var(--ko-accent); }
.ko-order-form { padding: clamp(22px, 3vw, 34px); border-radius: calc(var(--ko-radius) * 1.3); background: var(--ko-surface); border: 1px solid var(--ko-border); box-shadow: 0 30px 60px -40px rgb(0 0 0 / .5); }
.ko-field { margin: 0 0 16px; }
.ko-field label, .ko-field legend { display: block; margin-bottom: 6px; }
.ko-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .ko-field-row { grid-template-columns: 1fr; } }
.ko-methods { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ko-methods legend { width: 100%; }
.ko-method-choice { flex: 1 1 160px; position: relative; cursor: pointer; }
.ko-method-choice input { position: absolute; opacity: 0; }
.ko-method-choice span { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-radius: var(--ko-radius); border: 2px solid var(--ko-border); font-weight: 800; color: var(--ko-heading); transition: border-color .2s, background-color .2s; }
.ko-method-choice span::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--pm); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pm) 30%, transparent); }
.ko-method-choice input:checked + span { border-color: var(--pm); background: color-mix(in srgb, var(--pm) 12%, var(--ko-surface)); }
.ko-method-choice input:focus-visible + span { outline: 2px solid var(--ko-primary); outline-offset: 2px; }
.ko-order-form input[type="file"] { padding: 10px; background: var(--ko-bg); }
.ko-terms { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 18px; font-weight: 500; font-size: .85rem; color: var(--ko-muted); }
.ko-terms input { margin-top: 3px; flex: none; }
.ko-form-note { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: .85rem; color: var(--ko-muted); }
.ko-form-note svg { flex: none; margin-top: 2px; }

/* ---------- Order page ---------- */
.ko-order-card { padding: clamp(24px, 4vw, 44px); border-radius: calc(var(--ko-radius) * 1.4); background: var(--ko-surface); border: 1px solid var(--ko-border); box-shadow: 0 30px 70px -40px rgb(0 0 0 / .45); text-align: center; }
.ko-order-card__head { display: flex; gap: 18px; align-items: center; text-align: left; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--ko-border); }
.ko-order-card__head h1 { margin: 0; font-size: var(--ko-h3); }
.ko-order-card__head p { margin: 4px 0 0; }
.ko-order-thumb { width: 84px; height: 84px; object-fit: cover; object-position: top; border-radius: var(--ko-radius); flex: none; }
.ko-order-card .ko-eyebrow { margin-bottom: 4px; }
.ko-timeline { display: flex; justify-content: center; list-style: none; margin: 0 0 28px; padding: 0; counter-reset: t; }
.ko-timeline li { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; max-width: 180px; position: relative; font-size: .82rem; font-weight: 700; color: var(--ko-muted); }
.ko-timeline li::after { content: ""; position: absolute; top: 17px; left: calc(50% + 22px); right: calc(-50% + 22px); height: 2px; background: var(--ko-border); }
.ko-timeline li:last-child::after { display: none; }
.ko-timeline li span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ko-border); background: var(--ko-surface); }
.ko-timeline li.is-done { color: var(--ko-heading); }
.ko-timeline li.is-done span { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.ko-timeline li.is-done::after { background: #1f9d55; }
.ko-timeline li.is-current { color: var(--ko-heading); }
.ko-timeline li.is-current span { border-color: var(--ko-primary); color: var(--ko-primary); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ko-primary) 15%, transparent); animation: ko-pulse 2s infinite; }
@keyframes ko-pulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--ko-primary) 6%, transparent); } }
.ko-order-state h2 { font-size: var(--ko-h3); margin: 14px 0 10px; }
.ko-order-state .ko-btn { margin: 8px 4px; }
.ko-order-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; }
.ko-order-icon.is-warn { background: color-mix(in srgb, #e0a526 18%, transparent); color: #b7830f; }
.ko-order-icon.is-ok { background: color-mix(in srgb, #1f9d55 16%, transparent); color: #1f9d55; }
.ko-order-icon.is-bad { background: color-mix(in srgb, #ce1126 14%, transparent); color: #ce1126; }
.ko-btn--download { --_bg: #1f9d55; --_fg: #fff; font-size: 1.05rem; }
.ko-btn--download:hover { --_bg: #17804a; }
.ko-next { margin-top: 26px; padding: 20px 22px; border-radius: var(--ko-radius); background: var(--ko-bg); text-align: left; }
.ko-next h3 { margin: 0 0 10px; font-size: 1.05rem; }
.ko-next ol { margin: 0 0 10px; padding-left: 20px; }
.ko-order-page .ko-center { margin-top: 24px; }

/* Purchases */
.ko-purchases { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 12px; }
.ko-purchase { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: var(--ko-radius); background: var(--ko-surface); border: 1px solid var(--ko-border); }
.ko-purchase img { width: 64px; height: 64px; object-fit: cover; object-position: top; border-radius: 10px; flex: none; }
.ko-purchase__body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.ko-status { align-self: flex-start; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.ko-status--pending { background: color-mix(in srgb, #e0a526 20%, transparent); color: #8a6206; }
.ko-status--approved { background: color-mix(in srgb, #1f9d55 16%, transparent); color: #157043; }
.ko-status--rejected { background: color-mix(in srgb, #ce1126 14%, transparent); color: #a00e1e; }
.ko-lookup-card { margin-top: 24px; }

/* ---------- Live preview ---------- */
.ko-preview-body { margin: 0; overflow: hidden; height: 100vh; display: flex; flex-direction: column; background: #1b1f1d; }
.ko-pbar { display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 16px; background: var(--ko-heading); color: #fff; flex: none; position: relative; z-index: 2; box-shadow: 0 4px 18px rgb(0 0 0 / .3); }
.ko-pbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px; background-image: var(--ko-band); background-size: auto 100%; }
.ko-pbar a { color: #fff; }
.ko-pbar__back, .ko-pbar__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgb(255 255 255 / .08); text-decoration: none; }
.ko-pbar__brand .ko-brand__logo img { width: auto; max-height: 34px; max-width: 160px; filter: brightness(0) invert(1); }
.ko-pbar__brand .ko-brand__name { font-size: 1.1rem; }
.ko-pbar__brand .ko-brand__tagline { display: none; }
.ko-pbar__title { display: flex; align-items: center; gap: 12px; min-width: 0; padding-left: 14px; border-left: 1px solid rgb(255 255 255 / .15); }
.ko-pbar__title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ko-pbar__title .ko-price { color: var(--ko-accent); }
.ko-pbar__title .ko-price del { color: rgb(255 255 255 / .5); }
.ko-pbar__devices { display: flex; gap: 4px; margin: 0 auto; padding: 4px; border-radius: 12px; background: rgb(255 255 255 / .08); }
.ko-pbar__devices button { display: grid; place-items: center; width: 38px; height: 34px; border: 0; border-radius: 9px; background: none; color: rgb(255 255 255 / .7); cursor: pointer; }
.ko-pbar__devices button.is-active { background: #fff; color: var(--ko-heading); }
.ko-pbar__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.ko-pbar__devices + .ko-pbar__actions { margin-left: 0; }
@media (max-width: 860px) { .ko-pbar__brand, .ko-pbar__devices { display: none; } .ko-pbar__title { border: 0; padding: 0; } .ko-pbar__title .ko-price { display: none; } }
.ko-pstage { flex: 1; display: flex; justify-content: center; overflow: auto; padding: 0; background: #2a2f2c; transition: padding .3s; }
.ko-pframe { position: relative; width: 100%; height: 100%; background: #fff; transition: width .4s cubic-bezier(.2,.7,.2,1), height .4s, border-radius .4s; }
.ko-pframe iframe { display: block; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .4s; }
.ko-pstage.is-loaded iframe { opacity: 1; }
.ko-ploading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ko-primary); animation: ko-breath 1.6s ease-in-out infinite; }
.ko-pstage.is-loaded .ko-ploading { display: none; }
@keyframes ko-breath { 50% { opacity: .35; transform: scale(.94); } }
.ko-pstage[data-device="tablet"], .ko-pstage[data-device="mobile"] { padding: 28px 0; }
.ko-pstage[data-device="tablet"] .ko-pframe { width: 820px; max-width: 100%; height: calc(100% - 4px); border-radius: 22px; overflow: hidden; box-shadow: 0 0 0 12px #111, 0 30px 60px rgb(0 0 0 / .5); }
.ko-pstage[data-device="mobile"] .ko-pframe { width: 390px; height: min(844px, 100%); border-radius: 36px; overflow: hidden; box-shadow: 0 0 0 12px #111, 0 30px 60px rgb(0 0 0 / .5); }
.ko-pshots { width: min(1200px, 100%); padding: 28px 16px; display: grid; gap: 24px; }
.ko-pshots img { width: 100%; border-radius: 12px; box-shadow: 0 20px 40px rgb(0 0 0 / .4); }
.ko-preview-body #wpadminbar { display: none; }
html:has(.ko-preview-body) { margin-top: 0 !important; }

/* Fixes: price wrapping, checkout payment column */
.ko-price { flex-wrap: wrap; row-gap: 0; }
.ko-price del, .ko-price ins { white-space: nowrap; }
.ko-checkout__pay .ko-paymethods { grid-template-columns: minmax(0, 1fr); }
.ko-paymethod__number span { white-space: nowrap; }
