/*
Shop styling for the Shopify plugin (/products/…, /collections/…, cart and quick view).

Loaded from functions.php after the plugin's own stylesheets
(plugins/shopify-plugin/includes/components/frontend/styles/), so a selector
with the same specificity as the plugin's wins here. Look up the plugin's rule
for an element, copy its selector and override what's needed.
*/

/* ---------- General ---------- */

/* the plugin's components use their own fonts and rounded corners */
.shopify-product-content,
.shopify-collection-content,
.product-modal {
	font-family: "FuturaBT-Medium", Arial, sans-serif;
}
.shopify-product-content button,
.shopify-collection-content button,
.product-modal button {
	font-family: inherit;
}

/* ---------- Product detail page (/products/…) ---------- */

.single-product {
	border-radius: 0;
}
.single-product__container {
	padding: 0;
	gap: 40px;
}
.single-product__details {
	background: transparent;
	border-radius: 0;
	padding: 0;
	gap: 24px;
}
.single-product__title {
	margin: 0;
	font-size: 26px;
	font-weight: normal;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	text-wrap: balance;
}
.single-product__price {
	color: inherit;
	font-size: 18px;
	font-weight: normal;
}
.single-product__compare-price {
	opacity: 0.5;
}
.single-product__description-text {
	color: inherit;
	font-size: 15px;
	line-height: 21px;
	letter-spacing: 0;
}

/* buttons: square, uppercase, like the SHOP button */
.single-product__add-button,
.single-product__buy-button {
	min-height: 51px;
	border-radius: 0;
	font-size: 16px;
	font-weight: normal;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	transition: background-color 0.2s, color 0.2s;
}
.single-product__add-button {
	background-color: #000;
	color: #fff;
}
.single-product__add-button:hover {
	background-color: #333;
}
.single-product__buy-button {
	background-color: transparent;
	/* the plugin sets this border with !important */
	border: 1px solid #000 !important;
	color: #000;
}
.single-product__buy-button:hover {
	background-color: #000;
	color: #fff;
	opacity: 1;
}
.single-product__incrementor {
	border-color: #000;
	border-radius: 0;
}
.single-product__incrementor button {
	color: inherit;
}
.single-product__incrementor button:hover {
	background: rgba(0, 0, 0, 0.06);
}

/* description accordion */
.single-product__accordion__item {
	border: 0;
	border-top: 1px solid #ccc;
	border-bottom: 1px solid #ccc;
	border-radius: 0;
}
.single-product__accordion__header {
	padding: 16px 0;
	font-size: 15px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.single-product__accordion__header::after {
	right: 0;
	top: 15px;
}
.single-product__accordion__header.active {
	border-bottom: 0;
}
.single-product__accordion__item .single-product__accordion__content {
	padding: 0;
}
/* open by default: functions.php marks the header .active once Shopify has rendered it.
   No height limit, so it fits whatever the description's length; the plugin's own
   inline max-height takes over when it's closed and reopened by a click */
.single-product__accordion__header.active + .single-product__accordion__content {
	max-height: none;
}

/* photo gallery (shopify/pdp.php): one large photo, thumbnails below */
.product-gallery {
	width: 100%;
}
.product-gallery__slide {
	display: none;
}
.product-gallery__slide.is-active {
	display: block;
}
/* square frame, whole photo visible; the fixed frame keeps the page from jumping between
   portrait and landscape photos. shopify-media injects "object-fit: cover !important" plus
   a blurred placeholder background per image, hence the !important here */
.product-gallery__slide img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: contain !important;
	background: #fff !important;
}
/* shopify-list-context is display: contents, so the thumbnails are laid out by this wrapper */
.product-gallery__thumbs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 8px;
}
.product-gallery.has-one-photo .product-gallery__thumbs,
.product-gallery.has-one-photo .product-gallery__arrow {
	display: none;
}

/* previous/next arrows on the large photo; shown on hover with a mouse, always on touch */
.product-gallery__main {
	position: relative;
}
.single-product-layout button.product-gallery__arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	padding: 0;
	border: 0;
	background: rgba(255, 255, 255, 0.85);
	color: #000;
	opacity: 0;
	transition: opacity 0.2s, background-color 0.2s;
}
.product-gallery__arrow--prev {
	left: 0;
}
.product-gallery__arrow--next {
	right: 0;
}
.product-gallery__main:hover .product-gallery__arrow,
.single-product-layout button.product-gallery__arrow:focus-visible {
	opacity: 1;
}
.single-product-layout button.product-gallery__arrow:hover {
	background: #fff;
}
@media (hover: none) {
	.single-product-layout button.product-gallery__arrow {
		opacity: 1;
	}
}
.single-product-layout button.product-gallery__thumb {
	width: 64px;
	height: 64px;
	padding: 0;
	border: 1px solid transparent;
	background: #fff;
	opacity: 0.6;
	transition: opacity 0.2s, border-color 0.2s;
}
.single-product-layout button.product-gallery__thumb:hover,
.single-product-layout button.product-gallery__thumb.is-active {
	opacity: 1;
}
.single-product-layout button.product-gallery__thumb.is-active {
	border-color: #000;
}
.product-gallery__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---------- Collection pages (/collections/…) and product cards ---------- */

.shopify-collection-content {
	padding: 0;
}
.collection-grid__container {
	max-width: none;
}
/* three columns of ~300px like the home grid; two on tablets, one on phones */
.shopify-collection-content .collection-grid__grid {
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 40px 30px;
}
.product-card,
.shopify-collection-content .product-card {
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
	transition: transform 0.3s, box-shadow 0.3s;
}
/* hover: the card lifts with a soft shadow, as on the old Buy Button shop page */
.product-card:hover,
.shopify-collection-content .product-card:hover {
	transform: none;
	box-shadow: none;
}
@media (hover: hover) {
	.product-card:hover,
	.shopify-collection-content .product-card:hover {
		transform: translateY(-5px);
		box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
	}
}
.product-card__image-container,
.shopify-collection-content .product-card__image-container {
	height: auto;
	aspect-ratio: 1 / 1;
	border-radius: 0;
	background: #fff;
}
.product-card__image-container img,
.shopify-collection-content .product-card__image-container img {
	width: 100%;
	height: 100%;
	border-radius: 0;
	object-fit: contain;
}
/* the photo itself stays put on hover (the plugin zooms and fades it) */
.product-card:hover .product-card__image-container img {
	transform: none;
	opacity: 1;
}
.product-card .product-card__details,
.shopify-collection-content .product-card__details {
	display: block;
	padding: 12px 0 16px;
	text-align: center;
}
.product-card .product-card__details .product-card__title,
.shopify-collection-content .product-card__title {
	margin: 0 0 4px;
	color: inherit;
	font-size: 14px;
	font-weight: normal;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.product-card__title:hover {
	text-decoration: none;
}
.product-card__price,
.shopify-collection-content .product-card__price {
	color: inherit;
	font-size: 14px;
	font-weight: normal;
}
/* title and price sit in a link, which the theme colours grey; use the normal text colour */
.product-card .product__link {
	color: #000;
}

/* No "Quick shop" button on the cards: the plugin setting Shopify → Settings → Product view
   is "Detailed product page only", so cards link straight to the product page */

.pagination-button-list button {
	border-color: #000;
	border-radius: 0;
}

/* ---------- Dark mode ---------- */
@media (prefers-color-scheme: dark) {
	.single-product__add-button {
		background-color: #ededed;
		color: #111;
	}
	.single-product__add-button:hover {
		background-color: #fff;
	}
	.single-product__buy-button {
		border-color: #ededed !important;
		color: #ededed;
	}
	.single-product__buy-button:hover {
		background-color: #ededed;
		color: #111;
	}
	.single-product__incrementor {
		border-color: #ededed;
	}
	.single-product__incrementor button:hover {
		background: rgba(255, 255, 255, 0.1);
	}
	.single-product__accordion__item {
		border-color: #444;
	}
	.single-product-layout button.product-gallery__thumb.is-active {
		border-color: #ededed;
	}
	/* the plugin's chevron icon is a grey SVG; lighten it */
	.single-product__accordion__header::after {
		filter: invert(1) brightness(1.5);
	}
	.product-card .product__link {
		color: #ededed;
	}
	/* a black shadow barely shows on the dark background */
	@media (hover: hover) {
		.product-card:hover,
		.shopify-collection-content .product-card:hover {
			box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
		}
	}
	.pagination-button-list button {
		border-color: #ededed;
	}
	.pagination-button-list button svg {
		stroke: #ededed;
	}
	.pagination-button-list button:hover {
		background: #ededed;
		border-color: #ededed;
	}
	.pagination-button-list button:hover svg polyline {
		stroke: #111;
	}
}
