.ptah-op {
	--ptah-op-accent: #2B3A8C;
	--ptah-op-accent-hover: #1F2A6B;
	--ptah-op-star: #F5A623;
	--ptah-op-border: #8D9096;
	--ptah-op-muted: #5F6368;
	width: 100%;
	max-width: 640px;
	margin: 0;
	color: #111;
}

/* Bloque de presentación */
.ptah-op__title {
	margin: 0 0 12px;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.25;
	color: #111;
}

.ptah-op__subtitle {
	margin: 0 0 18px;
	font-size: 16px;
	line-height: 1.4;
	color: #333;
}

.ptah-op__open {
	display: block;
	width: 100%;
	padding: 11px 20px;
	border: 1px solid var(--ptah-op-border);
	border-radius: 999px;
	background: #fff;
	color: #111;
	font: inherit;
	font-size: 15px;
	cursor: pointer;
	transition: background-color .2s, border-color .2s;
}

.ptah-op .ptah-op__open:focus {
	background: #fff;
	color: #111;
	border-color: var(--ptah-op-border);
	box-shadow: none;
}

.ptah-op .ptah-op__open:hover {
	background-color: #F7F8F8;
	border-color: #555;
	color: #111;
}

.ptah-op__open:focus-visible,
.ptah-op__submit:focus-visible,
.ptah-op__cancel:focus-visible {
	outline: 2px solid var(--ptah-op-accent);
	outline-offset: 2px;
}

/* Formulario */
.ptah-op__form {
	margin-top: 20px;
	padding: 20px;
	border: 1px solid #E3E3E3;
	border-radius: 12px;
	background: #fff;
}

.ptah-op__open[hidden],
.ptah-op__form[hidden],
.ptah-op__done[hidden] {
	display: none;
}

.ptah-op__field {
	margin: 0 0 16px;
	padding: 0;
	border: 0;
	min-width: 0;
}

.ptah-op__row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0 16px;
}

.ptah-op__label {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	font-size: 14px;
	font-weight: 600;
}

.ptah-op__optional {
	font-weight: 400;
	color: var(--ptah-op-muted);
}

.ptah-op__form textarea,
.ptah-op__form input[type="text"],
.ptah-op__form input[type="email"] {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid var(--ptah-op-border);
	border-radius: 8px;
	background: #fff;
	color: #111;
	font: inherit;
	font-size: 15px;
}

.ptah-op__form textarea {
	resize: vertical;
	min-height: 100px;
}

.ptah-op__form textarea:focus,
.ptah-op__form input:focus {
	outline: none;
	border-color: var(--ptah-op-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ptah-op-accent) 20%, transparent);
}

.ptah-op__form [aria-invalid="true"] {
	border-color: #C62828;
}

.ptah-op__hint {
	display: block;
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--ptah-op-muted);
}

/* Estrellas seleccionables (orden invertido para el efecto hover sin JS) */
.ptah-op__stars {
	display: inline-flex;
	flex-direction: row-reverse;
	gap: 4px;
}

.ptah-op__stars input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}

.ptah-op__stars label {
	display: inline-flex;
	cursor: pointer;
	padding: 2px;
	border-radius: 4px;
}

.ptah-op__stars svg {
	width: 32px;
	height: 32px;
	fill: #D9D9D9;
	transition: fill .15s, transform .15s;
}

.ptah-op__stars label:hover svg,
.ptah-op__stars label:hover ~ label svg,
.ptah-op__stars input:checked ~ label svg {
	fill: var(--ptah-op-star);
}

.ptah-op__stars label:hover svg {
	transform: scale(1.1);
}

.ptah-op__stars input:focus-visible + label {
	outline: 2px solid var(--ptah-op-accent);
	outline-offset: 1px;
}

.ptah-op__sr,
.ptah-op__hp {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Acciones */
.ptah-op__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ptah-op__submit,
.ptah-op__cancel {
	padding: 10px 22px;
	border-radius: 999px;
	font: inherit;
	font-size: 15px;
	cursor: pointer;
	transition: background-color .2s, border-color .2s, box-shadow .2s, transform .2s, opacity .2s;
}

.ptah-op .ptah-op__submit,
.ptah-op .ptah-op__submit:focus {
	border: 1px solid var(--ptah-op-accent);
	background: var(--ptah-op-accent);
	color: #fff;
	box-shadow: none;
}

.ptah-op .ptah-op__submit:hover:not(:disabled) {
	border-color: var(--ptah-op-accent-hover);
	background: var(--ptah-op-accent-hover);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.ptah-op .ptah-op__submit:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: none;
}

.ptah-op .ptah-op__submit:disabled {
	opacity: .6;
	cursor: progress;
}

.ptah-op .ptah-op__cancel,
.ptah-op .ptah-op__cancel:focus {
	border: 1px solid var(--ptah-op-border);
	background: #fff;
	color: #111;
	box-shadow: none;
}

.ptah-op .ptah-op__cancel:hover {
	border-color: #555;
	background: #F7F8F8;
	color: #111;
}

.ptah-op__message {
	margin: 0 0 12px;
	font-size: 14px;
	min-height: 0;
}

.ptah-op__message:empty {
	display: none;
}

.ptah-op__message.is-error {
	color: #C62828;
}

/* Confirmación */
.ptah-op__done {
	margin-top: 20px;
	padding: 16px 20px;
	border-radius: 12px;
	background: #EEF6EE;
	color: #1E5E2A;
}

.ptah-op__done-text {
	margin: 0;
	font-size: 15px;
}

/* Opiniones publicadas */
.ptah-op__list {
	margin-top: 32px;
}

.ptah-op__summary {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}

.ptah-op__summary-text {
	font-size: 15px;
	color: #333;
}

.ptah-op__stars-static {
	position: relative;
	display: inline-block;
	width: 90px;
	height: 18px;
	flex-shrink: 0;
	background-repeat: repeat-x;
	background-position: left center;
	background-size: 18px 18px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23D9D9D9' d='M12 2.5l2.9 6.2 6.8.8-5 4.6 1.4 6.7L12 17.4l-6.1 3.4 1.4-6.7-5-4.6 6.8-.8z'/%3E%3C/svg%3E");
}

.ptah-op__stars-fill {
	position: absolute;
	inset: 0 auto 0 0;
	overflow: hidden;
	background-color: var(--ptah-op-star);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.2 6.8.8-5 4.6 1.4 6.7L12 17.4l-6.1 3.4 1.4-6.7-5-4.6 6.8-.8z'/%3E%3C/svg%3E") left / 18px 18px repeat-x;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.2 6.8.8-5 4.6 1.4 6.7L12 17.4l-6.1 3.4 1.4-6.7-5-4.6 6.8-.8z'/%3E%3C/svg%3E") left / 18px 18px repeat-x;
}

.ptah-op__reviews {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ptah-op__review {
	padding: 16px 0;
	border-top: 1px solid #E3E3E3;
}

.ptah-op__review-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin-bottom: 6px;
}

.ptah-op__review-author {
	font-size: 15px;
}

.ptah-op__badge {
	padding: 2px 8px;
	border-radius: 999px;
	background: #EEF6EE;
	color: #1E5E2A;
	font-size: 12px;
}

.ptah-op__review-date {
	font-size: 13px;
	color: var(--ptah-op-muted);
}

.ptah-op__review-text {
	font-size: 15px;
	line-height: 1.55;
	color: #222;
}

.ptah-op__review-text p {
	margin: 0 0 8px;
}

.ptah-op__notice {
	padding: 12px 16px;
	border: 1px dashed #BBB;
	border-radius: 8px;
	color: #555;
	font-size: 14px;
}

.elementor-element-70d40e18 .e-con-inner{
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
	.ptah-op__stars svg,
	.ptah-op__open,
	.ptah-op__submit { transition: none; }
	.ptah-op__stars label:hover svg { transform: none; }
}

/* Quitar el relleno del contenedor de la plantilla de Elementor que envuelve el widget */
.ptah-op-template .e-con,
.ptah-op-template .e-con-inner {
	--padding-top: 0px;
	--padding-right: 0px;
	--padding-bottom: 0px;
	--padding-left: 0px;
	padding: 0;
}

.ptah-op-template {
	margin: 40px 0;
}

/* Ocultar las estrellas nativas de WooCommerce bajo el título (no cargan bien en el tema) */
.single-product .summary .woocommerce-product-rating,
.single-product .entry-summary .woocommerce-product-rating {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.ptah-op .ptah-op__submit:hover:not(:disabled) { transform: none; }
}
