﻿/* ══════════════════════════════════════════════════
   JURÔ — RELACIONADOS: cards idênticos à loja
   (size picker + hover effect)
══════════════════════════════════════════════════ */

.related-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	margin-top: 40px;
}
@media (max-width: 1024px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px)  { .related-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* ── Entrada animada ── */
.rel-card {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity .5s ease, transform .5s ease;
}
.rel-card.revealed { opacity: 1; transform: translateY(0); }

/* ── Wrapper da imagem ── */
.rel-card .item-visual {
	position: relative;
	overflow: hidden;
	border-radius: 4px;
	background: var(--g200);
	aspect-ratio: 3 / 4;
	cursor: pointer;
}

/* ── Link cobre toda a área ── */
.rel-card .item-link {
	display: block;
	width: 100%;
	height: 100%;
}

/* ── Imagem principal ── */
.rel-card .main-img {
	position: absolute;
	inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform .52s cubic-bezier(.25,.46,.45,.94), opacity .36s ease;
	will-change: transform;
}
.rel-card .item-visual:hover .main-img {
	transform: scale(1.06);
	opacity: 0;
}

/* ── Imagem de hover ── */
.rel-card .hover-img {
	position: absolute;
	inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	opacity: 0;
	transform: scale(1.04);
	transition: opacity .36s ease, transform .52s cubic-bezier(.25,.46,.45,.94);
	will-change: opacity, transform;
}
.rel-card .item-visual:hover .hover-img {
	opacity: 1;
	transform: scale(1);
}

/* ── Overlay escuro degradê ── */
.rel-card .item-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(26,17,9,.72) 0%, rgba(26,17,9,.18) 45%, transparent 100%);
	opacity: 0;
	transition: opacity .32s ease;
	pointer-events: none;
	z-index: 2;
}
.rel-card .item-visual:hover .item-overlay { opacity: 1; }

/* ── Badge ── */
.rel-card .item-tag {
	position: absolute;
	top: 12px; left: 12px;
	z-index: 4;
	font-family: var(--fn-b, 'BritannicBQ', sans-serif);
	font-size: 9px; font-weight: 700;
	letter-spacing: .1em; text-transform: uppercase;
	padding: 4px 10px; border-radius: 2px;
	color: var(--white); background: var(--burg);
}

/* ── Dots estáticos de tamanho ── */
.rel-card .item-sizes {
	position: absolute;
	bottom: 56px; left: 0; right: 0;
	z-index: 3;
	display: flex;
	gap: 4px;
	justify-content: center;
	flex-wrap: wrap;
	padding: 0 10px;
	opacity: 1;
	transition: opacity .2s ease;
}
.rel-card .item-visual:hover .item-sizes { opacity: 0; pointer-events: none; }

.rel-card .size-dot {
	font-family: var(--fn-b, 'BritannicBQ', sans-serif);
	font-size: 9px; font-weight: 700;
	letter-spacing: .06em;
	padding: 3px 6px;
	border-radius: 2px;
	background: rgba(255,255,255,.15);
	color: rgba(255,255,255,.8);
	backdrop-filter: blur(4px);
	border: 1px solid rgba(255,255,255,.2);
	line-height: 1;
}
.rel-card .size-dot.oos { opacity: .3; text-decoration: line-through; }

/* ── Área de ações (sobe no hover) ── */
.rel-card .item-quick-actions {
	position: absolute;
	bottom: 0; left: 0; right: 0;
	z-index: 5;
	padding: 10px;
	transform: translateY(100%);
	opacity: 0;
	transition: transform .3s cubic-bezier(.34,1.06,.64,1), opacity .25s ease;
}
.rel-card .item-visual:hover .item-quick-actions {
	transform: translateY(0);
	opacity: 1;
}

/* ── Size picker — idêntico ao archive-product.php ── */
.rel-card .juro-size-picker {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
}
.rel-card .jsp-hint {
	font-size: 8px; font-weight: 700;
	letter-spacing: .12em; text-transform: uppercase;
	color: rgba(255,255,255,.55);
	white-space: nowrap; flex-shrink: 0; line-height: 1;
}
.rel-card .jsp-sizes {
	display: flex;
	gap: 3px;
	flex: 1;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
	align-items: center;
	padding: 2px 0;
}
.rel-card .jsp-sizes::-webkit-scrollbar { display: none; }

.rel-card .jsp-opt {
	background: rgba(255,255,255,.1);
	border: 1px solid rgba(255,255,255,.28);
	color: rgba(255,255,255,.88);
	font-family: inherit;
	font-size: 9px; font-weight: 700;
	letter-spacing: .08em;
	padding: 5px 7px;
	border-radius: 2px;
	cursor: pointer;
	white-space: nowrap; line-height: 1;
	flex-shrink: 0;
	transition: background .16s, border-color .16s, color .16s, transform .14s;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.rel-card .jsp-opt:hover:not(.oos):not([disabled]) {
	background: rgba(255,255,255,.26);
	border-color: rgba(255,255,255,.7);
	transform: translateY(-1px);
}
.rel-card .jsp-opt.selected {
	background: #fff !important;
	color: #3b0a18 !important;
	border-color: #fff !important;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,.22);
}
.rel-card .jsp-opt.oos,
.rel-card .jsp-opt[disabled] {
	opacity: .3; cursor: not-allowed; text-decoration: line-through;
}

/* ── Botão sacola ── */
.rel-card .jsp-add {
	width: 32px; height: 32px;
	border-radius: 50%;
	border: 1.5px solid rgba(255,255,255,.22);
	background: rgba(255,255,255,.07);
	color: rgba(255,255,255,.25);
	display: flex; align-items: center; justify-content: center;
	cursor: not-allowed;
	flex-shrink: 0;
	font-size: 12px;
	transition: background .22s cubic-bezier(.34,1.56,.64,1),
	            border-color .22s, color .22s,
	            transform .22s cubic-bezier(.34,1.56,.64,1),
	            box-shadow .22s;
}
.rel-card .jsp-add:not([disabled]) {
	background: #fff;
	border-color: #fff;
	color: #3b0a18;
	cursor: pointer;
	animation: relJspActivate .42s cubic-bezier(.34,1.56,.64,1) both;
}
.rel-card .jsp-add:not([disabled]):hover {
	transform: scale(1.13);
	box-shadow: 0 5px 18px rgba(0,0,0,.28);
}
.rel-card .jsp-add:not([disabled]):active { transform: scale(.93); }
.rel-card .jsp-add.loading {
	pointer-events: none; opacity: .65;
	animation: relJspSpin .75s linear infinite !important;
}
@keyframes relJspActivate {
	0%   { transform: scale(.7); opacity: 0; }
	55%  { transform: scale(1.1); }
	100% { transform: scale(1);  opacity: 1; }
}
@keyframes relJspSpin { to { transform: rotate(360deg); } }

/* ── Botão produto simples ── */
.rel-card .btn-quick-add {
	display: flex;
	align-items: center; justify-content: center;
	gap: 8px; width: 100%;
	padding: 10px 16px; border-radius: 3px;
	background: rgba(255,255,255,.92);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: var(--burg);
	font-family: var(--fn-b, 'BritannicBQ', sans-serif);
	font-size: 11px; font-weight: 700;
	letter-spacing: .1em; text-transform: uppercase;
	text-decoration: none; border: none;
	cursor: pointer;
	transition: background .2s ease, color .2s ease;
}
.rel-card .btn-quick-add:hover { background: var(--burg); color: var(--white); }

/* ── Info abaixo da imagem ── */
.rel-card .item-details { padding: 12px 2px 0; }
.rel-card .item-category {
	display: block;
	font-family: var(--fn-b, 'BritannicBQ', sans-serif);
	font-size: 9px; font-weight: 700;
	letter-spacing: .14em; text-transform: uppercase;
	color: var(--rose); margin-bottom: 4px;
}
.rel-card .item-name {
	font-family: var(--fn-name, 'Albert Sans', sans-serif);
	font-size: clamp(14px, 1.2vw, 17px);
	font-weight: 400; line-height: 1.25;
	text-transform: uppercase;
	letter-spacing: .04em;
	margin: 0 0 6px;
}
.rel-card .item-name a {
	color: var(--ink); text-decoration: none;
	transition: color .18s ease;
}
.rel-card .item-name a:hover { color: var(--burg); }
.rel-card .item-price { font-size: 14px; color: var(--burg); font-weight: 600; }

/* ── Wrapper da imagem principal ── */
.gallery-main {
	position: relative;
	overflow: hidden;
	cursor: zoom-in;
}

/* ── Overlay escuro que aparece no hover ── */
.gallery-zoom-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0);
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	transition: background 0.28s ease;
	z-index: 4;
	border-radius: inherit;
}

/* ── Ícone da lupa ── */
.gallery-zoom-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(255,255,255,0.92);
	color: var(--burg, #7B2D3E);
	font-size: 24px;
	box-shadow: 0 6px 28px rgba(0,0,0,0.22);
	opacity: 0;
	transform: scale(0.72);
	transition: opacity 0.26s ease, transform 0.26s cubic-bezier(0.34,1.56,0.64,1);
}
.gallery-main:hover .gallery-zoom-overlay { background: rgba(0,0,0,0.14); }
.gallery-main:hover .gallery-zoom-icon    { opacity: 1; transform: scale(1); }

/* ── Imagem principal: transição suave ao trocar ── */
#galleryMain {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: opacity 0.22s ease;
}
#galleryMain.is-switching { opacity: 0; }

/* ── Thumbnails ── */
.g-thumb {
	cursor: pointer;
	transition: opacity 0.18s ease, border-color 0.18s ease;
}
.g-thumb:not(.active)       { opacity: 0.55; }
.g-thumb:not(.active):hover { opacity: 0.85; }
.g-thumb.active             { opacity: 1; }

/* ══ LIGHTBOX ══════════════════════════════════════════════ */
#juroLightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex !important;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}
#juroLightbox.lb-open {
	opacity: 1;
	pointer-events: all;
}

#juroLightboxBackdrop {
	position: absolute;
	inset: 0;
	background: rgba(10,6,4,0.92);
	cursor: zoom-out;
}

/* ── Imagem dentro do lightbox ── */
#juroLightboxImgWrap {
	position: relative;
	z-index: 2;
	max-width: 90vw;
	max-height: 88vh;
	display: flex;
	align-items: center;
	justify-content: center;
}
#juroLightboxImg {
	max-width: 90vw;
	max-height: 88vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 24px 80px rgba(0,0,0,0.6);
	transition: opacity 0.22s ease, transform 0.22s ease;
	display: block;
}
#juroLightboxImg.lb-img-switching {
	opacity: 0;
	transform: scale(0.96);
}

/* ── Spinner ── */
#juroLightboxSpinner {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 28px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}
#juroLightboxSpinner.lb-loading { opacity: 1; }

/* ── Botão fechar ── */
#juroLightboxClose {
	position: absolute;
	top: 20px;
	right: 24px;
	z-index: 3;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: rgba(255,255,255,0.12);
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease;
}
#juroLightboxClose:hover {
	background: rgba(255,255,255,0.25);
	transform: scale(1.1);
}

/* ── Botões prev / next ── */
#juroLightboxPrev,
#juroLightboxNext {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: none;
	background: rgba(255,255,255,0.12);
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease;
}
#juroLightboxPrev { left: 20px; }
#juroLightboxNext { right: 20px; }
#juroLightboxPrev:hover,
#juroLightboxNext:hover {
	background: rgba(255,255,255,0.28);
}
#juroLightboxPrev:disabled,
#juroLightboxNext:disabled {
	opacity: 0.25;
	cursor: default;
}

/* ── Contador (ex: 2 / 5) ── */
#juroLightboxCounter {
	position: absolute;
	bottom: 22px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	color: rgba(255,255,255,0.65);
	font-size: 13px;
	font-family: var(--fn-b, 'BritannicBQ', sans-serif);
	letter-spacing: 0.08em;
	user-select: none;
}

@media (max-width: 600px) {
	#juroLightboxPrev { left: 8px; }
	#juroLightboxNext { right: 8px; }
	#juroLightboxClose { top: 12px; right: 12px; }
}

/* ── Texto do modal de tamanhos (extraído do inline) ── */
.size-modal-copy {
	font-family: var(--fn-b);
	font-size: 15px;
	color: #7A6658;
	margin-bottom: 24px;
	line-height: 1.7;
}

.size-modal-note {
	font-family: var(--fn-head);
	font-size: 9px;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: #A09080;
	margin-top: 20px;
}