/* Step31 Accessories
 * Colours, width and top spacing are set from  Accessories > Settings  and arrive as CSS variables
 * (--s31a-gold, --s31a-cream, --s31a-sand, --s31a-ink, --s31a-muted, --s31a-wrap, --s31a-top).
 * Fonts are inherited from the theme, so the accessories pages use the same typeface as the rest of the site.
 */

:root {
	--s31a-on-gold: #111111;
	--s31a-line: color-mix(in srgb, var(--s31a-ink) 14%, transparent);
}

.s31a-page,
.s31a-home,
.s31a-addon,
.s31a-co {
	font-family: inherit;
	color: var(--s31a-ink);
	box-sizing: border-box;
}
.s31a-page *,
.s31a-home *,
.s31a-addon *,
.s31a-co * {
	box-sizing: border-box;
}

/* Content width = the width set in Settings (default 1280px), with a side gutter on top of it,
 * so the text lines up with the Best Sellers / New Arrivals sections instead of sitting further in. */
.s31a-wrap {
	--s31a-gutter: 20px;
	max-width: calc(var(--s31a-wrap, 1280px) + (var(--s31a-gutter) * 2));
	margin: 0 auto;
	padding-left: var(--s31a-gutter);
	padding-right: var(--s31a-gutter);
}
@media (min-width: 641px) {
	.s31a-wrap {
		--s31a-gutter: 28px;
	}
}
@media (min-width: 1024px) {
	.s31a-wrap {
		--s31a-gutter: 32px;
	}
}

/* ---------- shared type ---------- */
.s31a-eyebrow {
	display: block;
	margin: 0 0 12px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--s31a-gold);
}
.s31a-title {
	margin: 0 0 18px;
	font-size: clamp(40px, 6vw, 72px);
	font-weight: 400;
	line-height: 1;
	letter-spacing: -0.025em;
	color: var(--s31a-ink);
}
.s31a-title--section {
	max-width: 14em;
	font-size: clamp(34px, 5.6vw, 82px);
	font-weight: 300;
	line-height: 0.98;
	letter-spacing: -0.035em;
	margin-bottom: 14px;
}
.s31a-desc {
	max-width: 460px;
	margin: 0 0 14px;
	font-size: 13px;
	line-height: 1.7;
	color: var(--s31a-muted);
}
.s31a-count {
	margin: 0;
	font-size: 12px;
	color: var(--s31a-muted);
}

/* ---------- buttons ---------- */
.s31a-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 15px 26px;
	border: 0;
	border-radius: 0;
	background: var(--s31a-gold);
	color: var(--s31a-on-gold);
	font: inherit;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.2s ease;
}
.s31a-btn:hover,
.s31a-btn:focus-visible {
	opacity: 0.88;
	color: var(--s31a-on-gold);
}
.s31a-btn--sm {
	padding: 11px 18px;
	font-size: 10px;
}
.s31a-link {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 12px;
	color: var(--s31a-muted);
	text-decoration: underline;
	cursor: pointer;
}
.s31a-badge {
	align-self: flex-start;
	padding: 5px 9px;
	background: var(--s31a-ink);
	color: var(--s31a-cream);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	white-space: nowrap;
}
.s31a-tag {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 6px;
	background: var(--s31a-ink);
	color: var(--s31a-cream);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	vertical-align: middle;
}

/* ---------- prices (same look as the shop cards: gold price, struck old price) ---------- */
.s31a-addon ins,
.s31a-co ins {
	text-decoration: none;
	color: var(--s31a-gold);
	font-weight: 500;
}
.s31a-addon del,
.s31a-co del {
	margin-right: 4px;
	font-size: 0.88em;
	color: var(--s31a-muted);
	opacity: 0.8;
}
.s31a-from {
	font-size: 0.85em;
	color: var(--s31a-muted);
}

/* ---------- accessories page ---------- */
.s31a-page {
	background: var(--s31a-cream);
	padding: var(--s31a-top, 40px) 0 88px;
}
.s31a-crumbs {
	margin-bottom: 28px;
	font-size: 11px;
	color: var(--s31a-muted);
}
.s31a-crumbs a {
	color: inherit;
}
.s31a-pagehead {
	padding-bottom: 36px;
}
.s31a-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 18px 0;
	margin-bottom: 40px;
	border-top: 1px solid var(--s31a-line);
	border-bottom: 1px solid var(--s31a-line);
}
.s31a-chip {
	padding: 13px 22px;
	background: var(--s31a-ink);
	color: var(--s31a-cream);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none;
}
.s31a-chip.is-active,
.s31a-chip:hover,
.s31a-chip:focus-visible {
	background: var(--s31a-gold);
	color: var(--s31a-on-gold);
}
.s31a-empty {
	padding: 48px 0;
	font-size: 14px;
	color: var(--s31a-muted);
}
.s31a-pagination {
	display: flex;
	justify-content: center;
	margin-top: 48px;
}
.s31a-pagination .page-numbers {
	display: inline-block;
	min-width: 38px;
	padding: 10px 12px;
	margin: 0 3px;
	border: 1px solid var(--s31a-line);
	font-size: 12px;
	text-align: center;
	text-decoration: none;
	color: var(--s31a-ink);
}
.s31a-pagination .page-numbers.current {
	background: var(--s31a-gold);
	border-color: var(--s31a-gold);
	color: var(--s31a-on-gold);
}

.s31a-seo {
	counter-reset: s31a-seo;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 40px;
	margin-top: 88px;
}
.s31a-seo__item {
	counter-increment: s31a-seo;
	padding-top: 18px;
	border-top: 1px solid var(--s31a-gold);
}
.s31a-seo__item::before {
	content: counter(s31a-seo, decimal-leading-zero);
	display: block;
	margin-bottom: 10px;
	font-size: 10px;
	letter-spacing: 0.22em;
	color: var(--s31a-gold);
}
.s31a-seo__item h2 {
	margin: 0 0 12px;
	font-size: clamp(20px, 2.2vw, 26px);
	font-weight: 400;
	line-height: 1.25;
	color: var(--s31a-ink);
}
.s31a-seo__item p {
	margin: 0;
	font-size: 13px;
	line-height: 1.8;
	color: var(--s31a-muted);
}

/* ---------- homepage section ---------- */
.s31a-home {
	padding: clamp(48px, 7vw, 96px) 0;
}
.s31a-bg-sand {
	background: var(--s31a-sand);
}
.s31a-bg-cream {
	background: var(--s31a-cream);
}
.s31a-home__head {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 32px;
}
.s31a-home__intro .s31a-desc {
	margin-bottom: 0;
}
.s31a-home__note {
	margin: 28px 0 0;
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--s31a-gold);
}
.s31a-products .s31a-grid {
	display: grid;
	grid-template-columns: repeat(var(--s31a-cols, 4), minmax(0, 1fr));
	gap: 24px;
	align-items: start;
}
.s31a-products .s31a-grid > * {
	min-width: 0;
	margin: 0;
}
/* Homepage cards: Best Sellers / New Arrivals show no badges, so the accessories row hides them too. */
.s31a-home--nobadges .s31a-grid [class*="badge"] {
	display: none !important;
}

/* wider wrapper used under the theme's own hero (same width as the Shop page grid) */
.s31a-wrap--wide {
	max-width: 1600px;
	margin: 0 auto;
	padding-left: 12px;
	padding-right: 12px;
}
.s31a-page--theme {
	padding-top: 0;
}
.s31a-page--theme .s31a-products {
	padding-top: 32px;
}
.s31a-page--theme .s31a-empty {
	padding-left: 8px;
}
.s31a-toolbar .step31-archive-toolbar-shell {
	justify-content: flex-start;
}

/* ---------- product page card ---------- */
.s31a-addon {
	width: 100%;
	margin: 20px 0;
	border: 1px solid var(--s31a-line);
	background: var(--s31a-sand);
	text-align: left;
}
.s31a-addon__head {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 16px 18px;
	cursor: pointer;
}
.s31a-addon__toggle {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--s31a-gold);
}
.s31a-addon__copy {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.s31a-addon__copy .s31a-eyebrow {
	margin: 0;
	font-size: 10px;
}
.s31a-addon__title {
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
}
.s31a-addon__text {
	font-size: 12px;
	line-height: 1.6;
	color: var(--s31a-muted);
}
.s31a-addon__check {
	margin-top: 4px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.s31a-addon__panel {
	padding: 0 18px 18px;
	border-top: 1px solid var(--s31a-line);
}
.s31a-addon__panel[hidden] {
	display: none;
}
.s31a-addon__label {
	margin: 16px 0 10px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--s31a-muted);
}
.s31a-addon__note {
	margin: 12px 0 0;
	font-size: 11px;
	color: var(--s31a-muted);
}

.s31a-types {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 8px;
}
.s31a-type {
	display: block;
	cursor: pointer;
}
.s31a-type__input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.s31a-type__box {
	display: flex;
	flex-direction: column;
	gap: 6px;
	height: 100%;
	padding: 10px;
	border: 1px solid var(--s31a-line);
	background: var(--s31a-cream);
	font-size: 12px;
	line-height: 1.4;
}
.s31a-type__box img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	background: var(--s31a-sand);
}
.s31a-type__name {
	font-size: 12px;
	font-weight: 500;
}
.s31a-type__price {
	font-size: 12px;
}
.s31a-type__input:checked + .s31a-type__box {
	border-color: var(--s31a-gold);
	outline: 1px solid var(--s31a-gold);
}
.s31a-type__input:focus-visible + .s31a-type__box {
	outline: 2px solid var(--s31a-gold);
	outline-offset: 2px;
}

.s31a-opts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 10px;
	margin-top: 12px;
}
.s31a-opts:empty {
	display: none;
}
.s31a-field {
	display: block;
}
.s31a-field__label {
	display: block;
	margin-bottom: 5px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--s31a-muted);
}
.s31a-select {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid var(--s31a-line);
	border-radius: 0;
	background: var(--s31a-cream);
	color: var(--s31a-ink);
	font: inherit;
	font-size: 13px;
}
.s31a-msg {
	min-height: 0;
	margin: 8px 0 0;
	font-size: 12px;
	color: #a33b2f;
}
.s31a-msg:empty {
	display: none;
}

/* ---------- shared form controls (product page card + checkout) ---------- */
.s31a-addon .s31a-select,
.s31a-co .s31a-select {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	height: 42px;
	min-height: 0;
	margin: 0;
	padding: 0 36px 0 12px;
	border: 1px solid var(--s31a-line);
	border-radius: 0;
	background-color: var(--s31a-cream);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23857d70' stroke-width='2' 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 12px center;
	background-size: 14px;
	box-shadow: none;
	color: var(--s31a-ink);
	font: inherit;
	font-size: 13px;
	line-height: 40px;
	cursor: pointer;
}
.s31a-addon .s31a-select:focus,
.s31a-co .s31a-select:focus {
	outline: 0;
	border-color: var(--s31a-gold);
}
.s31a-addon .s31a-field__label,
.s31a-co .s31a-field__label {
	margin: 0 0 6px;
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--s31a-muted);
}

/* ---------- checkout add-on ----------
 * Built to sit next to the order summary card: same rounded card, soft border and shadow,
 * small uppercase item names, gold prices, and a dark tag like the product badges.
 * Colours, corner roundness and shadow are editable in Accessories > Settings. */
.s31a-btn--outline {
	background: transparent;
	color: var(--s31a-ink);
	box-shadow: inset 0 0 0 1px var(--s31a-gold);
}
.s31a-btn--outline:hover,
.s31a-btn--outline:focus-visible {
	background: var(--s31a-gold);
	color: var(--s31a-on-gold);
	opacity: 1;
}

.s31a-co {
	container-type: inline-size;
	margin: 0 0 20px;
	padding: 22px 22px 2px;
	border: 1px solid var(--s31a-line);
	border-radius: var(--s31a-radius, 14px);
	background: var(--s31a-card, #fff);
	box-shadow: var(--s31a-co-shadow, none);
	color: var(--s31a-ink);
	text-align: left;
	transition: opacity 0.2s ease;
}
.s31a-co.is-loading {
	opacity: 0.55;
	pointer-events: none;
}
.s31a-co .s31a-co__head {
	position: static;
	margin: 0 0 16px;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
}
.s31a-co .s31a-eyebrow {
	margin: 0 0 6px;
	font-size: 10px;
	letter-spacing: 0.22em;
}
.s31a-co .s31a-co__title {
	margin: 0 0 4px;
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	text-transform: none;
	color: var(--s31a-ink);
}
.s31a-co .s31a-co__desc {
	margin: 0;
	font-size: 12px;
	line-height: 1.6;
	color: var(--s31a-muted);
}

.s31a-co__list {
	display: grid;
}
.s31a-co__item {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) auto;
	gap: 6px 16px;
	align-items: start;
	padding: 16px 0;
	border-top: 1px solid var(--s31a-line);
}
.s31a-co__img {
	width: 72px;
	height: 72px;
	border-radius: calc(var(--s31a-radius, 14px) * 0.7);
	object-fit: cover;
	background: var(--s31a-sand);
}
.s31a-co__item.is-added .s31a-co__img {
	outline: 1px solid var(--s31a-gold);
	outline-offset: 2px;
}
.s31a-co__info {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}
.s31a-co__top {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 8px;
	align-items: center;
}
.s31a-co__name {
	font-size: 12px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.s31a-co__save {
	display: inline-flex;
	padding: 4px 7px;
	border: 1px solid color-mix(in srgb, var(--s31a-gold) 48%, transparent);
	border-radius: calc(var(--s31a-radius, 14px) * 0.3);
	background: #171512;
	color: var(--s31a-gold);
	font-size: 9px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.s31a-co__save[hidden] {
	display: none;
}
.s31a-co__price {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 8px;
	align-items: baseline;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
}
.s31a-co__price .s31a-from {
	order: 0;
	font-size: 11px;
	font-weight: 500;
	color: var(--s31a-muted);
}
.s31a-co__price ins {
	order: 1;
	text-decoration: none;
	color: var(--s31a-gold);
	font-weight: 700;
}
.s31a-co__price del {
	order: 2;
	margin: 0;
	font-size: 12px;
	font-weight: 400;
	color: var(--s31a-muted);
	opacity: 1;
	text-decoration-thickness: 1px;
}

/* options: no visible labels, the placeholder says it (labels stay for screen readers) */
.s31a-co .s31a-opts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin-top: 6px;
}
.s31a-co .s31a-opts:empty {
	display: none;
}
.s31a-co .s31a-field {
	position: relative;
	display: block;
}
.s31a-co .s31a-field__label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.s31a-co .s31a-select {
	height: 40px;
	padding: 0 34px 0 12px;
	border-radius: calc(var(--s31a-radius, 14px) * 0.6);
	background-color: var(--s31a-cream);
	font-size: 12.5px;
	line-height: 38px;
}
.s31a-co .s31a-msg {
	margin: 2px 0 0;
	font-size: 12px;
}

.s31a-co__action {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: flex-end;
	align-self: start;
}
.s31a-co__action .s31a-btn {
	min-width: 104px;
	padding: 11px 16px;
	border-radius: calc(var(--s31a-radius, 14px) * 0.6);
	font-size: 10px;
}
.s31a-co__action .s31a-link {
	font-size: 11px;
	color: var(--s31a-muted);
}
.s31a-co__added {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--s31a-gold);
}
.s31a-co__added::before {
	content: "";
	width: 5px;
	height: 9px;
	margin-top: -3px;
	border: solid currentColor;
	border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg);
}

.s31a-co__saved {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	margin: 0;
	padding: 14px 0 16px;
	border-top: 1px solid var(--s31a-line);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--s31a-muted);
}
.s31a-co__saved strong {
	font-size: 13px;
	letter-spacing: 0;
	color: var(--s31a-gold);
}

/* Narrow checkout column and phones: thumbnail + name on top, options and button full width. */
@container (max-width: 520px) {
	.s31a-co__item {
		grid-template-columns: 60px minmax(0, 1fr);
		gap: 6px 14px;
	}
	.s31a-co__img {
		grid-row: span 2;
		width: 60px;
		height: 60px;
	}
	.s31a-co__info {
		display: contents;
	}
	.s31a-co__top {
		grid-column: 2;
		align-self: end;
	}
	.s31a-co__price {
		grid-column: 2;
		align-self: start;
	}
	.s31a-co .s31a-opts,
	.s31a-co .s31a-msg {
		grid-column: 1 / -1;
	}
	.s31a-co__action {
		grid-column: 1 / -1;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		margin-top: 4px;
	}
	.s31a-co__action .s31a-btn {
		width: 100%;
		min-height: 44px;
	}
}
@container (max-width: 340px) {
	.s31a-co .s31a-opts {
		grid-template-columns: 1fr;
	}
}

/* ---------- tablet ---------- */
@media (min-width: 641px) and (max-width: 1024px) {
	.s31a-products .s31a-grid {
		grid-template-columns: repeat(min(var(--s31a-cols, 4), 3), minmax(0, 1fr)) !important;
		gap: 16px;
	}
}
@media (min-width: 641px) {
	.s31a-wrap--wide {
		padding-left: 24px;
		padding-right: 24px;
	}
}
@media (min-width: 769px) {
	.s31a-wrap--wide {
		padding-left: 32px;
		padding-right: 32px;
	}
}
@media (min-width: 1024px) {
	.s31a-wrap--wide {
		padding-left: 40px;
		padding-right: 40px;
	}
}

/* ---------- small screens ---------- */
@media (max-width: 768px) {
	.s31a-seo {
		grid-template-columns: 1fr;
		gap: 28px;
	}
	.s31a-products .s31a-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 12px;
		row-gap: 28px;
	}
	.s31a-home__head {
		align-items: flex-start;
		margin-bottom: 24px;
	}
	.s31a-home__head .s31a-btn {
		width: 100%;
	}
	.s31a-title--section {
		font-size: clamp(34px, 11vw, 52px);
	}
	.s31a-co {
		padding: 18px 16px 2px;
	}
	.s31a-chip {
		padding: 11px 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.s31a-btn,
	.s31a-co {
		transition: none;
	}
}

/* Homepage accessories cards: keep the linked name in the theme's colour. */
.step31-home .step31-product-card__details h3 a {
	color: inherit;
	text-decoration: none;
}

/* circular loader over the order summary / add-on box while a change is processed */
.s31a-loader {
	position: absolute;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.62);
	-webkit-backdrop-filter: blur(1.5px);
	backdrop-filter: blur(1.5px);
	border-radius: var(--s31a-radius, 14px);
	pointer-events: all;
	animation: s31a-fade 0.15s ease both;
}
.s31a-loader i {
	display: block;
	width: 34px;
	height: 34px;
	border: 3px solid var(--s31a-line, #e7dfd1);
	border-top-color: var(--s31a-gold, #b59a5b);
	border-radius: 50%;
	animation: s31a-spin 0.7s linear infinite;
}
@keyframes s31a-spin {
	to {
		transform: rotate(360deg);
	}
}
@keyframes s31a-fade {
	from {
		opacity: 0;
	}
}
.s31a-dark .s31a-loader,
[data-theme='dark'] .s31a-loader {
	background: rgba(20, 19, 17, 0.6);
}
