/* Shared unframed artwork treatment for shop/discovery cards and detail slides. */
.woocommerce-shop[data-haystack-shop-frame="unframed"] :is(.haystack-native-products, .haystack-artist-products) .product-image img,
.single-product .haystack-discovery-card__image img,
.single-product.haystack-framing-product .haystack-artwork-viewer__detail-image {
	filter: drop-shadow(0 8px 12px rgba(31, 27, 20, 0.24)) drop-shadow(0 2px 3px rgba(31, 27, 20, 0.16));
}

.haystack-shop-intro {
	max-width: 450px;
	margin: 70px 0 95px;
	margin-left: 8.333333%;
	text-align: left;
}

.haystack-shop-intro h1 {
	max-width: 450px;
	margin: 0 0 40px;
	font-size: 46px;
	line-height: 52px;
	letter-spacing: 0;
}

.haystack-shop-intro p {
	max-width: 450px;
	margin: 0;
	font-size: 16px;
	line-height: 24px;
}

.haystack-shop-view-nav {
	margin-bottom: 75px;
}

.haystack-shop-view-nav .products-tabs {
	display: flex;
	gap: 14px;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

.haystack-shop-view-nav .products-tabs button {
	padding: 11px 22px 10px;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.haystack-shop-view-nav .products-tabs .active button,
.haystack-shop-view-nav .products-tabs button:hover,
.haystack-shop-view-nav .products-tabs button:focus-visible {
	background: #000;
	color: #fff;
}

.haystack-shop-panel[hidden],
.artist-wrapper[hidden],
.haystack-artist-selected[hidden],
.haystack-artist-prompt[hidden] {
	display: none !important;
}

.haystack-artist-view .artists-list {
	display: flex;
	flex-direction: column;
	row-gap: 4px;
	margin: 0;
	padding: 0 0 50px;
	list-style: none;
}

.haystack-artist-view .artists-list li {
	margin: 0;
}

.haystack-artist-view .artists-list button {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	width: auto;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 12px;
	font-weight: 400;
	line-height: 14px;
	letter-spacing: .05em;
	text-align: left;
}

.haystack-artist-view .artists-list button::before {
	display: none;
	width: 10px;
	height: 10px;
	content: '×';
	font-size: 14px;
	font-weight: 400;
	line-height: 9px;
	text-align: center;
}

.haystack-artist-view .artists-list button:hover,
.haystack-artist-view .artists-list button:focus-visible,
.haystack-artist-view .artists-list button.active {
	color: var(--artist-color);
}

.haystack-artist-view .artists-list button > span {
	transform: skewX(0deg);
	transition: transform .2s ease-in-out;
}

.haystack-artist-view .artists-list button:hover > span,
.haystack-artist-view .artists-list button:focus-visible > span,
.haystack-artist-view .artists-list button.active > span {
	transform: skewX(-15deg);
}

.haystack-artist-view .artists-list button.active {
	font-weight: 700;
}

.haystack-artist-view .artists-list button.active::before {
	display: block;
}

.haystack-artist-selected {
	margin-bottom: 35px;
	padding-bottom: 24px;
	border-bottom: 1px solid rgba(0, 0, 0, .15);
}

.haystack-artist-selected .wc-block-product-filter-removable-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.haystack-artist-selected .wc-block-product-filter-removable-chips__item {
	display: flex;
	align-items: center;
	width: auto;
	max-width: 100%;
	padding: 6px 9px;
	border-radius: 2px;
	background: rgba(58, 140, 132, .1);
	color: #245651;
}

.haystack-artist-selected .wc-block-product-filter-removable-chips__remove {
	min-width: 0;
	padding: 0 0 0 7px;
	border: 0;
	background: transparent;
	color: inherit;
}

.haystack-artist-clear {
	margin-top: 10px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #3a8c84;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.haystack-artist-results {
	scroll-margin-top: 125px;
}

.haystack-native-shop .filters-column {
	padding-inline: 0 !important;
}

.haystack-native-shop .filters-column-inner {
	padding-inline: 20px;
}

.haystack-artist-view #artists-filters {
	border-right: 1px solid #a6a6a6;
	padding-right: 10px;
}

.haystack-artist-view .artist-wrapper {
	padding-bottom: 100px;
	border-bottom: 1px solid #a6a6a6;
}

.haystack-artist-view .artist-wrapper + .artist-wrapper {
	padding-top: 40px;
}

.haystack-artist-view .artist-title {
	margin-bottom: 40px;
}

.haystack-artist-view .artist-title h3 {
	margin: 0;
}

.haystack-artist-view .artist-title a {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	row-gap: 10px;
	column-gap: 30px;
	color: inherit;
	font-size: 28px;
	line-height: 32px;
	text-decoration: none;
}

.haystack-artist-view .artist-title .read-more-label {
	color: #a6a6a6;
	font-size: 12px;
	font-style: italic;
	font-weight: 800;
	line-height: 14px;
	letter-spacing: .1em;
	opacity: 0;
	text-transform: uppercase;
	transition: opacity .3s ease-in-out;
}

.haystack-artist-view .artist-title a:hover,
.haystack-artist-view .artist-title a:focus-visible {
	color: var(--artist-color);
}

.haystack-artist-view .artist-title a:hover .read-more-label,
.haystack-artist-view .artist-title a:focus-visible .read-more-label {
	color: #a6a6a6;
	opacity: 1;
}

.haystack-artist-products {
	display: flex;
	flex-wrap: wrap;
	gap: 100px 0;
	margin-inline: -20px;
}

.haystack-artist-products .product-wrapper {
	width: 33.3333%;
	padding-inline: 20px;
}

.haystack-native-filter-blocks .wc-block-product-filters__content,
.haystack-native-filter-blocks .wc-block-product-filters__overlay-content {
	display: block;
}

.haystack-native-shop .product-archive__refinery.grid-product-wrapper,
.haystack-native-filter-blocks,
.haystack-native-filter-blocks .wc-block-product-filters__content {
	float: none;
	width: 100%;
	max-width: none;
}

.haystack-native-filter-blocks .wp-block-woocommerce-product-filter-attribute {
	margin: 0;
}

.haystack-native-filter-blocks .wp-block-woocommerce-product-filter-attribute + .wp-block-woocommerce-product-filter-attribute {
	margin-top: 36px;
}

.haystack-native-filter-blocks .haystack-native-filter-title {
	margin: 0 0 12px;
	font-family: "Area Normal", sans-serif;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.haystack-filter-tooltip {
	appearance: none;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 6px;
	vertical-align: 1px;
	cursor: help;
}

.haystack-filter-tooltip__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 12px;
	height: 12px;
	border: 1px solid currentColor;
	border-radius: 50%;
	font-size: 8px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
}

.haystack-filter-tooltip__content {
	position: absolute;
	top: 50%;
	left: calc(100% + 10px);
	z-index: 20;
	width: max-content;
	max-width: 190px;
	padding: 7px 10px;
	border-radius: 2px;
	background: #000;
	color: #fff;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.35;
	letter-spacing: .02em;
	opacity: 0;
	pointer-events: none;
	text-transform: none;
	transform: translate(-4px, -50%);
	transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
	visibility: hidden;
}

.haystack-filter-tooltip:hover .haystack-filter-tooltip__content,
.haystack-filter-tooltip:focus .haystack-filter-tooltip__content,
.haystack-filter-tooltip:focus-visible .haystack-filter-tooltip__content {
	opacity: 1;
	transform: translate(0, -50%);
	visibility: visible;
}

.haystack-native-filter-blocks ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.haystack-native-filter-blocks label,
.haystack-native-filter-blocks button {
	font-size: 12px;
	letter-spacing: .05em;
}

.haystack-native-filter-blocks .wc-block-product-filter-checkbox-list__item {
	margin: 0 0 8px;
}

.haystack-native-filter-blocks .wc-block-product-filter-checkbox-list__input {
	margin-right: 8px;
}

.haystack-native-filter-blocks .wc-block-product-filter-active {
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(0, 0, 0, .15);
}

.haystack-native-filter-blocks .wc-block-product-filter-removable-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.haystack-native-filter-blocks .wc-block-product-filter-removable-chips__item {
	width: auto;
	max-width: 100%;
	margin: 0;
	padding: 6px 9px;
	border: 0;
	border-radius: 2px;
	background: rgba(58, 140, 132, .1);
	color: #245651;
}

.haystack-native-filter-blocks .wc-block-product-filter-removable-chips__remove {
	min-width: 0;
	padding: 0 0 0 7px;
	color: inherit;
}

.haystack-native-filter-blocks .wc-block-product-filter-clear-button,
.haystack-native-filter-blocks .haystack-native-clear-filters a {
	margin-top: 10px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #3a8c84;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.haystack-native-filter-blocks .wc-block-product-filter-clear-button:hover,
.haystack-native-filter-blocks .wc-block-product-filter-clear-button:focus-visible,
.haystack-native-filter-blocks .haystack-native-clear-filters a:hover,
.haystack-native-filter-blocks .haystack-native-clear-filters a:focus-visible {
	color: #245651;
}

.haystack-native-filter-blocks .haystack-native-clear-filters {
	margin: 10px 0 0;
}

.haystack-native-filter-blocks :focus-visible {
	outline: 2px solid #3a8c84;
	outline-offset: 3px;
}

.haystack-native-products-snapshot {
	position: absolute;
	z-index: 3;
	overflow: hidden;
	background: #fff;
	pointer-events: none;
}

.haystack-native-products.wc-block-product-template {
	display: flex !important;
	flex-wrap: wrap;
	gap: 100px 0;
	margin-inline: -20px;
	min-height: 200px;
}

.haystack-native-products.wc-block-product-template > li {
	display: contents;
}

.haystack-native-products .product-wrapper {
	width: 33.3333%;
	padding-inline: 20px;
}

.haystack-native-commerce .woocommerce-pagination {
	margin: 60px 0 100px;
	text-align: center;
}

.haystack-native-commerce .haystack-shop-label {
	border-top: 1px solid rgba(0, 0, 0, .15);
	padding-top: 12px;
}

@media (min-width: 768px) {
	.haystack-native-shop #artwork-filters.collapse,
	.haystack-native-shop #artists-filters.collapse {
		display: block;
		height: auto !important;
	}
}


/* Match the legacy three-column shop gutters at the small-tablet breakpoint.
 * Woo's template max-width otherwise clips the grid's negative-margin gutters. */
@media (min-width: 768px) and (max-width: 991px) {
	.haystack-native-shop .products-column {
		padding-inline: 10px;
	}

	.haystack-native-products.wc-block-product-template {
		margin-inline: -10px;
		max-width: none;
	}

	.haystack-native-products .product-wrapper {
		padding-inline: 10px;
	}
}

@media (max-width: 767px) {
	.haystack-filter-tooltip__content {
		top: calc(100% + 8px);
		left: 0;
		transform: translateY(-4px);
	}

	.haystack-filter-tooltip:hover .haystack-filter-tooltip__content,
	.haystack-filter-tooltip:focus .haystack-filter-tooltip__content,
	.haystack-filter-tooltip:focus-visible .haystack-filter-tooltip__content {
		transform: translateY(0);
	}

	.haystack-artist-view .filters-column-inner {
		padding-inline: 20px;
	}

	.haystack-artist-view #artists-filters {
		border-right: 0;
		padding-right: 0;
	}

	.haystack-shop-intro {
		margin: 45px 0 65px;
		margin-left: 0;
	}

	.haystack-shop-intro h1 {
		font-size: 40px;
		line-height: 46px;
	}

	.haystack-shop-view-nav {
		margin-bottom: 45px;
	}

	.haystack-shop-view-nav .products-tabs {
		gap: 25px;
	}

	.haystack-native-shop .mobile-filters-toggle {
		display: inline-block;
		margin-bottom: 24px;
	}

	.haystack-native-shop .mobile-filters-toggle > span:last-child {
		display: none;
	}

	.haystack-native-shop .mobile-filters-toggle[aria-expanded="true"] > span:first-child {
		display: none;
	}

	.haystack-native-shop .mobile-filters-toggle[aria-expanded="true"] > span:last-child {
		display: inline;
	}

	.haystack-native-products .product-wrapper {
		width: 50%;
	}

	.haystack-artist-products .product-wrapper {
		width: 50%;
	}
}

@media (max-width: 480px) {
	.haystack-native-products .product-wrapper {
		width: 100%;
	}

	.haystack-artist-products .product-wrapper {
		width: 100%;
	}
}

/* Reclaim 40px on each side of the desktop artwork grid, preserving card gaps. */
@media (min-width: 992px) {
  .haystack-native-products.wc-block-product-template {
    margin-left: -60px;
    max-width: none;
    width: calc(100% + 80px);
  }
}
