/* SGC Product Tools — front-end styles (single product pages only).
 * Only this plugin's own elements are styled — WooCommerce / theme styles are not overridden. */

/* ── Button row: Get a Quote | Download Brochure ───────────────── */
.sgcpt-btn-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin: 16px 0;
	width: 100%;
	flex-basis: 100%;
	clear: both;
	box-sizing: border-box;
}
.sgcpt-btn-row.sgcpt-cols-1 { grid-template-columns: 1fr; }
.sgcpt-btn-row .sgclabs-quote-btn,
.sgcpt-btn-row .sgclabs-pdf-inline-btn {
	width: 100% !important;
	min-height: 52px !important;
	padding: 14px 12px !important;
	margin: 0 !important;
	border: none !important;
	border-radius: 7px !important;
	font-family: inherit;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	letter-spacing: .2px;
	text-transform: uppercase;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 6px !important;
	box-sizing: border-box !important;
	cursor: pointer;
	white-space: nowrap;
	transition: opacity .2s, transform .1s;
}
.sgcpt-btn-row .sgclabs-quote-btn:hover,
.sgcpt-btn-row .sgclabs-pdf-inline-btn:hover { opacity: .88; transform: translateY(-1px); }
.sgcpt-btn-row .sgclabs-quote-btn:active,
.sgcpt-btn-row .sgclabs-pdf-inline-btn:active { transform: translateY(0); }
@media (max-width: 480px) {
	.sgcpt-btn-row { grid-template-columns: 1fr; }
	.sgcpt-btn-row .sgclabs-quote-btn,
	.sgcpt-btn-row .sgclabs-pdf-inline-btn { white-space: normal; }
}

/* ── Quote modal ───────────────────────────────────────────────── */
#sgclabs-quote-overlay {
	position: fixed; inset: 0;
	background: rgba(0,0,0,.65);
	z-index: 99999;
	display: flex; align-items: center; justify-content: center;
	padding: 15px;
	backdrop-filter: blur(3px);
	animation: sgcqFadeIn .2s ease;
	box-sizing: border-box;
}
@keyframes sgcqFadeIn { from { opacity: 0 } to { opacity: 1 } }
#sgclabs-quote-modal {
	background: #fff; border-radius: 16px;
	width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto;
	padding: 30px; position: relative;
	box-shadow: 0 25px 60px rgba(0,0,0,.35);
	animation: sgcqSlideUp .25s ease;
	box-sizing: border-box;
	text-align: left;
	color: #333;
}
@keyframes sgcqSlideUp { from { transform: translateY(30px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
#sgclabs-quote-modal * { box-sizing: border-box; }
#sgclabs-quote-close {
	position: absolute; top: 14px; right: 16px;
	background: #f0f0f0; border: none; border-radius: 50%;
	width: 32px; height: 32px; font-size: 20px; line-height: 1; padding: 0;
	cursor: pointer; color: #555; transition: all .2s;
	display: flex; align-items: center; justify-content: center; z-index: 11;
}
#sgclabs-quote-close:hover { background: #e0e0e0; color: #000; }
#sgclabs-quote-header {
	display: flex; gap: 14px; align-items: flex-start;
	margin-bottom: 20px; padding: 0 30px 18px 0;
	border-bottom: 2px solid #f0f0f0;
}
#sgclabs-quote-icon {
	font-size: 32px; width: 52px; height: 52px;
	background: #f0f4ff; border-radius: 12px;
	display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
#sgclabs-quote-title { font-size: 18px; font-weight: 700; color: #1a1a2e; margin: 0 0 4px; line-height: 1.3; text-transform: none; }
#sgclabs-quote-subtitle { font-size: 13px; color: #666; margin: 0; }
#sgclabs-quote-product-badge {
	background: linear-gradient(135deg, #f0f4ff, #e8ecff);
	border: 1px solid #c5d0f5; border-radius: 8px;
	padding: 10px 14px; margin-bottom: 16px;
	display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
	font-size: 14px; font-weight: 600; color: #1a1a2e;
}
.sgcq-row { display: flex; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.sgcq-col { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 5px; }
.sgcq-col > label { font-size: 13px; font-weight: 600; color: #333; margin: 0; }
.sgcq-req { color: #e74c3c; }
.sgcq-col input[type="text"], .sgcq-col input[type="email"], .sgcq-col input[type="tel"], .sgcq-col textarea {
	border: 1.5px solid #e0e0e0; border-radius: 8px;
	padding: 9px 12px; font-size: 14px; width: 100%; margin: 0;
	background: #fff; color: #222; box-shadow: none;
	transition: border-color .2s; font-family: inherit; min-height: 40px;
}
.sgcq-col input:focus, .sgcq-col textarea:focus { border-color: #1a1a2e; outline: none; box-shadow: 0 0 0 3px rgba(26,26,46,.08); }
.sgcq-col input[readonly] { background: #f8f8ff; cursor: default; }
.sgcq-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.sgcq-custom-select { position: relative; }
.sgcq-cs-display {
	border: 1.5px solid #e0e0e0; border-radius: 8px;
	padding: 9px 12px; font-size: 14px; cursor: pointer;
	background: #fff; display: flex; justify-content: space-between; align-items: center;
	min-height: 40px; user-select: none; transition: border-color .2s; color: #222;
}
.sgcq-cs-display:hover, .sgcq-cs-display:focus { border-color: #1565c0; outline: none; }
.sgcq-cs-display.open { border-color: #1565c0; border-bottom-color: transparent; border-radius: 8px 8px 0 0; }
.sgcq-cs-arrow { font-size: 12px; color: #888; transition: transform .2s; }
.sgcq-cs-display.open .sgcq-cs-arrow { transform: rotate(180deg); }
#sgcq-country-panel {
	position: fixed; z-index: 999999;
	background: #fff; border: 1.5px solid #1565c0; border-radius: 0 0 10px 10px;
	box-shadow: 0 8px 30px rgba(0,0,0,.15);
	max-height: 220px; overflow-y: auto; display: none; box-sizing: border-box;
}
#sgcq-country-panel.open { display: block; }
#sgcq-country-search {
	width: 100%; padding: 9px 12px; border: none; border-bottom: 1px solid #eee;
	font-size: 13px; outline: none; box-sizing: border-box;
	position: sticky; top: 0; background: #fff; z-index: 1; margin: 0;
}
.sgcq-cs-opt { padding: 9px 14px; font-size: 13px; cursor: pointer; transition: background .1s; color: #222; }
.sgcq-cs-opt:hover { background: #e8f0fe; color: #1565c0; font-weight: 600; }
.sgcq-cs-noresult { padding: 10px 14px; color: #888; font-size: 13px; }

.sgcq-type-wrap { display: flex; gap: 8px; flex-wrap: wrap; }
.sgcq-type-chip { cursor: pointer; margin: 0; }
.sgcq-type-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.sgcq-type-chip span {
	display: block; padding: 7px 12px;
	background: #f5f5f5; border: 1.5px solid #e0e0e0; border-radius: 20px;
	font-size: 12.5px; font-weight: 500; color: #444; transition: all .15s; white-space: nowrap;
}
.sgcq-type-chip input:checked + span { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }
.sgcq-type-chip input:focus-visible + span { outline: 2px solid #1565c0; outline-offset: 2px; }

#sgcq-file-zone {
	border: 2px dashed #d0d0d0; border-radius: 8px; padding: 12px 16px;
	text-align: center; cursor: pointer; font-size: 13px; color: #666; transition: border-color .2s;
}
#sgcq-file-zone:hover { border-color: #1a1a2e; color: #1a1a2e; }
#sgcq-file-label { cursor: pointer; }
#sgcq-file-name { font-size: 13px; color: #27ae60; font-weight: 600; margin-top: 4px; }

.sgcq-footer { display: flex; gap: 12px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.sgcq-security { font-size: 12px; color: #888; flex: 1; }
#sgcq-submit-btn {
	color: #fff; border: none; padding: 13px 28px; border-radius: 8px;
	font-size: 15px; font-weight: 600; cursor: pointer; transition: all .2s;
	white-space: nowrap; position: relative; min-width: 200px; margin: 0;
}
#sgcq-submit-btn:hover:not(:disabled) { opacity: .88; transform: translateY(-1px); }
#sgcq-submit-btn:disabled { cursor: not-allowed; }

#sgcq-loading-overlay {
	display: none; position: absolute; inset: 0;
	background: rgba(255,255,255,.88); border-radius: 16px; z-index: 10;
	flex-direction: column; align-items: center; justify-content: center; gap: 16px;
}
#sgcq-loading-overlay.active { display: flex; }
.sgcq-spinner {
	width: 48px; height: 48px; border: 4px solid #e0e0e0; border-top-color: #1a1a2e;
	border-radius: 50%; animation: sgcqSpin .8s linear infinite;
}
@keyframes sgcqSpin { to { transform: rotate(360deg); } }
.sgcq-loading-text { font-size: 15px; font-weight: 600; color: #1a1a2e; }
.sgcq-loading-sub { font-size: 12px; color: #888; margin-top: -10px; }
.sgcq-progress-wrap { width: 220px; height: 4px; background: #e0e0e0; border-radius: 4px; overflow: hidden; }
.sgcq-progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, #1a1a2e, #27ae60); border-radius: 4px; transition: width .3s ease; }
#sgclabs-quote-modal.submitting #sgclabs-quote-close { pointer-events: none; opacity: .3; }

#sgclabs-quote-msg { border-radius: 8px; padding: 12px 16px; font-size: 14px; margin-bottom: 14px; border: 1px solid transparent; }
#sgclabs-quote-msg.success { background: #f0fff4; color: #155724; border-color: #b7e1c0; }
#sgclabs-quote-msg.error { background: #fff0f0; color: #721c24; border-color: #f5c6cb; }

#sgclabs-quote-success-screen { text-align: center; padding: 30px 20px; }
#sgclabs-quote-success-screen .sgcq-success-icon { font-size: 60px; margin-bottom: 16px; }
#sgclabs-quote-success-screen h3 { font-size: 20px; color: #155724; margin: 0 0 8px; }
#sgclabs-quote-success-screen p { color: #666; font-size: 14px; margin: 0; }
#sgclabs-quote-success-screen .sgcq-close-btn {
	margin-top: 20px; padding: 10px 24px; background: #1a1a2e; color: #fff;
	border: none; border-radius: 8px; cursor: pointer; font-size: 14px;
}
#sgclabs-quote-modal::-webkit-scrollbar { width: 5px; }
#sgclabs-quote-modal::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 5px; }

@media (max-width: 600px) {
	#sgclabs-quote-modal { padding: 16px; }
	#sgclabs-quote-header { padding-right: 36px; }
	.sgcq-row { flex-direction: column; gap: 10px; }
	.sgcq-col { min-width: 100%; }
	.sgcq-type-wrap { gap: 6px; }
	.sgcq-footer { flex-direction: column; gap: 10px; }
	#sgcq-submit-btn { width: 100%; }
	#sgcq-file-zone { padding: 10px; font-size: 12px; }
	.sgcq-cs-display { font-size: 13px; }
}

/* ── PDF brochure modal ────────────────────────────────────────── */
#sgc-pdf-modal { display: none; position: fixed; inset: 0; z-index: 999999; background: rgba(15,42,92,.55); align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
#sgc-pdf-modal * { box-sizing: border-box; }
#sgc-pdf-modal .sgc-pdf-box { background: #fff; border-radius: 14px; width: 440px; max-width: 100%; box-shadow: 0 24px 64px rgba(15,42,92,.35); overflow: hidden; font-family: inherit; text-align: left; }
#sgc-pdf-modal .sgc-pdf-head { background: linear-gradient(120deg, #1565c0 0%, #3368c6 100%); color: #fff; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#sgc-pdf-modal .sgc-pdf-head h3 { margin: 0; font-size: 16px; font-weight: 700; color: #fff; line-height: 1.3; text-transform: none; }
#sgc-pdf-modal .sgc-pdf-head small { display: block; font-size: 12px; opacity: .85; margin-top: 2px; }
#sgc-pdf-modal .sgc-pdf-x { background: rgba(255,255,255,.15); border: none; color: #fff; width: 32px; height: 32px; padding: 0; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; flex-shrink: 0; }
#sgc-pdf-modal .sgc-pdf-body { padding: 20px; }
#sgc-pdf-modal .sgc-pdf-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #d3e1f7; border-radius: 8px; margin: 0 0 10px; cursor: pointer; font-size: 14px; color: #1e293b; background: #f8fbff; }
#sgc-pdf-modal .sgc-pdf-opt input { width: 16px; height: 16px; accent-color: #1565c0; margin: 0; }
#sgc-pdf-modal label.sgc-pdf-lbl { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; color: #0f2a5c; }
#sgc-pdf-modal textarea { width: 100%; padding: 9px 11px; border: 1px solid #d3e1f7; border-radius: 8px; font-size: 13px; resize: vertical; font-family: inherit; margin: 0; }
#sgc-pdf-modal textarea:focus { outline: none; border-color: #3368c6; box-shadow: 0 0 0 3px #eaf1fc; }
#sgc-pdf-modal .sgc-pdf-go { margin-top: 16px; width: 100%; background: linear-gradient(120deg, #1565c0 0%, #3368c6 100%); color: #fff; border: none; padding: 13px; border-radius: 9px; font-size: 15px; font-weight: 700; cursor: pointer; }
#sgc-pdf-modal .sgc-pdf-go:disabled { opacity: .7; cursor: wait; }
#sgc-pdf-modal #sgc-pdf-status { font-size: 13px; margin-top: 10px; min-height: 18px; }
#sgc-pdf-modal .sgc-pdf-load { padding: 36px 20px; text-align: center; color: #64748b; font-size: 14px; }

/* ── Internal links: related products + related categories ─────── */
.sgclabs-related-products, .sgclabs-related-cats { margin: 40px 0; clear: both; }
.sgclabs-section-heading {
	font-size: 1.25em; font-weight: 700; color: #1a1a2e;
	border-left: 4px solid #1565c0; padding-left: 14px; margin: 0 0 20px; letter-spacing: .2px;
}
.sgclabs-related-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(var(--sgcpt-card-w, 160px), 1fr));
	gap: 15px;
}
.sgclabs-related-card {
	background: #fff; border: 1.5px solid #e0e8f8; border-radius: 10px; overflow: hidden;
	text-decoration: none !important; color: inherit; display: flex; flex-direction: column;
	transition: transform .2s, box-shadow .2s, border-color .2s;
}
.sgclabs-related-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(21,101,192,.13); border-color: #1565c0; }
.sgclabs-related-img { position: relative; aspect-ratio: 1; overflow: hidden; background: #f0f5ff; }
.sgclabs-related-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; margin: 0; }
.sgclabs-related-card:hover .sgclabs-related-img img { transform: scale(1.04); }
.sgclabs-stock-badge { position: absolute; top: 8px; right: 8px; background: #1565c0; color: #fff; font-size: 10px; padding: 3px 8px; border-radius: 20px; font-weight: 600; letter-spacing: .3px; }
.sgclabs-related-info { padding: 12px; flex: 1; }
.sgclabs-related-info h3 { font-size: 13px; font-weight: 600; color: #1a1a2e; margin: 0 0 4px; line-height: 1.3; }
.sgclabs-related-info small { font-size: 11px; color: #888; }
.sgclabs-related-price { font-size: 13px; font-weight: 700; color: #1565c0; margin-top: 6px; }
.sgclabs-related-cta { display: block; margin: 0 12px 12px; padding: 8px 12px; background: #1565c0; color: #fff; text-align: center; border-radius: 6px; font-size: 12px; font-weight: 600; transition: background .2s; }
.sgclabs-related-card:hover .sgclabs-related-cta { background: #1a1a2e; }
.sgclabs-cats-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.sgclabs-cat-chip {
	background: #fff; border: 2px solid #1565c0; border-radius: 7px; padding: 10px 20px;
	text-decoration: none !important; color: #1565c0; font-size: 13px; font-weight: 600;
	display: inline-flex; align-items: center; gap: 8px; transition: all .2s; letter-spacing: .2px;
}
.sgclabs-cat-chip:hover { background: #1565c0; color: #fff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(21,101,192,.2); }
.sgclabs-cat-count { background: #1565c0; color: #fff; border-radius: 20px; padding: 2px 8px; font-size: 11px; font-weight: 700; }
.sgclabs-cat-chip:hover .sgclabs-cat-count { background: #fff; color: #1565c0; }
.sgclabs-auto-link { color: #1565c0; border-bottom: 1px dashed #1565c0; text-decoration: none; transition: color .2s; }
.sgclabs-auto-link:hover { color: #c62828; border-bottom-color: #c62828; }
@media (max-width: 600px) {
	.sgclabs-related-grid { grid-template-columns: repeat(2, 1fr); }
	.sgclabs-cat-chip { padding: 8px 14px; font-size: 12px; }
}

/* ── Size / porosity variant links ─────────────────────────────── */
.sgc-svl-block { margin: 10px 0; clear: both; }
.sgc-svl-label { display: block; font-size: 13px; font-weight: 700; color: var(--sgcpt-svl-brand, #1a1a2e); margin: 0 0 6px; }
.sgc-svl-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.sgc-svl-pills a, .sgc-svl-pills span {
	display: inline-block; padding: 4px 12px; border-radius: 4px; font-size: 12px; line-height: 1.6;
	text-decoration: none !important; border: 1px solid #e2e8f0; transition: all .15s;
}
.sgc-svl-pills a { background: #f1f5f9; color: #334155; }
.sgc-svl-pills a:hover { background: var(--sgcpt-svl-brand, #1a1a2e); border-color: var(--sgcpt-svl-brand, #1a1a2e); color: #fff; }
.sgc-svl-pills .sgc-svl-current { background: var(--sgcpt-svl-accent, #27ae60); border-color: var(--sgcpt-svl-accent, #27ae60); color: #fff; font-weight: 600; }
.sgc-svl-text { font-size: 13px; color: #475569; margin: 10px 0; }
.sgc-svl-text a { color: var(--sgcpt-svl-brand, #1a1a2e); font-weight: 600; text-decoration: underline; }
