/* Custom tee designer (template catalog/product/view-custom-modern.phtml). Colors come from teepop-modern.css */
.tp-designer {
	--tpd-red: var(--tp-red, #e3202b);
	--tpd-ink: var(--tp-ink, #111827);
	--tpd-text: var(--tp-text, #374151);
	--tpd-muted: var(--tp-muted, #6b7280);
	--tpd-line: var(--tp-line, #e5e7eb);
	--tpd-soft: var(--tp-soft, #f6f7f9);
	--tpd-green: var(--tp-green, #16a34a);
	--tpd-green-dark: var(--tp-green-dark, #12843c);
	color: var(--tpd-text);
}
.main { padding-top: 0; }
#_GUARANTEE_SealSpan, #___ratingbadge_0 { display: none !important; }
.tp-designer .product-name,
.tp-designer .product-options,
.tp-designer .product-options-bottom,
.block-related,
.tp-designer .fluff,
.tp-designer .add-to-cart-wrapper { display: none; }
.tpd-hidden-select { display: none !important; }

/* ---------- layout ---------- */
.tpd-layout {
	display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; align-items: start; margin: 8px 0 40px;
}
.tpd-stage {
	position: relative; background: var(--tpd-soft); border-radius: 20px; overflow: hidden; padding: 0;
}
.tp-designer img.tee { display: block; float: none; width: 100%; height: auto; aspect-ratio: 1500 / 1429; }
.tp-designer .canvas-container { position: absolute !important; left: 50%; transform: translateX(-50%); margin: 0; }
.tp-designer #c,
.tp-designer .canvas-container .lower-canvas { border: 0; }
.tp-designer .canvas-container::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	border: 2px dashed rgba(17, 24, 39, .28); border-radius: 6px;
}
.tpd-tip { display: flex; gap: 10px; align-items: center; margin: 14px 4px 0; font-size: 14px; color: var(--tpd-muted); }
.tpd-tip-dot { flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--tpd-red); }

/* ---------- side panel ---------- */
.tpd-panel {
	position: sticky; top: 20px; background: #fff; border: 1px solid var(--tpd-line); border-radius: 20px;
	padding: 26px; box-shadow: 0 10px 30px rgba(17, 24, 39, .06);
}
.tpd-eyebrow {
	display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	color: var(--tpd-red); margin-bottom: 6px;
}
.tp-designer .tpd-intro h1 {
	font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; color: var(--tpd-ink); margin: 0 0 8px; text-transform: none;
}
.tp-designer .tpd-intro p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--tpd-muted); }
.tpd-intro--mobile { display: none; }
.tpd-intro--desktop { margin-bottom: 22px; }

.tpd-step { border-top: 1px solid var(--tpd-line); padding-top: 20px; margin-top: 20px; }
.tpd-intro--desktop + .tpd-step { margin-top: 0; }
.tpd-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tp-designer h2.dt-header {
	display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; background: none; width: auto;
	font-size: 18px; font-weight: 800; color: var(--tpd-ink); text-transform: none; letter-spacing: -.01em;
}
.tpd-num {
	display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
	background: var(--tpd-ink); color: #fff; font-size: 13px; font-weight: 800;
}
.tpd-sheet-close { display: none; }

.tp-designer .dt-inner { padding: 0; width: auto; }
.tp-designer label {
	display: block; margin: 14px 0 6px; font-size: 13px; font-weight: 700; color: var(--tpd-ink); text-transform: none;
}
.tpd-picked { font-weight: 500; color: var(--tpd-muted); margin-left: 4px; }
.tp-designer textarea#current-text {
	display: block; width: 100%; min-height: 84px; resize: vertical; box-sizing: border-box;
	border: 1.5px solid var(--tpd-line); border-radius: 12px; padding: 12px 14px;
	font-size: 17px; line-height: 1.35; color: var(--tpd-ink); background: #fff;
}
.tp-designer textarea#current-text:focus { border-color: var(--tpd-ink); outline: 0; box-shadow: 0 0 0 3px rgba(17, 24, 39, .08); }
.tpd-row { display: flex; gap: 12px; align-items: flex-end; }
.tpd-field--font { flex: 1 1 auto; min-width: 0; }
.tpd-field--ink { flex: 0 0 auto; }
.tp-designer select#font-family {
	display: block; width: 100%; max-width: 100%; height: 46px; font-size: 16px; font-weight: 600;
	border: 1.5px solid var(--tpd-line); border-radius: 12px; padding: 0 12px; background-color: #fff; color: var(--tpd-ink);
}
.tp-designer input#current-color {
	display: block; width: 46px; height: 46px; padding: 4px; border: 1.5px solid var(--tpd-line); border-radius: 12px;
	background: #fff; cursor: pointer;
}
.tp-designer .sp-replacer { height: 46px; border-radius: 12px; border: 1.5px solid var(--tpd-line); background: #fff; padding: 9px; }
.tpd-inks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tpd-ink {
	width: 26px; height: 26px; border-radius: 50%; padding: 0; cursor: pointer;
	border: 1px solid rgba(17, 24, 39, .18); box-shadow: inset 0 0 0 2px #fff; transition: transform .12s ease;
}
.tpd-ink:hover { transform: scale(1.12); }
.tpd-ink.is-active { outline: 2px solid var(--tpd-ink); outline-offset: 2px; }

/* shirt colors + sizes */
.tpd-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.tpd-swatch {
	width: 34px; height: 34px; border-radius: 50%; padding: 0; cursor: pointer;
	border: 1px solid rgba(17, 24, 39, .2); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); transition: transform .12s ease;
}
.tpd-swatch:hover { transform: scale(1.08); }
.tpd-swatch.is-active { outline: 2.5px solid var(--tpd-ink); outline-offset: 3px; }
.tpd-swatch.is-locked { opacity: .25; cursor: not-allowed; transform: none; }
.tpd-sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tpd-size {
	height: 46px; border: 1.5px solid var(--tpd-line); border-radius: 10px; background: #fff; cursor: pointer;
	font-size: 15px; font-weight: 700; color: var(--tpd-ink); line-height: 1.1; padding: 0 4px;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	transition: border-color .12s ease, background .12s ease;
}
.tpd-size small { font-size: 11px; font-weight: 600; color: var(--tpd-muted); }
.tpd-size:hover { border-color: var(--tpd-muted); }
.tpd-size.is-active { background: var(--tpd-ink); border-color: var(--tpd-ink); color: #fff; }
.tpd-size.is-active small { color: rgba(255, 255, 255, .75); }
.tpd-note { margin: 8px 0 0; font-size: 12px; color: var(--tpd-muted); }
.tpd-note--big { display: none; }

.tp-designer .error-text { display: none; margin: 8px 0 0; font-size: 14px; font-weight: 700; color: #dc2626; }

/* buttons */
.tp-designer a.tpd-btn {
	display: flex; align-items: center; justify-content: center; width: 100%; max-width: none; box-sizing: border-box;
	height: 48px; margin: 16px 0 0; padding: 0 18px; border: 0; border-radius: 12px;
	font-size: 15px; font-weight: 700; text-decoration: none; text-align: center; cursor: pointer;
	transition: background .15s ease, transform .1s ease;
}
.tp-designer a.tpd-btn:active { transform: translateY(1px); }
.tp-designer a.tpd-btn--dark { background: var(--tpd-ink); color: #fff; }
.tp-designer a.tpd-btn--dark:hover { background: #000; color: #fff; }
.tp-designer a.tpd-btn--ghost { background: #fff; color: var(--tpd-ink); border: 1.5px solid var(--tpd-line); }
.tp-designer a#close-sizes { display: none; }
.tpd-buy { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--tpd-line); }
.tpd-price { display: flex; align-items: baseline; justify-content: space-between; }
.tpd-price-label { font-size: 14px; font-weight: 600; color: var(--tpd-muted); }
.tpd-price .custom-price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--tpd-ink); }
.tp-designer a.tpd-btn--buy {
	height: 56px; font-size: 17px; background: var(--tpd-green); color: #fff; box-shadow: 0 8px 20px rgba(22, 163, 74, .28);
}
.tp-designer a.tpd-btn--buy:hover { background: var(--tpd-green-dark); color: #fff; }
.tp-designer .is-busy { opacity: .6; pointer-events: none; }

.tpd-trust { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 8px; }
.tpd-trust li { position: relative; padding-left: 24px; font-size: 13px; color: var(--tpd-muted); }
.tpd-trust li::before {
	content: ""; position: absolute; left: 0; top: 2px; width: 14px; height: 14px; border-radius: 50%;
	background: var(--tpd-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* "done editing?" popup (kept from the old page) */
.cus-underlay { display: none; position: fixed; inset: 0; background: rgba(17, 24, 39, .6); z-index: 10000; }
.cus-popup {
	display: none; position: fixed; z-index: 10001; left: 50%; top: 80px; transform: translateX(-50%);
	width: min(92vw, 480px); background: #fff; border-radius: 20px; padding: 24px; text-align: center;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}

/* bottom bar: phones only */
.tpd-bar { display: none; }

/* ---------- tablets ---------- */
@media (max-width: 1100px) {
	.tpd-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; }
	.tpd-panel { padding: 20px; }
}

/* ---------- phones: the scripts switch to full-screen sheets below 770px ---------- */
@media (max-width: 769px) {
	.tpd-layout { display: block; margin-bottom: 110px; }
	.tpd-intro--mobile { display: block; text-align: center; margin: 4px 0 14px; }
	.tp-designer .tpd-intro--mobile h1 { font-size: 26px; }
	.tpd-intro--desktop, .tpd-trust { display: none; }
	.tpd-stage { border-radius: 16px; }
	.tpd-tip { font-size: 13px; }
	.tpd-panel { position: static; border: 0; box-shadow: none; padding: 0; background: transparent; }
	.tpd-step { border: 0; margin: 0; padding: 0; }

	.tp-designer #add-text-inner,
	.tp-designer #edit-text-inner {
		display: none; position: fixed; inset: 0; z-index: 100000; overflow-y: auto;
		background: #fff; padding: 18px 18px 28px;
	}
	.tpd-sheet-close {
		display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0;
		border-radius: 50%; background: var(--tpd-soft); font-size: 26px; line-height: 1; color: var(--tpd-ink); cursor: pointer;
	}
	.tp-designer a#close-sizes { display: flex; }
	.tpd-sizes { grid-template-columns: repeat(4, 1fr); }

	.tpd-bar {
		display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px;
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96);
		border-top: 1px solid var(--tpd-line); box-shadow: 0 -8px 24px rgba(17, 24, 39, .08);
		-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	}
	.tpd-bar > div {
		position: static; width: auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
		height: 52px; padding: 0 6px; border: 1.5px solid var(--tpd-line); border-radius: 12px; background: #fff;
		color: var(--tpd-ink); font-size: 12px; font-weight: 800; letter-spacing: .02em; text-align: center; cursor: pointer;
	}
	.tpd-bar > .bottom-co { background: var(--tpd-green); border-color: var(--tpd-green); color: #fff; }
	.tpd-bar > .bottom-co .custom-price { font-size: 12px; font-weight: 600; opacity: .9; }
	/* keep the spin-to-win bar visible: sit it just above the designer buttons */
	body.product-custom-tee-shirt .s-t-con { bottom: calc(73px + env(safe-area-inset-bottom)) !important; }
}
