/* =============================================================================
   Retail Price Suggester  —  PDP feature
   All rules scoped under .pe-rps-* to avoid collisions with theme / sidecart.
   ============================================================================= */

/* ---------- Trigger link (below the image card, no chrome) ----------
   Sits inside .pe-product-gallery-col directly below .pe-product-gallery.
   Plain text link — no border, no background, no card. */
.pe-rps-card {
	margin: 14px 0 0;
	padding: 0 4px;
}

@media (max-width: 600px) {
	.pe-rps-card {
		padding: 0;
	}
}

.pe-rps-trigger {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 6px 2px;
	background: transparent;
	border: 0;
	cursor: pointer;
	text-align: left;
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	color: #0f172a;
	transition: color .15s ease;
}

.pe-rps-trigger:hover,
.pe-rps-trigger:focus-visible {
	color: #475569;
	outline: none;
}

.pe-rps-trigger-text {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.pe-rps-trigger-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: currentColor;
	flex-shrink: 0;
	transition: transform .18s ease;
}

.pe-rps-trigger:hover .pe-rps-trigger-arrow,
.pe-rps-trigger:focus-visible .pe-rps-trigger-arrow {
	transform: translateX(4px);
}

/* ---------- Modal ---------- */
.pe-rps-modal[hidden] { display: none; }

.pe-rps-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: pe-rps-fade .18s ease-out;
}

@keyframes pe-rps-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.pe-rps-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .55);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.pe-rps-panel {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 40px);
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 24px 48px -12px rgba(15,23,42,.35);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	animation: pe-rps-pop .22s cubic-bezier(.16,1,.3,1);
}

@keyframes pe-rps-pop {
	from { opacity: 0; transform: translateY(8px) scale(.97); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.pe-rps-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 22px;
	border-bottom: 1px solid #e2e8f0;
}

.pe-rps-title {
	font-size: 17px;
	font-weight: 700;
	color: #0f172a;
	margin: 0;
}

.pe-rps-close {
	background: transparent;
	border: 0;
	color: #64748b;
	cursor: pointer;
	padding: 6px;
	border-radius: 8px;
	display: inline-flex;
	transition: background .15s, color .15s;
}

.pe-rps-close:hover {
	background: #f1f5f9;
	color: #0f172a;
}

.pe-rps-body {
	padding: 22px 24px 24px;
	overflow-y: auto;
}

/* ---------- Intro copy ---------- */
.pe-rps-intro {
	font-size: 13.5px;
	color: #475569;
	line-height: 1.5;
	margin-bottom: 16px;
}

/* ---------- Pricing tier segmented pill ----------
   Flat/Motion/3D-style toggle: light gray track containing transparent
   inactive buttons and a white "lifted" card for the active option.
   Content inside each button stays stacked (label / composition / price). */
.pe-rps-pricing-toggle[hidden] { display: none; }

.pe-rps-pricing-toggle {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(0, 1fr);
	gap: 4px;
	padding: 5px;
	background: #f1f5f9;
	border-radius: 16px;
	margin-bottom: 18px;
}

.pe-rps-pricing-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 10px 8px;
	background: transparent;
	border: 0;
	border-radius: 12px;
	cursor: pointer;
	font: inherit;
	color: #94a3b8;
	transition: all .18s ease;
	text-align: center;
	min-width: 0;
}

.pe-rps-pricing-btn:hover:not(.is-active) {
	color: #475569;
}

.pe-rps-pricing-btn:focus-visible {
	outline: 2px solid #0f172a;
	outline-offset: -2px;
}

.pe-rps-pricing-btn.is-active {
	background: #fff;
	color: #0f172a;
	box-shadow: 0 2px 6px -1px rgba(15,23,42,.12), 0 1px 2px rgba(15,23,42,.06);
}

.pe-rps-pricing-btn-label {
	font-size: 13.5px;
	font-weight: 700;
	color: inherit;
	line-height: 1.15;
}

.pe-rps-pricing-btn-comp {
	font-size: 11px;
	color: #cbd5e1;
	font-weight: 500;
}

.pe-rps-pricing-btn.is-active .pe-rps-pricing-btn-comp {
	color: #94a3b8;
}

.pe-rps-pricing-btn-price {
	margin-top: 2px;
	font-size: 14px;
	font-weight: 800;
	color: inherit;
	font-variant-numeric: tabular-nums;
	letter-spacing: -.01em;
}

/* ---------- Markup chips (3 across) ----------
   Same Flat/Motion/3D segmented pill style as .pe-rps-pricing-toggle:
   light gray track, transparent inactive buttons, white "lifted" card for active. */
.pe-rps-chips {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px;
	padding: 5px;
	background: #f1f5f9;
	border-radius: 16px;
	margin-bottom: 14px;
}

.pe-rps-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 8px;
	background: transparent;
	border: 0;
	border-radius: 12px;
	font: inherit;
	font-size: 14.5px;
	font-weight: 700;
	color: #94a3b8;
	cursor: pointer;
	transition: all .18s ease;
	min-width: 0;
}

.pe-rps-chip:hover:not(.is-active) {
	color: #475569;
}

.pe-rps-chip:focus-visible {
	outline: 2px solid #0f172a;
	outline-offset: -2px;
}

.pe-rps-chip.is-active {
	background: #fff;
	color: #0f172a;
	box-shadow: 0 2px 6px -1px rgba(15,23,42,.12), 0 1px 2px rgba(15,23,42,.06);
}

/* ---------- Custom % slider row ---------- */
.pe-rps-slider-row {
	padding: 14px 16px;
	border: 1.5px solid #e2e8f0;
	border-radius: 12px;
	background: #f8fafc;
	margin-bottom: 20px;
}

.pe-rps-slider-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.pe-rps-slider-label {
	font-size: 13px;
	font-weight: 600;
	color: #334155;
}

.pe-rps-slider-value {
	font-size: 17px;
	font-weight: 800;
	color: #0f172a;
	letter-spacing: -.01em;
	font-variant-numeric: tabular-nums;
}

.pe-rps-slider {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 6px;
	border-radius: 999px;
	background: linear-gradient(to right, #0f172a 0%, #0f172a var(--pe-rps-fill, 23%), #e2e8f0 var(--pe-rps-fill, 23%), #e2e8f0 100%);
	outline: none;
	margin: 0;
	cursor: pointer;
}

.pe-rps-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #0f172a;
	box-shadow: 0 1px 3px rgba(15,23,42,.2);
	cursor: grab;
	transition: transform .12s ease;
}

.pe-rps-slider::-webkit-slider-thumb:active {
	cursor: grabbing;
	transform: scale(1.1);
}

.pe-rps-slider::-moz-range-thumb {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #0f172a;
	box-shadow: 0 1px 3px rgba(15,23,42,.2);
	cursor: grab;
}

.pe-rps-slider::-moz-range-track {
	height: 6px;
	border-radius: 999px;
	background: transparent;
}

.pe-rps-slider:focus-visible::-webkit-slider-thumb {
	box-shadow: 0 0 0 3px rgba(15,23,42,.18);
}

.pe-rps-slider-ticks {
	display: flex;
	justify-content: space-between;
	font-size: 10.5px;
	color: #94a3b8;
	font-weight: 600;
	margin-top: 8px;
	padding: 0 6px;
}

/* ---------- Base price reference ---------- */
.pe-rps-base {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 14px;
	background: #f8fafc;
	border-radius: 10px;
	margin-bottom: 18px;
	font-size: 13px;
}

.pe-rps-base-label {
	color: #64748b;
}

.pe-rps-base-value {
	color: #334155;
	font-weight: 600;
}

.pe-rps-base-value strong {
	color: #0f172a;
	font-weight: 800;
	font-size: 14.5px;
}

.pe-rps-base-novat {
	color: #94a3b8;
	font-size: 11.5px;
	font-weight: 500;
}

/* ---------- Result block (neutral, subtle accent) ---------- */
.pe-rps-result {
	padding: 22px 18px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	text-align: center;
	margin-bottom: 14px;
}

.pe-rps-result-label {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 11.5px;
	color: #64748b;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	margin-bottom: 8px;
}

/* "Τιμή αγοράς" pill — visible only in anchor mode (admin set a market avg
   and the user hasn't moved the slider/chips yet). */
.pe-rps-anchor-badge {
	display: none;
	padding: 2px 8px;
	background: #0f172a;
	color: #fff;
	border-radius: 999px;
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.pe-rps-modal.pe-rps-anchored .pe-rps-anchor-badge {
	display: inline-flex;
}

.pe-rps-result-price-row {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 6px;
	margin-bottom: 4px;
}

.pe-rps-result-price {
	font-size: 38px;
	font-weight: 800;
	color: #0f172a;
	letter-spacing: -.02em;
	line-height: 1;
}

.pe-rps-result-suffix {
	font-size: 15px;
	color: #475569;
	font-weight: 600;
}

.pe-rps-result-vat {
	display: block;
	font-size: 12px;
	color: #94a3b8;
	font-weight: 500;
	margin-bottom: 12px;
}

.pe-rps-result-novat,
.pe-rps-result-profit {
	font-size: 13px;
	color: #475569;
	padding-top: 10px;
	margin-top: 10px;
	border-top: 1px solid #e2e8f0;
}

.pe-rps-result-novat strong,
.pe-rps-result-profit strong {
	color: #0f172a;
	font-weight: 800;
}

.pe-rps-result-profit.pe-rps-profit--negative {
	color: #991b1b;
}

.pe-rps-result-profit.pe-rps-profit--negative strong {
	color: #7f1d1d;
}

/* ---------- Max retail warning (amber alert) ---------- */
.pe-rps-maxwarn[hidden] { display: none; }

.pe-rps-maxwarn {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 14px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 10px;
	font-size: 12.5px;
	color: #991b1b;
	margin-bottom: 14px;
	line-height: 1.4;
}

.pe-rps-maxwarn svg {
	flex-shrink: 0;
	color: #dc2626;
	margin-top: 1px;
}

.pe-rps-maxwarn strong {
	color: #7f1d1d;
	font-weight: 800;
	white-space: nowrap;
}

/* Tint the result block red when over the max retail. */
.pe-rps-modal.pe-rps-over-max .pe-rps-result {
	background: #fef2f2;
	border-color: #fecaca;
}

.pe-rps-modal.pe-rps-over-max .pe-rps-result-price {
	color: #991b1b;
}

/* ---------- Market average comparison ---------- */
.pe-rps-market[hidden] { display: none; }

.pe-rps-market {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px;
	padding: 11px 14px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	font-size: 13px;
	color: #475569;
	margin-bottom: 14px;
}

.pe-rps-market-label {
	color: #64748b;
}

.pe-rps-market-value {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
}

.pe-rps-market-value strong {
	color: #0f172a;
	font-weight: 800;
	font-size: 14.5px;
}

.pe-rps-market-note {
	font-size: 12px;
	color: #64748b;
	font-style: italic;
}

.pe-rps-market--under .pe-rps-market-note {
	color: #047857;
}

.pe-rps-market--over .pe-rps-market-note {
	color: #b45309;
}

/* ---------- Disclaimer ---------- */
.pe-rps-disclaimer {
	font-size: 11.5px;
	color: #94a3b8;
	text-align: center;
	margin: 0;
	line-height: 1.4;
}

/* ---------- Locked state (guests) ---------- */
.pe-rps-modal.is-locked .pe-rps-body {
	position: relative;
	min-height: 340px;
}

.pe-rps-modal.is-locked .pe-rps-intro,
.pe-rps-modal.is-locked .pe-rps-pricing-toggle,
.pe-rps-modal.is-locked .pe-rps-base,
.pe-rps-modal.is-locked .pe-rps-chips,
.pe-rps-modal.is-locked .pe-rps-slider-row,
.pe-rps-modal.is-locked .pe-rps-result,
.pe-rps-modal.is-locked .pe-rps-market,
.pe-rps-modal.is-locked .pe-rps-maxwarn,
.pe-rps-modal.is-locked .pe-rps-disclaimer {
	filter: blur(6px);
	pointer-events: none;
	user-select: none;
}

.pe-rps-lock-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: linear-gradient(180deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,.82) 35%, rgba(255,255,255,.92) 100%);
}

.pe-rps-lock-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 10px;
	max-width: 320px;
}

.pe-rps-lock-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #f1f5f9;
	color: #0f172a;
	margin-bottom: 4px;
}

.pe-rps-lock-title {
	font-size: 17px;
	font-weight: 800;
	color: #0f172a;
}

.pe-rps-lock-text {
	font-size: 13.5px;
	color: #475569;
	line-height: 1.5;
	margin: 0 0 8px;
}

.pe-rps-lock-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 22px;
	background: #0f172a;
	color: #fff;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 700;
	font-size: 14.5px;
	box-shadow: 0 8px 18px -6px rgba(15,23,42,.45);
	transition: all .15s ease;
}

.pe-rps-lock-btn:hover {
	background: #1e293b;
	transform: translateY(-1px);
	box-shadow: 0 12px 22px -6px rgba(15,23,42,.5);
	color: #fff;
}

.pe-rps-lock-btn svg {
	transition: transform .15s ease;
}

.pe-rps-lock-btn:hover svg {
	transform: translateX(3px);
}

/* ---------- Body lock when modal open ---------- */
body.pe-rps-open {
	overflow: hidden;
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 600px) {
	.pe-rps-panel {
		max-width: 100%;
		border-radius: 16px;
	}
	.pe-rps-result-price {
		font-size: 30px;
	}
	.pe-rps-trigger {
		font-size: 14px;
	}
	.pe-rps-chips {
		gap: 3px;
		padding: 4px;
	}
	.pe-rps-chip {
		padding: 9px 4px;
		font-size: 13.5px;
	}
	.pe-rps-body {
		padding: 18px 18px 20px;
	}
	.pe-rps-slider-row {
		padding: 12px 14px;
	}
	.pe-rps-slider-value {
		font-size: 17px;
	}
	.pe-rps-pricing-toggle {
		gap: 6px;
	}
	.pe-rps-pricing-btn {
		padding: 9px 4px;
	}
	.pe-rps-pricing-btn-label {
		font-size: 12.5px;
	}
	.pe-rps-pricing-btn-comp {
		font-size: 10.5px;
	}
	.pe-rps-pricing-btn-price {
		font-size: 13px;
	}
}
