/**
 * VT-Szablon Product CSS — WooCommerce single product enhancements.
 *
 * Version:    0.1.0
 * Last build: 2026-06-10
 * Sources:    snippety #59 (vt-product-sidebar-learn), #61 (vt-product-related-tests)
 *             + meta-pills i sticky-cta z sprint v5 product module
 *
 * Ładowane TYLKO na is_product() — patrz includes/assets.php.
 * Dependency: vt-szablon-template (vt-template.css MUSI być wcześniej — używamy --vt-* tokens).
 *
 * KOMPONENTY:
 *  - .vt-product-sidebar — sidebar "Dowiedz się więcej" (5 pillar links, snippet #59)
 *  - .vt-related-tests + .vt-related-grid — cross-sell (3 cards, snippet #61)
 *  - .vt-product-meta-pills — pill grupy pod tytułem (cert, dostawa, refund)
 *  - .vt-product-sticky-cta — sticky CTA mobile (placeholder Sprint 2)
 *
 * Brandbook v1.3 tokens (referencja kolorów — wartości w :root w vt-template.css):
 *   --vt-navy:#16243F  --vt-paper:#F6F5F1  --vt-line:#E6E4DC
 *   --vt-red:#D92C39   --vt-mist:#A8D8DB   --vt-surface:#FFFFFF
 *
 * @package VT_Szablon
 */

/* ============================================================
 * Sidebar "Dowiedz się więcej" (snippet #59)
 * ============================================================ */
.vt-product-sidebar {
	background: #F6F5F1;
	border: 1px solid #E6E4DC;
	border-radius: 8px;
	padding: 20px 24px;
	margin: 24px 0;
	font-family: "Titillium Web", sans-serif;
}

.vt-product-sidebar h3 {
	font-family: "League Spartan", sans-serif;
	font-weight: 600;
	color: #16243F;
	margin: 0 0 12px;
	font-size: 18px;
	letter-spacing: -0.01em;
}

.vt-product-sidebar ul.vt-sidebar-links {
	list-style: none;
	padding: 0;
	margin: 0;
}

.vt-product-sidebar ul.vt-sidebar-links li {
	padding: 6px 0;
	border-bottom: 1px dashed #E6E4DC;
}

.vt-product-sidebar ul.vt-sidebar-links li:last-child {
	border-bottom: 0;
}

.vt-product-sidebar ul.vt-sidebar-links a {
	color: #16243F;
	text-decoration: none;
	font-weight: 500;
}

.vt-product-sidebar ul.vt-sidebar-links a:hover {
	color: #D92C39;
	text-decoration: underline;
}

/* ============================================================
 * Related tests grid (snippet #61)
 * ============================================================ */
.vt-related-tests {
	margin: 48px 0 0;
}

.vt-related-tests h3 {
	font-family: "League Spartan", sans-serif;
	font-weight: 600;
	color: #16243F;
	font-size: 22px;
	margin: 0 0 20px;
	letter-spacing: -0.01em;
}

.vt-related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.vt-related-grid .vt-card {
	background: #fff;
	border: 1px solid #E6E4DC;
	border-radius: 12px;
	padding: 16px;
	text-align: center;
	transition: transform 200ms, border-color 200ms;
}

.vt-related-grid .vt-card:hover {
	transform: translateY(-2px);
	border-color: #A8D8DB;
}

.vt-related-grid .vt-card img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	display: block;
	margin: 0 auto;
}

.vt-related-grid .vt-card .vt-name {
	font-family: "Titillium Web", sans-serif;
	font-weight: 600;
	color: #16243F;
	margin: 12px 0;
	font-size: 14px;
	line-height: 1.35;
	min-height: 38px;
}

.vt-related-grid .vt-card a.vt-btn {
	display: inline-block;
	background: #D92C39;
	color: #fff;
	padding: 8px 16px;
	border-radius: 100px;
	text-decoration: none;
	font-size: 13px;
	font-family: "Titillium Web", sans-serif;
	font-weight: 600;
}

.vt-related-grid .vt-card a.vt-btn:hover {
	background: #16243F;
}

@media (max-width: 760px) {
	.vt-related-grid {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
 * Product meta pills — grupa pod tytułem (cert, dostawa, refund)
 * Markup: <ul class="vt-product-meta-pills"><li>...</li></ul>
 * ========================================================================== */
.vt-product-meta-pills {
	list-style: none;
	padding: 0;
	margin: 16px 0 24px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.vt-product-meta-pills li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: var(--vt-paper-2);
	border: 1px solid var(--vt-line);
	border-radius: 100px;
	font-family: var(--vt-display);
	font-weight: 500;
	font-size: 12px;
	letter-spacing: 0.02em;
	color: var(--vt-slate);
}

.vt-product-meta-pills li::before {
	content: "✓";
	color: var(--vt-green);
	font-weight: 700;
	font-size: 13px;
}

/* ==========================================================================
 * Product sticky CTA (mobile) — Sprint 2 placeholder
 * Markup target: <div class="vt-product-sticky-cta">...</div>
 * JS dodaje klasę .is-visible gdy main #addBtn znika z viewport.
 * ========================================================================== */
.vt-product-sticky-cta {
	display: none;
}

@media (max-width: 768px) {
	.vt-product-sticky-cta.is-visible {
		display: flex;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 90;
		align-items: center;
		justify-content: space-between;
		padding: 12px 16px;
		background: var(--vt-surface);
		box-shadow: 0 -4px 14px rgba(22, 36, 63, .08);
		border-top: 1px solid var(--vt-line);
		gap: 12px;
	}

	.vt-product-sticky-cta .vt-sb-price {
		font-family: var(--vt-display);
		font-weight: 800;
		font-size: 18px;
		color: var(--vt-navy);
		white-space: nowrap;
	}

	body.has-vt-sticky-cta {
		padding-bottom: 72px;
	}
}
