/* "Piederumi" section on single product pages - not a native WooCommerce
   loop, so Astra's dynamic related/upsell grid CSS doesn't target it;
   forcing the same 6-column layout explicitly here. */
.lsv-product-accessories {
	margin-top: 40px;
}

/* Match the "Populārākie GRAM modeļi" heading style from the homepage
   (see .lsv-featured-products h2 in homepage.css) on both our own
   Piederumi heading and WooCommerce's native "Related products"/
   "Saistītie produkti" heading, which otherwise just inherits Astra's
   default heading font. */
.lsv-product-accessories h2,
.related.products > h2 {
	font-family: 'Roboto Slab', Georgia, serif;
	font-size: 30px;
	line-height: 1.2;
	color: #1A5E63;
	margin-bottom: 16px;
}

.lsv-product-accessories ul.products {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	column-gap: 20px;
	row-gap: 20px;
}
/* Astra's default (non-grid) product-loop item spacing adds a 40px
   margin-bottom + ~19px padding-bottom on every <li> - invisible on
   "Līdzīgi produkti" since it never wraps past one row, but Piederumi
   has 14 items across 3 rows, so it stacked on top of the grid's own
   row-gap between every row. Zeroed out in favor of the grid gap above. */
.lsv-product-accessories ul.products li.product {
	width: auto;
	float: none;
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

@media (max-width: 900px) {
	.lsv-product-accessories ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.lsv-product-accessories ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Hides the small "Galda svari" category label Astra shows above the
   product title (single_product_category() in
   class-astra-woocommerce.php) - it's called directly rather than hooked
   as its own removable action callback, so hiding it via CSS is simpler
   than unhooking it. */
.single-product .single-product-category {
	display: none !important;
}

/* Match the product title ("Gram S3") to the "Piederumi" heading font
   (see .lsv-product-accessories h2 above) instead of Astra's default
   product-title styling. */
.single-product .product_title.entry-title {
	font-family: 'Roboto Slab', Georgia, serif;
	font-size: 30px;
	line-height: 1.2;
	color: #1A5E63;
}

/* Match the selected variation's "Modelis: S3-30 RS" text (the variation
   description, see the "Modelis:" gotcha in product data model notes) to
   the same product-title look. */
.single-product .woocommerce-variation-description,
.single-product .woocommerce-variation-description p {
	font-family: 'Roboto Slab', Georgia, serif;
	font-size: 30px;
	font-weight: 600;
	line-height: 1.2;
	color: #1A5E63;
}

/* Astra generates this margin inline as `.ast-plain-container.ast-no-sidebar
   #primary{margin-top:60px;margin-bottom:60px}` (an ID selector, so
   !important is needed to beat it) - a sitewide default that made the gaps
   before the breadcrumb and after "Saistītie produkti" much bigger than
   the ~22px gap between the header's own nav links and its bottom edge (top)
   / the 16px gap between the section's own heading and images (bottom).
   Matching those instead, scoped to product pages only so other page types
   keep Astra's normal spacing. */
.single-product #primary {
	margin-top: 22px !important;
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

/* Match "Populārākie GRAM modeļi" card text (see featured-products.php /
   homepage.css .lsv-product-category / .lsv-product-title / .lsv-price-*)
   on the native WooCommerce "Līdzīgi produkti" AND our own "Piederumi"
   cards - both use the same content-product.php card markup, which
   otherwise renders with Astra's own product-loop styling. */
.related.products .ast-woo-product-category,
.lsv-product-accessories .ast-woo-product-category {
	font-family: 'Roboto', Arial, sans-serif !important;
	font-size: 12px !important;
	color: #E08D79 !important;
	font-weight: 600 !important;
	margin-bottom: 2px;
	display: block;
}
.related.products .woocommerce-loop-product__title,
.lsv-product-accessories .woocommerce-loop-product__title {
	font-family: 'Roboto', Arial, sans-serif !important;
	font-weight: 700 !important;
	font-size: 14px !important;
	color: #222 !important;
	margin: 0 0 4px;
}
.related.products .lsv-related-price,
.related.products .lsv-related-price .woocommerce-Price-amount,
.related.products .lsv-related-price bdi,
.related.products .lsv-related-price .lsv-price-prefix,
.lsv-product-accessories .lsv-related-price,
.lsv-product-accessories .lsv-related-price .woocommerce-Price-amount,
.lsv-product-accessories .lsv-related-price bdi,
.lsv-product-accessories .lsv-related-price .lsv-price-prefix {
	font-family: 'Roboto', Arial, sans-serif !important;
	font-style: normal !important;
}
.related.products .lsv-related-price,
.lsv-product-accessories .lsv-related-price {
	display: block;
	margin-top: 6px;
}
.related.products .lsv-price-excl,
.lsv-product-accessories .lsv-price-excl {
	display: block;
	font-weight: 700;
	color: #1A5E63;
}
.related.products .lsv-price-incl,
.lsv-product-accessories .lsv-price-incl {
	display: block;
	font-size: 12px;
	color: #777;
}
.related.products .lsv-price-excl span,
.related.products .lsv-price-incl span,
.lsv-product-accessories .lsv-price-excl span,
.lsv-product-accessories .lsv-price-incl span {
	font-weight: 400;
	font-size: 11px;
}
.related.products .lsv-price-prefix,
.lsv-product-accessories .lsv-price-prefix {
	font-weight: 700;
}

/* Gram S3's custom "Papildus informācija" tab (see
   product-s3-additional-info.php) - image+text feature blocks followed by
   the model comparison table. */
.lsv-s3-spec-sections {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
	margin-bottom: 32px;
}
.lsv-s3-spec-block img {
	width: 100%;
	height: 200px;
	object-fit: contain;
	background: #f7f7f7;
	border-radius: 8px;
	margin-bottom: 12px;
}
.lsv-s3-spec-block h3 {
	font-family: 'Roboto Slab', Georgia, serif;
	font-size: 17px;
	color: #1A5E63;
	margin: 0 0 6px;
}
.lsv-s3-spec-block p {
	font-size: 14px;
	color: #444;
	line-height: 1.5;
	margin: 0;
}
.lsv-s3-model-table {
	width: 100%;
	border-collapse: collapse;
}
.lsv-s3-model-table th,
.lsv-s3-model-table td {
	border: 1px solid #eee;
	padding: 8px 12px;
	text-align: center;
	font-size: 13px;
}
.lsv-s3-model-table thead th {
	background: #1A5E63;
	color: #fff;
}
.lsv-s3-model-table tbody th {
	text-align: left;
	background: #f7f7f7;
	font-weight: 600;
	white-space: nowrap;
}

@media (max-width: 900px) {
	.lsv-s3-spec-sections {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.lsv-s3-spec-sections {
		grid-template-columns: 1fr;
	}
	.lsv-s3-model-table {
		display: block;
		overflow-x: auto;
	}
}
