/* =========================================================
   COTIZACION.PHP — carrito de cotización
   ========================================================= */

html, body.qt-body{ min-height: 100%; }
body.qt-body{
	background: var(--jj-bg-light) !important;
	color: var(--jj-text);
	font-family: 'Inter', Arial, sans-serif;
	margin: 0;
	display: flex;
	flex-direction: column;
}

.qt-page{
	flex: 1 0 auto;
	width: 100%;
	max-width: var(--jj-container);
	margin: 0 auto;
	padding: 170px clamp(16px, 4vw, 48px) 64px;
	color: var(--jj-text);
}

/* Bootstrap subraya los enlaces por defecto: aquí no */
.qt-page a{ text-decoration: none; }

.qt-head h1{
	color: var(--jj-text-invert);
	font-size: clamp(1.8rem, 3.4vw, 2.5rem);
	font-weight: 800;
	display: inline-block;
	padding-bottom: 10px;
	border-bottom: 4px solid var(--jj-orange);
	margin-bottom: 0.5em;
}
.qt-head p{ color: var(--jj-text-soft); max-width: 70ch; margin-bottom: 32px; }

/* ---------- Botones ---------- */
.qt-btn{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 24px;
	border-radius: 999px;
	border: 2px solid transparent;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--jj-transition-fast), color var(--jj-transition-fast),
	            border-color var(--jj-transition-fast), transform var(--jj-transition-fast);
}
.qt-btn:hover{ transform: translateY(-2px); }
.qt-btn:disabled{ opacity: 0.6; cursor: wait; transform: none; }
.qt-block{ width: 100%; }
.qt-btn-primary{ background: var(--jj-orange); color: var(--jj-navy); }
.qt-btn-primary:hover{ background: var(--jj-orange-dark); color: var(--jj-white); }
.qt-btn-outline{ border-color: var(--jj-orange); color: var(--jj-orange); background: transparent; }
.qt-btn-outline:hover{ background: var(--jj-orange); color: var(--jj-navy); }
.qt-btn-wa{ border-color: rgba(255,255,255,0.22); color: var(--jj-text); background: transparent; }
.qt-btn-wa:hover{ border-color: #25d366; color: #25d366; }

.qt-link-btn{
	background: none;
	border: 0;
	padding: 0;
	color: var(--jj-text-soft);
	font-size: 14px;
	text-decoration: underline;
}
.qt-link-btn:hover{ color: var(--jj-orange); }

/* ---------- Vacío ---------- */
.qt-empty{
	text-align: center;
	padding: 56px 20px 72px;
	background: var(--jj-navy-soft);
	border: 1px dashed rgba(255,255,255,0.18);
	border-radius: var(--jj-radius-md);
}
.qt-empty svg{ margin: 0 auto 14px; color: var(--jj-orange); }
.qt-empty h2{ color: var(--jj-text-invert); font-size: 1.5rem; }
.qt-empty p{ color: var(--jj-text-soft); }

/* ---------- Layout ---------- */
.qt-layout{
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
	gap: clamp(20px, 3vw, 40px);
	align-items: start;
}

.qt-list-head{ display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.qt-list-head h2{ color: var(--jj-text-invert); font-size: 1.3rem; font-weight: 700; margin: 0; }
.qt-list-head h2 span{ color: var(--jj-orange); }

.qt-items{ list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.qt-item{
	display: grid;
	grid-template-columns: 104px minmax(0, 1fr) auto;
	gap: 18px;
	align-items: center;
	padding: 14px;
	background: var(--jj-navy-soft);
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: var(--jj-radius-md);
	box-shadow: var(--jj-shadow-sm);
	transition: border-color var(--jj-transition-fast);
}
.qt-item:hover{ border-color: rgba(226,121,45,0.55); }

.qt-thumb{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 104px;
	height: 104px;
	padding: 8px;
	background: var(--jj-white);
	border-radius: var(--jj-radius-sm);
}
.qt-thumb img{ max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

.qt-info{ display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.qt-brand{ font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--jj-orange); }
.qt-name{ color: var(--jj-text-invert); font-weight: 700; font-size: 15px; line-height: 1.35; }
.qt-name:hover{ color: var(--jj-orange); }
.qt-model{ font-size: 12.5px; color: var(--jj-text-soft); }

.qt-controls{ display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.qt-stepper{
	display: inline-flex;
	align-items: center;
	border: 1px solid rgba(255,255,255,0.18);
	border-radius: 999px;
	overflow: hidden;
	background: var(--jj-bg-blue-2);
}
.qt-stepper button{
	width: 36px; height: 38px;
	border: 0;
	background: transparent;
	color: var(--jj-text-invert);
	font-size: 18px;
	line-height: 1;
	transition: background-color var(--jj-transition-fast), color var(--jj-transition-fast);
}
.qt-stepper button:hover{ background: var(--jj-orange); color: var(--jj-navy); }
.qt-stepper input{
	width: 52px; height: 38px;
	border: 0;
	background: transparent;
	color: var(--jj-text-invert);
	text-align: center;
	font-weight: 700;
	-moz-appearance: textfield;
}
.qt-stepper input::-webkit-outer-spin-button,
.qt-stepper input::-webkit-inner-spin-button{ -webkit-appearance: none; margin: 0; }
.qt-stepper input:focus{ outline: none; }
.qt-stepper:focus-within, .qt-note:focus{
	outline: none;
	border-color: var(--jj-orange);
	box-shadow: 0 0 0 3px rgba(226,121,45,0.18);
}

.qt-note{
	flex: 1 1 180px;
	min-width: 0;
	height: 40px;
	padding: 0 14px;
	border-radius: 999px;
	border: 1px solid rgba(255,255,255,0.14);
	background: var(--jj-bg-blue-2);
	color: var(--jj-text-invert);
	font-size: 13.5px;
}
.qt-note::placeholder{ color: var(--jj-text-soft); }

.qt-remove{
	width: 40px; height: 40px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,0.14);
	background: transparent;
	color: var(--jj-text-soft);
	transition: background-color var(--jj-transition-fast), color var(--jj-transition-fast), border-color var(--jj-transition-fast);
}
.qt-remove:hover{ background: #c0392b; border-color: #c0392b; color: #fff; }

.qt-more{
	display: inline-block;
	margin-top: 18px;
	font-weight: 700;
	color: var(--jj-orange);
}
.qt-more:hover{ color: var(--jj-white); }

/* ---------- Formulario lateral ---------- */
.qt-side{ position: sticky; top: 24px; }
.qt-form{
	background: var(--jj-navy-soft);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: var(--jj-radius-md);
	box-shadow: var(--jj-shadow-md);
	padding: clamp(18px, 2.6vw, 28px);
}
.qt-form h2{ color: var(--jj-text-invert); font-size: 1.3rem; font-weight: 700; margin-bottom: 14px; }

.qt-summary{
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}
.qt-summary span{
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(226,121,45,0.14);
	color: var(--jj-orange);
	font-weight: 700;
	font-size: 13px;
}

.qt-field{ margin-bottom: 14px; }
.qt-field label{
	display: block;
	margin-bottom: 5px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--jj-text-soft);
}
.qt-field label small{ text-transform: none; letter-spacing: 0; font-weight: 400; }
.qt-field input, .qt-field textarea{
	width: 100%;
	padding: 11px 14px;
	border-radius: 10px;
	border: 1px solid rgba(255,255,255,0.16);
	background: var(--jj-bg-blue-2);
	color: var(--jj-text-invert);
	font-size: 15px;
	font-family: inherit;
}
.qt-field textarea{ resize: vertical; min-height: 84px; }
.qt-field input:focus, .qt-field textarea:focus{
	outline: none;
	border-color: var(--jj-orange);
	box-shadow: 0 0 0 3px rgba(226,121,45,0.18);
}
.qt-hp{ position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.qt-error{
	margin: 0 0 12px;
	padding: 10px 14px;
	border-radius: var(--jj-radius-sm);
	background: rgba(192,57,43,0.16);
	border: 1px solid rgba(192,57,43,0.6);
	color: #ffb4a8;
	font-size: 14px;
}
.qt-form .qt-btn + .qt-btn{ margin-top: 10px; }
.qt-legal{ margin: 14px 0 0; font-size: 12.5px; color: var(--jj-text-soft); }

/* ---------- Confirmación ---------- */
.qt-done{
	max-width: 640px;
	margin: 0 auto;
	text-align: center;
	background: var(--jj-navy-soft);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: var(--jj-radius-md);
	box-shadow: var(--jj-shadow-md);
	padding: clamp(24px, 4vw, 48px);
}
.qt-done-icon{
	width: 68px; height: 68px;
	margin: 0 auto 16px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: var(--jj-orange);
	color: var(--jj-navy);
	font-size: 34px;
	font-weight: 800;
}
.qt-done h2{ color: var(--jj-text-invert); font-weight: 800; }
.qt-done p{ color: var(--jj-text); }
#qtDoneRef{ font-weight: 700; color: var(--jj-orange); font-size: 1.1rem; }
.qt-done-list{ list-style: none; margin: 20px 0; padding: 14px 18px; text-align: left; background: rgba(255,255,255,0.04); border-radius: var(--jj-radius-sm); display: grid; gap: 6px; font-size: 14.5px; }
.qt-done-list strong{ color: var(--jj-orange); }
.qt-done-actions{ display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- Responsive ---------- */
@media (max-width: 991px){
	.qt-layout{ grid-template-columns: 1fr; }
	.qt-side{ position: static; }
}
@media (max-width: 575px){
	.qt-item{ grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
	.qt-thumb{ width: 72px; height: 72px; padding: 5px; }
	.qt-remove{ grid-column: 2; justify-self: end; margin-top: -4px; }
	.qt-thumb{ align-self: start; }
	.qt-controls{ flex-direction: column; align-items: stretch; }
	.qt-note{ flex: 0 0 auto; width: 100%; }
	.qt-stepper{ align-self: flex-start; }
	.qt-list-head{ flex-wrap: wrap; }
}
@media (max-width: 1199.98px){
	.qt-page{ padding-top: 134px; }   /* cabecera compacta (84px) + 50px */
}
