/**
 * Store Core - Campos del cliente (fotos + comentarios)
 *
 * Estilos base del plugin. El tema puede afinarlos con mayor especificidad.
 */

.spc-field,
.spc-photos,
.spc-note {
	display: block;
	margin: 0 0 20px;
}

.spc-section-title,
.spc-field__label {
	display: block;
	margin: 0 0 4px;
	font-weight: 800;
	font-size: 0.8rem;
	line-height: 1.3;
	color: var(--color-primary-dark, #480019);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.spc-field__hint {
	margin: 0 0 10px;
	font-size: 0.8rem;
	line-height: 1.4;
	color: var(--color-muted, #7c4b63);
}

/* Input nativo: oculto pero accesible (funciona sin JavaScript). */
.spc-photos__input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}

.spc-photos__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
	gap: 10px;
	margin: 0;
	padding: 0;
}

@media (max-width: 480px) {
	.spc-photos__grid {
		grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
	}
}

.spc-photos__slot {
	position: relative;
	aspect-ratio: 1 / 1;
	border-radius: 14px;
	overflow: hidden;
	background: #fff;
	border: 1.5px solid var(--color-border, #ffd3e3);
}

.spc-photos__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.spc-photos__name {
	position: absolute;
	inset: auto 0 0 0;
	padding: 4px 6px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
	color: #fff;
	font-size: 0.62rem;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.spc-photos__remove {
	position: absolute;
	top: 5px;
	right: 5px;
	width: 26px;
	height: 26px;
	border: 0;
	border-radius: 50%;
	background: rgba(72, 0, 25, 0.78);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	line-height: 1;
	transition: background 0.18s ease, transform 0.18s ease;
}

.spc-photos__remove:hover,
.spc-photos__remove:focus-visible {
	background: #c53030;
	transform: scale(1.06);
}

.spc-photos__add {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	aspect-ratio: 1 / 1;
	min-height: 88px;
	border-radius: 14px;
	border: 1.5px dashed var(--color-primary, #f469a2);
	background: var(--color-surface2, #fff1f7);
	color: var(--color-primary-dark, #480019);
	cursor: pointer;
	font-size: 0.68rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-align: center;
	transition: border-color 0.18s ease, background 0.18s ease;
}

.spc-photos__add:hover,
.spc-photos__add:focus-visible,
.spc-photos__input:focus-visible + .spc-photos__count,
.spc-photos__input:focus-visible ~ * .spc-photos__add {
	border-color: var(--color-primary-dark, #480019);
	background: #fff;
}

.spc-photos__count {
	margin: 8px 0 0;
	font-size: 0.76rem;
	font-weight: 700;
	color: var(--color-muted, #7c4b63);
}

.spc-photos__error {
	margin: 8px 0 0;
	font-size: 0.8rem;
	font-weight: 700;
	color: #c53030;
}

.spc-note__field {
	width: 100%;
	display: block;
	box-sizing: border-box;
	min-height: 96px;
	padding: 12px 14px;
	border: 1.5px solid var(--color-border, #ffd3e3);
	border-radius: 14px;
	background: #fff;
	font-family: inherit;
	font-size: 0.92rem;
	color: var(--color-text, #480019);
	resize: vertical;
	transition: border-color 0.18s ease;
}

.spc-note__field:focus {
	outline: 3px solid var(--color-primary-dark, #480019);
	outline-offset: 2px;
	border-color: var(--color-primary-dark, #480019);
}

.spc-note__field::placeholder {
	color: #b78ea0;
}

.spc-cart-thumb {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 10px;
	margin: 0 4px 4px 0;
	display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
	.spc-photos__remove,
	.spc-photos__add,
	.spc-note__field {
		transition: none;
	}
}
