/*
 * Prometal Group – veikala dizains: VIENS PRODUKTS
 * Ielādējas: /product/... lapās.
 * Izkārtojums: galerija kreisajā pusē, "lipīgs" kopsavilkums labajā, cilnes un saistītie produkti pa visu platumu.
 */

/* ───────── Režģis ───────── */
body.single-product div.product {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: 0 64px;
	align-items: start;
}
body.single-product div.product > .woocommerce-tabs,
body.single-product div.product > section.related,
body.single-product div.product > section.upsells,
body.single-product div.product > .woocommerce-notices-wrapper { grid-column: 1 / -1; }

/* ───────── Galerija ───────── */
body.single-product div.product div.woocommerce-product-gallery {
	position: relative;
	float: none !important;
	width: auto !important;
	margin: 0 !important;
}
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery__image {
	background: var(--pmg-soft);
	line-height: 0;
}
.woocommerce-product-gallery__image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 0;
}
.woocommerce-product-gallery__trigger {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: #fff;
	border-radius: 0;
	box-shadow: var(--pmg-shadow);
	text-indent: -9999px;
	overflow: hidden;
	transition: background .2s;
}
.woocommerce-product-gallery__trigger:hover { background: var(--pmg-ink); }

/* Sīktēlu josla */
/* WooCommerce CSS dod li width:25% + float ar stiprāku selektoru – tāpēc garāks selektors un !important */
body.single-product div.product div.woocommerce-product-gallery ol.flex-control-thumbs {
	display: grid !important;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 10px;
	margin: 10px 0 0 !important;
	padding: 0 !important;
	overflow: visible;
	list-style: none;
}
body.single-product div.product div.woocommerce-product-gallery ol.flex-control-thumbs::before,
body.single-product div.product div.woocommerce-product-gallery ol.flex-control-thumbs::after { content: none !important; display: none !important; }
body.single-product div.product div.woocommerce-product-gallery ol.flex-control-thumbs li {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}
body.single-product div.product div.woocommerce-product-gallery ol.flex-control-thumbs li img {
	display: block;
	width: 100% !important;
	height: auto !important;
	margin: 0 !important;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	background: var(--pmg-soft);
	opacity: .55;
	cursor: pointer;
	box-shadow: inset 0 -3px 0 transparent;
	transition: opacity .25s;
}
body.single-product div.product div.woocommerce-product-gallery ol.flex-control-thumbs li img:hover,
body.single-product div.product div.woocommerce-product-gallery ol.flex-control-thumbs li img.flex-active { opacity: 1; }
body.single-product div.product div.woocommerce-product-gallery ol.flex-control-thumbs li img.flex-active { outline: 2px solid var(--pmg-teal); outline-offset: -2px; }

/* ───────── Dalīšanās pogas (izvada prometals-shop.php) ───────── */
.pmg-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	margin: 28px 0 0;
}
.pmg-share__label {
	color: var(--pmg-muted);
	font: 700 11px/1.2 var(--pmg-font);
	letter-spacing: 1.5px;
	text-transform: uppercase;
}
.pmg-share__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pmg-share__list li { margin: 0; padding: 0; list-style: none; }
.pmg-share__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	background: #fff;
	color: var(--pmg-ink) !important;
	border: 1px solid var(--pmg-line);
	border-radius: 0;
	cursor: pointer;
	text-decoration: none !important;
	transition: background .2s, color .2s, border-color .2s;
}
.pmg-share__btn svg { width: 18px; height: 18px; fill: currentColor; }
.pmg-share__btn:hover,
.pmg-share__btn:focus-visible { background: var(--pmg-ink); border-color: var(--pmg-ink); color: #fff !important; outline: 0; }
.pmg-share__btn.is-copied { background: var(--pmg-teal); border-color: var(--pmg-teal); color: #fff !important; }
/* "Saite nokopēta" paziņojums virs pogas */
.pmg-share__btn[data-tip]::after {
	content: attr(data-tip);
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	padding: 6px 10px;
	background: var(--pmg-ink);
	color: #fff;
	font: 500 12px/1 var(--pmg-font);
	white-space: nowrap;
	transform: translateX(-50%);
	pointer-events: none;
}
.pmg-share__native { display: none; }
@media (hover: none) {
	.pmg-share__native.is-supported { display: inline-flex; }
}

/* ───────── Kopsavilkums ───────── */
body.single-product div.product div.summary {
	position: sticky;
	top: var(--pmg-sticky-top);
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0;
}
.pmg-eyebrow {
	margin: 0 0 12px;
	color: var(--pmg-teal);
	font: 700 11px/1.3 var(--pmg-font);
	letter-spacing: 1.5px;
	text-transform: uppercase;
}
.pmg-eyebrow a { color: inherit !important; text-decoration: none; }
.pmg-eyebrow a:hover { text-decoration: underline; }

body.single-product div.product .product_title {
	margin: 0 0 14px !important;
	color: var(--pmg-ink);
	font: 600 34px/1.2 var(--pmg-font);
	text-transform: none;
}
body.single-product div.product .woocommerce-product-rating {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 18px;
	font-size: 13px;
}
body.single-product .star-rating span::before { color: var(--pmg-teal); }
body.single-product .woocommerce-review-link { color: var(--pmg-muted); text-decoration: none; }
body.single-product .woocommerce-review-link:hover { color: var(--pmg-teal); }

body.single-product div.product p.price,
body.single-product div.product span.price {
	margin: 0 0 24px !important;
	font: 700 28px/1.2 var(--pmg-font);
}
body.single-product div.product .woocommerce-product-details__short-description {
	margin: 0 0 28px;
	padding: 0 0 28px;
	border-bottom: 1px solid var(--pmg-line);
	color: #444;
	font-size: 14px;
	line-height: 1.8;
}
body.single-product div.product .woocommerce-product-details__short-description p:last-child { margin-bottom: 0; }
body.single-product div.product p.stock {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
	color: var(--pmg-teal);
	font: 600 13px var(--pmg-font);
}
body.single-product div.product p.stock::before {
	content: '';
	width: 8px;
	height: 8px;
	background: currentColor;
	border-radius: 50%;
}
body.single-product div.product p.stock.out-of-stock { color: var(--pmg-danger); }

/* Pirkšanas rinda */
body.single-product div.product form.cart {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 28px !important;
}
body.single-product div.product form.cart .single_add_to_cart_button { flex: 1 1 200px; }
body.single-product div.product form.cart .variations { flex: 0 0 100%; margin-bottom: 8px; }
body.single-product div.product form.cart .variations select {
	width: 100%;
	height: 48px;
	padding: 0 16px;
	border: 1px solid #d8d8d8;
	border-radius: 0;
	font: 400 14px var(--pmg-font);
}

/* Meta (SKU, kategorija) */
body.single-product div.product .product_meta {
	display: grid;
	gap: 6px;
	margin: 0 0 28px;
	color: var(--pmg-muted);
	font-size: 13px;
}
body.single-product div.product .product_meta > span { display: block; }
body.single-product div.product .product_meta a { color: var(--pmg-teal) !important; text-decoration: none; }
body.single-product div.product .product_meta a:hover { text-decoration: underline; }

/* Uzticības rinda (izvada prometals-shop.php) */
.pmg-trust {
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	border: 1px solid var(--pmg-line);
}
.pmg-trust li {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	padding: 14px 18px;
	border-bottom: 1px solid var(--pmg-line);
	color: var(--pmg-ink);
	font-size: 13px;
	line-height: 1.4;
}
.pmg-trust li:last-child { border-bottom: 0; }
.pmg-trust svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--pmg-teal); }
.pmg-trust a { color: var(--pmg-ink); font-weight: 600; text-decoration: none; }
.pmg-trust a:hover { color: var(--pmg-teal); }

/* ───────── Cilnes ───────── */
body.single-product div.product .woocommerce-tabs { margin-top: 96px; }
body.single-product div.product .woocommerce-tabs ul.tabs {
	display: flex;
	gap: 36px;
	margin: 0 0 36px !important;
	padding: 0 !important;
	border: 0;
	border-bottom: 1px solid var(--pmg-line);
	overflow-x: auto;
}
body.single-product div.product .woocommerce-tabs ul.tabs::before,
body.single-product div.product .woocommerce-tabs ul.tabs::after { content: none !important; }
body.single-product div.product .woocommerce-tabs ul.tabs li {
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	list-style: none;
	box-shadow: none !important;
}
body.single-product div.product .woocommerce-tabs ul.tabs li::before,
body.single-product div.product .woocommerce-tabs ul.tabs li::after { content: none !important; }
body.single-product div.product .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 0 0 16px !important;
	color: var(--pmg-muted) !important;
	font: 700 12px/1.2 var(--pmg-font);
	letter-spacing: 1.5px;
	text-transform: uppercase;
	white-space: nowrap;
	text-decoration: none;
	transition: color .2s;
}
body.single-product div.product .woocommerce-tabs ul.tabs li a:hover { color: var(--pmg-ink) !important; }
body.single-product div.product .woocommerce-tabs ul.tabs li.active {
	background: transparent !important;
	box-shadow: inset 0 -2px 0 var(--pmg-teal) !important;
}
body.single-product div.product .woocommerce-tabs ul.tabs li.active a { color: var(--pmg-ink) !important; }

body.single-product div.product .woocommerce-Tabs-panel { max-width: 860px; font-size: 14px; line-height: 1.85; color: #444; }
/* WC atkārto cilnes nosaukumu kā H2 – liekam ārā */
body.single-product div.product .woocommerce-Tabs-panel > h2:first-child { display: none; }

/* Specifikācijas tabula */
body.single-product table.woocommerce-product-attributes {
	width: 100%;
	border: 0;
	border-collapse: collapse;
}
body.single-product table.woocommerce-product-attributes th,
body.single-product table.woocommerce-product-attributes td {
	padding: 16px 0;
	border: 0;
	border-bottom: 1px solid var(--pmg-line);
	background: transparent;
	font-size: 14px;
	font-style: normal;
	text-align: left;
	vertical-align: top;
}
body.single-product table.woocommerce-product-attributes th {
	width: 32%;
	color: var(--pmg-muted);
	font: 700 11px/1.6 var(--pmg-font);
	letter-spacing: 1.5px;
	text-transform: uppercase;
}
body.single-product table.woocommerce-product-attributes td p { margin: 0; }

/* Atsauksmes */
.woocommerce-Reviews-title {
	margin: 0 0 24px;
	font: 600 20px/1.3 var(--pmg-font);
}
.woocommerce-Reviews ol.commentlist { margin: 0 0 40px; padding: 0; list-style: none; }
.woocommerce-Reviews ol.commentlist li { margin: 0 0 24px; padding: 0 0 24px; border-bottom: 1px solid var(--pmg-line); }
.woocommerce-Reviews .comment_container { display: flex; gap: 20px; }
.woocommerce-Reviews .comment_container img.avatar { flex-shrink: 0; width: 52px; height: 52px; border-radius: 0; }
.woocommerce-Reviews .comment-text { flex: 1; margin: 0 !important; padding: 0 !important; border: 0 !important; }
.woocommerce-Reviews .comment-text p { margin: 8px 0 0; }
.woocommerce-Reviews .woocommerce-review__author { font-weight: 600; color: var(--pmg-ink); }
.woocommerce-Reviews .woocommerce-review__published-date { color: var(--pmg-muted); font-size: 12px; }
.woocommerce-Reviews .comment-reply-title { display: block; margin-bottom: 16px; font: 600 18px var(--pmg-font); }
.woocommerce-Reviews #commentform input[type="text"],
.woocommerce-Reviews #commentform input[type="email"],
.woocommerce-Reviews #commentform textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #d8d8d8;
	border-radius: 0;
	font: 400 14px var(--pmg-font);
	outline: 0;
}
.woocommerce-Reviews #commentform input:focus,
.woocommerce-Reviews #commentform textarea:focus { border-color: var(--pmg-teal); box-shadow: 0 0 0 3px rgba(0, 118, 101, .15); }
.woocommerce-Reviews #commentform input[type="submit"] {
	min-height: 48px;
	padding: 0 28px;
	background: var(--pmg-ink);
	color: #fff;
	border: 1px solid var(--pmg-ink);
	border-radius: 0;
	font: 700 12px var(--pmg-font);
	letter-spacing: 1.5px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .25s, border-color .25s;
}
.woocommerce-Reviews #commentform input[type="submit"]:hover { background: var(--pmg-teal); border-color: var(--pmg-teal); }

/* ───────── Saistītie produkti ───────── */
body.single-product div.product section.related.products,
body.single-product div.product section.upsells.products {
	margin: 96px 0 0;
	padding: 72px 0 0;
	border-top: 1px solid var(--pmg-line);
}
body.single-product section.related.products > h2,
body.single-product section.upsells.products > h2 {
	position: relative;
	margin: 0 0 44px;
	padding-bottom: 18px;
	font: 600 28px/1.2 var(--pmg-font);
}
body.single-product section.related.products > h2::after,
body.single-product section.upsells.products > h2::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 60px;
	height: 2px;
	background: var(--pmg-teal);
}

/* ───────── Responsīvi ───────── */
@media (max-width: 991px) {
	body.single-product div.product { grid-template-columns: 1fr; gap: 40px 0; }
	body.single-product div.product div.summary { position: static; }
	body.single-product div.product .product_title { font-size: 28px; }
	body.single-product div.product .woocommerce-tabs { margin-top: 56px; }
	body.single-product div.product section.related.products { margin-top: 64px; padding-top: 48px; }
}
@media (max-width: 575px) {
	body.single-product div.product div.woocommerce-product-gallery ol.flex-control-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
	body.single-product div.product form.cart .quantity { flex: 0 0 100%; }
	body.single-product div.product form.cart .quantity input.qty { flex: 1; }
	body.single-product div.product .woocommerce-tabs ul.tabs { gap: 24px; }
	body.single-product table.woocommerce-product-attributes th { width: 40%; }
}
