/* ===== LGD Product Quiz 2.0 ===== */
.lgdq-quiz {
	width: 100%;
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #222;
}
.lgdq-quiz * { box-sizing: border-box; }

.lgdq-tpl-finder { align-items: stretch; gap: 0; max-width: none; }
.lgdq-tpl-finder .diamond-finder-main {
  position: relative;
  flex: inherit;
  min-width: 1120px;
  border: 1px solid #eee;
  border-radius: 20px;
  overflow: hidden;
}
.lgdq-tpl-finder .diamond-finder-side {
  flex: 0 0 498px;
  width: 498px;
  max-width: 498px;
  border-left: 1px solid #eee;
  background: #fafafa;
    background-position-x: 0%;
    background-position-y: 0%;
    background-image: none;
    background-size: auto;
  min-height: 450px;
  background-image: url('https://lgd.net.au/wp-content/themes/lgdapp/assets/banners/quiz-side-bg.png');
  background-size: cover;
  background-position: bottom;
  border-bottom-right-radius: 20px;
  border-top-right-radius: 20px;
}

/* ---------------- AJAX loader between pages ---------------- */
.lgdq-ajax-loader {
	position: absolute;
	inset: 0;
	z-index: 50;
	background: rgba(255, 255, 255, .86);
	backdrop-filter: blur(2px);
	display: none;
	align-items: center;
	justify-content: center;
	text-align: center;
	border-radius: 20px;
}
.lgdq-ajax-loader.active { display: flex; }
.lgdq-loader-spinner {
	width: 54px;
	height: 54px;
	margin: 0 auto 14px;
	border-radius: 50%;
	border: 4px solid #eee;
	border-top-color: #591E72;
	animation: lgdq-spin .8s linear infinite;
}
@keyframes lgdq-spin { to { transform: rotate(360deg); } }
.lgdq-loader-text { color: #666; font-weight: 600; letter-spacing: .3px; }

.diamond-finder-wrap { 
    position: relative; 
    display: flex; 
    background: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    box-shadow: rgba(0, 0, 0, 0.1) 0 4px 6px -1px, rgba(0, 0, 0, 0.06) 0 2px 4px -1px !important;
}

/* ---------------- Pages + transitions ---------------- */
.lgdq-pages { position: relative; min-height: 480px; }
.lgdq-page { display: none; min-height: 480px; }
.lgdq-page.active { display: block; }
.lgdq-page.active { animation: lgdq-fade-in .32s ease; }
@keyframes lgdq-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------------- Header ---------------- */
.header-finder-wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 15px 30px;
	border-bottom: 1px solid #eee;
	background: #fff;
}
.header-finder-wrap h5 { margin: 0; font-weight: 500; color: #888; }
.header-finder-wrap h2 { margin: 0; }
.lgdq-view-toggle { display: none; gap: 0; border: 1px solid #ddd; border-radius: 10px; overflow: hidden; }
.lgdq-quiz.lgdq-on-results .lgdq-view-toggle { display: flex; }
.lgdq-view-toggle .lgdq-view-btn {
	height: 40px;
	padding: 0 18px;
	font-size: 17px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #591E72;
	color: #fff;
	cursor: pointer;
}
.lgdq-view-toggle .lgdq-view-btn.active { background: #fff; color: #591E72; }

/* ---------------- Intro page ---------------- */
.diamond-finder-intro { min-height: 380px; display: flex; align-items: center; padding: 30px; background: #fff; }
.intro-finder-inner { max-width: 640px; }
.lgdq-btn-content {
	height: 40px;
	padding: 0 30px;
	background: #591E72;
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	border: 0;
	cursor: pointer;
	font-weight: 600;
}
.lgdq-btn-content:hover { background: #45205a; }

/* ---------------- About You page ---------------- */
.diamond-finder-about { padding: 28px 30px; background: #fff; }
.lgdq-about-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 18px 0; }
.lgdq-field { display: block; font-weight: 600; font-size: 13px; }
.lgdq-field span { display: block; margin-bottom: 5px; }
.lgdq-field input, .lgdq-field select {
	display: block; width: 100%; margin-top: 4px; padding: 11px 12px;
	border: 1px solid #d1d5db; border-radius: 10px; font-size: 15px; font-weight: 400; background: #fff;
}
.lgdq-about-question { margin: 22px 0 8px; }
.lgdq-about-q-title { margin: 0 0 12px; font-size: 17px; }

/* ---------------- Options / answers ---------------- */
.lgdq-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.lgdq-option { cursor: pointer; }
.lgdq-option input { position: absolute; opacity: 0; pointer-events: none; }
.lgdq-card {
	position: relative;
	display: flex; flex-direction: column; align-items: center; gap: 8px;
	padding: 12px; border: 2px solid #e5e7eb; border-radius: 14px;
	background: #fff; text-align: center; transition: all .2s ease; height: 100%;
}
.lgdq-option input:checked + .lgdq-card { border-color: #591E72; box-shadow: 0 6px 18px rgba(89, 30, 114, .16); }
.lgdq-media { width: 100%; height: 100px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 10px; background: #f7f7fa; }
.lgdq-media-img { width: 100%; height: 100%; object-fit: cover; }
.lgdq-media-ph { font-size: 34px; line-height: 1; }
.lgdq-opt-label { font-size: 13px; font-weight: 600; color: #1f2937; }
.lgdq-check {
	position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%;
	background: #591E72; color: #fff; display: none; align-items: center; justify-content: center; font-size: 11px;
}
.lgdq-option input:checked + .lgdq-card .lgdq-check { display: flex; }

/* ---------------- Shape SVG ---------------- */
.shp-svg { width: 44px; height: 44px; fill: #fff; stroke: #591E72; stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }
.shp-svg .gem-outline { stroke-width: 1.6; }
.shp-svg .gem-table { stroke-width: 1.1; }
.shp-svg .gem-facet { stroke-width: .8; opacity: .75; }

/* ---------------- Step info + question + progress parts ---------------- */
.finder-questions-wrap { padding: 20px 30px 12px; border-bottom: 1px solid #f1f1f1; background: #fff; }
.stepnum { display: flex; align-items: center; font-weight: 600; color: #591E72; font-size: 14px; margin-bottom: 8px; }
.lgdq-question-wrap { margin-top: 8px; }
.lgdq-step-heading { font-size: 19px; margin: 0 0 4px; }
.lgdq-question { margin: 0 0 6px; font-size: 15px; color: #6b7280; }

.lgdq-progress-bar { padding: 10px 30px; border-top: 1px solid #eee; background: #fff; }

/* straight */
.lgdq-progress-straight .lgdq-progress-track, .lgdq-progress-round-square .lgdq-progress-track {
	position: relative; height: 10px; background: #eee; border-radius: 999px; overflow: hidden;
}
.lgdq-progress-straight .lgdq-progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, #591E72, #d73aed); border-radius: 999px; transition: width .45s ease; }

/* round-square segments */
.lgdq-progress-round-square .lgdq-progress-track { height: 14px; border-radius: 6px; }
.lgdq-progress-round-square .lgdq-progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, #591E72, #d73aed); transition: width .45s ease; }

/* round ring */
.lgdq-progress-round { display: flex; align-items: center; gap: 16px; }
.lgdq-progress-ring { position: relative; width: 64px; height: 64px; flex: 0 0 64px; }
.lgdq-ring-svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.lgdq-ring-bg { fill: none; stroke: #eee; stroke-width: 7; }
.lgdq-ring-fill { fill: none; stroke: #591E72; stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset .45s ease; }
.lgdq-ring-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #591E72; }

.lgdq-progress-segments { display: flex; gap: 6px; flex-wrap: wrap; }
.lgdq-progress-segments .lgdq-progress-step {
	width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid #d6d3de;
	color: #9b97a6; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; transition: all .3s ease;
}
.lgdq-progress-round-square .lgdq-progress-segments .lgdq-progress-step { border-radius: 8px; }
.lgdq-progress-segments .lgdq-progress-step.done { background: #591E72; border-color: #591E72; color: #fff; }
.lgdq-progress-segments .lgdq-progress-step.current { border-color: #591E72; color: #591E72; box-shadow: 0 0 0 4px rgba(89,30,114,.18); transform: scale(1.12); }
.lgdq-step-counter { font-weight: 600; font-size: 13px; color: #888; }

/* ---------------- Body / answers ---------------- */
.body-finder-wrap { padding: 24px 30px; min-height: 220px; background: #fff; }

/* ---------------- Nav ---------------- */
.footer-finder-wrap { justify-content: space-between; background: #fff; border-top: 1px solid #eee; padding: 16px 30px; }
.lgdq-nav { display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.lgdq-btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 12px 22px; border: none; border-radius: 999px; cursor: pointer;
	font-weight: 600; font-size: 15px; text-decoration: none; transition: all .2s ease;
}
.lgdq-btn i { font-size: 12px; }
.lgdq-next { background: #591E72; color: #fff; }
.lgdq-next:hover { background: #45205a; }
.lgdq-prev { background: #eef0f4; color: #1f2937; }
.lgdq-prev:hover { background: #e2e5ec; }
.lgdq-btn:disabled,
.lgdq-btn.lgdq-btn-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.lgdq-btn:disabled:hover,
.lgdq-btn.lgdq-btn-disabled:hover { background: #591E72; }
.lgdq-error { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; font-size: 14px; font-weight: 500; }
.lgdq-error i { margin-right: 6px; }

/* ---------------- Review page ---------------- */
.diamond-finder-review { padding: 28px 30px; background: #fff; }
.lgdq-review-list { margin: 18px 0; border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lgdq-review-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 16px; border-bottom: 1px solid #f1f1f1; font-size: 14px; }
.lgdq-review-row:last-child { border-bottom: 0; }
.lgdq-review-q { color: #666; font-weight: 600; }
.lgdq-review-a { color: #111; text-align: right; }

/* ---------------- Results ---------------- */
.diamond-finder-results { padding: 24px 30px; background: #fff; }
.lgdq-results-head { margin-bottom: 14px; }
.lgdq-results-title { margin: 0 0 4px; font-size: 21px; }
.lgdq-results-personal { margin: 0 0 12px; color: #6b7280; }
.lgdq-loading { padding: 24px; text-align: center; color: #4b5563; }
.lgdq-summary { font-weight: 600; margin-bottom: 12px; font-size: 14px; }
.lgdq-no-results { padding: 20px; background: #f3f4f6; border-radius: 12px; color: #6b7280; }

/* GRID — 4 equal columns, 3 equal rows (12 products) */
.lgdq-results-grid {
	display: none;
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: repeat(3, auto);
	gap: 0;
}
.view-grid .lgdq-results-grid { display: grid; }
.lgdq-card-product { border: 1px solid #eee; border-bottom: 1px solid #eee; display: flex; flex-direction: column; padding: 10px; text-align: center; background: #fff; }
.lgdq-card-product:hover { box-shadow: 0 8px 20px rgba(0,0,0,.07); z-index: 2; }
.lgdq-card-img { display: block; background: #f7f7fa; }
.lgdq-card-img img { width: 100%; height: 110px; object-fit: cover; display: block; }
.lgdq-card-shape { margin: 6px 0 2px; }
.lgdq-card-title { font-weight: 600; color: #111827; text-decoration: none; font-size: 13px; line-height: 1.25; }
.lgdq-card-badges { padding: 6px 0 2px; display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; align-items: center; }
.lgdq-card-badges span { background: #f4effa; color: #591E72; font-size: 11px; padding: 2px 7px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; }
.lgdq-card-price { padding: 4px 0; color: #591E72; font-weight: 700; font-size: 15px; }
.lgdq-card-score { font-size: 11px; color: #9ca3af; margin-bottom: 6px; }
.lgdq-card-btn { margin: 0 auto 6px; justify-content: center; padding: 8px 16px; font-size: 13px; }

/* TABLE — 2 pages x 6 products */
.lgdq-table-wrap { display: none; overflow-x: auto; }
.view-table .lgdq-table-wrap { display: block; }
.lgdq-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
.lgdq-table th, .lgdq-table td { padding: 10px 10px; border-bottom: 1px solid #eef0f4; text-align: left; }
.lgdq-table th { background: #f9fafb; font-weight: 600; color: #374151; white-space: nowrap; }
.lgdq-table tbody tr:hover { background: #faf7fd; }
.lgdq-shape-cell { text-align: center; }
.lgdq-score-cell { font-weight: 700; color: #591E72; }
.lgdq-price-cell { color: #591E72; font-weight: 700; white-space: nowrap; }
.lgdq-compare-box {
	width: 20px; height: 20px; border: 2px solid #d1d5db; border-radius: 5px; display: inline-flex;
	align-items: center; justify-content: center; color: #fff; font-size: 11px; cursor: pointer;
}
.lgdq-compare-input { position: absolute; opacity: 0; }
.lgdq-compare-input:checked + .lgdq-compare-box { background: #591E72; border-color: #591E72; }
.lgdq-table-pagination, .lgdq-grid-pagination { display: flex; justify-content: space-between; align-items: center; padding: 12px 2px; }
.lgdq-page-btn {
	background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 7px 14px; cursor: pointer; font-weight: 600; font-size: 13px;
}
.lgdq-page-btn:disabled { opacity: .45; cursor: default; }
.lgdq-table-page-info, .lgdq-grid-page-info { font-size: 13px; color: #666; }

/* CAROUSEL — 4 equal-width columns visible at a time, prev/next arrows scroll the rest into view, no dots */
.lgdq-carousel { display: none; align-items: center; gap: 8px; }
.view-carousel .lgdq-carousel { display: flex; }
.lgdq-car-track { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; flex: 1; }
.lgdq-car-track::-webkit-scrollbar { display: none; }
.lgdq-car-slides { display: flex; }
.lgdq-car-slide {
	flex: 0 0 25%;          /* 4 equal-width columns visible */
	max-width: 25%;
	box-sizing: border-box;
	min-width: 0;
	scroll-snap-align: start;
	padding: 8px;
	border-right: 1px solid #f1f1f1;
	text-align: center;
}
.lgdq-car-img { display: block; background: #f7f7fa; }
.lgdq-car-img img { width: 100%; height: 90px; object-fit: cover; display: block; }
.lgdq-car-shape { margin: 5px 0 2px; }
.lgdq-car-title a { font-weight: 600; color: #111827; text-decoration: none; font-size: 12px; }
.lgdq-car-meta { font-size: 11px; color: #888; margin: 3px 0; }
.lgdq-car-price { color: #591E72; font-weight: 700; font-size: 14px; }
.lgdq-car-arrow {
	flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid #ddd; background: #fff;
	cursor: pointer; display: flex; align-items: center; justify-content: center; color: #591E72; font-size: 14px;
}
.lgdq-car-arrow:hover { background: #f4effa; }

/* Selected-shape badge shown on Carat & Budget steps */
.lgdq-shape-selected { margin: 2px 0 10px; }
.lgdq-shape-chip {
	display: inline-flex; align-items: center; gap: 8px;
	background: #f4effa; border: 1px solid #e4d9f2; color: #591E72;
	padding: 5px 14px 5px 8px; border-radius: 999px;
	font-size: 13px; font-weight: 600;
}
.lgdq-shape-chip svg { width: 26px; height: 26px; flex: 0 0 auto; }
.lgdq-shape-chip-txt { white-space: nowrap; }

/* Color swatch */
.lgdq-color-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: middle; margin-right: 4px; }
.lgdq-color-txt { vertical-align: middle; }

/* ---------------- Contact panel (diamond-finder-side) ---------------- */
.lgdq-contact-panel { padding: 24px 20px; display: none; }
.lgdq-contact-panel.active { display: block; }
.lgdq-contact-title { margin: 0 0 8px; color: #591E72; }
.lgdq-contact-text { color: #666; font-size: 14px; margin: 0 0 14px; }
.lgdq-contact-list { list-style: none; margin: 0 0 14px; padding: 0; }
.lgdq-contact-list li { padding: 6px 0; font-size: 14px; }
.lgdq-contact-list i { width: 22px; color: #591E72; }
.lgdq-contact-list a { color: #1f2937; text-decoration: none; }
.lgdq-contact-personal { border-top: 1px solid #eee; padding-top: 12px; display: flex; flex-direction: column; }
.lgdq-contact-name { color: #591E72; font-size: 15px; }
.lgdq-contact-detail { color: #888; font-size: 13px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 991px) {
	.lgdq-tpl-finder { flex-direction: column; }
	.lgdq-tpl-finder .diamond-finder-side { flex: 0 0 498px; width: 498px; max-width: 498px; border-left: 0; border-top: 1px solid #eee; }
}
@media (max-width: 860px) {
	.lgdq-results-grid { grid-template-columns: repeat(3, 1fr); }
	.lgdq-car-slide { flex: 0 0 33.333%; max-width: 33.333%; }
}
@media (max-width: 560px) {
	.lgdq-options { grid-template-columns: repeat(2, 1fr); }
	.lgdq-results-grid { grid-template-columns: repeat(2, 1fr); }
	.lgdq-car-slide { flex: 0 0 50%; max-width: 50%; }
}
