/* iamkoko.la preview layer. Uses her theme fonts (Fjalla One, Jost) already loaded by the theme. */

/* Theme change preview: product title shows immediately (no 6–9 s mask reveal). */
html.koko-title-fix [data-transition-cropper]:has(.product-page--heading),
html.koko-title-fix [data-transition-cropper]:has(.product-page--heading) * {
  clip-path: none !important; transform: none !important; opacity: 1 !important; overflow: visible !important;
}

.koko-hidden { display: none !important; }


/* Preview bar */
.koko-ui { font-family: Jost, sans-serif; color: #000; }
.koko-bar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 2147483000;
  display: flex; align-items: center; gap: 10px; background: #000; color: #fff; padding: 8px 8px 8px 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 24px);
}
.koko-bar-title { font-family: "Fjalla One", sans-serif; text-transform: uppercase; letter-spacing: .08em; font-size: 14px; }
.koko-seg[hidden] { display: none; }
.koko-seg { display: inline-flex; border: 1px solid #fff; }
.koko-seg button, .koko-open { font: 500 12px Jost, sans-serif; text-transform: uppercase; letter-spacing: .08em; border: 0; background: transparent; color: #fff; padding: 8px 12px; cursor: pointer; white-space: nowrap; }
.koko-seg button[aria-pressed="true"] { background: #fff; color: #000; }
.koko-open { display: inline-flex; align-items: center; gap: 8px; background: #d02e2e; }
.koko-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; }

.koko-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 2147483001;
  background: #fff; border-left: 1px solid #e2e2e2; box-shadow: -12px 0 40px rgba(0,0,0,.15); display: flex; flex-direction: column;
}
.koko-panel[hidden] { display: none; }
.koko-panel-head { display: flex; justify-content: space-between; align-items: start; padding: 18px 20px 12px; border-bottom: 1px solid #e2e2e2; }
.koko-panel h2 { font: 400 26px/1.1 "Fjalla One", sans-serif; text-transform: uppercase; margin: 0; }
.koko-panel h3 { font: 400 16px/1.2 "Fjalla One", sans-serif; text-transform: uppercase; letter-spacing: .04em; margin: 18px 0 8px; }
.koko-eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #747474; margin: 0 0 6px; }
.koko-close { border: 0; background: none; font-size: 30px; line-height: 1; cursor: pointer; }
.koko-panel-body { overflow-y: auto; padding: 4px 20px 24px; font-size: 15px; line-height: 1.45; }
.koko-panel ul { padding-left: 18px; margin: 0; }
.koko-panel li { margin: 5px 0; }
.koko-panel a { color: #000; text-decoration: underline; }
.koko-muted { color: #747474; font-size: 13px; margin: 0 0 10px; }
.koko-qs { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.koko-qs li { border: 1px solid #e2e2e2; padding: 12px; margin: 0; }
.koko-qs li.is-ok { border-color: #2e7d4f; }
.koko-q { margin: 0; font-weight: 500; }
.koko-now { margin: 4px 0 8px; font-size: 13px; color: #747474; }
.koko-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.koko-acts button { font: 500 12px Jost, sans-serif; text-transform: uppercase; letter-spacing: .06em; border: 1px solid #000; background: #fff; color: #000; padding: 6px 10px; cursor: pointer; }
.koko-acts button[aria-pressed="true"] { background: #000; color: #fff; }
.koko-ui textarea, .koko-ui input { width: 100%; box-sizing: border-box; font: 15px Jost, sans-serif; margin-top: 6px; padding: 8px; border: 1px solid #ccc; }
.koko-field { display: block; font-size: 13px; font-weight: 500; margin-top: 14px; }
.koko-send { margin-top: 16px; width: 100%; font: 500 14px Jost, sans-serif; text-transform: uppercase; letter-spacing: .08em; background: #000; color: #fff; border: 0; padding: 14px; cursor: pointer; }
.koko-msg { font-size: 13px; margin: 10px 0 0; }
.koko-msg.is-error { color: #d02e2e; }
.koko-msg.is-ok { color: #2e7d4f; }
.koko-copy { font: 500 12px Jost, sans-serif; border: 1px solid currentColor; background: none; color: inherit; padding: 4px 8px; margin-top: 6px; cursor: pointer; }

.koko-toast {
  position: fixed; left: 50%; bottom: 76px; transform: translate(-50%, 10px); opacity: 0; transition: .2s; z-index: 2147483002;
  background: #fff; color: #000; border: 1px solid #000; padding: 10px 14px; font: 14px Jost, sans-serif; pointer-events: none;
}
.koko-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 560px) {
  .koko-bar { gap: 6px; padding: 6px; bottom: 10px; }
  .koko-bar-title { display: none; }
  .koko-seg button, .koko-open { padding: 8px 8px; font-size: 11px; letter-spacing: .04em; }
  .koko-open-label { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
}

/* Shop Pay / dynamic checkout buttons can't load in a preview; hide their empty placeholders. */
.shopify-payment-button, .product-buy-buttons--smart, [data-shopify="payment-button"] { display: none !important; }

/* Sold one-of-ones: custom request */
.koko-custom-line { font: 500 11px/1.3 Jost, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #d02e2e; margin: 6px 0 0; text-align: center; }
.koko-custom { border: 1px solid #000; padding: 16px; margin: 16px 0; font: 15px/1.45 Jost, sans-serif; }
.koko-custom p { margin: 0 0 10px; }
.koko-custom-h { font: 400 18px/1.2 "Fjalla One", sans-serif !important; text-transform: uppercase; letter-spacing: .03em; }
.koko-custom-btn { width: 100%; font: 500 14px Jost, sans-serif; letter-spacing: .08em; text-transform: uppercase; background: #000; color: #fff; border: 0; padding: 14px; cursor: pointer; }
.koko-custom-dlg { border: 0; padding: 0; width: min(440px, calc(100vw - 32px)); background: #fff; color: #000; }
.koko-custom-dlg::backdrop { background: rgba(0,0,0,.5); }
.koko-custom-form { display: grid; gap: 12px; padding: 18px 20px 20px; font: 15px Jost, sans-serif; }
.koko-custom-head { display: flex; justify-content: space-between; align-items: center; }
.koko-custom-head h2 { font: 400 24px "Fjalla One", sans-serif; text-transform: uppercase; margin: 0; }
.koko-custom-piece { display: flex; gap: 12px; align-items: center; background: #f4f4f4; padding: 8px; }
.koko-custom-piece img { width: 56px; height: 72px; object-fit: cover; }
.koko-custom-piece p { margin: 0; display: grid; font-size: 14px; }
.koko-custom-piece span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #747474; }
.koko-custom-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 500; }
.koko-custom-form select { font: 15px Jost, sans-serif; padding: 8px; border: 1px solid #ccc; background: #fff; }


/* Kill her scroll-reveal fades (blank gaps on fast scroll) */
html.koko-no-reveal [data-transition-item], html.koko-no-reveal [data-transition-item] > * { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }
html.koko-no-reveal [data-transition-cropper] { overflow: visible !important; }

/* Collection title */
.koko-coll-title { text-align: center; padding: 28px 16px 4px; font-family: Jost, sans-serif; }
.koko-coll-title h1 { font: 400 clamp(26px, 5vw, 36px)/1.1 "Fjalla One", sans-serif; text-transform: uppercase; letter-spacing: .04em; margin: 0; }
.koko-coll-title p { margin: 6px 0 0; color: #747474; font-size: 14px; }

/* Compact filter bar */
.koko-filters { margin: 0 0 18px; font-family: Jost, sans-serif; }
.koko-fbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid #e2e2e2; border-bottom: 1px solid #e2e2e2; padding: 10px 0; }
.koko-fd { position: relative; }
.koko-fd summary { list-style: none; cursor: pointer; font: 500 13px Jost, sans-serif; text-transform: uppercase; letter-spacing: .06em; border: 1px solid #000; padding: 7px 12px; }
.koko-fd summary::-webkit-details-marker { display: none; }
.koko-fd summary::after { content: " ▾"; }
.koko-fd[open] summary { background: #000; color: #fff; }
.koko-fopts { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; background: #fff; border: 1px solid #000; padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; width: max-content; max-width: min(320px, 80vw); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.koko-fopts button { font: 400 13px Jost, sans-serif; text-transform: uppercase; letter-spacing: .05em; border: 1px solid #ccc; background: #fff; color: #000; padding: 6px 10px; cursor: pointer; }
.koko-fopts button[aria-pressed="true"] { background: #000; color: #fff; border-color: #000; }
.koko-fsold { font-size: 13px; display: inline-flex; gap: 6px; align-items: center; text-transform: uppercase; letter-spacing: .05em; }
.koko-fcount { font-size: 13px; color: #747474; margin-left: auto; }
.koko-drop { font: 400 11px/1.2 Jost, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #747474; margin: 4px 0 0; text-align: center; }

/* Product info */
.koko-info { margin: 10px 0 4px; font: 14px/1.45 Jost, sans-serif; display: grid; gap: 6px; }
.koko-info p { margin: 0; }
.koko-1of1 { font: 500 12px/1 Jost, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.koko-model-note { font-size: 12px; color: #747474; }
.koko-info a { color: inherit; }

/* Sold: notify + similar */
.koko-notify-btn { width: 100%; margin-top: 8px; font: 500 13px Jost, sans-serif; background: #fff; color: #000; border: 1px solid #000; padding: 11px; cursor: pointer; }
.koko-similar { margin: 8px 0 16px; font-family: Jost, sans-serif; }
.koko-similar-h { font: 400 16px "Fjalla One", sans-serif; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 8px; }
.koko-similar-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.koko-similar-row a { color: #000; text-decoration: none; font-size: 12px; display: grid; gap: 4px; }
.koko-similar-row img { width: 100%; aspect-ratio: 2/3; object-fit: cover; background: #f4f4f4; }

/* Homepage line under hero */
.koko-hero { text-align: center; padding: 28px 16px 8px; font-family: Jost, sans-serif; }
.koko-hero h2 { font: 400 clamp(24px, 4.4vw, 38px)/1.1 "Fjalla One", sans-serif; text-transform: uppercase; letter-spacing: .03em; margin: 0; }
.koko-hero p { margin: 8px 0 16px; color: #444; }
.koko-hero-btn { display: inline-block; background: #000 !important; color: #fff !important; border: 0 !important; text-decoration: none; font: 500 13px Jost, sans-serif; letter-spacing: .1em; text-transform: uppercase; padding: 13px 22px; }

/* Video capture mode */
html.koko-capture .koko-bar, html.koko-capture .koko-toast { display: none !important; }
