/* Amor em Peças – Personalizador
 * Interface visual, responsiva mobile. Cores neutras que herdam do tema.
 */

.aep-personalizador {
	--aep-accent: #b08968;
	--aep-accent-dark: #8c6a4f;
	--aep-line: #e7e0d8;
	--aep-bg: #faf7f3;
	--aep-text: #3a332c;
	--aep-muted: #8a8079;
	--aep-radius: 14px;
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 28px;
	align-items: start;
	color: var(--aep-text);
	font-family: inherit;
}

@media (max-width: 900px) {
	.aep-personalizador {
		grid-template-columns: 1fr;
	}
}

/* ---- Passos ---- */
.aep-steps {
	display: flex;
	flex-direction: column;
	gap: 26px;
}

.aep-step {
	background: #fff;
	border: 1px solid var(--aep-line);
	border-radius: var(--aep-radius);
	padding: 20px 22px;
}

.aep-step.is-hidden {
	display: none;
}

.aep-step-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 16px;
	font-size: 1.15rem;
	line-height: 1.2;
}

.aep-step-title small {
	color: var(--aep-muted);
	font-weight: 400;
}

.aep-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--aep-accent);
	color: #fff;
	font-size: 0.9rem;
	font-weight: 700;
	flex: 0 0 auto;
}

.aep-hint {
	margin: -8px 0 14px;
	color: var(--aep-muted);
	font-size: 0.9rem;
}

/* ---- Grelhas de cartões ---- */
.aep-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 14px;
}

.aep-card {
	border: 2px solid var(--aep-line);
	border-radius: 12px;
	background: var(--aep-bg);
	padding: 12px;
	cursor: pointer;
	text-align: center;
	transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.aep-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
}

.aep-card.is-selected {
	border-color: var(--aep-accent);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(176, 137, 104, .18);
}

.aep-card-img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 8px;
	background: #efe9e2;
}

.aep-card-name {
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.25;
}

.aep-card-price {
	font-size: 0.88rem;
	color: var(--aep-accent-dark);
	font-weight: 600;
}

.aep-card-badge {
	font-size: 0.72rem;
	color: var(--aep-muted);
}

/* Cartão de tipo (sem imagem) */
.aep-type-card {
	padding: 22px 12px;
	justify-content: center;
}

.aep-type-card .aep-card-name {
	font-size: 1.02rem;
}

/* ---- Passo da medida (pulso/pescoço) ---- */
.aep-size-body {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.aep-size-guide {
	flex: 0 0 200px;
	max-width: 220px;
}

.aep-guide {
	margin: 0;
	text-align: center;
}

.aep-guide svg {
	width: 100%;
	height: auto;
	background: var(--aep-bg);
	border: 1px solid var(--aep-line);
	border-radius: 12px;
	padding: 6px;
}

.aep-guide figcaption {
	margin-top: 8px;
	font-size: 0.82rem;
	color: var(--aep-muted);
	line-height: 1.35;
}

/* Mostra só a ilustração correspondente ao tipo escolhido */
.aep-guide-neck { display: none; }
[data-measure="neck"] .aep-guide-wrist { display: none; }
[data-measure="neck"] .aep-guide-neck { display: block; }

.aep-size-field {
	position: relative;
	width: 140px;
	flex: 0 0 auto;
}

.aep-size-input {
	width: 100%;
	padding: 12px 44px 12px 14px;
	border: 2px solid var(--aep-line);
	border-radius: 10px;
	font-size: 1rem;
	box-sizing: border-box;
}

.aep-size-input:focus {
	outline: none;
	border-color: var(--aep-accent);
}

.aep-size-unit {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 0.9rem;
	color: var(--aep-muted);
}

@media (max-width: 480px) {
	.aep-size-guide { flex-basis: 100%; max-width: 240px; margin: 0 auto; }
}

/* ---- Campo de nome ---- */
.aep-name-field {
	position: relative;
	max-width: 320px;
}

.aep-name-input {
	width: 100%;
	padding: 12px 62px 12px 14px;
	border: 2px solid var(--aep-line);
	border-radius: 10px;
	font-size: 1rem;
	box-sizing: border-box;
}

.aep-name-input:focus {
	outline: none;
	border-color: var(--aep-accent);
}

.aep-name-counter {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 0.82rem;
	color: var(--aep-muted);
}

/* ---- Resumo ---- */
.aep-summary {
	position: sticky;
	top: 24px;
	background: #fff;
	border: 1px solid var(--aep-line);
	border-radius: var(--aep-radius);
	padding: 20px;
}

@media (max-width: 900px) {
	.aep-summary {
		position: static;
	}
}

.aep-summary-title {
	margin: 0 0 14px;
	font-size: 1.1rem;
}

.aep-summary-img {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 10px;
	background: var(--aep-bg);
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 14px;
	overflow: hidden;
}

.aep-summary-placeholder {
	color: var(--aep-muted);
	font-size: 0.9rem;
}

/* Cubos de letras do nome, sobre a imagem */
.aep-summary-letters {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 16px;
	display: flex;
	gap: 5px;
	justify-content: center;
	flex-wrap: wrap;
	padding: 0 10px;
	pointer-events: none;
}

.aep-letter-cube {
	width: 26px;
	height: 26px;
	background: #fff;
	color: #111;
	border-radius: 5px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 15px;
	line-height: 1;
	text-transform: uppercase;
	box-shadow: 0 2px 5px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(0, 0, 0, .06);
	animation: aep-cube-pop .18s ease;
}

@keyframes aep-cube-pop {
	from { transform: translateY(6px) scale(.7); opacity: 0; }
	to   { transform: translateY(0) scale(1); opacity: 1; }
}

.aep-summary-list {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
	font-size: 0.92rem;
}

.aep-summary-list li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
	border-bottom: 1px dashed var(--aep-line);
}

.aep-summary-list li span {
	text-align: right;
	color: var(--aep-text);
}

.aep-summary-price {
	margin: 14px 0;
	font-size: 0.95rem;
}

.aep-price-line,
.aep-price-total {
	display: flex;
	justify-content: space-between;
	padding: 5px 0;
}

.aep-price-total {
	border-top: 2px solid var(--aep-line);
	margin-top: 6px;
	padding-top: 10px;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--aep-accent-dark);
}

.aep-add-btn {
	width: 100%;
	padding: 14px 18px !important;
	font-size: 1rem !important;
	cursor: pointer;
	margin-top: 6px;
}

.aep-add-btn[disabled] {
	opacity: .5;
	cursor: not-allowed;
}

.aep-feedback {
	margin: 12px 0 0;
	font-size: 0.9rem;
	min-height: 1.2em;
}

.aep-feedback.is-error {
	color: #b3261e;
}

.aep-feedback.is-success {
	color: #2e7d32;
}

/* ---- Botão na página de produto ---- */
.aep-request-personalization {
	margin: 16px 0;
}

.aep-request-btn {
	display: inline-block;
}

.aep-request-note {
	margin: 8px 0 0;
	font-size: 0.85rem;
	color: #8a8079;
}

/* ---- Etiqueta no carrinho ---- */
.aep-cart-tag {
	font-size: 0.82rem;
	color: #b08968;
	font-weight: 600;
}
