/**
 * Single product - The Photo Shop
 *
 * Brand tokens read from Elementor kit 2887 so the page matches the rest of
 * the site. If the kit colours change, update these four values.
 *
 * ---------------------------------------------------------------------------
 * SECTION 1 neutralises WooCommerce core's float layout. Those rules live in
 * woocommerce-layout.css and woocommerce.css at a specificity a plain
 * .tps-product selector cannot beat, so every selector below deliberately
 * carries the full `.woocommerce div.product.tps-product` prefix. Do not
 * shorten them, and do not reach for !important instead; matching Woo's own
 * specificity is what makes this stable across Woo updates.
 *
 * Nothing is dequeued, so cart, checkout, and the shop archive keep Woo's
 * default layout until you rebuild those too.
 * ---------------------------------------------------------------------------
 */

/* ======================================================== 1. core resets */

/* layout.css floats these to 48% each, inside our grid columns, which is
   what collapsed the summary to 250px and the thumbnails to 11px. */
.woocommerce div.product.tps-product div.images,
.woocommerce div.product.tps-product div.summary {
	float: none;
	width: auto;
	margin-bottom: 0;
}

.woocommerce div.product.tps-product div.images .flex-control-thumbs {
	overflow: visible;
	margin-top: 1.125rem;
}

/* woocommerce.css: li { width: 25%; float: left } */
.woocommerce div.product.tps-product div.images .flex-control-thumbs li {
	width: auto;
	float: none;
}

.woocommerce div.product.tps-product div.images .flex-control-thumbs li img {
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 8px;
	opacity: 0.65;
	cursor: pointer;
	transition: opacity 0.15s ease, box-shadow 0.15s ease;
}

.woocommerce div.product.tps-product div.images .flex-control-thumbs li img:hover {
	opacity: 1;
	box-shadow: 0 0 0 1px #D5DADA;
}

.woocommerce div.product.tps-product div.images .flex-control-thumbs li img.flex-active {
	opacity: 1;
	box-shadow: 0 0 0 1px #AEB6B6;
}

/* layout.css floats the quantity box and the button */
.woocommerce div.product.tps-product form.cart div.quantity {
	float: none;
	margin: 0;
}

.woocommerce div.product.tps-product form.cart .button {
	float: none;
}

.woocommerce div.product.tps-product form.cart .variations {
	margin-bottom: 1rem;
}

/* ===================================================== 2. page styling */

.tps-product {
	--tps-teal:        #0E9594;
	--tps-teal-bright: #11B8B6;
	--tps-yellow:      #FFBD00;
	--tps-purple:      #4E36A3;
	--tps-coral:       #FF5544;
	--tps-ink:         #252525;
	--tps-rule:        #ECECEC;
	--tps-muted:       #6B6B6B;
	--tps-surface:     #F7F9F9;

	--tps-display: "Oswald", sans-serif;
	--tps-body:    "Inter", sans-serif;

	color: var(--tps-ink);
	font-family: var(--tps-body);
}

/* ------------------------------------------------------- page container
 *
 * Hello Elementor leaves .site-main unconstrained, so the product page ran
 * edge to edge while the header and footer capped at 1200px.
 *
 * 1200px is Elementor kit 2887's --container-max-width. The header and
 * footer sit their content 10px inside that, so the same padding here puts
 * the breadcrumb, gallery and tabs on the exact same left edge as the logo.
 *
 * If you change the container width in Elementor > Site Settings > Layout,
 * change the 1200px below to match.
 */
body.single-product .site-main {
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 10px;
	box-sizing: border-box;
}

/* 10px is too tight to read against on a phone, and the 1200px cap is not
   in play at that size anyway. */
@media (max-width: 600px) {
	body.single-product .site-main {
		padding-inline: 16px;
	}
}

/* ---------------------------------------------------------------- layout */

.tps-product__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: clamp(1.75rem, 4vw, 3.5rem);
	align-items: start;
	margin-bottom: 3rem;
}

.tps-product__media {
	position: sticky;
	top: 2rem;
	min-width: 0;
}

.tps-product__summary {
	min-width: 0;
}

@media (max-width: 900px) {
	.tps-product__grid {
		grid-template-columns: 1fr;
		gap: 1.75rem;
	}
	.tps-product__media {
		position: static;
	}
}

/* ------------------------------------------------------------- headings */

.tps-product .product_title {
	font-family: var(--tps-display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	line-height: 1.05;
	font-size: clamp(2rem, 4.5vw, 3rem);
	margin: 0 0 0.5rem;
	color: var(--tps-ink);
}

/* ---------------------------------------------------------------- price */

/* "From $8.00 per print" above the selector. Same specificity note as the
   variation price below. */
.woocommerce div.product.tps-product p.price {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	margin: 0 0 1.25rem;
	font-family: var(--tps-display);
}

.tps-price-lead {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--tps-teal);
}

.tps-price-unit {
	font-family: var(--tps-body);
	font-size: 0.8125rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--tps-muted);
}

/* --------------------------------------------------------- how it works */

.tps-steps {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 1.125rem 1.25rem;
	background: var(--tps-surface);
	border-radius: 12px;
	display: grid;
	gap: 0.625rem;
}

.tps-steps li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.4;
}

.tps-steps__n {
	flex: 0 0 auto;
	width: 1.5rem;
	height: 1.5rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--tps-teal);
	color: #fff;
	font-family: var(--tps-display);
	font-size: 0.8125rem;
	font-weight: 700;
}

/* ----------------------------------------------------------- price list */

.tps-pricelist {
	margin: 0 0 1.5rem;
	border: 1px solid var(--tps-rule);
	border-radius: 12px;
	overflow: hidden;
}

.tps-pricelist > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.875rem 1.125rem;
	cursor: pointer;
	list-style: none;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--tps-teal);
	background: #fff;
}

.tps-pricelist > summary::-webkit-details-marker { display: none; }

.tps-pricelist > summary:hover { background: var(--tps-surface); }

.tps-pricelist > summary:focus-visible {
	outline: 2px solid var(--tps-teal);
	outline-offset: -2px;
}

.tps-pricelist__chev { transition: transform 0.18s ease; }
.tps-pricelist[open] .tps-pricelist__chev { transform: rotate(180deg); }

.tps-pricelist__grid {
	list-style: none;
	margin: 0;
	padding: 0.25rem 1.125rem 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
	gap: 0 1.5rem;
}

/* "4 X 6: $8.00" reads unambiguously. A space-between row puts the price
   nearer the next size than its own, which is how you misread a price. */
.tps-pricelist__grid li {
	display: flex;
	align-items: baseline;
	justify-content: flex-start;
	gap: 0.3rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--tps-rule);
	margin: 0;
	font-size: 0.9375rem;
}

.tps-pricelist__size {
	font-family: var(--tps-display);
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--tps-muted);
}

.tps-pricelist__size::after {
	content: ":";
}

.tps-pricelist__price {
	font-weight: 600;
	white-space: nowrap;
	color: var(--tps-ink);
}

.tps-pricelist__note {
	margin: 0;
	padding: 0.75rem 1.125rem 1rem;
	font-size: 0.8125rem;
	color: var(--tps-muted);
}

/* -------------------------------------------------------- variation row */

/* Card matching the steps strip: same surface, radius and padding. */
.tps-product .variations {
	display: block;
	width: 100%;
	margin: 0 0 1rem;
	padding: 1.125rem 1.25rem;
	background: var(--tps-surface);
	border: 0;
	border-radius: 12px;
}

.tps-product .variations tbody,
.tps-product .variations tr {
	display: block;
	width: 100%;
	background: none;
}

.tps-product .variations th,
.tps-product .variations td {
	display: block;
	width: 100%;
	padding: 0;
	text-align: left;
	border: 0;
	background: none;
}

.tps-product .variations .label label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--tps-muted);
}

.tps-product .variations select {
	width: 100%;
	padding: 0.75rem 2.5rem 0.75rem 0.875rem;
	font-family: var(--tps-body);
	font-size: 1rem;
	color: var(--tps-ink);
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230E9594' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.875rem center;
	border: 1px solid var(--tps-rule);
	border-radius: 8px;
	appearance: none;
	-webkit-appearance: none;
}

.tps-product .variations select:focus {
	outline: none;
	border-color: var(--tps-teal);
	box-shadow: 0 0 0 3px rgba(14, 149, 148, 0.15);
}

.tps-product .reset_variations {
	display: inline-block;
	margin-top: 0.4rem;
	font-size: 0.8125rem;
	color: var(--tps-muted);
}

/* --------------------------------------------- add-on plugin field block */

.tps-product .thwepof-input-container,
.tps-product .thwepo-sections,
.tps-product .wcpo-options {
	margin: 1.25rem 0;
	display: grid;
	gap: 1rem;
}

.tps-product .thwepof-input-container label,
.tps-product .wcpo-options label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--tps-muted);
}

.tps-product .thwepof-input-container input[type="text"],
.tps-product .thwepof-input-container input[type="date"],
.tps-product .thwepof-input-container textarea,
.tps-product .thwepof-input-container select {
	width: 100%;
	padding: 0.75rem 0.875rem;
	font-family: var(--tps-body);
	font-size: 1rem;
	border: 1px solid var(--tps-rule);
	border-radius: 8px;
	background: #fff;
}

.tps-product .thwepof-input-container textarea {
	min-height: 5.5rem;
	resize: vertical;
}

.tps-product .thwepof-input-container input:focus,
.tps-product .thwepof-input-container textarea:focus,
.tps-product .thwepof-input-container select:focus {
	outline: none;
	border-color: var(--tps-teal);
	box-shadow: 0 0 0 3px rgba(14, 149, 148, 0.15);
}

/* Dashed dropzone for whichever upload field the add-on renders */
.tps-product input[type="file"] {
	width: 100%;
	padding: 1.5rem 1rem;
	border: 2px dashed var(--tps-rule);
	border-radius: 12px;
	background: var(--tps-surface);
	font-size: 0.9375rem;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.tps-product input[type="file"]:hover {
	border-color: var(--tps-teal-bright);
	background: #fff;
}

/* ------------------------------------------------------- quantity + cta */

.tps-qty-label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--tps-muted);
}

.tps-product form.cart {
	display: block;
	margin-top: 1.25rem;
}

/*
 * On a variable product Woo nests the quantity box and the button inside
 * .woocommerce-variation-add-to-cart, so that is the flex row, not form.cart.
 * align-items: end keeps the "How many prints?" label from pushing the
 * button out of line.
 */
.tps-product .woocommerce-variation-add-to-cart,
.tps-product form.cart:not(.variations_form) {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.75rem;
}

.tps-product .quantity {
	flex: 0 0 auto;
}

.tps-product form.cart .quantity input.qty {
	width: 5.5rem;
	padding: 0.8rem 0.5rem;
	font-family: var(--tps-display);
	font-size: 1.125rem;
	font-weight: 500;
	text-align: center;
	border: 1px solid var(--tps-rule);
	border-radius: 8px;
}

.tps-product form.cart .quantity input.qty:focus {
	outline: none;
	border-color: var(--tps-teal);
	box-shadow: 0 0 0 3px rgba(14, 149, 148, 0.15);
}

.tps-product form.cart button.single_add_to_cart_button {
	flex: 1 1 auto;
	min-width: 12rem;
	padding: 0.9rem 1.75rem;
	font-family: var(--tps-display);
	font-size: 1rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #fff;
	background: var(--tps-teal);
	border: 0;
	border-radius: 50px;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.06s ease;
}

.tps-product form.cart button.single_add_to_cart_button:hover {
	background: var(--tps-teal-bright);
}

.tps-product form.cart button.single_add_to_cart_button:active {
	transform: translateY(1px);
}

.tps-product form.cart button.single_add_to_cart_button:focus-visible {
	outline: 3px solid var(--tps-purple);
	outline-offset: 2px;
}

.tps-product form.cart button.disabled,
.tps-product form.cart button[disabled] {
	background: #BFC7C7;
	cursor: not-allowed;
}

/* Below this the 12rem minimum would force the button to sit beside the
   quantity box in a cramped row. Let it take its own full-width line. */
@media (max-width: 480px) {
	.tps-product form.cart button.single_add_to_cart_button {
		flex: 1 1 100%;
		min-width: 0;
	}
}

/* Selected-variation price. The variation description above it is blanked
   in PHP, so this is the only thing in the block. */
.tps-product .single_variation {
	margin: 0 0 1rem;
}

.tps-product .woocommerce-variation-description {
	display: none;
}

/* Full prefix required: woocommerce.css sets `.woocommerce div.product
   span.price { font-size: 1.25em }`, which outranks a shorter selector and
   held this at 20px. */
.woocommerce div.product.tps-product .woocommerce-variation-price span.price,
.woocommerce div.product.tps-product .single_variation span.price {
	display: block;
	margin: 0;
	font-family: var(--tps-display);
	font-size: clamp(2rem, 4vw, 2.5rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.01em;
	color: var(--tps-ink);
}

.woocommerce div.product.tps-product .woocommerce-variation-price span.price .woocommerce-Price-currencySymbol,
.woocommerce div.product.tps-product .single_variation span.price .woocommerce-Price-currencySymbol {
	font-size: 0.65em;
	font-weight: 600;
	vertical-align: 0.28em;
	margin-right: 0.08em;
	color: var(--tps-muted);
}

/* "4 prints x $25.00 each", written by print-total.js under the total. */
.tps-product .tps-total-note {
	margin: 0.375rem 0 0;
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: var(--tps-muted);
}

.tps-mixed-note {
	margin: 0.25rem 0 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--tps-muted);
	max-width: 46ch;
}

/* ------------------------------------------------------------- gallery */

.tps-product .woocommerce-product-gallery {
	margin: 0;
}

.tps-product .woocommerce-product-gallery__wrapper {
	border-radius: 14px;
	overflow: hidden;
}

/* Thumb strip grid. The per-item sizing lives in section 1, because Woo
   core outguns any selector short enough to live here. */
.tps-product .flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 0.5rem;
	margin: 0.625rem 0 0;
	padding: 0;
	list-style: none;
}

.tps-product .flex-control-thumbs li {
	margin: 0;
}

/* ------------------------------------------------------- short content */

.tps-product .woocommerce-product-details__short-description {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: #4A4A4A;
	margin-bottom: 1.5rem;
}

.tps-product .woocommerce-product-details__short-description p:last-child {
	margin-bottom: 0;
}

/* ============================================== tabs: description etc.
 *
 * Woo core draws these as rounded "folder" tabs built from ::before and
 * ::after pseudo-elements with borders and radii. Those are unset first,
 * then rebuilt as a plain underlined row.
 */

.tps-product .woocommerce-tabs {
	margin: 3.5rem 0 0;
	padding-top: 2.25rem;
	border-top: 1px solid var(--tps-rule);
}

.woocommerce div.product.tps-product .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 2rem;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
	border-bottom: 1px solid var(--tps-rule);
}

.woocommerce div.product.tps-product .woocommerce-tabs ul.tabs::before,
.woocommerce div.product.tps-product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product.tps-product .woocommerce-tabs ul.tabs li::after {
	display: none;
}

.woocommerce div.product.tps-product .woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.woocommerce div.product.tps-product .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 0 0 0.875rem;
	font-family: var(--tps-display);
	font-size: 0.9375rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--tps-muted);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.woocommerce div.product.tps-product .woocommerce-tabs ul.tabs li a:hover {
	color: var(--tps-ink);
}

.woocommerce div.product.tps-product .woocommerce-tabs ul.tabs li.active a {
	color: var(--tps-teal);
	border-bottom-color: var(--tps-teal);
	font-weight: 600;
}

.woocommerce div.product.tps-product .woocommerce-tabs .panel {
	margin: 0;
	padding: 0;
	border: 0;
	max-width: 68ch;
	font-size: 0.9375rem;
	line-height: 1.7;
	color: #4A4A4A;
}

/* Woo repeats the tab name as an h2 inside each panel. The tab says it. */
.woocommerce div.product.tps-product .woocommerce-tabs .panel > h2:first-child {
	display: none;
}

.woocommerce div.product.tps-product .woocommerce-tabs .panel table.shop_attributes {
	width: 100%;
	border: 0;
	border-collapse: collapse;
}

.woocommerce div.product.tps-product .woocommerce-tabs .panel table.shop_attributes th,
.woocommerce div.product.tps-product .woocommerce-tabs .panel table.shop_attributes td {
	padding: 0.75rem 0;
	border: 0;
	border-bottom: 1px solid var(--tps-rule);
	font-style: normal;
	text-align: left;
	background: none;
}

.woocommerce div.product.tps-product .woocommerce-tabs .panel table.shop_attributes th {
	width: 30%;
	font-family: var(--tps-display);
	font-weight: 500;
	text-transform: uppercase;
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
	color: var(--tps-muted);
}

@media (max-width: 600px) {
	.woocommerce div.product.tps-product .woocommerce-tabs ul.tabs {
		gap: 0.25rem 1.25rem;
	}
	.woocommerce div.product.tps-product .woocommerce-tabs ul.tabs li a {
		font-size: 0.8125rem;
	}
}

/* ====================================================== related / upsells */

.tps-product + .related,
.woocommerce div.product.tps-product .related,
.woocommerce div.product.tps-product .upsells {
	margin-top: 3.5rem;
	padding-top: 2.25rem;
	border-top: 1px solid var(--tps-rule);
}

.woocommerce div.product.tps-product .related > h2,
.woocommerce div.product.tps-product .upsells > h2 {
	font-family: var(--tps-display);
	font-size: 1.375rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	margin: 0 0 1.5rem;
}

.woocommerce div.product.tps-product ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
	gap: 1.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce div.product.tps-product ul.products::before,
.woocommerce div.product.tps-product ul.products::after {
	display: none;
}

.woocommerce div.product.tps-product ul.products li.product {
	width: auto;
	margin: 0;
	float: none;
	clear: none;
}

.woocommerce div.product.tps-product ul.products li.product img {
	border-radius: 10px;
	margin-bottom: 0.75rem;
}
