/*
 * Product page, phase 1 (includes/product-page.php). No build step: served as is.
 * Everything is scoped to body.swan-pp (single product pages).
 */

/* ---------- photo: no empty box around a landscape photo ---------- */
/* Flatsome's "Custom CSS Mobile" sets min-height: 400px on the gallery. The image carries its own
   width and height, so the browser already reserves the right space. */
.swan-pp .woocommerce-product-gallery.woocommerce-product-gallery--with-images {
	min-height: 0;
}

/* ---------- breadcrumb ---------- */
.swan-pp-breadcrumb {
	font-size: 13px;
	text-transform: none;
	letter-spacing: 0;
}
.swan-pp-breadcrumb a {
	color: inherit;
}
.swan-pp-breadcrumb .divider {
	margin: 0 0.4em;
	opacity: 0.6;
}

/* ---------- maker and rating (1) ---------- */
.swan-pp-maker {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: -4px 0 14px;
	font-size: 15px;
	line-height: 1.35;
}
.swan-pp-maker__avatar {
	flex: none;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	overflow: hidden;
	display: grid;
	place-items: center;
	background: #e9dccb;
	color: #6b4f2a;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
}
.swan-pp-maker__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
}
.swan-pp-maker__text a {
	font-weight: 600;
	color: inherit;
	text-decoration: underline;
}
.swan-pp-maker .swan-pp-maker__rating {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 400;
	color: #555;
}
.swan-pp-stars {
	position: relative;
	display: inline-block;
	color: #d6d6d6;
	letter-spacing: 1px;
	line-height: 1;
}
.swan-pp-stars > span {
	position: absolute;
	left: 0;
	top: 0;
	overflow: hidden;
	white-space: nowrap;
	color: #f2a900;
}

/* ---------- achteraf betalen (4) ---------- */
.swan-pp .product-info .price-wrapper {
	margin-bottom: 6px;
}
.swan-pp-pay-later {
	margin: -6px 0 6px;
	font-size: 14px;
	color: #555;
}

/* ---------- delivery and shipping (2, 3) ---------- */
.swan-pp-delivery {
	flex: 0 0 100%;
	display: grid;
	gap: 6px;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	padding: 10px 12px;
	margin: 4px 0 6px;
	font-size: 14px;
	line-height: 1.4;
}
.swan-pp-delivery__row {
	display: flex;
	gap: 8px;
	align-items: flex-start;
}
.swan-pp-delivery__row svg {
	flex: none;
	margin-top: 1px;
	color: #2e8540;
}
.swan-pp-delivery__note {
	display: block;
	color: #666;
	font-size: 12px;
}

/* ---------- buttons on one line ---------- */
.swan-pp .product-info form.cart:not(.variations_form),
.swan-pp .product-info .woocommerce-variation-add-to-cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}
.swan-pp .product-info form.cart:not(.variations_form) > *,
.swan-pp .product-info .woocommerce-variation-add-to-cart > * {
	flex: 0 0 100%;
	margin-left: 0;
	margin-right: 0;
}
.swan-pp .product-info form.cart .quantity {
	flex: 0 0 auto;
	margin: 0;
}
/* The quantity always gets its own row: next to two buttons it squeezed "In winkelwagen" until
   its text wrapped letter by letter (narrow buy columns, larger text settings). The button keeps a
   minimum width and never wraps; if both buttons don't fit, "Nu kopen" moves to the next line. */
.swan-pp .product-info form.cart .quantity {
	flex-basis: 100%;
	justify-content: flex-start;
}
.swan-pp .product-info form.cart .single_add_to_cart_button {
	flex: 1 1 11em;
	width: auto;
	min-width: 11em;
	margin: 0;
	white-space: nowrap;
}
.swan-pp .product-info form.cart .ux-buy-now-button {
	white-space: nowrap;
}
/* Narrow phones (360px): the theme's 18.6px buttons with 22px padding don't fit side by side. */
@media (max-width: 389px) {
	.swan-pp .product-info form.cart .single_add_to_cart_button,
	.swan-pp .product-info form.cart .ux-buy-now-button {
		padding-left: 12px;
		padding-right: 12px;
		font-size: 16px;
		letter-spacing: 0;
		white-space: nowrap;
	}
}
.swan-pp .product-info form.cart .ux-buy-now-button {
	flex: 0 0 auto;
	margin: 0;
	background: #fff;
	color: #111;
	border: 1.5px solid #111;
	box-shadow: none;
}
.swan-pp .product-info form.cart .ux-buy-now-button:hover {
	background: #111;
	color: #fff;
}
.swan-pp .product-info form.cart script {
	display: none;
}

/* Flatsome's sticky add-to-cart bar (theme option product_sticky_cart, off in production until it
   is tested, item 5): on a phone only the product and "In winkelwagen". */
@media (max-width: 549px) {
	.swan-pp .sticky-add-to-cart {
		background: #fff;
		box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.08);
	}
	.swan-pp .sticky-add-to-cart .quantity,
	.swan-pp .sticky-add-to-cart .ux-buy-now-button {
		display: none;
	}
}

/* WooCommerce greys the button out until the options are chosen; it stays the main button here,
   and a tap shows which option is missing (product-page.js). */
.swan-pp .product-info .single_add_to_cart_button.disabled.wc-variation-selection-needed,
.swan-pp .product-info .variations_form .ux-buy-now-button.disabled {
	opacity: 1;
	cursor: pointer;
}

/* ---------- order-by advice (8) ---------- */
.swan-pp-order-by {
	background: #fdf1f4;
	color: #8a2448;
	border-radius: 10px;
	padding: 9px 12px;
	margin: 0;
	font-weight: 600;
}

/* ---------- message to the seller (7) ---------- */
.swan-seller-note {
	margin: 0;
}
.swan-seller-note summary {
	cursor: pointer;
	list-style: none;
	border: 1px dashed #bbb;
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 14px;
	font-weight: 500;
	color: #222;
}
.swan-seller-note summary::-webkit-details-marker {
	display: none;
}
.swan-seller-note summary::before {
	content: "+ ";
	font-weight: 700;
}
.swan-seller-note[open] summary::before {
	content: "− ";
}
.swan-seller-note__optional {
	color: #666;
	font-weight: 400;
}
.swan-seller-note input {
	margin: 8px 0 0;
}

/* ---------- reassurances (4) ---------- */
.swan-pp-checks {
	list-style: none;
	margin: 2px 0 0;
	padding: 0;
	font-size: 14px;
	display: grid;
	gap: 4px;
}
.swan-pp-checks li {
	margin: 0;
	padding-left: 22px;
	position: relative;
}
.swan-pp-checks li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: #2e8540;
	font-weight: 700;
}

/* ---------- options as buttons (9) ---------- */
.swan-pp .variations {
	position: relative;
	margin-bottom: 6px;
}
.swan-pp .variations tr {
	display: block;
	margin-bottom: 12px;
}
.swan-pp .variations tr:last-child {
	margin-bottom: 0;
}
/* WooCommerce's "Wissen" link sits under the last option and keeps its line while hidden. */
.swan-pp .variations .reset_variations {
	position: absolute;
	top: 0;
	right: 0;
	margin: 0;
	font-size: 12px;
}
.swan-pp .variations th.label,
.swan-pp .variations td.value {
	display: block;
	padding: 0;
	border: 0;
}
.swan-pp .variations th.label label {
	display: inline;
	font-size: 14px;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
}
.swan-pp .swan-pp-chosen {
	font-weight: 600;
}
.swan-pp-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 6px;
}
.swan-pp-option {
	margin: 0;
	min-height: 0;
	padding: 7px 14px;
	line-height: 1.3;
	font-size: 14px;
	text-transform: none;
	letter-spacing: 0;
	color: #222;
	background: #fff;
	border: 1.5px solid #ccc;
	border-radius: 8px;
	cursor: pointer;
}
.swan-pp-option[aria-pressed="true"] {
	border-color: #111;
	box-shadow: inset 0 0 0 1px #111;
	font-weight: 600;
}
.swan-pp-option:disabled {
	color: #aaa;
	text-decoration: line-through;
	cursor: not-allowed;
}
.swan-pp .swan-pp-missing .swan-pp-option {
	border-color: #c62828;
}
.swan-pp .swan-pp-missing th.label label {
	color: #c62828;
}
.swan-pp-options-message {
	color: #c62828;
	font-size: 14px;
	margin: 0 0 10px;
}
/* With JS running, the buttons replace the selects (which stay in the form for WooCommerce). */
.swan-pp-js .swan-pp .variations td.value select {
	display: none;
}
html:not(.swan-pp-js) .swan-pp-options {
	display: none;
}
/* The chosen variation's price moves to the main price (product-page.js). */
.swan-pp-js .swan-pp .product-info .woocommerce-variation-price {
	display: none;
}

/* ---------- mobile: compact header and first screen (6) ---------- */
@media (max-width: 849px) {
	/* The top bar's points (pay later, returns, rating) now sit next to the button. */
	.swan-pp #top-bar {
		display: none;
	}

	/* One header row, as on Etsy: menu, small logo, search, wishlist, cart. Flatsome draws the
	   logo row (80px) and the search row (66px) separately; the search row is laid over the
	   space between the logo and the icons. The offsets follow the logo at 40px high. */
	.swan-pp .header-wrapper {
		position: relative;
	}
	.swan-pp #masthead,
	.swan-pp #masthead .header-inner {
		height: 56px;
		min-height: 0;
	}
	/* Flatsome's logo settings add vertical padding to the image (14px on tst) and a larger
	   !important height when the header is stuck; both would shrink or overflow the 40px logo. */
	.swan-pp #logo img,
	.swan-pp .stuck #logo img {
		max-height: 40px !important;
		width: auto;
		padding: 0;
	}
	.swan-pp .stuck #masthead,
	.swan-pp .stuck #masthead .header-inner {
		height: 56px !important;
	}
	.swan-pp #masthead .header-inner .flex-left {
		flex: 0 0 auto;
	}
	.swan-pp #masthead .header-inner .logo {
		flex: 0 0 auto;
		width: auto;
		margin: 0 8px;
		order: 2;
	}
	.swan-pp #masthead .header-inner .flex-right {
		flex: 1 1 auto;
		order: 3;
		justify-content: flex-end;
	}
	.swan-pp #wide-nav {
		position: absolute;
		top: 0;
		left: 128px;
		right: 84px;
		height: 56px;
		min-height: 0;
		background: transparent;
		border-bottom: 0;
		z-index: 2;
	}
	.swan-pp #masthead {
		border-bottom: 1px solid rgba(37, 43, 50, 0.13);
	}
	.swan-pp #wide-nav .header-bg-container,
	.swan-pp #wide-nav .header-bg-color {
		display: none;
	}
	.swan-pp #wide-nav .flex-row {
		height: 56px;
		padding: 0;
	}
	.swan-pp #wide-nav .nav,
	.swan-pp #wide-nav .nav > li,
	.swan-pp #wide-nav .nav > li > div {
		width: 100%;
		margin: 0;
		padding: 0;
	}
	.swan-pp #wide-nav .speedsearch-search-container,
	.swan-pp #wide-nav .speedsearch-search-block,
	.swan-pp #wide-nav .speedsearch-search {
		width: 100%;
		max-width: none;
		margin: 0;
	}
	.swan-pp #wide-nav .speedsearch-search-input,
	.swan-pp #wide-nav input[type="search"] {
		height: 36px;
		min-height: 0;
		font-size: 14px;
		padding-right: 34px;
		text-overflow: ellipsis;
	}

	/* Breadcrumb: only "‹ Category". */
	.swan-pp-breadcrumb a,
	.swan-pp-breadcrumb .divider {
		display: none;
	}
	.swan-pp-breadcrumb a:last-of-type {
		display: inline;
		font-size: 14px;
	}
	.swan-pp-breadcrumb a:last-of-type::before {
		content: "‹ ";
	}
	.swan-pp .product-page-title .page-title-inner {
		min-height: 0;
		padding-top: 6px;
		padding-bottom: 2px;
		justify-content: flex-start;
		text-align: left;
	}
	.swan-pp .product-main {
		padding-top: 4px;
	}
	/* Flatsome centres the title column on mobile (medium-text-center, with !important). */
	.swan-pp .product-page-title .medium-text-center,
	.swan-pp .product-page-title .swan-pp-breadcrumb {
		text-align: left !important;
	}
}

/* ---------- accessibility ---------- */
/* "Productdetails" is an h2 (woocommerce/single-product/tabs/sections.php) with the h5 look it had. */
.swan-pp .product-section .swan-pp-section-title {
	font-size: 1em;
	font-weight: 400;
	letter-spacing: 0.05em;
	line-height: 1.2;
	margin-bottom: 0.5em;
}
/* The maker description's "Lees meer" link: at least a 24px touch target. */
.swan-pp a[data-readmore-toggle] {
	display: inline-block;
	min-height: 24px;
	padding: 3px 0;
}

/* ---------- labels from tags ("Duurzaam cadeau", "Giftset", "Kraamkado") ---------- */
.swan-pp-labels {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: -2px 0 12px;
}
.swan-pp .swan-pp-label {
	font-size: 12px;
	line-height: 1.4;
	padding: 2px 9px;
	border: 1px solid #c9d8c0;
	border-radius: 999px;
	background: #f3f7ef;
	color: #33501f;
	text-decoration: none;
}
.swan-pp .swan-pp-label:hover {
	border-color: #33501f;
}

/* ---------- desktop rhythm ---------- */
/* Even spacing in the buy area (form.cart is a flex column with gap) and 40px between the sections
   below the fold, which had 50-80px each plus a separate "Pin it" row. */
.swan-pp .product-info form.cart:not(.variations_form),
.swan-pp .product-info .woocommerce-variation-add-to-cart {
	row-gap: 12px;
}
.swan-pp .swan-pp-checks {
	margin-top: 4px;
}
@media (min-width: 850px) {
	.swan-pp .product-main {
		padding-bottom: 24px;
	}
	.swan-pp .product-footer .product-description-creator,
	.swan-pp .product-footer .product-reviews,
	.swan-pp .product-footer .product-creative-related,
	.swan-pp .product-footer .related-products-wrapper {
		margin-top: 40px;
	}
	.swan-pp .product-footer .swan-pinterest-button {
		margin-top: 8px;
	}
}

/* ---------- one type scale in the buy column ---------- */
.swan-pp .product-info .swan-pp-order-by {
	font-size: 15px;
	line-height: 1.45;
}
/* Was 21 text styles (10 sizes, 4 weights, ~9 colours). Now: the title (Playfair), the price
   (20px semibold, blue), body text 15px, secondary notes 13px grey; weights 400 and 600; accents
   only for price, stock and stars. */
.swan-pp .product-info {
	--swan-pp-text: #304155;
	--swan-pp-muted: #666;
}
.swan-pp .product-info .swan-pp-maker,
.swan-pp .product-info .swan-pp-delivery,
.swan-pp .product-info .swan-pp-pay-later,
.swan-pp .product-info .swan-seller-note summary,
.swan-pp .product-info .swan-pp-checks,
.swan-pp .product-info .swan-pp-options-message,
.swan-pp .product-info .accordion-title {
	font-size: 15px;
	line-height: 1.45;
	color: var(--swan-pp-text);
}
.swan-pp .product-info .swan-pp-delivery strong,
.swan-pp .product-info .swan-pp-pay-later strong,
.swan-pp .product-info .swan-pp-maker__text a {
	font-weight: 600;
}
.swan-pp .product-info .swan-seller-note summary {
	font-weight: 400;
}
.swan-pp .product-info .swan-pp-maker .swan-pp-maker__rating,
.swan-pp .product-info .swan-pp-delivery__note,
.swan-pp .product-info .swan-seller-note__optional,
.swan-pp .product-info .swan-wishlist-toggle--text,
.swan-pp .product-info .stock {
	font-size: 13px;
	color: var(--swan-pp-muted);
}
.swan-pp .product-info .stock {
	font-weight: 600;
	color: #4f7a2f;
}
.swan-pp .product-info .product-page-price,
.swan-pp .product-info .product-page-price .amount,
.swan-pp .product-info .product-page-price bdi,
.swan-pp .product-info .product-page-price .woocommerce-Price-currencySymbol {
	font-size: 20px;
	font-weight: 600;
}
.swan-pp .product-info .swan-pp-maker .swan-pp-maker__rating,
.swan-pp .product-info .swan-pp-maker .swan-pp-maker__rating span {
	font-weight: 400;
}
.swan-pp .product-info .product-page-price small,
.swan-pp .product-info .swan-pp-from {
	font-size: 13px;
	font-weight: 400;
	color: var(--swan-pp-muted);
}
/* The shipping amount is a WooCommerce price, which Flatsome styles like the product price. */
.swan-pp .product-info .swan-pp-delivery .amount,
.swan-pp .product-info .swan-pp-delivery .amount * {
	font-size: inherit;
	font-weight: 600;
	color: inherit;
}

/* ---------- columns on laptop widths ---------- */
/* Flatsome splits 7/5 (product_image_width 7). Between 850 and 1199px that left the buy column
   ~420px wide, so its text wrapped and it ran 250-520px below the photos. 50/50 there. */
@media (min-width: 850px) and (max-width: 1199px) {
	.swan-pp .product-main .product-gallery {
		flex-basis: 50%;
		max-width: 50%;
	}
}

/* Square thumbnails even when the image is not: ShortPixel's CDN crops them to 100x100, but the
   first request for a crop it has not made yet redirects to the original (and makes the crop in
   the background), so a new product's portrait photos made the cells uneven. On tst the CDN never
   gets its crops. The big photo stays uncropped. */
.swan-pp .product-thumbnails .col > a {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}
.swan-pp .product-thumbnails .col > a img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Thumbnails under the photo on laptop widths, so the photo gets the whole 50% column. */
@media (min-width: 850px) and (max-width: 1199px) {
	.swan-pp .product-gallery .row > .col.large-10,
	.swan-pp .product-gallery .row > .vertical-thumbnails {
		flex-basis: 100%;
		max-width: 100%;
	}
	.swan-pp .product-gallery .row > .vertical-thumbnails {
		order: 2;
		overflow: visible;
		padding-top: 10px;
	}
	/* Flatsome's desktop CSS stacks the slider cells (position relative, width 95%, all !important);
	   here they become a grid of five, wrapping to a second row for more photos. */
	.swan-pp .product-gallery .vertical-thumbnails .flickity-slider {
		position: relative !important;
		display: grid;
		grid-template-columns: repeat(5, 1fr);
		gap: 8px;
	}
	.swan-pp .product-gallery .vertical-thumbnails .product-thumbnails .col {
		width: auto !important;
		margin: 0;
		padding: 0 !important;
	}
}

/* ---------- long titles ---------- */
/* Some makers write 100-150 character titles; at 32px Playfair that was 6 lines before the price.
   Whole title stays visible (it is the h1), only smaller. LONG_TITLE in product-page.php. */
.swan-pp-long-title .product-info .product-title {
	font-size: 20px;
	line-height: 1.3;
}
@media (min-width: 850px) {
	.swan-pp-long-title .product-info .product-title {
		font-size: 24px;
	}
}
