/**
 * Estilos del flujo "Solicitar cotización" en la tienda (storefront).
 * Aislado con prefijo .ipt-q para no chocar con el tema ni con WooCommerce.
 */

.ipt-qbtn {
	--ipt-brand: #e5305f;
	--ipt-brand-dark: #c21f4c;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 12px;
	padding: 13px 20px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--ipt-brand);
	background: #fff;
	border: 2px solid var(--ipt-brand);
	border-radius: 13px;
	cursor: pointer;
	transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .05s ease;
	text-decoration: none;
	-webkit-appearance: none;
	appearance: none;
}

.ipt-qbtn:hover {
	background: var(--ipt-brand);
	color: #fff;
	box-shadow: 0 6px 18px rgba(229, 48, 95, .28);
}

.ipt-qbtn:active {
	transform: translateY(1px);
}

.ipt-qbtn svg {
	flex: 0 0 auto;
}

.ipt-qbtn--solid {
	color: #fff;
	background: var(--ipt-brand);
	border-color: var(--ipt-brand);
}

.ipt-qbtn--solid:hover {
	background: var(--ipt-brand-dark);
	border-color: var(--ipt-brand-dark);
}

.ipt-qbtn[disabled] {
	opacity: .6;
	cursor: not-allowed;
	box-shadow: none;
}

/* ----- Modal ----- */
.ipt-qmodal {
	--ipt-brand: #e5305f;
	--ipt-brand-dark: #c21f4c;
	--ipt-ink: #1f2430;
	--ipt-muted: #6b7280;
	--ipt-line: #e5e7eb;
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.ipt-qmodal[hidden] {
	display: none;
}

.ipt-qmodal * {
	box-sizing: border-box;
}

.ipt-qmodal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(17, 20, 28, .55);
	backdrop-filter: blur(2px);
	animation: ipt-q-fade .2s ease;
}

.ipt-qmodal__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 640px;
	max-height: calc(100vh - 36px);
	overflow: hidden;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 20px 50px rgba(17, 20, 28, .18), 0 1px 0 rgba(17, 20, 28, .04);
	animation: ipt-q-pop .22s cubic-bezier(.16, 1, .3, 1);
	color: #0f1115;
	font-size: 14px;
	line-height: 1.45;
}
.ipt-qmodal__head { padding: 22px 26px 6px; flex: 0 0 auto; }
.ipt-qmodal__scroll { flex: 1 1 auto; overflow-y: auto; padding: 6px 26px 8px; }
/* El atributo [hidden] debe ganar siempre: varios bloques del modal tienen su
   propio display (flex/grid), que si no, sobreescribe a [hidden] y deja el
   formulario visible tras enviar la solicitud. */
.ipt-qmodal [hidden] { display: none !important; }
.ipt-qmodal__dialog .ipt-qform__foot {
	flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
	padding: 16px 26px 22px; background: #fff;
}
.ipt-qmodal__dialog .ipt-qform__foot .ipt-qbtn { flex: 1 1 auto; justify-content: center; margin-top: 0; }
/* Etiquetas de sección (sentence-case, sobrias) */
.ipt-qsection__lbl {
	font-size: 13px; font-weight: 600; color: #0f1115; margin: 16px 0 10px;
}
.ipt-qitems .ipt-qsection__lbl:first-child { margin-top: 6px; }
/* Selector de alcance: segmented control moderno (pista gris, activo en blanco) */
.ipt-qseg { display: flex; gap: 6px; background: #f1f3f5; padding: 4px; border-radius: 13px; }
.ipt-qseg__opt { position: relative; flex: 1 1 0; cursor: pointer; min-width: 0; }
.ipt-qseg__opt input { position: absolute; opacity: 0; pointer-events: none; }
.ipt-qseg__opt span {
	display: flex; flex-direction: column; gap: 1px; text-align: center;
	padding: 9px 4px; border-radius: 10px; height: 100%;
	transition: background .15s, box-shadow .15s;
}
.ipt-qseg__opt b { font-size: 12.5px; color: #6b7280; font-weight: 600; }
.ipt-qseg__opt small { font-size: 10.5px; color: #9aa0a8; }
.ipt-qseg__opt input:checked + span { background: #fff; box-shadow: 0 1px 3px rgba(17,20,28,.12); }
.ipt-qseg__opt input:checked + span b { color: #0f1115; }
.ipt-qseg__opt input:checked + span small { color: #6b7280; }
.ipt-qseg__opt input:focus-visible + span { box-shadow: 0 0 0 2px #e5305f; }
/* Grilla de datos en 2 columnas */
.ipt-qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ipt-qfield--full { grid-column: 1 / -1; }
.ipt-qfield em { font-weight: 400; color: #9aa0a8; font-style: normal; }
@media (max-width: 480px) {
	.ipt-qgrid { grid-template-columns: 1fr; }
}

@keyframes ipt-q-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes ipt-q-pop {
	from { opacity: 0; transform: translateY(12px) scale(.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.ipt-qmodal__x {
	position: absolute;
	top: 18px;
	right: 18px;
	z-index: 3;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	line-height: 1;
	color: #6b7280;
	background: #f4f5f7;
	border: 0;
	border-radius: 9px;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

.ipt-qmodal__x:hover {
	background: #e9ebef;
	color: #0f1115;
}

.ipt-qmodal__head h2 {
	margin: 0 0 4px;
	font-size: 19px;
	font-weight: 600;
	letter-spacing: -.01em;
	color: #0f1115;
	padding-right: 36px;
}

.ipt-qmodal__head p {
	margin: 0;
	color: #8a8f98;
	font-size: 13px;
}

.ipt-qmodal__product {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 16px 0 4px;
	padding: 12px 14px;
	background: #fff5f2;
	border: 1px solid #ffd9cf;
	border-radius: 10px;
}

.ipt-qmodal__product span {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--ipt-brand-dark);
}

.ipt-qmodal__product strong {
	font-size: 15px;
	color: var(--ipt-ink);
}

/* ----- Selector de productos (multi) ----- */
.ipt-qitems {
	margin-top: 16px;
}

.ipt-qsearch {
	position: relative;
}

.ipt-qsearch .ipt-qfield {
	margin-bottom: 8px;
}

.ipt-qsearch__results {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 5;
	margin-top: -4px;
	max-height: 240px;
	overflow-y: auto;
	background: #fff;
	border: 1.5px solid var(--ipt-line);
	border-radius: 10px;
	box-shadow: 0 12px 28px rgba(17, 20, 28, .14);
}

.ipt-qsearch__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 10px 13px;
	background: transparent;
	border: 0;
	border-bottom: 1px solid #f1f2f4;
	text-align: left;
	font-size: 14px;
	color: var(--ipt-ink);
	cursor: pointer;
	transition: background .12s ease;
}

.ipt-qsearch__item:last-child {
	border-bottom: 0;
}

.ipt-qsearch__item:hover {
	background: #fff5f2;
}

.ipt-qsearch__name {
	flex: 1 1 auto;
	min-width: 0;
}

.ipt-qsearch__price {
	flex: 0 0 auto;
	font-weight: 700;
	color: var(--ipt-brand-dark);
}

.ipt-qsearch__empty {
	padding: 12px 13px;
	font-size: 13px;
	color: var(--ipt-muted);
}

.ipt-qitems__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ipt-qitem {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 13px;
	margin-bottom: 7px;
	background: #f7f8fa;
	border: 0;
	border-radius: 13px;
}

.ipt-qitem__info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.ipt-qitem__info strong {
	font-size: 14px;
	color: var(--ipt-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ipt-qitem__price {
	font-size: 12px;
	color: var(--ipt-muted);
}

.ipt-qitem__qty {
	flex: 0 0 64px;
	width: 56px;
	padding: 6px 8px;
	font-size: 14px;
	text-align: center;
	color: #0f1115;
	background: #fff;
	border: 1px solid #e8eaed;
	border-radius: 9px;
	-webkit-appearance: none;
	appearance: textfield;
	-moz-appearance: textfield;
}

.ipt-qitem__qty:focus {
	outline: none;
	border-color: #0f1115;
	box-shadow: 0 0 0 3px rgba(17, 20, 28, .08);
}

.ipt-qitem__rm {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 19px;
	line-height: 1;
	color: #9aa0a8;
	background: transparent;
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	transition: background .12s ease, color .12s ease;
}

.ipt-qitem__rm:hover {
	background: #eef0f3;
	color: #0f1115;
}

.ipt-qitems__empty {
	margin: 4px 0 0;
	padding: 14px;
	font-size: 13px;
	color: var(--ipt-muted);
	text-align: center;
	background: #f9fafb;
	border: 1px dashed var(--ipt-line);
	border-radius: 10px;
}

/* ----- Formulario ----- */
.ipt-qform {
	margin-top: 18px;
}

.ipt-qform__row {
	display: flex;
	gap: 14px;
}

.ipt-qform__row > .ipt-qfield {
	flex: 1 1 0;
	min-width: 0;
}

.ipt-qfield {
	display: block;
	margin-bottom: 10px;
}
.ipt-qgrid .ipt-qfield { margin-bottom: 0; }

.ipt-qfield > span {
	display: block;
	margin-bottom: 4px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ipt-ink);
}

.ipt-qfield > span i {
	color: var(--ipt-brand);
	font-style: normal;
}

.ipt-qfield input,
.ipt-qfield textarea,
.ipt-qsearch input {
	width: 100%;
	padding: 11px 13px;
	font-size: 14px;
	font-family: inherit;
	color: #0f1115;
	background: #fff;
	border: 1px solid #e8eaed;
	border-radius: 11px;
	transition: border-color .15s ease, box-shadow .15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.ipt-qfield input::placeholder,
.ipt-qfield textarea::placeholder,
.ipt-qsearch input::placeholder { color: #9aa0a8; }

.ipt-qfield input:focus,
.ipt-qfield textarea:focus,
.ipt-qsearch input:focus {
	outline: none;
	border-color: #0f1115;
	box-shadow: 0 0 0 3px rgba(17, 20, 28, .08);
}

.ipt-qfield textarea {
	resize: vertical;
	min-height: 52px;
}

.ipt-qfield--qty {
	flex: 0 0 110px;
}

.ipt-qfield input[aria-invalid="true"] {
	border-color: #dc2626;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.ipt-qform__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-top: 8px;
}

.ipt-qform__msg {
	font-size: 13px;
	color: var(--ipt-muted);
	min-height: 18px;
}

.ipt-qform__msg.is-error {
	color: #dc2626;
}

.ipt-qform__foot .ipt-qbtn {
	margin-top: 0;
}

/* ----- Estado de éxito ----- */
.ipt-qmodal__done {
	text-align: center;
	padding: 18px 8px 8px;
}

.ipt-qmodal__check {
	width: 64px;
	height: 64px;
	margin: 0 auto 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	color: #fff;
	background: #16a34a;
	border-radius: 50%;
	box-shadow: 0 8px 22px rgba(22, 163, 74, .32);
}

.ipt-qmodal__done h3 {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 700;
	color: var(--ipt-ink);
}

.ipt-qmodal__done p {
	margin: 0 auto 18px;
	max-width: 360px;
	color: var(--ipt-muted);
	font-size: 14px;
}

/* ----- Responsive ----- */
@media (max-width: 560px) {
	.ipt-qmodal__dialog {
		padding: 22px 18px;
	}
	.ipt-qform__row {
		flex-direction: column;
		gap: 0;
	}
	.ipt-qfield--qty {
		flex: 1 1 auto;
	}
	.ipt-qform__foot {
		flex-direction: column-reverse;
		align-items: stretch;
	}
	.ipt-qform__foot .ipt-qbtn {
		width: 100%;
	}
}

/* Precio web + precio por transferencia: dos columnas comparadas (punto 8) */
.ipt-tprice--cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin: 14px 0;
}
.ipt-tprice__card {
	position: relative;
	border: 1px solid rgba( 0, 0, 0, .12 );
	border-radius: 12px;
	padding: 14px 16px;
	background: #fff;
}
.ipt-tprice__card--pref {
	border: 2px solid #e5305f;
	background: #fdeef3;
}
.ipt-tprice__label {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	color: #555;
}
.ipt-tprice__card--pref .ipt-tprice__label { color: #e5305f; }
.ipt-tprice__label svg { width: 17px; height: 17px; flex: 0 0 auto; }
.ipt-tprice__label small { font-weight: 400; opacity: .85; }
.ipt-tprice__amount {
	margin-top: 7px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.1;
	color: #1a1a1a;
}
.ipt-tprice__card--pref .ipt-tprice__amount { color: #e5305f; }
.ipt-tprice__save {
	margin-top: 3px;
	font-size: 12.5px;
	font-weight: 600;
	color: #e5305f;
}
.ipt-tprice__badge {
	position: absolute;
	top: -10px;
	right: 12px;
	background: #e5305f;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .02em;
	padding: 3px 9px;
	border-radius: 999px;
}
.ipt-tprice__amount .woocommerce-Price-amount { font-weight: 700; }
@media ( max-width: 360px ) {
	.ipt-tprice--cols { grid-template-columns: 1fr; }
}

/* Oferta de la competencia en el formulario de solicitud (punto 10) */
.ipt-qcompete { margin: 12px 0 2px; }
.ipt-qcompete__check {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 13px;
	color: var(--ipt-ink);
	cursor: pointer;
}
.ipt-qcompete__check em { font-style: normal; color: #9aa0a8; }
.ipt-qcompete__check input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: #0f1115; }
.ipt-qcompete__fields { margin-top: 10px; }
.ipt-qcompete__file { margin-top: 10px; }
.ipt-qcompete__file input[type="file"] { font-size: 13px; color: #4a4f57; }
.ipt-qcompete__file input[type="file"]::file-selector-button {
	margin-right: 10px; padding: 8px 12px; border: 1px solid #d7dbe3; border-radius: 8px;
	background: #f5f6f8; color: #1a1a1a; font-weight: 600; cursor: pointer;
}
.ipt-qcompete__filehint { margin: 6px 0 0; font-size: 12px; color: #1f7a4d; }

/* Bloques "Despachos" y "Retiro en Tienda" en la ficha de producto */
.ipt-shipinfo { margin: 18px 0; display: flex; flex-direction: column; gap: 10px; }
.ipt-shipinfo__item { border: 1px solid #e6e9f0; border-radius: 12px; padding: 0 16px; background: #fff; }
.ipt-shipinfo__item summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; padding: 14px 0; font-weight: 700; font-size: 15px; color: #1a1a1a; }
.ipt-shipinfo__item summary::-webkit-details-marker { display: none; }
.ipt-shipinfo__item summary::after { content: ""; width: 9px; height: 9px; margin-left: auto; border-right: 2px solid #9aa3b5; border-bottom: 2px solid #9aa3b5; transform: rotate(45deg); transition: transform .2s; }
.ipt-shipinfo__item[open] summary::after { transform: rotate(-135deg); }
.ipt-shipinfo__ico { display: inline-grid; place-items: center; flex: 0 0 auto; color: #e5305f; }
.ipt-shipinfo__ico svg { width: 20px; height: 20px; }
.ipt-shipinfo__body { padding: 0 0 14px 30px; }
.ipt-shipinfo__body p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.5; color: #5b6577; }
.ipt-shipinfo__body p:last-child { margin-bottom: 0; }

/* Contador flotante de la cotización (carrito persistente) */
.ipt-qfab { position: fixed; right: 18px; bottom: 18px; z-index: 99980; display: inline-flex; align-items: center; gap: 9px; padding: 12px 18px; border: none; border-radius: 999px; background: #e5305f; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 8px 24px rgba(229, 48, 95,.4); }
.ipt-qfab:hover { background: #c21f4c; }
.ipt-qfab__count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #fff; color: #e5305f; font-size: 13px; font-weight: 800; }
@media (max-width: 520px) { .ipt-qfab__label { display: none; } }

/* Toast "agregado": seguir vitrineando o cotizar */
.ipt-qtoast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); z-index: 99990; width: min(560px, calc(100vw - 28px)); background: #fff; border: 1px solid #e6e9f0; border-radius: 14px; box-shadow: 0 16px 48px rgba(16,24,40,.22); padding: 14px 16px; opacity: 0; transition: opacity .22s, transform .22s; }
.ipt-qtoast.is-in { opacity: 1; transform: translate(-50%, 0); }
.ipt-qtoast__msg { font-size: 14px; color: #1a1a1a; margin-bottom: 11px; line-height: 1.4; }
.ipt-qtoast__check { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #16a34a; color: #fff; font-size: 12px; font-weight: 800; vertical-align: -4px; }
.ipt-qtoast__actions { display: flex; gap: 9px; }
.ipt-qtoast__actions .ipt-qbtn { flex: 1; justify-content: center; }
/* --- Botones del flujo de cotización: contraste alto + color corporativo,
   forzados para ganarle a los estilos de botón de Blocksy (que los pintaba
   azules / gris con texto blanco). Componente aislado → !important es seguro. --- */
.ipt-qtoast .ipt-qbtn--ghost,
.ipt-qmodal .ipt-qbtn--ghost,
.ipt-qbtn--ghost {
	background: #fff !important;
	color: var(--pt-plum, #2a1522) !important;   /* texto ciruela: alto contraste sobre blanco */
	border: 1.5px solid #ecd9e2 !important;
	font-weight: 700 !important;
}
.ipt-qtoast .ipt-qbtn--ghost:hover,
.ipt-qmodal .ipt-qbtn--ghost:hover,
.ipt-qbtn--ghost:hover {
	background: #fff !important;
	color: #c21f4c !important;
	border-color: #e5305f !important;
	box-shadow: 0 4px 14px rgba(229, 48, 95, .16) !important;
}
/* Botón principal (Enviar solicitud / Solicitar cotización): magenta corporativo. */
.ipt-qtoast .ipt-qbtn--solid,
.ipt-qmodal .ipt-qbtn--solid,
#ipt-qsubmit.ipt-qbtn,
.ipt-qbtn--solid {
	background: #e5305f !important;
	border-color: #e5305f !important;
	color: #fff !important;
	font-weight: 800 !important;
}
.ipt-qtoast .ipt-qbtn--solid:hover,
.ipt-qmodal .ipt-qbtn--solid:hover,
#ipt-qsubmit.ipt-qbtn:hover,
.ipt-qbtn--solid:hover {
	background: #c21f4c !important;
	border-color: #c21f4c !important;
	color: #fff !important;
	box-shadow: 0 8px 22px rgba(229, 48, 95, .32) !important;
}

/* Selector de alcance (A/B/C) en el formulario */
.ipt-qscope { border: none; padding: 0; margin: 6px 0 2px; }
.ipt-qscope legend { font-size: 14px; font-weight: 600; color: #1a1a1a; margin-bottom: 8px; padding: 0; }
.ipt-qscope__opt { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border: 1px solid #e6e9f0; border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.ipt-qscope__opt:has(input:checked) { border-color: #e5305f; background: #fdeef3; }
.ipt-qscope__opt input { margin-top: 3px; flex: 0 0 auto; accent-color: #e5305f; }
.ipt-qscope__opt strong { display: block; font-size: 14px; color: #1a1a1a; }
.ipt-qscope__opt small { display: block; font-size: 12.5px; color: #5b6577; margin-top: 1px; }
