/**
 * TDP · Reseñas de Productos — bloque de reseñas de la ficha de producto.
 *
 * Mismas clases y el mismo aspecto que tenía «TDP - Reseñas» (tdp-rev-*): la
 * especificidad con "body" y los !important se mantienen a propósito, porque
 * es lo que hacía falta para ganarle la partida al CSS del tema en este sitio.
 */

body .tdp-reviews-wrap {
	--tdp-rev-accent: #adcc00;
	--tdp-rev-star-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1.6l2.47 5.01 5.53.8-4 3.9.94 5.5L10 14.2l-4.94 2.6.94-5.5-4-3.9 5.53-.8z'/%3E%3C/svg%3E");
	box-sizing: border-box;
	font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	background: #f4f4f2;
	border-radius: 16px;
	padding: 36px;
	color: #222;
	margin-top: 40px;
	margin-bottom: 60px;
}

.tdp-reviews-wrap *,
.tdp-reviews-wrap *::before,
.tdp-reviews-wrap *::after {
	box-sizing: border-box;
}

body .tdp-rev-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 28px;
	flex-wrap: wrap;
	gap: 14px;
}

body .tdp-rev-heading {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.3px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	color: #222;
}

body .tdp-rev-heading-star { color: var( --tdp-rev-accent ); font-size: 22px; }

body .tdp-rev-avg-badge {
	font-size: 13px;
	background: #edffc0 !important;
	border: 1px solid #c8f000;
	color: #3a6300 !important;
	padding: 4px 12px;
	border-radius: 20px;
	font-weight: 700;
	white-space: nowrap;
}

body button.tdp-rev-btn-write {
	appearance: none;
	-webkit-appearance: none;
	background: #2e2e2e !important;
	color: #ccff01 !important;
	border: none !important;
	outline: none;
	padding: 10px 22px;
	border-radius: 50px;
	font-family: inherit;
	font-weight: 800;
	font-size: 12px;
	letter-spacing: 1px;
	text-transform: uppercase;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	transition: background 0.2s;
	line-height: normal;
	box-shadow: none !important;
}

body button.tdp-rev-btn-write:hover { background: #444 !important; }

body .tdp-rev-form-box {
	background: #fff !important;
	border: 1px solid #e2e2e0 !important;
	border-top: 3px solid var( --tdp-rev-accent ) !important;
	border-radius: 12px;
	padding: 28px;
	margin-bottom: 24px;
	display: none;
}

body .tdp-rev-form-box.is-open {
	display: block;
	animation: tdp-rev-fadein 0.25s ease;
}

@keyframes tdp-rev-fadein {
	from { opacity: 0; transform: translateY( -6px ); }
	to { opacity: 1; transform: translateY( 0 ); }
}

body .tdp-rev-star-icon.is-bouncing { transform: scale( 1.3 ); }

body .tdp-rev-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	margin: 0;
}

body .tdp-rev-form-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #aaa !important;
	margin-bottom: 10px;
	display: block;
	text-align: center;
}

body .tdp-rev-stars {
	display: flex;
	gap: 6px;
	justify-content: center;
	margin-bottom: 22px;
}

body .tdp-rev-star-icon {
	display: inline-block;
	width: 32px;
	height: 32px;
	background-color: #d8d8d8;
	cursor: pointer;
	transition: transform 0.15s ease;
	-webkit-mask-image: var( --tdp-rev-star-mask );
	mask-image: var( --tdp-rev-star-mask );
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
}

body .tdp-rev-star-icon.is-on { background-color: var( --tdp-rev-accent ); }

body .tdp-rev-form-fields { max-width: 580px; margin: 0 auto; }

body .tdp-rev-field {
	width: 100%;
	background: #f9f9f7 !important;
	border: 1px solid #dedede !important;
	color: #222 !important;
	border-radius: 8px;
	padding: 13px 15px;
	font-family: inherit;
	font-size: 14px;
	margin-bottom: 12px;
	outline: none;
	transition: border-color 0.2s;
}

body .tdp-rev-field:focus {
	border-color: var( --tdp-rev-accent ) !important;
	box-shadow: 0 0 0 3px rgba( 173, 204, 0, 0.12 ) !important;
}

body .tdp-rev-field::placeholder { color: #bbb; }

body button.tdp-rev-submit {
	width: 100%;
	background: #2e2e2e !important;
	color: #ccff01 !important;
	border: none !important;
	padding: 14px;
	border-radius: 8px;
	font-family: inherit;
	font-weight: 800;
	font-size: 13px;
	letter-spacing: 1px;
	text-transform: uppercase;
	cursor: pointer;
	margin-top: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: background 0.2s;
	box-shadow: none !important;
}

body button.tdp-rev-submit:hover { background: #444 !important; }
body button.tdp-rev-submit[disabled] { opacity: 0.7; cursor: default; }

body .tdp-rev-divider { border: none; border-top: 1px solid #e2e2e0; margin: 0 0 22px; }

body .tdp-rev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

@media ( max-width: 640px ) {
	body .tdp-rev-grid { grid-template-columns: 1fr; }
}

body .tdp-rev-card {
	background: #fff !important;
	border: 1px solid #e2e2e0 !important;
	border-radius: 12px;
	padding: 22px;
	position: relative;
	overflow: hidden;
	transition: border-color 0.2s, box-shadow 0.2s;
}

body .tdp-rev-card:hover {
	border-color: var( --tdp-rev-accent ) !important;
	box-shadow: 0 4px 14px rgba( 0, 0, 0, 0.05 );
}

body .tdp-rev-accent {
	position: absolute;
	top: 0;
	left: 0;
	width: 3px;
	height: 100%;
	background: var( --tdp-rev-accent );
	border-radius: 12px 0 0 12px;
}

body .tdp-rev-card-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 12px;
}

body .tdp-rev-author { display: flex; align-items: center; gap: 10px; min-width: 0; }

body .tdp-rev-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #2e2e2e !important;
	color: #ccff01 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 13px;
	flex-shrink: 0;
}

body .tdp-rev-name {
	font-weight: 700;
	font-size: 14px;
	color: #222 !important;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body .tdp-rev-verified {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	color: #5a8a00 !important;
	font-weight: 600;
	margin-top: 2px;
}

body .tdp-rev-card-stars { display: flex; gap: 2px; flex: none; }
body .tdp-rev-card-stars .tdp-rev-star-icon { width: 13px; height: 13px; cursor: default; }

body .tdp-rev-body { font-size: 14px; line-height: 1.65; color: #666 !important; margin-bottom: 10px; overflow-wrap: anywhere; }

body .tdp-rev-date {
	font-size: 11px;
	color: #bbb !important;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

body .tdp-rev-empty {
	text-align: center;
	padding: 48px 20px;
	color: #bbb !important;
	grid-column: 1 / -1;
	border: 1px dashed #ddd;
	border-radius: 12px;
}

.tdp-rev-pending-badge {
	position: absolute;
	top: -10px;
	right: 16px;
	background: #2e2e2e;
	color: #ccff01;
	font-size: 10px;
	font-weight: 700;
	padding: 4px 12px;
	border-radius: 20px;
	letter-spacing: 0.5px;
}

/* -------------------------------------------------------------------------
 * Fotos de clientes: tira en cada tarjeta y galería con lupa
 * ------------------------------------------------------------------------- */

body .tdp-rev-photos {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

body .tdp-rev-photo {
	display: block;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 1px solid #e2e2e0 !important;
	border-radius: 8px;
	background: #f4f4f2;
	cursor: zoom-in;
	overflow: hidden;
}

body .tdp-rev-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

body .tdp-rev-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3rem 1rem;
	background: rgba( 12, 14, 18, 0.9 );
}

body .tdp-rev-lightbox[hidden] { display: none; }

body .tdp-rev-lightbox__img {
	max-width: min( 1100px, 92vw );
	max-height: 84vh;
	border-radius: 10px;
	object-fit: contain;
}

body .tdp-rev-lightbox__close,
body .tdp-rev-lightbox__nav {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba( 255, 255, 255, 0.14 ) !important;
	color: #fff !important;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}

body .tdp-rev-lightbox__close:hover,
body .tdp-rev-lightbox__nav:hover { background: rgba( 255, 255, 255, 0.3 ) !important; }

body .tdp-rev-lightbox__close { top: 1rem; right: 1rem; }
body .tdp-rev-lightbox__nav--prev { left: 1rem; }
body .tdp-rev-lightbox__nav--next { right: 1rem; }
body .tdp-rev-lightbox__nav[hidden] { display: none; }

/* -------------------------------------------------------------------------
 * Subida de fotos en el formulario
 * ------------------------------------------------------------------------- */

body .tdp-rev-upload { margin: 4px 0 16px; }

body .tdp-rev-upload__label {
	display: block;
	margin-bottom: 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #aaa !important;
}

body .tdp-rev-upload__hint { text-transform: none; letter-spacing: normal; font-weight: 400; }

body .tdp-rev-upload__input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

body button.tdp-rev-upload__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #fff !important;
	border: 1px dashed #b9bfc9 !important;
	color: #222 !important;
	padding: 9px 16px;
	border-radius: 8px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: none !important;
}

body button.tdp-rev-upload__btn:hover { border-color: var( --tdp-rev-accent ) !important; }
body button.tdp-rev-upload__btn[disabled] { opacity: 0.5; cursor: not-allowed; }

body .tdp-rev-upload__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 10px;
	padding: 0;
	list-style: none;
}

body .tdp-rev-upload__item {
	position: relative;
	width: 62px;
	height: 62px;
	margin: 0;
	border: 1px solid #e2e2e0;
	border-radius: 8px;
	background: #f4f4f2 center / cover no-repeat;
	overflow: hidden;
}

body .tdp-rev-upload__item--loading::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba( 255, 255, 255, 0.75 );
	border: 2px solid #ccc;
	border-top-color: var( --tdp-rev-accent );
	border-radius: 50%;
	width: 22px;
	height: 22px;
	margin: auto;
	animation: tdp-rev-spin 0.8s linear infinite;
}

@keyframes tdp-rev-spin {
	to { transform: rotate( 360deg ); }
}

body .tdp-rev-upload__remove {
	position: absolute;
	top: 2px;
	right: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba( 0, 0, 0, 0.6 ) !important;
	color: #fff !important;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
}

body .tdp-rev-upload__error {
	margin: 6px 0 0;
	color: #c0392b !important;
	font-size: 12px;
	font-weight: 600;
}

/* -------------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------------- */

@media ( max-width: 600px ) {
	body .tdp-reviews-wrap { padding: 22px; }
	body .tdp-rev-lightbox__nav { top: auto; bottom: 1rem; }
}

@media ( prefers-reduced-motion: reduce ) {
	.tdp-reviews-wrap * { transition: none !important; animation: none !important; }
}
