/* HOTCUP configurator v2 */
:root {
	--o: #ff3d00;
	--o2: #ff7a1a;
	--ink: #1a1a1a;
	--muted: #7a726d;
	--line: #eee3dd;
	--soft: #fff3ec;
	--bg: #f7f3ef;
}
html, body.hc2-body { margin: 0; background: var(--bg); }
.hc2-body { font-family: Montserrat, Arial, sans-serif; color: var(--ink); -webkit-font-smoothing: antialiased; }
.hc2 *, .hc2 *::before, .hc2 *::after { box-sizing: border-box; }
.hc2 svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.hc2 button { font: inherit; color: inherit; cursor: pointer; }
.hc2 h2 { margin: 0 0 14px; font-size: 16px; font-weight: 700; }
.hc2 h3 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.hc2-muted { color: var(--muted); font-size: 13px; }
.hc2-small { font-size: 12px; margin: 10px 0 0; }
.hc2-hint { margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* Top bar */
.hc2-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 18px; background: #fff; border-bottom: 1px solid var(--line); }
.hc2-back { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--ink); border: 1px solid var(--line); border-radius: 50%; }
.hc2-back:hover { color: var(--o); border-color: var(--o); }
.hc2-top__title { display: grid; min-width: 0; }
.hc2-top__title strong { overflow: hidden; font-size: 15px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.hc2-top__title span { font-size: 13px; color: var(--muted); }
.hc2-top__title span del { opacity: .6; }
.hc2-top__tools { display: flex; gap: 6px; margin-left: auto; }
.hc2-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.hc2-icon-btn:hover:not(:disabled) { color: var(--o); border-color: var(--o); }
.hc2-icon-btn:disabled { opacity: .35; cursor: default; }

/* Layout */
.hc2-main { display: grid; grid-template-columns: 78px 300px minmax(0, 1fr) 360px; min-height: calc(100vh - 64px); }
.hc2-rail { display: flex; flex-direction: column; gap: 6px; padding: 14px 8px; background: #fff; border-right: 1px solid var(--line); }
.hc2-rail button { display: grid; justify-items: center; gap: 5px; padding: 10px 4px; font-size: 11.5px; font-weight: 600; background: none; border: 0; border-radius: 14px; }
.hc2-rail button svg { width: 22px; height: 22px; }
.hc2-rail button:hover { color: var(--o); }
.hc2-rail button.is-on { color: var(--o); background: var(--soft); }
.hc2-panel { padding: 20px 18px; overflow-y: auto; background: #fff; border-right: 1px solid var(--line); }
.hc2-work { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px 20px 30px; }
.hc2-side { display: flex; flex-direction: column; gap: 16px; padding: 20px 18px; background: #fff; border-left: 1px solid var(--line); }

/* Tabs */
.hc2-tabs { display: inline-flex; gap: 4px; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; }
.hc2-tabs[hidden] { display: none; }
.hc2-tab { position: relative; display: inline-flex; align-items: center; gap: 6px; min-width: 96px; justify-content: center; padding: 9px 18px; font-size: 13.5px; font-weight: 600; background: none; border: 0; border-radius: 999px; }
.hc2-tab.is-on { color: #fff; background: linear-gradient(90deg, var(--o2), var(--o)); box-shadow: 0 6px 14px rgba(255, 61, 0, .22); }
.hc2-tab i { width: 7px; height: 7px; background: #2e9e5b; border-radius: 50%; }
.hc2-tab.is-on i { background: #fff; }
.hc2-tabs--surf .hc2-tab { min-width: 110px; }

/* Field */
.hc2-field-wrap { display: flex; flex-direction: column; align-items: center; width: 100%; }
.hc2-field-box { position: relative; background: #fff; background-image: linear-gradient(45deg, #f4efeb 25%, transparent 25%), linear-gradient(-45deg, #f4efeb 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f4efeb 75%), linear-gradient(-45deg, transparent 75%, #f4efeb 75%); background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; border-radius: 6px; box-shadow: 0 0 0 1.5px rgba(255, 61, 0, .55), 0 18px 40px rgba(17, 17, 17, .10); }
.hc2-field-box .canvas-container { border-radius: 6px; }
.hc2-guides { position: absolute; inset: 0; pointer-events: none; }
.hc2-guides i { position: absolute; display: none; background: rgba(255, 61, 0, .8); }
.hc2-guides .v { top: 0; bottom: 0; left: 50%; width: 1px; }
.hc2-guides .h { left: 0; right: 0; top: 50%; height: 1px; }
.hc2-guides.show-v .v, .hc2-guides.show-h .h { display: block; }
.hc2-field-info { margin: 10px 0 0; font-size: 12px; color: var(--muted); }

/* Selection toolbar */
.hc2-sel { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px; width: min(100%, 640px); padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 22px rgba(17, 17, 17, .05); }
.hc2-sel[hidden] { display: none; }
.hc2-sel label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.hc2-sel input[type="range"] { width: 120px; }
.hc2-sel__btns { display: flex; gap: 4px; }
.hc2-sel__btns button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.hc2-sel__btns button:hover { color: var(--o); border-color: var(--o); }
.hc2-sel__btns .is-danger:hover { color: #c62828; border-color: #c62828; }
input[type="range"] { accent-color: var(--o); }

/* Panel widgets */
.hc2-search { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 0 12px; height: 42px; border: 1.5px solid var(--line); border-radius: 12px; }
.hc2-search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 14px; background: none; }
.hc2-pats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hc2-pat { display: grid; gap: 4px; padding: 6px; font-size: 10.5px; font-weight: 600; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.hc2-pat:hover { border-color: var(--o); }
.hc2-pat img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.hc2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; font-size: 14px; font-weight: 600; border: 0; border-radius: 999px; }
.hc2-btn--soft { width: 100%; color: var(--o); background: var(--soft); }
.hc2-btn--soft:hover { background: #ffe6da; }
.hc2-btn--main { width: 100%; min-height: 54px; font-size: 15px; color: #fff; background: linear-gradient(90deg, var(--o2) 0%, var(--o) 55%, #e3341c 100%); box-shadow: 0 10px 24px rgba(255, 61, 0, .26); }
.hc2-btn--main:disabled { opacity: .6; cursor: wait; }
.hc2-textprops { display: grid; gap: 14px; margin-top: 16px; }
.hc2-textprops[hidden] { display: none; }
.hc2-field { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.hc2-field textarea, .hc2-field select { width: 100%; padding: 10px 12px; font: inherit; font-size: 14px; color: var(--ink); background: #fcfaf9; border: 1.5px solid var(--line); border-radius: 12px; }
.hc2-field textarea:focus, .hc2-field select:focus { outline: none; border-color: var(--o); }
.hc2-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.hc2-swatches button { width: 26px; height: 26px; padding: 0; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.hc2-swatches input { width: 30px; height: 30px; padding: 0; border: 0; background: none; }
.hc2-seg { display: grid; grid-template-columns: 1fr 1fr 1fr 44px; gap: 4px; }
.hc2-seg button { padding: 8px 4px; font-size: 12px; font-weight: 600; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.hc2-seg button.is-on { color: var(--o); border-color: var(--o); background: var(--soft); }
.hc2-upload { display: grid; justify-items: center; gap: 6px; padding: 28px 16px; text-align: center; cursor: pointer; background: #fcfaf9; border: 2px dashed #e8d9d1; border-radius: 16px; }
.hc2-upload:hover { border-color: var(--o); }
.hc2-upload svg { width: 30px; height: 30px; color: var(--o); }
.hc2-upload strong { font-size: 14px; }
.hc2-upload span { font-size: 12px; color: var(--muted); }
.hc2-layers { display: grid; gap: 6px; }
.hc2-layer { display: flex; align-items: center; gap: 10px; padding: 9px 10px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.hc2-layer b { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; font-size: 12px; color: var(--o); background: var(--soft); border-radius: 8px; }
.hc2-layer span { overflow: hidden; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.hc2-layer.is-on { border-color: var(--o); }

/* Side */
.hc2-preview { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.hc2-preview__head { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 5px 10px; font-size: 12px; color: var(--muted); background: rgba(255, 255, 255, .9); border-radius: 999px; }
.hc2-preview__head svg { width: 15px; height: 15px; }
.hc2-preview__head b { font-weight: 600; color: var(--ink); }
.hc2-preview__img { display: block; width: 100%; height: auto; }
.hc2-spinner { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border: 2px solid #f1d9cd; border-top-color: var(--o); border-radius: 50%; opacity: 0; animation: hc2spin .8s linear infinite; }
.hc2-preview.is-busy .hc2-spinner { opacity: 1; }
@keyframes hc2spin { to { transform: rotate(360deg); } }
.hc2-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.hc2-var { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; font-size: 12px; font-weight: 600; background: #fff; border: 1px solid var(--line); border-radius: 999px; }
.hc2-var img { width: 28px; height: 28px; object-fit: cover; border-radius: 50%; }
.hc2-var.is-on { color: var(--o); border-color: var(--o); }
.hc2-buy { margin-top: auto; padding-top: 6px; }
.hc2-buy__price { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.hc2-buy__price strong { font-size: 20px; color: var(--ink); }
.hc2-status { min-height: 18px; margin: 10px 0 0; font-size: 12.5px; color: #2e7d32; }
.hc2-status.is-err { color: #c62828; }
.hc2.is-booting .hc2-main { opacity: .35; pointer-events: none; }

/* Tablets / phones */
@media (max-width: 1180px) {
	.hc2-main { grid-template-columns: 78px 280px minmax(0, 1fr); }
	.hc2-side { grid-column: 3; grid-row: 2; border-left: 0; background: none; }
}
@media (max-width: 899px) {
	.hc2-top { height: 58px; padding: 0 12px; }
	.hc2-main { display: flex; flex-direction: column; min-height: 0; padding-bottom: 76px; }
	.hc2-work { order: 1; padding: 14px 12px 6px; }
	.hc2-side { order: 2; padding: 6px 12px 20px; background: none; border: 0; }
	.hc2-preview { max-width: 420px; margin: 0 auto; width: 100%; }
	.hc2-rail { position: fixed; right: 0; bottom: 0; left: 0; z-index: 30; flex-direction: row; justify-content: space-around; gap: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(17, 17, 17, .06); }
	.hc2-rail button { flex: 1; }
	.hc2-panel { position: fixed; right: 0; bottom: calc(68px + env(safe-area-inset-bottom)); left: 0; z-index: 25; max-height: 56vh; border: 0; border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; box-shadow: 0 -16px 40px rgba(17, 17, 17, .14); transform: translateY(110%); transition: transform .25s ease; }
	.hc2.has-panel .hc2-panel { transform: none; }
	.hc2-pats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.hc2-tab { min-width: 0; padding: 8px 14px; }
	.hc2-sel { gap: 10px; padding: 10px; }
	.hc2-sel input[type="range"] { width: 92px; }
	.hc-cc-reopen { bottom: 84px; }
}

/* Preview label sits above the image, not on it. */
.hc2-preview { padding-top: 42px; }
/* Consent can be changed on shop pages; here the icon would cover the tool bar. */
body.hc2-body .hc-cc-reopen { display: none; }

/* `.hc2 button { color: inherit }` outranks the single-class rule — keep CTA text white. */
.hc2 .hc2-btn--main, .hc2 .hc2-btn--main:hover { color: #fff; }
/* Desktop: the app fills the screen; panels scroll on their own, the page does not. */
@media (min-width: 900px) {
	html, body.hc2-body { height: 100%; overflow: hidden; }
	.hc2 { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
	.hc2-main { flex: 1 1 auto; height: auto; min-height: 0; }
	.hc2-panel, .hc2-work, .hc2-side { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
}

/* Products without white underprint (gold mugs) */
.hc2-nowhite { margin: 10px 0 0; padding: 9px 11px; border-radius: 8px; background: #fff7e0; border: 1px solid #f0d68a; color: #6b5200; font-size: 12.5px; line-height: 1.45; }
.hc2-pf { margin: 0 0 14px; padding: 12px; border-radius: 10px; background: #fff; border: 1px solid #ebe7e2; }
.hc2-pf__note { margin: 0 0 10px; font-size: 12px; line-height: 1.45; color: #6b6b6b; }
.hc2-pf__row { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #222; }
.hc2-pf__row span { display: block; margin-bottom: 4px; }
.hc2-pf__row input { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid #d9d3cc; border-radius: 8px; font: inherit; font-weight: 400; }
.hc2-pf__row input.is-invalid { border-color: #d63638; background: #fff5f5; }
/* Pattern tiles: long SEO names stay inside the tile (2 lines, full name in the tooltip). */
.hc2-pat { min-width: 0; overflow: hidden; align-content: start; text-align: center; font-family: inherit; }
.hc2-pat span { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 10.5px !important; line-height: 1.25; font-weight: 600; color: #333; overflow-wrap: anywhere; }
.hc2-pats { overflow-x: hidden; }

/* Out-of-print-field warning */
.hc2-field-wrap.is-out { box-shadow: 0 0 0 2px #c62828; border-radius: 6px; }
.hc2-outwarn { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: #fdecea; color: #b71c1c; font-size: 13px; line-height: 1.4; }
.hc2-outwarn[hidden] { display: none; }
.hc2-btn.is-warn { background: #c62828 !important; border-color: #c62828 !important; }
