/* =========================================================
   PRODUCTO.PHP — ficha de producto (galería, compra, especificaciones)
   Usa los tokens --jj-* de main.css (navy + naranja).
   ========================================================= */

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

.pd-page{
	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 */
.pd-page a{ text-decoration: none; }

/* ---------- Breadcrumb ---------- */
.pd-breadcrumb{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--jj-text-soft);
	margin-bottom: 24px;
}
.pd-breadcrumb a{ color: var(--jj-text-soft); }
.pd-breadcrumb a:hover{ color: var(--jj-orange); }
.pd-breadcrumb .current{ color: var(--jj-text-invert); font-weight: 600; }

/* ---------- Hero ---------- */
.pd-hero{
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
	gap: clamp(24px, 4vw, 56px);
	align-items: start;
}

.pd-gallery{ position: sticky; top: 24px; }
.pd-main{
	background: var(--jj-white);
	border-radius: var(--jj-radius-md);
	border: 1px solid rgba(255,255,255,0.08);
	box-shadow: var(--jj-shadow-md);
	aspect-ratio: 1 / 1;
	max-height: 560px;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(16px, 3vw, 36px);
	overflow: hidden;
}
.pd-main img{
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	transition: transform var(--jj-transition);
}
.pd-main:hover img{ transform: scale(1.05); }

.pd-thumbs{ display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pd-thumb{
	width: 72px;
	height: 72px;
	padding: 6px;
	border-radius: var(--jj-radius-sm);
	background: var(--jj-white);
	border: 2px solid transparent;
	transition: border-color var(--jj-transition-fast), transform var(--jj-transition-fast);
}
.pd-thumb img{ width: 100%; height: 100%; object-fit: contain; }
.pd-thumb:hover{ transform: translateY(-2px); }
.pd-thumb.active{ border-color: var(--jj-orange); }

/* ---------- Info ---------- */
.pd-tags{ display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pd-brand, .pd-cat{
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 5px 12px;
	border-radius: 999px;
}
.pd-brand{ background: var(--jj-orange); color: var(--jj-navy); }
.pd-cat{ background: rgba(255,255,255,0.08); color: var(--jj-text-soft); }

.pd-info h1{
	color: var(--jj-text-invert);
	font-size: clamp(1.5rem, 3vw, 2.15rem);
	font-weight: 800;
	margin-bottom: 0.35em;
}
.pd-model{ color: var(--jj-text-soft); margin-bottom: 0.8em; }
.pd-model strong{ color: var(--jj-text-invert); }
.pd-summary{ color: var(--jj-text); font-size: 16px; }

.pd-fullname{
	font-size: 13px;
	color: var(--jj-text-soft);
	background: rgba(255,255,255,0.04);
	border-left: 3px solid var(--jj-orange);
	border-radius: 0 var(--jj-radius-sm) var(--jj-radius-sm) 0;
	padding: 10px 14px;
	margin: 18px 0;
}
.pd-fullname span{
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--jj-orange);
	margin-bottom: 2px;
}

.pd-highlights{ list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; }
.pd-highlights li{ position: relative; padding-left: 22px; font-size: 14.5px; }
.pd-highlights li::before{
	content: "";
	position: absolute;
	left: 2px; top: 0.6em;
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--jj-orange);
}

/* ---------- Opciones de compra ---------- */
.pd-buy{
	background: var(--jj-navy-soft);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: var(--jj-radius-md);
	padding: clamp(16px, 2.4vw, 24px);
	box-shadow: var(--jj-shadow-sm);
}
.pd-buy-row{ display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: end; margin-bottom: 18px; }
.pd-buy label{
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--jj-text-soft);
	margin-bottom: 6px;
}
.pd-buy label small{ text-transform: none; letter-spacing: 0; font-weight: 400; }

.pd-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);
}
.pd-stepper button{
	width: 42px; height: 44px;
	border: 0;
	background: transparent;
	color: var(--jj-text-invert);
	font-size: 20px;
	line-height: 1;
	transition: background-color var(--jj-transition-fast), color var(--jj-transition-fast);
}
.pd-stepper button:hover{ background: var(--jj-orange); color: var(--jj-navy); }
.pd-stepper input{
	width: 58px; height: 44px;
	border: 0;
	background: transparent;
	color: var(--jj-text-invert);
	text-align: center;
	font-weight: 700;
	font-size: 16px;
	-moz-appearance: textfield;
}
.pd-stepper input::-webkit-outer-spin-button,
.pd-stepper input::-webkit-inner-spin-button{ -webkit-appearance: none; margin: 0; }
.pd-stepper input:focus{ outline: none; }

.pd-note input{
	width: 100%;
	height: 46px;
	padding: 0 16px;
	border-radius: 999px;
	border: 1px solid rgba(255,255,255,0.18);
	background: var(--jj-bg-blue-2);
	color: var(--jj-text-invert);
	font-size: 14px;
}
.pd-note input::placeholder{ color: var(--jj-text-soft); }
.pd-note input:focus, .pd-stepper:focus-within{
	outline: none;
	border-color: var(--jj-orange);
	box-shadow: 0 0 0 3px rgba(226,121,45,0.18);
}

.pd-actions{ display: flex; flex-wrap: wrap; gap: 10px; }
.pd-btn{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px;
	border-radius: 999px;
	border: 2px solid transparent;
	font-weight: 700;
	font-size: 14px;
	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);
}
.pd-btn:hover{ transform: translateY(-2px); }
.pd-btn-primary{ background: var(--jj-orange); color: var(--jj-navy); flex: 1 1 100%; padding: 14px 22px; font-size: 15px; }
.pd-btn-primary:hover{ background: var(--jj-orange-dark); color: var(--jj-white); }
.pd-btn-outline{ border-color: var(--jj-orange); color: var(--jj-orange); background: transparent; flex: 1 1 140px; }
.pd-btn-outline:hover{ background: var(--jj-orange); color: var(--jj-navy); }
.pd-btn-wa{ border-color: rgba(255,255,255,0.22); color: var(--jj-text); background: transparent; flex: 1 1 180px; }
.pd-btn-wa:hover{ border-color: #25d366; color: #25d366; }

.pd-added{ margin: 14px 0 0; font-size: 14px; color: #7bd88f; }
.pd-added a{ color: var(--jj-orange); font-weight: 700; text-decoration: underline; }

.pd-assure{ list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; font-size: 14px; color: var(--jj-text-soft); }
.pd-assure li{ display: flex; align-items: center; gap: 10px; }
.pd-assure svg{ color: var(--jj-orange); flex: none; }

/* ---------- Navegación interna ---------- */
.pd-tabs{
	position: sticky;
	top: 0;
	z-index: 30;
	display: flex;
	gap: 8px;
	margin: 48px 0 32px;
	padding: 12px 0;
	overflow-x: auto;
	background: rgba(11,16,22,0.92);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid rgba(255,255,255,0.08);
}
.pd-tabs a{
	flex: none;
	padding: 8px 18px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	color: var(--jj-text);
	background: rgba(255,255,255,0.06);
	transition: background-color var(--jj-transition-fast), color var(--jj-transition-fast);
}
.pd-tabs a:hover{ background: var(--jj-orange); color: var(--jj-navy); }
.pd-section{ scroll-margin-top: 70px; margin-bottom: 56px; }

.pd-section h2{
	color: var(--jj-text-invert);
	font-size: clamp(1.4rem, 2.6vw, 1.9rem);
	font-weight: 800;
	display: inline-block;
	padding-bottom: 10px;
	margin-bottom: 1em;
	border-bottom: 4px solid var(--jj-orange);
}

/* ---------- Especificaciones (se adapta a cualquier cantidad de filas y grupos) ---------- */
.pd-specs{ column-count: 2; column-gap: 24px; }
.pd-spec-group{
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	page-break-inside: avoid;
	display: inline-block;
	width: 100%;
	margin: 0 0 24px;
	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);
	padding: 6px 20px 10px;
}
.pd-spec-group h3{
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--jj-orange);
	margin: 0;
	padding: 14px 0 10px;
	border-bottom: 1px solid rgba(255,255,255,0.1);
}
.pd-spec-table{ width: 100%; border-collapse: collapse; }
.pd-spec-table tr{ border-bottom: 1px solid rgba(255,255,255,0.06); }
.pd-spec-table tr:last-child{ border-bottom: 0; }
.pd-spec-table th, .pd-spec-table td{ padding: 11px 0; vertical-align: top; font-size: 14.5px; }
.pd-spec-table th{
	width: 42%;
	padding-right: 14px;
	font-weight: 500;
	color: var(--jj-text-soft);
	position: relative;
}
.pd-spec-table td{ color: var(--jj-text-invert); font-weight: 600; }

.pd-spec-list{ list-style: none; margin: 0; padding: 4px 0 6px; }
.pd-spec-list li{ padding: 11px 0 11px 20px; border-bottom: 1px solid rgba(255,255,255,0.06); position: relative; font-weight: 600; color: var(--jj-text-invert); }
.pd-spec-list li:last-child{ border-bottom: 0; }
.pd-spec-list li::before{ content: ""; position: absolute; left: 2px; top: 1.1em; width: 7px; height: 7px; border-radius: 50%; background: var(--jj-orange); }

/* Ayuda contextual "?" */
.pd-hint{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px; height: 16px;
	margin-left: 6px;
	border-radius: 50%;
	border: 1px solid var(--jj-text-soft);
	color: var(--jj-text-soft);
	font-size: 10px;
	font-weight: 700;
	cursor: help;
	vertical-align: middle;
	position: relative;
}
.pd-hint:hover, .pd-hint:focus{ border-color: var(--jj-orange); color: var(--jj-orange); outline: none; }
.pd-hint::after{
	content: attr(data-tip);
	position: absolute;
	left: -6px;
	bottom: calc(100% + 8px);
	width: max-content;
	max-width: min(280px, 72vw);
	padding: 10px 12px;
	border-radius: var(--jj-radius-sm);
	background: #0b1016;
	border: 1px solid var(--jj-orange);
	color: var(--jj-text-invert);
	font-size: 12.5px;
	font-weight: 400;
	line-height: 1.45;
	text-align: left;
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity var(--jj-transition-fast), transform var(--jj-transition-fast);
	pointer-events: none;
	z-index: 40;
}
.pd-hint:hover::after, .pd-hint:focus::after{ opacity: 1; visibility: visible; transform: translateY(0); }

.pd-empty, .pd-disclaimer{ color: var(--jj-text-soft); font-size: 13.5px; }
.pd-disclaimer{ margin-top: 4px; }

/* ---------- Características / Incluye ---------- */
.pd-two{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
.pd-two > div:only-child{ grid-column: 1 / -1; }
.pd-check, .pd-box{ list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.pd-check li, .pd-box li{
	position: relative;
	padding: 12px 16px 12px 46px;
	background: var(--jj-navy-soft);
	border: 1px solid rgba(255,255,255,0.07);
	border-radius: var(--jj-radius-sm);
	font-size: 14.5px;
}
.pd-check li::before{
	content: "";
	position: absolute; left: 16px; top: 50%;
	width: 16px; height: 8px;
	border-left: 3px solid var(--jj-orange);
	border-bottom: 3px solid var(--jj-orange);
	transform: translateY(-70%) rotate(-45deg);
}
.pd-box li::before{
	content: "";
	position: absolute; left: 17px; top: 50%;
	width: 14px; height: 14px;
	border: 2px solid var(--jj-orange);
	border-radius: 3px;
	transform: translateY(-50%);
}

/* ---------- Relacionados (carrusel, igual que "Explorar productos" en index.php) ---------- */
.pd-carousel{
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
}

/* Botones de flecha: mismas imágenes (img/scrollLeft.png / scrollRight.png) y estilo que el inicio */
.pd-carousel .scrollBtn{
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background-color: var(--jj-blue-deep);
	box-shadow: var(--jj-shadow-sm);
	cursor: pointer;
	transition: box-shadow var(--jj-transition-fast), transform var(--jj-transition-fast), opacity var(--jj-transition-fast);
}
.pd-carousel .scrollBtn:hover{ box-shadow: var(--jj-shadow-md); transform: translateY(-2px); }
.pd-carousel .scrollBtn:focus-visible{ outline: 2px solid var(--jj-orange); outline-offset: 3px; }
.pd-carousel .scrollBtn img{ width: 22px; height: 22px; }
.pd-carousel .scrollBtn.swiper-button-lock{ display: none; }   /* todo cabe: no hacen falta flechas */
.pd-carousel .scrollBtn.swiper-button-disabled{ opacity: .4; cursor: default; }

.pd-carousel .swiper{
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	overflow: hidden;
	padding: 14px 0 28px;   /* espacio para el "salto" y la sombra de la tarjeta */
}
.pd-carousel .swiper-slide{
	display: flex;
	justify-content: center;
	height: auto;
}

/* Listado.css fuerza el tamaño de .service-card con !important (rejilla del listado);
   dentro del carrusel la tarjeta debe llenar su diapositiva. */
.pd-carousel .service-card{
	width: 100% !important;
	max-width: 230px;
	height: 335px !important;
	margin: 0;
	padding: 15px;
}
.pd-carousel .service-card img{ width: 150px; height: 180px; max-width: 100%; }
.pd-carousel .service-card h3{ font-size: 13px; }

/* ---------- 404 ---------- */
.pd-missing{ text-align: center; padding: 40px 0 80px; }
.pd-missing h1{ color: var(--jj-text-invert); }

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px){
	.pd-page{ padding-top: 134px; }   /* cabecera compacta (84px) + 50px */
}
@media (max-width: 991px){
	.pd-hero{ grid-template-columns: 1fr; }
	.pd-gallery{ position: static; }
	.pd-main{ max-height: 440px; }
}
@media (max-width: 767px){
	.pd-specs{ column-count: 1; }
	.pd-two{ grid-template-columns: 1fr; }
	.pd-buy-row{ grid-template-columns: 1fr; }
}
@media (max-width: 480px){
	.pd-carousel{ gap: 6px; }
	.pd-carousel .scrollBtn{ width: 38px; height: 38px; }
	.pd-carousel .scrollBtn img{ width: 18px; height: 18px; }
	.pd-spec-table th, .pd-spec-table td{ display: block; width: 100%; padding: 0; }
	.pd-spec-table th{ padding-top: 11px; font-size: 13px; }
	.pd-spec-table td{ padding-bottom: 11px; }
}
