/* ============================================================
   Diginova Look Builder — frontend styles
   Neutral, mobile-first. Overrides via theme if needed.
   ============================================================ */

.dlb-looks-section { max-width: 1200px; margin: 0 auto; padding: 24px 16px; }

/* Filters */
.dlb-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-bottom: 28px;
}
.dlb-filter-btn {
	border: 1px solid #d8d8d8;
	background: #fff;
	color: #333;
	padding: 8px 18px;
	border-radius: 999px;
	font-size: 13px;
	letter-spacing: .04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: all .2s ease;
}
.dlb-filter-btn:hover { border-color: #111; }
.dlb-filter-btn.is-active {
	background: #111;
	color: #fff;
	border-color: #111;
}

/* Grid (Pinterest-style masonry via columns) */
.dlb-grid {
	list-style: none;
	padding: 0;
	margin: 0;
	column-count: 3;
	column-gap: 16px;
}
@media (max-width: 900px) { .dlb-grid { column-count: 2; } }
@media (max-width: 540px) { .dlb-grid { column-count: 1; } }

.dlb-grid-item {
	break-inside: avoid;
	margin: 0 0 16px;
	display: inline-block;
	width: 100%;
}
.dlb-grid-item.is-hidden { display: none; }

.dlb-card {
	display: block;
	text-decoration: none;
	color: inherit;
	background: #fafafa;
	border-radius: 6px;
	overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease;
}
.dlb-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
.dlb-card-img-wrap { position: relative; }
.dlb-card-img {
	display: block;
	width: 100%;
	height: auto;
}
.dlb-card-badge {
	position: absolute;
	bottom: 10px; left: 10px;
	background: rgba(0,0,0,.75);
	color: #fff;
	font-size: 11px;
	letter-spacing: .05em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 999px;
}
.dlb-card-body { padding: 12px 14px 16px; }
.dlb-card-title { font-size: 16px; margin: 0 0 6px; font-weight: 600; line-height: 1.3; }
.dlb-card-tags { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.dlb-tag {
	display: inline-block;
	font-size: 11px;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #666;
	padding: 2px 8px;
	border: 1px solid #e2e2e2;
	border-radius: 999px;
}

.dlb-empty { text-align: center; color: #888; padding: 60px 20px; }

/* ============================================================
   Single look — interactive hotspots
   ============================================================ */
.dlb-single-look { max-width: 1100px; margin: 0 auto; padding: 32px 16px; }
.dlb-single-header { text-align: center; margin-bottom: 24px; }
.dlb-single-title { font-size: clamp(24px, 4vw, 38px); font-weight: 600; margin: 0 0 10px; }
.dlb-single-tags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 0 0 12px; }
.dlb-single-tags .dlb-tag { text-decoration: none; }
.dlb-single-excerpt { color: #555; max-width: 640px; margin: 0 auto; line-height: 1.6; }

.dlb-single-canvas {
	position: relative;
	display: block;
	max-width: 900px;
	margin: 0 auto 40px;
	background: #f3f3f3;
	border-radius: 8px;
	overflow: hidden;
}
.dlb-single-img { display: block; width: 100%; height: auto; }
.dlb-pins-layer { position: absolute; inset: 0; pointer-events: none; }

/* Pin button */
.dlb-fpin {
	position: absolute;
	width: 24px; height: 24px;
	transform: translate(-50%, -50%);
	background: transparent;
	border: 0;
	padding: 0;
	pointer-events: auto;
	cursor: pointer;
}
.dlb-fpin-dot {
	display: block;
	width: 100%; height: 100%;
	background: #fff;
	border: 3px solid #111;
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0,0,0,.3);
	position: relative;
	z-index: 2;
}
.dlb-fpin-pulse {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: rgba(255,255,255,.6);
	animation: dlb-pulse 2s infinite ease-out;
	z-index: 1;
}
@keyframes dlb-pulse {
	0% { transform: scale(1); opacity: .6; }
	100% { transform: scale(2.4); opacity: 0; }
}
.dlb-fpin:hover .dlb-fpin-dot { background: #111; border-color: #fff; }
.dlb-fpin:focus { outline: none; }
.dlb-fpin:focus .dlb-fpin-dot { box-shadow: 0 0 0 3px rgba(0,0,0,.2); }

/* Tooltip */
.dlb-tooltip {
	position: absolute;
	bottom: calc(100% + 12px);
	left: 50%;
	transform: translateX(-50%) translateY(6px);
	width: 220px;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 12px 28px rgba(0,0,0,.18);
	padding: 10px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
	z-index: 10;
	text-align: left;
}
.dlb-tooltip::after {
	content: '';
	position: absolute;
	top: 100%; left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: #fff;
}
.dlb-fpin:hover .dlb-tooltip,
.dlb-fpin.is-open .dlb-tooltip,
.dlb-fpin:focus .dlb-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
	pointer-events: auto;
}
.dlb-tooltip-thumb { display: block; width: 100%; height: 140px; object-fit: cover; border-radius: 4px; margin-bottom: 8px; }
.dlb-tooltip-body { display: block; }
.dlb-tooltip-label { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #999; margin-bottom: 2px; }
.dlb-tooltip-name { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.dlb-tooltip-price { display: block; font-size: 13px; color: #111; margin-bottom: 8px; }
.dlb-tooltip-btn {
	display: block;
	background: #111;
	color: #fff;
	text-align: center;
	padding: 8px 12px;
	border-radius: 4px;
	text-decoration: none;
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.dlb-tooltip-btn:hover { background: #333; color: #fff; }

/* Tooltip flip if near right edge */
.dlb-fpin.is-right .dlb-tooltip { left: auto; right: 0; transform: translateX(0) translateY(6px); }
.dlb-fpin.is-right .dlb-tooltip::after { left: auto; right: 12px; transform: none; }
.dlb-fpin.is-right:hover .dlb-tooltip,
.dlb-fpin.is-right.is-open .dlb-tooltip { transform: translateX(0) translateY(0); }

/* Products list under image */
.dlb-single-products { margin-top: 32px; }
.dlb-section-title { text-align: center; font-size: 20px; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 20px; font-weight: 500; }
.dlb-products-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
}
.dlb-product-card a {
	display: block;
	text-decoration: none;
	color: inherit;
	text-align: center;
}
.dlb-product-card img { display: block; width: 100%; height: auto; border-radius: 4px; margin-bottom: 8px; }
.dlb-product-card strong { display: block; font-size: 13px; margin-bottom: 4px; }
.dlb-product-price { font-size: 13px; color: #555; }

/* Mobile: tooltips lock open on tap */
@media (max-width: 720px) {
	.dlb-tooltip { width: 180px; }
	.dlb-tooltip-thumb { height: 110px; }
}

/* ============================================================
   Vista B — Combinations on product page
   ============================================================ */
.dlb-combinations {
	max-width: 1100px;
	margin: 60px auto;
	padding: 32px 16px 0;
	border-top: 1px solid #eee;
}
.dlb-combinations-header { text-align: center; margin-bottom: 24px; }
.dlb-combinations-title {
	font-size: clamp(20px, 3vw, 28px);
	font-weight: 500;
	margin: 0 0 6px;
	letter-spacing: .02em;
}
.dlb-combinations-title em { font-style: normal; font-weight: 700; }
.dlb-combinations-sub { color: #666; margin: 0; }

.dlb-combo-tabs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: center;
	margin-bottom: 32px;
}
.dlb-combo-tab {
	border: 0;
	background: transparent;
	color: #666;
	padding: 6px 14px;
	border-bottom: 2px solid transparent;
	cursor: pointer;
	font-size: 13px;
	letter-spacing: .04em;
	text-transform: uppercase;
	transition: all .2s ease;
}
.dlb-combo-tab:hover { color: #111; }
.dlb-combo-tab.is-active {
	color: #111;
	border-bottom-color: #111;
	font-weight: 600;
}

.dlb-combo-looks {
	display: grid;
	gap: 40px;
}
.dlb-combo-look {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 24px;
	background: #fafafa;
	border-radius: 8px;
	overflow: hidden;
	transition: opacity .25s ease;
}
.dlb-combo-look.is-hidden { display: none; }
@media (max-width: 700px) { .dlb-combo-look { grid-template-columns: 1fr; } }

.dlb-combo-look-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	min-height: 320px;
}
@media (max-width: 700px) { .dlb-combo-look-media img { min-height: 220px; } }

.dlb-combo-look-body { padding: 20px 24px 24px; }
.dlb-combo-look-title { font-size: 18px; margin: 0 0 8px; font-weight: 600; }
.dlb-combo-look-title a { color: inherit; text-decoration: none; }
.dlb-combo-look-title a:hover { text-decoration: underline; }
.dlb-combo-look-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }

.dlb-combo-categories { display: flex; flex-direction: column; gap: 18px; margin-bottom: 16px; }
.dlb-combo-category-title { font-size: 13px; margin: 0 0 8px; color: #555; font-weight: 400; letter-spacing: .02em; }
.dlb-combo-category-title strong { color: #111; font-weight: 600; }

.dlb-combo-items {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 12px;
}
.dlb-combo-item a {
	display: block;
	text-decoration: none;
	color: inherit;
	text-align: center;
}
.dlb-combo-item img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
	margin-bottom: 6px;
	transition: transform .2s ease;
}
.dlb-combo-item a:hover img { transform: scale(1.02); }
.dlb-combo-item strong { display: block; font-size: 12px; line-height: 1.3; margin-bottom: 2px; }
.dlb-combo-item-price { font-size: 12px; color: #555; }

.dlb-combo-cta {
	display: inline-block;
	margin-top: 8px;
	color: #111;
	text-decoration: none;
	font-size: 13px;
	letter-spacing: .04em;
	text-transform: uppercase;
	border-bottom: 1px solid currentColor;
	padding-bottom: 2px;
}
.dlb-combo-cta:hover { color: #555; }

/* ============================================================
   Virtual Try-On — carrusel sobre el Single Look (Fase 6e)
   ============================================================ */
.dlb-single-img {
	transition: opacity .25s ease;
}
.dlb-single-img.dlb-img-fading {
	opacity: 0;
}

/* Loader sobre el canvas mientras se genera */
.dlb-tryon-loader {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(255,255,255,.55);
	backdrop-filter: blur(2px);
	z-index: 20;
}
.dlb-single-canvas.dlb-is-generating .dlb-tryon-loader {
	display: flex;
}
.dlb-tryon-spinner {
	width: 38px;
	height: 38px;
	border: 3px solid rgba(0,0,0,.15);
	border-top-color: #111;
	border-radius: 50%;
	animation: dlb-spin .8s linear infinite;
}
@keyframes dlb-spin {
	to { transform: rotate(360deg); }
}

.dlb-tryon {
	max-width: 900px;
	margin: 0 auto 40px;
	padding: 0 16px;
	text-align: center;
}
.dlb-tryon-hint {
	color: #666;
	margin: -8px 0 20px;
	font-size: 14px;
}
.dlb-tryon-carousel {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding: 4px 2px 12px;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
}
.dlb-tryon-item {
	flex: 0 0 auto;
	width: 96px;
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
	scroll-snap-align: start;
	text-align: center;
}
.dlb-tryon-thumb {
	display: block;
	width: 96px;
	height: 96px;
	border-radius: 8px;
	overflow: hidden;
	border: 2px solid #e2e2e2;
	background: #f3f3f3;
	transition: border-color .2s ease, transform .2s ease;
}
.dlb-tryon-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.dlb-tryon-item:hover .dlb-tryon-thumb {
	border-color: #111;
	transform: translateY(-2px);
}
.dlb-tryon-item.is-active .dlb-tryon-thumb {
	border-color: #111;
	box-shadow: 0 0 0 2px #111;
}
.dlb-tryon-item.is-loading .dlb-tryon-thumb {
	opacity: .5;
	animation: dlb-pulse-fade 1s ease-in-out infinite;
}
@keyframes dlb-pulse-fade {
	0%, 100% { opacity: .5; }
	50% { opacity: .85; }
}
.dlb-tryon-name {
	display: block;
	font-size: 11px;
	line-height: 1.3;
	margin-top: 6px;
	color: #555;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.dlb-tryon-item.is-active .dlb-tryon-name {
	color: #111;
	font-weight: 600;
}
.dlb-tryon-status {
	min-height: 20px;
	margin: 6px 0 0;
	font-size: 13px;
	color: #888;
}

@media (max-width: 540px) {
	.dlb-tryon-item, .dlb-tryon-thumb { width: 80px; }
	.dlb-tryon-thumb { height: 80px; }
}
