/**
 * Storefront: Personalise hub, ready-made/personalise switch, product page
 * extras and shop navigation.
 */

/* ---- Chips ------------------------------------------------------------- */

.ew-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 20px;
}

.ew-chips__label {
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(35, 36, 40, 0.6);
	margin-right: 4px;
}

.ew-chip {
	display: inline-flex;
	align-items: center;
	min-height: 38px;
	padding: 6px 16px;
	border: 1px solid var(--ew-stone);
	border-radius: 999px;
	background: var(--ew-white);
	color: var(--ew-graphite);
	font-size: 0.9rem;
	text-decoration: none;
	transition: border-color 0.2s var(--ew-ease), background-color 0.2s var(--ew-ease), color 0.2s var(--ew-ease);
}

.ew-chip:hover,
.ew-chip:focus-visible {
	border-color: var(--ew-copper);
	color: var(--ew-graphite);
}

.ew-chip.is-active {
	background: var(--ew-graphite);
	border-color: var(--ew-graphite);
	color: var(--ew-offwhite);
}

.ew-chip--accent {
	background: var(--ew-copper);
	border-color: var(--ew-copper);
	color: var(--ew-white);
}

.ew-chip--accent:hover,
.ew-chip--accent:focus-visible {
	background: #a9663b;
	color: var(--ew-white);
}

.ew-chip--alt {
	border-style: dashed;
}

.ew-chip--small {
	min-height: 32px;
	padding: 4px 12px;
	font-size: 0.82rem;
}

.ew-shop-nav {
	padding-bottom: 16px;
	border-bottom: var(--ew-rule);
}

/* ---- Blank tiles ------------------------------------------------------- */

.ew-blanks {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

@media (min-width: 768px) {
	.ew-blanks {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: var(--ew-gap);
	}
}

.ew-blank {
	display: flex;
	flex-direction: column;
	gap: 6px;
	color: var(--ew-graphite);
	text-decoration: none;
}

.ew-blank__media {
	position: relative;
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: var(--ew-radius);
	background: var(--ew-offwhite);
	border: 1px dashed rgba(194, 122, 74, 0.45);
}

.ew-blank__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s var(--ew-ease);
}

.ew-blank:hover .ew-blank__img,
.ew-blank:focus-visible .ew-blank__img {
	transform: scale(1.04);
}

.ew-blank__badge {
	position: absolute;
	left: 50%;
	bottom: 12px;
	transform: translateX(-50%);
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(35, 36, 40, 0.86);
	color: var(--ew-offwhite);
	font-size: 0.78rem;
	letter-spacing: 0.04em;
	white-space: nowrap;
	transition: background-color 0.2s var(--ew-ease);
}

.ew-blank:hover .ew-blank__badge,
.ew-blank:focus-visible .ew-blank__badge {
	background: var(--ew-copper);
}

.ew-blank__name {
	margin-top: 6px;
	font-family: "DM Serif Display", Georgia, serif;
	font-size: 1.1rem;
	line-height: 1.25;
}

.ew-blank__price {
	font-size: 0.9rem;
	color: rgba(35, 36, 40, 0.7);
}

/* ---- Personalise page --------------------------------------------------- */

.ew-personalise--page {
	max-width: 1200px;
	margin: 0 auto;
}

.ew-personalise__intro {
	max-width: 720px;
	margin-bottom: 40px;
}

.ew-personalise__intro h1 {
	margin: 8px 0 12px;
}

.ew-personalise__intro .ew-chips {
	margin-top: 24px;
}

.ew-personalise__group {
	padding: 40px 0;
	border-top: var(--ew-rule);
	scroll-margin-top: 100px;
}

.ew-personalise__group h2 {
	margin: 0 0 4px;
}

.ew-personalise__group-intro {
	margin: 0 0 24px;
	color: rgba(35, 36, 40, 0.75);
}

.ew-personalise--home {
	background: var(--ew-offwhite);
}

.woocommerce-products-header + .ew-personalise--home,
.ew-shop-nav + .ew-personalise--home {
	margin-bottom: 32px;
}

.woocommerce .ew-personalise--home {
	margin: 0 0 32px;
	padding: 32px 24px;
	border-radius: var(--ew-radius);
}

.woocommerce .ew-personalise--home .ew-container {
	padding: 0;
}

/* ---- Ready-made / personalise switch ------------------------------------ */

.ew-mode {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	margin: 0 0 20px;
	padding: 4px;
	border: var(--ew-rule);
	border-radius: var(--ew-radius);
	background: var(--ew-offwhite);
}

.ew-mode__option {
	display: flex;
	flex-direction: column;
	padding: 10px 14px;
	border-radius: 3px;
	color: var(--ew-graphite);
	text-decoration: none;
	transition: background-color 0.2s var(--ew-ease);
}

.ew-mode__option:hover,
.ew-mode__option:focus-visible {
	background: var(--ew-white);
}

.ew-mode__option.is-active {
	background: var(--ew-graphite);
	color: var(--ew-offwhite);
}

.ew-mode__title {
	font-weight: 500;
	font-size: 0.95rem;
}

.ew-mode__note {
	font-size: 0.8rem;
	opacity: 0.75;
}

.ew-spec-line {
	margin: -4px 0 16px;
	font-size: 0.92rem;
	color: rgba(35, 36, 40, 0.75);
}

/* ---- Cross-link and trust points ---------------------------------------- */

.ew-crosslink {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 20px 0 0;
	padding: 12px;
	border: 1px solid var(--ew-stone);
	border-radius: var(--ew-radius);
	color: var(--ew-graphite);
	text-decoration: none;
	transition: border-color 0.2s var(--ew-ease);
}

.ew-crosslink:hover,
.ew-crosslink:focus-visible {
	border-color: var(--ew-copper);
}

.ew-crosslink__media img {
	display: block;
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: var(--ew-radius);
}

.ew-crosslink__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
}

.ew-crosslink__title {
	font-weight: 500;
}

.ew-crosslink__text {
	font-size: 0.88rem;
	color: rgba(35, 36, 40, 0.75);
}

.ew-crosslink__arrow {
	font-size: 1.3rem;
	color: var(--ew-copper);
}

.ew-trust {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 16px;
	margin: 20px 0 0;
	padding: 16px 0 0;
	border-top: var(--ew-rule);
	list-style: none;
}

.ew-trust__item {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 0.86rem;
	line-height: 1.3;
}

.ew-trust__item svg {
	flex: none;
	width: 22px;
	height: 22px;
	color: var(--ew-copper);
}

/* ---- Tabs content -------------------------------------------------------- */

.ew-spec {
	width: 100%;
	max-width: 640px;
	border-collapse: collapse;
}

.ew-spec th,
.ew-spec td {
	padding: 12px 0;
	border-bottom: var(--ew-rule);
	text-align: left;
	vertical-align: top;
}

.ew-spec th {
	width: 36%;
	font-weight: 500;
}

.ew-list {
	max-width: 680px;
	padding-left: 1.1em;
}

.ew-list li {
	margin-bottom: 8px;
}

.ew-faq {
	max-width: 720px;
	border-top: var(--ew-rule);
}

.ew-faq__item {
	border-bottom: var(--ew-rule);
}

.ew-faq__item summary {
	position: relative;
	padding: 16px 32px 16px 0;
	cursor: pointer;
	font-weight: 500;
	list-style: none;
}

.ew-faq__item summary::-webkit-details-marker {
	display: none;
}

.ew-faq__item summary::after {
	content: "+";
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--ew-copper);
	font-size: 1.3rem;
	transition: transform 0.2s var(--ew-ease);
}

.ew-faq__item[open] summary::after {
	transform: translateY(-50%) rotate(45deg);
}

.ew-faq__item p {
	margin: 0 0 16px;
	color: rgba(35, 36, 40, 0.8);
}

/* ---- How it is made ----------------------------------------------------- */

.ew-made {
	clear: both;
	margin: 48px 0;
	padding: 40px 24px;
	border-radius: var(--ew-radius);
	background: var(--ew-graphite);
	color: var(--ew-offwhite);
}

.ew-made__title {
	margin: 0 0 24px;
	color: var(--ew-offwhite);
	text-align: center;
}

.ew-made__steps {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) {
	.ew-made {
		padding: 48px 40px;
	}

	.ew-made__steps {
		grid-template-columns: repeat(4, 1fr);
	}
}

.ew-made__step {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding-top: 16px;
	border-top: 1px solid rgba(194, 122, 74, 0.6);
}

.ew-made__num {
	color: var(--ew-copper);
	font-size: 0.8rem;
	letter-spacing: 0.14em;
}

.ew-made__name {
	font-family: "DM Serif Display", Georgia, serif;
	font-size: 1.25rem;
}

.ew-made__text {
	font-size: 0.9rem;
	color: rgba(244, 242, 238, 0.75);
}

/* ---- Designs in this shape ---------------------------------------------- */

.ew-shape-designs {
	clear: both;
	margin: 48px 0 0;
	scroll-margin-top: 100px;
}

.ew-shape-designs .ew-section__head {
	margin-bottom: 24px;
}

/* ---- Card badge --------------------------------------------------------- */

.woocommerce ul.products li.product {
	position: relative;
}

.ew-card-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ew-card-badge--own {
	background: var(--ew-copper);
	color: var(--ew-white);
}

.single-product .related.products {
	clear: both;
	margin-top: 64px;
	padding-top: 48px;
	border-top: var(--ew-rule);
}

/* ---- Drawn designs on a blank product ---------------------------------- */

.ew-artwork .ew-section__head p {
	margin: 4px 0 0;
	color: rgba(35, 36, 40, 0.75);
}

.ew-artwork__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

@media (min-width: 640px) {
	.ew-artwork__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1000px) {
	.ew-artwork__grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: 20px;
	}
}

.ew-artwork__tile {
	display: flex;
	flex-direction: column;
	gap: 4px;
	color: var(--ew-graphite);
	text-decoration: none;
}

.ew-artwork__media {
	position: relative;
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: var(--ew-radius);
	background: var(--ew-offwhite);
	border: 1px solid var(--ew-stone);
	transition: border-color 0.2s var(--ew-ease);
}

.ew-artwork__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ew-artwork__etch {
	position: absolute;
	top: var(--ewp-etch-y, 41%);
	left: var(--ewp-etch-x, 50%);
	width: var(--ewp-etch-w, 34%);
	height: var(--ewp-etch-h, 40%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ew-art-ink);
	transform: translate(-50%, -50%);
}

.ew-artwork__etch svg {
	width: 78%;
	height: 78%;
}

.ew-artwork__tile:hover .ew-artwork__media,
.ew-artwork__tile:focus-visible .ew-artwork__media {
	border-color: var(--ew-copper);
}

.ew-artwork__name {
	margin-top: 6px;
	font-family: "DM Serif Display", Georgia, serif;
	font-size: 1.05rem;
}

.ew-artwork__price {
	font-size: 0.88rem;
	color: rgba(35, 36, 40, 0.7);
}

.ew-artwork__zoom {
	position: absolute;
	inset: 0;
	display: block;
}

/* Big "see more" button under the home page grids. */
.ew-more {
	display: flex;
	justify-content: center;
	margin-top: 32px;
}

.ew-more__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	max-width: 420px;
	min-height: 60px;
	padding: 16px 32px;
	font-family: var(--global-body-font-family, "Jost", sans-serif);
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	color: #f4f2ee;
	background: #232428;
	border: 2px solid #232428;
	border-radius: 4px;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.ew-more__button:hover,
.ew-more__button:focus-visible {
	color: #f4f2ee;
	background: #c27a4a;
	border-color: #c27a4a;
}

.ew-more__button span {
	transition: transform 0.2s ease;
}

.ew-more__button:hover span {
	transform: translateX(4px);
}

.ew-more {
	padding-inline: 20px;
}

.ew-container .ew-more {
	padding-inline: 0;
}

.ew-more:not(.ew-container .ew-more) {
	margin-bottom: 48px;
}

/* ---- Example designs built from the product's layouts ------------------- */

.ew-ex {
	display: block;
	container-type: size;
	overflow: hidden;
}

.ew-ex__art {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.ew-ex__line {
	position: absolute;
	display: block;
	line-height: 1;
	white-space: nowrap;
	transform: translateY(-50%);
}

.ew-ex__slot {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	container-type: size;
}

.ew-ex__mono {
	display: flex;
	align-items: center;
	justify-content: center;
	width: min(100cqw, 100cqh);
	height: min(100cqw, 100cqh);
	border: 1px solid currentColor;
	border-radius: 50%;
	font-size: min(36cqw, 36cqh);
	line-height: 1;
	letter-spacing: 0.02em;
	box-shadow: inset 0 0 0 3px transparent, inset 0 0 0 4px currentColor;
	opacity: 0.95;
}

.ew-ex .ew-ex__art {
	width: 100%;
	height: 100%;
}

.ew-ex .ew-ex__mono {
	box-shadow: none;
	border-width: 1px;
}

/* Four ready-made designs sit in one row on wider screens. */
@media (min-width: 1024px) {
	.ew-shape-designs ul.products.grid-lg-col-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 32px 24px;
	}
}

/* Example designs fill the row: three, or six in one line on wide screens. */
.ew-artwork__grid--n3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.ew-artwork__grid--n6 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
	.ew-artwork__grid--n3,
	.ew-artwork__grid--n6 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 20px;
	}
}

@media (min-width: 1000px) {
	.ew-artwork__grid--n6 {
		grid-template-columns: repeat(6, minmax(0, 1fr));
		gap: 16px;
	}
}
