/* ==========================================================================
   HAM Shop — express checkout, account dashboard, collections
   --------------------------------------------------------------------------
   Everything paints from the custom properties below. On account pages the
   customer's own accent replaces them (see includes/theming.php), which is why
   no colour is ever written literally inside a component.
   ========================================================================== */

:root {
	--ham-accent: #a62658;
	--ham-accent-hover: #8b1f4a;
	--ham-accent-text: #ffffff;
	--ham-accent-ink: #93214e;
	--ham-accent-soft: rgba(166, 38, 88, .10);
	--ham-accent-line: rgba(166, 38, 88, .24);
	--ham-accent-glow: rgba(166, 38, 88, .22);

	--ham-surface: #ffffff;
	--ham-surface-2: #fbfafc;
	--ham-canvas: #f7f5f9;
	--ham-ink: #241b2e;
	--ham-ink-soft: #6d6579;
	--ham-line: #e9e5ee;
	--ham-shadow: 0 20px 50px -34px rgba(36, 27, 46, .45);
	--ham-success: #15803d;
	--ham-danger: #b91c1c;

	--ham-radius: 16px;
	--ham-radius-sm: 10px;
	--ham-gap: 20px;
	--ham-ease: cubic-bezier(.2, .7, .3, 1);
}

/* --------------------------------------------------------------------------
   Primitives
   -------------------------------------------------------------------------- */

/**
 * Every component here is scoped to one of the plugin's own containers. The
 * stylesheet loads site-wide (product cards carry the save button), and the
 * site already had its own `.ham-btn` and `.ham-step` classes on the home
 * page — unscoped rules silently restyled them.
 */
.ham-checkout .ham-btn,
.ham-dash .ham-btn,
.ham-modal .ham-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 22px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .01em;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .18s var(--ham-ease), border-color .18s var(--ham-ease),
		color .18s var(--ham-ease), transform .18s var(--ham-ease), box-shadow .18s var(--ham-ease);
}

.ham-checkout .ham-btn:focus-visible,
.ham-dash .ham-btn:focus-visible,
.ham-modal .ham-btn:focus-visible {
	outline: 2px solid var(--ham-accent);
	outline-offset: 3px;
}

.ham-checkout .ham-btn--primary,
.ham-dash .ham-btn--primary,
.ham-modal .ham-btn--primary {
	background: var(--ham-accent);
	color: var(--ham-accent-text);
	box-shadow: 0 12px 26px -16px var(--ham-accent-glow);
}

.ham-checkout .ham-btn--primary:hover,
.ham-dash .ham-btn--primary:hover,
.ham-modal .ham-btn--primary:hover {
	background: var(--ham-accent-hover);
	color: var(--ham-accent-text);
	transform: translateY(-1px);
}

.ham-checkout .ham-btn--ghost,
.ham-dash .ham-btn--ghost,
.ham-modal .ham-btn--ghost {
	background: transparent;
	border-color: var(--ham-line);
	color: var(--ham-ink);
}

.ham-checkout .ham-btn--ghost:hover,
.ham-dash .ham-btn--ghost:hover,
.ham-modal .ham-btn--ghost:hover {
	border-color: var(--ham-accent-line);
	color: var(--ham-accent-ink);
	background: var(--ham-accent-soft);
}

.ham-checkout .ham-btn--block,
.ham-dash .ham-btn--block,
.ham-modal .ham-btn--block {
	width: 100%;
}

.ham-checkout .ham-btn--sm,
.ham-dash .ham-btn--sm,
.ham-modal .ham-btn--sm {
	padding: 9px 16px;
	font-size: 13.5px;
}

.ham-checkout .ham-btn--pay,
.ham-dash .ham-btn--pay,
.ham-modal .ham-btn--pay {
	padding: 17px 24px;
	font-size: 16.5px;
}

.ham-checkout .ham-btn[disabled],
.ham-dash .ham-btn[disabled],
.ham-modal .ham-btn[disabled],
.ham-checkout .ham-btn.is-busy,
.ham-dash .ham-btn.is-busy,
.ham-modal .ham-btn.is-busy {
	opacity: .62;
	cursor: default;
	transform: none;
}

.ham-checkout .ham-btn.is-busy .ham-btn__label::after,
.ham-dash .ham-btn.is-busy .ham-btn__label::after,
.ham-modal .ham-btn.is-busy .ham-btn__label::after {
	content: "";
	display: inline-block;
	width: 13px;
	height: 13px;
	margin-left: 9px;
	vertical-align: -1px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: ham-spin .7s linear infinite;
}

@keyframes ham-spin {
	to { transform: rotate(360deg); }
}

/**
* Glozin's base sheet paints every `button:hover` and `button:active` with the
 * theme's dark button colour. A bare class loses to that (one class beats
 * nothing,
but a class alone loses to an element plus a pseudo-class),
so each
 * of our controls states its own hover,
focus and active fill explicitly.
 */
.ham-checkout .ham-btn:hover,
.ham-dash .ham-btn:hover,
.ham-modal .ham-btn:hover,
.ham-checkout .ham-btn:focus,
.ham-dash .ham-btn:focus,
.ham-modal .ham-btn:focus,
.ham-checkout .ham-btn:active,
.ham-dash .ham-btn:active,
.ham-modal .ham-btn:active {
	background: transparent;
}

.ham-checkout .ham-btn--primary:hover,
.ham-dash .ham-btn--primary:hover,
.ham-modal .ham-btn--primary:hover,
.ham-checkout .ham-btn--primary:focus,
.ham-dash .ham-btn--primary:focus,
.ham-modal .ham-btn--primary:focus,
.ham-checkout .ham-btn--primary:active,
.ham-dash .ham-btn--primary:active,
.ham-modal .ham-btn--primary:active {
	background: var(--ham-accent-hover);
	color: var(--ham-accent-text);
}

.ham-checkout .ham-btn--primary:focus:not(:hover),
.ham-dash .ham-btn--primary:focus:not(:hover),
.ham-modal .ham-btn--primary:focus:not(:hover) {
	background: var(--ham-accent);
}

.ham-checkout .ham-btn--ghost:hover,
.ham-dash .ham-btn--ghost:hover,
.ham-modal .ham-btn--ghost:hover,
.ham-checkout .ham-btn--ghost:active,
.ham-dash .ham-btn--ghost:active,
.ham-modal .ham-btn--ghost:active {
	background: var(--ham-accent-soft);
	color: var(--ham-accent-ink);
}

.ham-checkout .ham-btn--ghost:focus:not(:hover),
.ham-dash .ham-btn--ghost:focus:not(:hover),
.ham-modal .ham-btn--ghost:focus:not(:hover) {
	background: transparent;
	color: var(--ham-ink);
}

.ham-i {
	flex: none;
}

/**
 * Several components below set `display: flex`, and an author rule always
 * beats the browser's own `[hidden] { display: none }`. Without this the
 * "new collection" form is never hidden and the design search cannot filter
 * anything out.
 */
.ham-checkout [hidden],
.ham-dash [hidden],
.ham-modal[hidden] {
	display: none !important;
}

/* --- Fields --------------------------------------------------------------- */

.ham-field {
	margin: 0 0 15px;
}

.ham-field label,
.ham-picker-field > span:first-child {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ham-ink-soft);
	letter-spacing: .01em;
}

.ham-field input,
.ham-inline-form input,
.ham-picker__new input,
.ham-coupon__form input,
.ham-search input {
	width: 100%;
	padding: 13px 15px;
	border: 1px solid var(--ham-line);
	border-radius: var(--ham-radius-sm);
	background: var(--ham-surface);
	color: var(--ham-ink);
	font-size: 15px;
	line-height: 1.3;
	transition: border-color .18s var(--ham-ease), box-shadow .18s var(--ham-ease);
	-webkit-appearance: none;
	appearance: none;
}

.ham-field input:focus,
.ham-inline-form input:focus,
.ham-picker__new input:focus,
.ham-coupon__form input:focus,
.ham-search input:focus {
	outline: none;
	border-color: var(--ham-accent);
	box-shadow: 0 0 0 4px var(--ham-accent-soft);
}

/**
 * Sits after the :focus rule on purpose. Both selectors weigh the same, so
 * the later one wins — and an invalid field is nearly always the focused one,
 * since flagging it puts the cursor back inside.
 */
.ham-field input.has-error,
.ham-picker__new input.has-error {
	border-color: var(--ham-danger);
	box-shadow: 0 0 0 4px rgba(185, 28, 28, .10);
}

.ham-picker__new input.has-error {
	animation: ham-nudge .3s var(--ham-ease);
}

@keyframes ham-nudge {
	20%, 60% { transform: translateX(-4px); }
	40%, 80% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
	.ham-picker__new input.has-error {
		animation: none;
	}
}

.ham-field--half {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.ham-field__prefixed {
	display: flex;
	align-items: stretch;
	border: 1px solid var(--ham-line);
	border-radius: var(--ham-radius-sm);
	background: var(--ham-surface);
	overflow: hidden;
	transition: border-color .18s var(--ham-ease), box-shadow .18s var(--ham-ease);
}

.ham-field__prefixed:focus-within {
	border-color: var(--ham-accent);
	box-shadow: 0 0 0 4px var(--ham-accent-soft);
}

.ham-field__prefix {
	display: flex;
	align-items: center;
	padding: 0 12px;
	background: var(--ham-surface-2);
	border-right: 1px solid var(--ham-line);
	font-size: 14px;
	font-weight: 600;
	color: var(--ham-ink-soft);
}

.ham-field__prefixed input {
	border: 0;
	border-radius: 0;
	box-shadow: none !important;
	background: transparent;
}

.ham-field__hint {
	margin: -4px 0 16px;
	font-size: 12.5px;
	color: var(--ham-ink-soft);
}

.ham-field__hint a {
	color: var(--ham-accent-ink);
}

/* --------------------------------------------------------------------------
   Auth panel
   -------------------------------------------------------------------------- */

.ham-auth__tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	padding: 4px;
	margin-bottom: 20px;
	background: var(--ham-surface-2);
	border: 1px solid var(--ham-line);
	border-radius: 999px;
}

.ham-auth__tab {
	padding: 10px 14px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--ham-ink-soft);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .18s var(--ham-ease), color .18s var(--ham-ease);
}

.ham-auth__tab:hover,
.ham-auth__tab:focus,
.ham-auth__tab:active {
	background: transparent;
	color: var(--ham-ink);
}

.ham-auth__tab.is-active,
.ham-auth__tab.is-active:hover,
.ham-auth__tab.is-active:focus {
	background: var(--ham-surface);
	color: var(--ham-ink);
	box-shadow: 0 2px 8px -4px rgba(36, 27, 46, .35);
}

.ham-auth__form {
	display: none;
}

.ham-auth__form.is-active {
	display: block;
}

.ham-auth__title {
	margin: 0 0 6px;
	font-size: 19px;
	font-weight: 700;
	color: var(--ham-ink);
}

.ham-auth__intro {
	margin: 0 0 18px;
	font-size: 14px;
	color: var(--ham-ink-soft);
}

.ham-auth__message {
	margin-bottom: 14px;
	font-size: 13.5px;
	line-height: 1.5;
}

.ham-auth__message:empty,
.ham-pay__message:empty {
	display: none;
}

.ham-auth__message.is-error,
.ham-pay__message.is-error {
	padding: 11px 14px;
	border-radius: var(--ham-radius-sm);
	background: rgba(185, 28, 28, .08);
	color: var(--ham-danger);
}

.ham-auth__message.is-success,
.ham-pay__message.is-success {
	padding: 11px 14px;
	border-radius: var(--ham-radius-sm);
	background: rgba(21, 128, 61, .08);
	color: var(--ham-success);
}

.ham-auth__google {
	margin-bottom: 4px;
}

/* --------------------------------------------------------------------------
   Checkout
   -------------------------------------------------------------------------- */

.ham-checkout {
	max-width: 1120px;
	margin: 0 auto;
	padding: 8px 0 60px;
	color: var(--ham-ink);
}

.ham-checkout__head {
	margin-bottom: 26px;
}

.ham-checkout__title {
	margin: 0 0 6px;
	font-size: 30px;
	font-weight: 700;
	letter-spacing: -.02em;
}

.ham-checkout__sub {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	font-size: 14px;
	color: var(--ham-ink-soft);
}

.ham-checkout__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
	gap: 26px;
	align-items: start;
}

.ham-panel,
.ham-summary {
	padding: 26px;
	background: var(--ham-surface);
	border: 1px solid var(--ham-line);
	border-radius: var(--ham-radius);
	box-shadow: var(--ham-shadow);
}

.ham-panel__head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 20px;
}

.ham-checkout__step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	flex: none;
	border-radius: 50%;
	background: var(--ham-accent-soft);
	color: var(--ham-accent-ink);
	font-size: 13px;
	font-weight: 700;
}

.ham-checkout__step--done {
	background: var(--ham-accent);
	color: var(--ham-accent-text);
}

.ham-panel__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
}

.ham-panel__hint {
	margin: 4px 0 0;
	font-size: 13.5px;
	color: var(--ham-ink-soft);
}

/* --- Identity ------------------------------------------------------------- */

.ham-identity {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px;
	margin-bottom: 22px;
	background: var(--ham-surface-2);
	border: 1px solid var(--ham-line);
	border-radius: var(--ham-radius-sm);
}

.ham-identity__avatar,
.ham-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	flex: none;
	border-radius: 50%;
	background: var(--ham-accent);
	color: var(--ham-accent-text);
	font-size: 18px;
	font-weight: 700;
}

.ham-identity__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.ham-identity__name {
	font-size: 15px;
	font-weight: 700;
}

.ham-identity__meta {
	font-size: 13px;
	color: var(--ham-ink-soft);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ham-identity__switch {
	margin-left: auto;
	font-size: 13px;
	font-weight: 600;
	color: var(--ham-accent-ink);
	text-decoration: none;
	white-space: nowrap;
}

.ham-identity__switch:hover {
	text-decoration: underline;
}

.ham-pay__legal {
	margin: 12px 0 0;
	font-size: 12px;
	line-height: 1.6;
	color: var(--ham-ink-soft);
	text-align: center;
}

.ham-pay__legal a {
	color: var(--ham-accent-ink);
}

.ham-pay__blocked {
	margin: 0;
	padding: 14px;
	border-radius: var(--ham-radius-sm);
	background: rgba(185, 28, 28, .07);
	color: var(--ham-danger);
	font-size: 14px;
	text-align: center;
}

/* --- Summary -------------------------------------------------------------- */

.ham-summary__title {
	margin: 0 0 16px;
	font-size: 16px;
	font-weight: 700;
}

.ham-summary__items {
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-height: 340px;
	overflow-y: auto;
}

.ham-summary__item {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 12px;
}

.ham-summary__thumb img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: var(--ham-radius-sm);
	border: 1px solid var(--ham-line);
	display: block;
}

.ham-summary__info {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.ham-summary__name {
	font-size: 14.5px;
	font-weight: 600;
	color: var(--ham-ink);
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ham-summary__name:hover {
	color: var(--ham-accent-ink);
}

.ham-summary__tag {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	color: var(--ham-ink-soft);
}

.ham-summary__price {
	font-size: 14.5px;
	font-weight: 700;
	white-space: nowrap;
}

.ham-summary__remove {
	width: 26px;
	height: 26px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--ham-ink-soft);
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
	transition: background-color .16s var(--ham-ease), color .16s var(--ham-ease);
}

.ham-summary__remove:hover {
	background: rgba(185, 28, 28, .10);
	color: var(--ham-danger);
}

.ham-coupon {
	padding: 16px 0;
	border-top: 1px dashed var(--ham-line);
	border-bottom: 1px dashed var(--ham-line);
}

.ham-coupon__form {
	display: flex;
	gap: 8px;
}

.ham-coupon__form button {
	flex: none;
	padding: 0 18px;
	border: 1px solid var(--ham-line);
	border-radius: var(--ham-radius-sm);
	background: var(--ham-surface-2);
	color: var(--ham-ink);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.ham-coupon__form button:hover {
	border-color: var(--ham-accent-line);
	color: var(--ham-accent-ink);
}

.ham-coupon__applied {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ham-coupon__applied li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--ham-accent-soft);
	color: var(--ham-accent-ink);
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .04em;
}

.ham-coupon__applied button {
	border: 0;
	background: none;
	color: inherit;
	font-size: 12px;
	text-decoration: underline;
	cursor: pointer;
	opacity: .8;
}

.ham-coupon__message {
	margin-top: 8px;
	font-size: 12.5px;
	color: var(--ham-danger);
}

.ham-coupon__message:empty {
	display: none;
}

.ham-summary__totals {
	margin: 18px 0 0;
}

.ham-summary__totals > div {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 10px;
	font-size: 14px;
	color: var(--ham-ink-soft);
}

.ham-summary__totals dt,
.ham-summary__totals dd {
	margin: 0;
}

.ham-summary__discount {
	color: var(--ham-success);
}

.ham-summary__grand {
	padding-top: 12px;
	margin: 0;
	border-top: 1px solid var(--ham-line);
	font-size: 17px !important;
	font-weight: 700;
	color: var(--ham-ink) !important;
}

.ham-trust {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 16px;
	padding: 0 4px;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--ham-ink-soft);
}

/* --------------------------------------------------------------------------
   Dashboard
   -------------------------------------------------------------------------- */

/* --- Undoing the theme ----------------------------------------------------
   Glozin lays the account area out with floats and fixed percentage widths at
   three-class specificity, and styles the nav links as plain blocks. These
   selectors match that weight so the grid below actually applies; the
   stylesheet is enqueued after the theme's so equal weight wins.
   ------------------------------------------------------------------------- */

.woocommerce-account .ham-dash .woocommerce-MyAccount-navigation,
.woocommerce-account .ham-dash .woocommerce-MyAccount-content {
	float: none;
	width: auto;
	margin: 0;
	overflow: visible;
}

/* The theme narrows both of these again inside its own mobile query. */
.woocommerce-account .ham-dash .woocommerce-MyAccount-navigation {
	padding: 10px;
}

.woocommerce-account .ham-dash .woocommerce-MyAccount-content {
	padding: 26px;
}

@media (max-width: 640px) {
	.woocommerce-account .ham-dash .woocommerce-MyAccount-navigation {
		padding: 8px;
	}

	.woocommerce-account .ham-dash .woocommerce-MyAccount-content {
		padding: 18px;
	}
}

.woocommerce-account .ham-dash .woocommerce-MyAccount-navigation li,
.woocommerce-account .ham-dash .woocommerce-MyAccount-navigation li:last-child {
	margin: 0 0 2px;
	padding: 0;
	list-style: none;
}

.woocommerce-account .ham-dash .woocommerce-MyAccount-navigation li a {
	display: flex;
	margin: 0;
	padding: 11px 13px;
	border: 0;
	font-size: 14.5px;
	font-weight: 600;
}

.woocommerce-account .ham-dash .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .ham-dash .woocommerce-MyAccount-navigation li:hover a {
	border: 0;
}

.woocommerce-account .ham-dash .woocommerce-MyAccount-content h2,
.woocommerce-account .ham-dash .woocommerce-MyAccount-content h3 {
	font-weight: 700;
}

.woocommerce-account .ham-dash .woocommerce-MyAccount-content h2 {
	font-size: 22px;
}

.woocommerce-account .ham-dash .woocommerce-MyAccount-content h3 {
	font-size: 16px;
}

.woocommerce-account .ham-dash .woocommerce-MyAccount-content p {
	font-size: 14px;
}

.ham-dash ul,
.ham-dash ol {
	list-style: none;
}

/* --- Layout --------------------------------------------------------------- */

.ham-dash {
	--ham-nav-width: 258px;
	color: var(--ham-ink);
}

.ham-dash__masthead {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 22px;
	margin-bottom: 24px;
	background: linear-gradient(135deg, var(--ham-accent-soft), transparent 70%), var(--ham-surface);
	border: 1px solid var(--ham-line);
	border-radius: var(--ham-radius);
}

.ham-dash__who {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.ham-dash__greeting {
	font-size: 17px;
	font-weight: 700;
}

.ham-dash__email {
	font-size: 13px;
	color: var(--ham-ink-soft);
	overflow: hidden;
	text-overflow: ellipsis;
}

.ham-dash__shop {
	margin-left: auto;
	flex: none;
}

.ham-dash__layout {
	display: grid;
	grid-template-columns: var(--ham-nav-width) minmax(0, 1fr);
	gap: 26px;
	align-items: start;
}

/* A grid item defaults to min-content width; without this a wide child (the
   nav list, a long file name) can force the whole page wider than the screen. */
.ham-dash__layout > * {
	min-width: 0;
}

.ham-dash__content {
	min-width: 0;
	padding: 26px;
	background: var(--ham-surface);
	border: 1px solid var(--ham-line);
	border-radius: var(--ham-radius);
	box-shadow: var(--ham-shadow);
}

.ham-dash__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 22px;
}

.ham-dash__title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -.01em;
}

.ham-dash__lede {
	margin: 6px 0 0;
	max-width: 56ch;
	font-size: 14px;
	line-height: 1.6;
	color: var(--ham-ink-soft);
}

.ham-back {
	display: inline-block;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ham-accent-ink);
	text-decoration: none;
}

/* --- Navigation ----------------------------------------------------------- */

.ham-nav {
	position: sticky;
	top: 24px;
	padding: 10px;
	background: var(--ham-surface);
	border: 1px solid var(--ham-line);
	border-radius: var(--ham-radius);
	box-shadow: var(--ham-shadow);
}

.ham-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ham-nav__item {
	margin: 0;
}

.ham-nav__link {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 11px 13px;
	border-radius: var(--ham-radius-sm);
	color: var(--ham-ink);
	font-size: 14.5px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .16s var(--ham-ease), color .16s var(--ham-ease);
}

.ham-nav__link:hover {
	background: var(--ham-accent-soft);
	color: var(--ham-accent-ink);
}

.ham-nav__icon {
	display: inline-flex;
	color: var(--ham-ink-soft);
	transition: color .16s var(--ham-ease);
}

.ham-nav__link:hover .ham-nav__icon {
	color: inherit;
}

/**
 * Glozin colours `li.is-active a` and `li:hover a` with its own near-black at
 * three classes plus an element, which is why the active pill kept black text
 * on the accent fill. These carry four classes so the accent's readable text
 * colour actually lands.
 */
.woocommerce-account .ham-dash .ham-nav__item.is-active > .ham-nav__link,
.woocommerce-account .ham-dash .ham-nav__item.is-active:hover > .ham-nav__link,
.woocommerce-account .ham-dash .ham-nav__item.is-active > .ham-nav__link:hover,
.woocommerce-account .ham-dash .ham-nav__item.is-active > .ham-nav__link:focus {
	background: var(--ham-accent);
	color: var(--ham-accent-text);
}

.woocommerce-account .ham-dash .ham-nav__item:hover > .ham-nav__link,
.woocommerce-account .ham-dash .ham-nav__item > .ham-nav__link:hover {
	background: var(--ham-accent-soft);
	color: var(--ham-accent-ink);
}

.ham-nav__item.is-active .ham-nav__icon {
	color: inherit;
}

.ham-nav__label {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ham-nav__badge {
	margin-left: auto;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--ham-accent-soft);
	color: var(--ham-accent-ink);
	font-size: 11.5px;
	font-weight: 700;
}

.ham-nav__item.is-active .ham-nav__badge {
	background: rgba(255, 255, 255, .22);
	color: inherit;
}

/**
 * Signing out is not a destination like the others; give it its own footing.
 * Written at the same weight as the theme reset above, which also sets the
 * list item's margin.
 */
.woocommerce-account .ham-dash .ham-nav__item--customer-logout {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--ham-line);
}

.ham-nav__item--customer-logout .ham-nav__link {
	color: var(--ham-ink-soft);
}

@media (max-width: 1024px) {
	.woocommerce-account .ham-dash .ham-nav__item--customer-logout {
		margin-top: 0;
		padding: 0 0 0 8px;
		border-top: 0;
		border-left: 1px solid var(--ham-line);
	}
}

/* --- Stats ---------------------------------------------------------------- */

.ham-stats {
	list-style: none;
	margin: 0 0 30px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.ham-stat {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px;
	background: var(--ham-surface-2);
	border: 1px solid var(--ham-line);
	border-radius: var(--ham-radius-sm);
}

.ham-stat__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin-bottom: 6px;
	border-radius: 9px;
	background: var(--ham-accent-soft);
	color: var(--ham-accent-ink);
}

.ham-stat__value {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.02em;
}

.ham-stat__value .woocommerce-Price-amount {
	font-size: inherit;
}

.ham-stat__label {
	font-size: 12.5px;
	color: var(--ham-ink-soft);
}

/* --- Sections and grids --------------------------------------------------- */

.ham-section {
	margin-top: 30px;
}

.ham-section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 14px;
}

.ham-section__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
}

.ham-section__more {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ham-accent-ink);
	text-decoration: none;
}

.ham-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 16px;
}

.ham-card {
	display: flex;
	flex-direction: column;
	background: var(--ham-surface);
	border: 1px solid var(--ham-line);
	border-radius: var(--ham-radius-sm);
	overflow: hidden;
	transition: border-color .18s var(--ham-ease), transform .18s var(--ham-ease), box-shadow .18s var(--ham-ease);
}

.ham-card:hover {
	border-color: var(--ham-accent-line);
	transform: translateY(-2px);
	box-shadow: 0 16px 32px -26px var(--ham-accent-glow);
}

.ham-card__media {
	display: block;
	aspect-ratio: 1 / 1;
	background: var(--ham-surface-2);
	overflow: hidden;
}

.ham-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ham-card__body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 12px 13px 8px;
	min-width: 0;
}

.ham-card__name {
	font-size: 14px;
	font-weight: 600;
	color: var(--ham-ink);
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ham-card__name:hover {
	color: var(--ham-accent-ink);
}

.ham-card__meta,
.ham-card__price {
	font-size: 12.5px;
	color: var(--ham-ink-soft);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ham-card__meta--warn {
	color: var(--ham-danger);
}

.ham-card__actions {
	display: flex;
	gap: 8px;
	padding: 8px 13px 13px;
	margin-top: auto;
}

.ham-card__actions .ham-btn {
	flex: 1 1 auto;
	min-width: 0;
	padding-left: 10px;
	padding-right: 10px;
	white-space: nowrap;
}

/* --- Folders -------------------------------------------------------------- */

.ham-folders {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
}

.ham-folder {
	position: relative;
	background: var(--ham-surface);
	border: 1px solid var(--ham-line);
	border-radius: var(--ham-radius);
	overflow: hidden;
	transition: border-color .18s var(--ham-ease), transform .18s var(--ham-ease), box-shadow .18s var(--ham-ease);
}

.ham-folder:hover {
	border-color: var(--ham-accent-line);
	transform: translateY(-2px);
	box-shadow: 0 16px 32px -26px var(--ham-accent-glow);
}

.ham-folder__link {
	display: block;
	padding: 14px;
	text-decoration: none;
	color: inherit;
}

.ham-folder__covers {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3px;
	aspect-ratio: 4 / 3;
	margin-bottom: 12px;
	padding: 3px;
	border: 1px solid var(--ham-line);
	border-radius: var(--ham-radius-sm);
	overflow: hidden;
	background: var(--ham-canvas);
}

/* Embroidery artwork is mostly white, so each tile needs its own edge. */
.ham-folder__cover {
	display: block;
	overflow: hidden;
	border-radius: 6px;
	background: var(--ham-surface);
	box-shadow: inset 0 0 0 1px var(--ham-line);
}

/* Fill the 2x2 tile grid sensibly whether there are one, two, three or four. */
.ham-folder__cover:only-child {
	grid-column: span 2;
	grid-row: span 2;
}

.ham-folder__cover:first-child:nth-last-child(2),
.ham-folder__cover:first-child:nth-last-child(2) ~ .ham-folder__cover {
	grid-row: span 2;
}

.ham-folder__cover:first-child:nth-last-child(3) {
	grid-row: span 2;
}

.ham-folder__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ham-folder__cover--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ham-ink-soft);
}

.ham-folder__name {
	display: block;
	font-size: 15px;
	font-weight: 700;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ham-folder__count {
	display: block;
	margin-top: 2px;
	font-size: 12.5px;
	color: var(--ham-ink-soft);
}

.ham-folder__actions {
	position: absolute;
	top: 20px;
	right: 20px;
	display: flex;
	gap: 6px;
	opacity: 0;
	transition: opacity .18s var(--ham-ease);
}

.ham-folder:hover .ham-folder__actions,
.ham-folder:focus-within .ham-folder__actions {
	opacity: 1;
}

.ham-folder__actions button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: #241b2e;
	cursor: pointer;
	box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .5);
}

.ham-folder__actions button:hover {
	background: #fff;
	color: var(--ham-accent);
}

/* --- Orders --------------------------------------------------------------- */

.ham-orders {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ham-order {
	border: 1px solid var(--ham-line);
	border-radius: var(--ham-radius);
	overflow: hidden;
	background: var(--ham-surface);
}

.ham-order__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	background: var(--ham-surface-2);
	border-bottom: 1px solid var(--ham-line);
}

.ham-order__number {
	font-size: 14.5px;
	font-weight: 700;
}

.ham-order__date {
	display: block;
	font-size: 12.5px;
	color: var(--ham-ink-soft);
}

.ham-pill {
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .02em;
	white-space: nowrap;
}

.ham-pill--ok {
	background: rgba(21, 128, 61, .12);
	color: var(--ham-success);
}

.ham-pill--bad {
	background: rgba(185, 28, 28, .12);
	color: var(--ham-danger);
}

.ham-pill--wait {
	background: var(--ham-accent-soft);
	color: var(--ham-accent-ink);
}

.ham-order__items {
	list-style: none;
	margin: 0;
	padding: 14px 18px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ham-order__item {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
}

.ham-order__thumb img {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid var(--ham-line);
	display: block;
}

.ham-order__name {
	font-size: 14px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ham-order__price {
	font-size: 13.5px;
	color: var(--ham-ink-soft);
	white-space: nowrap;
}

.ham-order__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	padding: 14px 18px;
	border-top: 1px solid var(--ham-line);
}

.ham-order__total {
	font-size: 13.5px;
	color: var(--ham-ink-soft);
}

.ham-order__total strong {
	margin-left: 6px;
	font-size: 16px;
	color: var(--ham-ink);
}

.ham-order__actions {
	display: flex;
	gap: 8px;
}

.ham-pager {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin-top: 20px;
}

/* --- WooCommerce's own forms and notices, brought into the system ---------
   The profile screen is still Woo's edit-account form. These selectors carry
   the same weight as the theme rules they replace so the fields match the
   ones we render ourselves.
   ------------------------------------------------------------------------ */

.woocommerce-account .ham-dash .woocommerce-MyAccount-content .woocommerce-EditAccountForm input,
.ham-dash .woocommerce-MyAccount-content input[type="text"],
.ham-dash .woocommerce-MyAccount-content input[type="email"],
.ham-dash .woocommerce-MyAccount-content input[type="tel"],
.ham-dash .woocommerce-MyAccount-content input[type="password"] {
	width: 100%;
	padding: 13px 15px;
	border: 1px solid var(--ham-line);
	border-radius: var(--ham-radius-sm);
	background: var(--ham-surface);
	color: var(--ham-ink);
	font-size: 15px;
	line-height: 1.3;
}

.woocommerce-account .ham-dash .woocommerce-MyAccount-content .woocommerce-EditAccountForm input:focus,
.ham-dash .woocommerce-MyAccount-content input:focus {
	outline: none;
	border-color: var(--ham-accent);
	box-shadow: 0 0 0 4px var(--ham-accent-soft);
}

.woocommerce-account .ham-dash .woocommerce-MyAccount-content .woocommerce-EditAccountForm label,
.ham-dash .woocommerce-MyAccount-content .form-row label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ham-ink-soft);
}

.ham-dash .woocommerce-MyAccount-content .form-row {
	margin-bottom: 16px;
	padding: 0;
}

.ham-dash .woocommerce-MyAccount-content .woocommerce-form-row .description,
.ham-dash .woocommerce-MyAccount-content em {
	display: block;
	margin-top: 6px;
	font-size: 12.5px;
	font-style: normal;
	color: var(--ham-ink-soft);
}

.woocommerce-account .ham-dash .woocommerce-MyAccount-content .woocommerce-EditAccountForm fieldset {
	margin: 6px 0 20px;
	padding: 20px;
	border: 1px solid var(--ham-line);
	border-radius: var(--ham-radius);
	background: var(--ham-surface-2);
}

.woocommerce-account .ham-dash .woocommerce-MyAccount-content .woocommerce-EditAccountForm fieldset legend {
	padding: 0 8px;
	font-size: 13px;
	font-weight: 700;
	color: var(--ham-ink);
}

.ham-dash .woocommerce-MyAccount-content .woocommerce-Button,
.ham-dash .woocommerce-MyAccount-content button.button,
.ham-dash .woocommerce-MyAccount-content button.button:hover,
.ham-dash .woocommerce-MyAccount-content button.button:focus {
	padding: 13px 24px;
	border: 0;
	border-radius: 999px;
	background: var(--ham-accent);
	color: var(--ham-accent-text);
	font-size: 15px;
	font-weight: 600;
}

.ham-dash .woocommerce-MyAccount-content button.button:hover {
	background: var(--ham-accent-hover);
}

.ham-dash .woocommerce-message,
.ham-dash .woocommerce-error,
.ham-dash .woocommerce-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	margin: 0 0 20px;
	padding: 14px 16px;
	border: 0;
	border-radius: var(--ham-radius-sm);
	background: var(--ham-accent-soft);
	color: var(--ham-ink);
	font-size: 14px;
	list-style: none;
}

.ham-dash .woocommerce-message::before,
.ham-dash .woocommerce-error::before,
.ham-dash .woocommerce-info::before {
	content: none;
}

.ham-dash .woocommerce-error {
	background: rgba(185, 28, 28, .09);
	color: var(--ham-danger);
}

/* --- Appearance ----------------------------------------------------------- */

.ham-appearance__row {
	padding-bottom: 22px;
	margin-bottom: 22px;
	border-bottom: 1px solid var(--ham-line);
}

.ham-appearance__label {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 700;
}

.ham-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 18px;
}

.ham-swatch {
	position: relative;
	width: 38px;
	height: 38px;
	border: 2px solid transparent;
	border-radius: 50%;
	background: var(--swatch);
	cursor: pointer;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
	transition: transform .16s var(--ham-ease), box-shadow .16s var(--ham-ease);
}

.ham-swatch,
.ham-swatch:hover,
.ham-swatch:focus,
.ham-swatch:active,
.ham-swatch.is-active {
	background: var(--swatch);
}

.ham-swatch:hover {
	transform: scale(1.08);
}

.ham-swatch.is-active {
	box-shadow: 0 0 0 3px var(--ham-surface), 0 0 0 5px var(--swatch);
}

.ham-picker-field {
	display: block;
	max-width: 320px;
}

.ham-picker-field__control {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ham-picker-field input[type="color"] {
	width: 52px;
	height: 44px;
	padding: 4px;
	border: 1px solid var(--ham-line);
	border-radius: var(--ham-radius-sm);
	background: var(--ham-surface);
	cursor: pointer;
}

.ham-picker-field input[type="text"] {
	flex: 1;
	min-width: 0;
	padding: 12px 14px;
	border: 1px solid var(--ham-line);
	border-radius: var(--ham-radius-sm);
	background: var(--ham-surface);
	color: var(--ham-ink);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 14px;
	text-transform: lowercase;
}

.ham-modes {
	display: flex;
	gap: 10px;
}

.ham-mode {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 18px;
	border: 1px solid var(--ham-line);
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color .16s var(--ham-ease), background-color .16s var(--ham-ease), color .16s var(--ham-ease);
}

.ham-mode input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.ham-mode.is-active {
	border-color: var(--ham-accent);
	background: var(--ham-accent-soft);
	color: var(--ham-accent-ink);
}

.ham-appearance__preview {
	padding: 20px;
	margin-bottom: 22px;
	background: var(--ham-canvas);
	border: 1px dashed var(--ham-line);
	border-radius: var(--ham-radius);
}

.ham-badge {
	display: inline-block;
	margin-bottom: 14px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--ham-surface);
	border: 1px solid var(--ham-line);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ham-ink-soft);
}

.ham-preview {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.ham-preview__link {
	font-size: 14px;
	font-weight: 600;
	color: var(--ham-accent-ink);
}

.ham-appearance__foot {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.ham-appearance__message {
	font-size: 13.5px;
	color: var(--ham-success);
}

/* --------------------------------------------------------------------------
   Save button and picker
   -------------------------------------------------------------------------- */

.ham-save {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 1px solid var(--ham-line);
	background: rgba(255, 255, 255, .94);
	color: #241b2e;
	cursor: pointer;
	transition: color .18s var(--ham-ease), border-color .18s var(--ham-ease), background-color .18s var(--ham-ease);
}

.ham-save--icon {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	box-shadow: 0 4px 14px -8px rgba(0, 0, 0, .55);
}

.ham-save--button {
	padding: 12px 20px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	background: transparent;
	color: var(--ham-ink);
}

.ham-save:hover {
	border-color: var(--ham-accent-line);
	color: var(--ham-accent);
}

.ham-save.is-saved {
	color: var(--ham-accent);
	border-color: var(--ham-accent-line);
	background: var(--ham-accent-soft);
}

.ham-save.is-saved .ham-i {
	fill: currentColor;
}

/* Saved-designs badge on the mobile bottom bar's wishlist item. */
.glozin-mobile-navigation-bar a {
	position: relative;
}

.ham-navbar-count {
	position: absolute;
	top: -2px;
	left: 50%;
	margin-left: 4px;
	min-width: 17px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--ham-accent);
	color: var(--ham-accent-text);
	font-size: 10.5px;
	font-weight: 700;
	line-height: 17px;
	text-align: center;
}

.ham-navbar-count.is-empty {
	display: none;
}

/* --- Modal ---------------------------------------------------------------- */

body.ham-modal-open {
	overflow: hidden;
}

.ham-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.ham-modal[hidden] {
	display: none;
}

.ham-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(24, 17, 32, .55);
	backdrop-filter: blur(2px);
}

.ham-modal__panel {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: 86vh;
	display: flex;
	flex-direction: column;
	background: var(--ham-surface);
	border-radius: var(--ham-radius);
	box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7);
	animation: ham-rise .22s var(--ham-ease);
}

@keyframes ham-rise {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: none; }
}

.ham-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px;
	border-bottom: 1px solid var(--ham-line);
}

.ham-modal__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--ham-ink);
}

.ham-modal__close {
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 50%;
	background: var(--ham-surface-2);
	color: var(--ham-ink-soft);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.ham-modal__close:hover,
.ham-modal__close:focus,
.ham-modal__close:active {
	background: var(--ham-surface-2);
	color: var(--ham-ink);
}

.ham-modal__body {
	padding: 16px 20px 20px;
	overflow-y: auto;
}

.ham-picker {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-height: 280px;
	overflow-y: auto;
}

.ham-picker__row {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 11px 12px;
	border-radius: var(--ham-radius-sm);
	cursor: pointer;
	transition: background-color .16s var(--ham-ease);
}

.ham-picker__row:hover {
	background: var(--ham-accent-soft);
}

/* --------------------------------------------------------------------------
   The switch
   --------------------------------------------------------------------------
   A real checkbox still carries the state, the label association and the
   keyboard focus; the track below is only its skin. The input is sized over
   the whole track rather than hidden, so a tap anywhere on it registers and
   :focus-visible still has something to ring.
   -------------------------------------------------------------------------- */

.ham-switch {
	position: relative;
	flex: none;
	width: 42px;
	height: 24px;
}

.ham-switch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}

.ham-switch__track {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 999px;
	/**
	 * --ham-line is a hairline colour; on a 42px control it reads as nothing
	 * at all and the knob looks like it is floating on the page. The off
	 * state needs enough weight to say "this is a control that is currently
	 * off", which is a good deal darker than a divider.
	 */
	background: #cfc9d6;
	background: color-mix(in srgb, var(--ham-ink-soft) 34%, #fff);
	transition: background-color .22s var(--ham-ease);
}

/**
 * Positioned, never margined. A margin on the knob collapses straight through
 * the track — which has no padding or border to stop it — dropping the knob
 * onto the track's top edge and pushing the track itself down by the same
 * amount. Both look like the knob is bulging out of its groove.
 */
.ham-switch__knob {
	position: absolute;
	top: 50%;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--ham-surface);
	box-shadow: 0 1px 2px rgba(36, 27, 46, .22);
	transform: translateY(-50%);
	transition: transform .22s var(--ham-ease);
}

.ham-switch input:checked + .ham-switch__track {
	background: var(--ham-accent);
}

.ham-switch input:checked + .ham-switch__track .ham-switch__knob {
	transform: translate(18px, -50%);
}

.ham-switch input:focus-visible + .ham-switch__track {
	outline: 2px solid var(--ham-accent);
	outline-offset: 2px;
}

.ham-picker__name {
	flex: 1;
	min-width: 0;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--ham-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ham-picker__count {
	font-size: 12px;
	font-style: normal;
	color: var(--ham-ink-soft);
	transition: color .2s var(--ham-ease);
}

/* --------------------------------------------------------------------------
   Confirmation
   --------------------------------------------------------------------------
   The switch sliding over is the action; this is the receipt. Without it the
   only thing that moves on a save is a number in the corner, which nobody
   watches. The row lights up once, a pill names what happened, and both
   settle back on their own — no dismissing, no layout shift left behind.
   -------------------------------------------------------------------------- */

.ham-picker__row.is-added {
	animation: ham-row-confirm 1.5s var(--ham-ease) forwards;
}

.ham-picker__row.is-removed {
	animation: ham-row-fade 1.1s var(--ham-ease) forwards;
}

@keyframes ham-row-confirm {
	0%   { background: var(--ham-accent-soft); }
	55%  { background: var(--ham-accent-soft); }
	100% { background: transparent; }
}

@keyframes ham-row-fade {
	0%   { background: var(--ham-surface-2); }
	100% { background: transparent; }
}

.ham-picker__pill {
	flex: none;
	overflow: hidden;
	max-width: 120px;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	white-space: nowrap;
	animation: ham-pill-in .28s var(--ham-ease) both, ham-pill-out .3s var(--ham-ease) 1.3s forwards;
}

.ham-picker__pill--added {
	background: var(--ham-accent);
	color: var(--ham-accent-text);
}

.ham-picker__pill--removed {
	background: var(--ham-line);
	color: var(--ham-ink-soft);
}

@keyframes ham-pill-in {
	from { opacity: 0; transform: translateX(-8px) scale(.85); }
	to   { opacity: 1; transform: none; }
}

/**
 * Collapses its own width on the way out, so the count and the switch glide
 * back into place instead of snapping when the pill disappears.
 */
@keyframes ham-pill-out {
	to {
		opacity: 0;
		padding-inline: 0;
		margin-inline-start: -4px;
		max-width: 0;
		transform: scale(.9);
	}
}

.ham-picker__count.is-bumped {
	color: var(--ham-accent-ink);
	animation: ham-count-bump .42s var(--ham-ease);
}

@keyframes ham-count-bump {
	40% { transform: scale(1.4); }
}

@media (prefers-reduced-motion: reduce) {
	.ham-picker__row.is-added,
	.ham-picker__row.is-removed,
	.ham-picker__count.is-bumped,
	.ham-switch__track,
	.ham-switch__knob {
		animation: none;
		transition: none;
	}

	.ham-picker__pill {
		animation: ham-pill-out .01s linear 1.6s forwards;
	}
}

.ham-picker__empty {
	padding: 14px 4px;
	font-size: 13.5px;
	color: var(--ham-ink-soft);
}

.ham-picker__skeleton {
	height: 42px;
	border-radius: var(--ham-radius-sm);
	background: linear-gradient(90deg, var(--ham-surface-2), var(--ham-line), var(--ham-surface-2));
	background-size: 200% 100%;
	animation: ham-shimmer 1.2s linear infinite;
}

@keyframes ham-shimmer {
	to { background-position: -200% 0; }
}

.ham-picker__new {
	display: flex;
	gap: 8px;
	padding-top: 14px;
	border-top: 1px solid var(--ham-line);
}

.ham-picker__new .ham-btn {
	flex: none;
}

/* --------------------------------------------------------------------------
   Load more
   --------------------------------------------------------------------------
   Shared by every grid that pages in place — the category browser and the home
   page's latest designs — so the two never drift apart on the one page that
   shows both of them at once. Unscoped on purpose, unlike .ham-btn: this name
   exists nowhere else on the site.
   -------------------------------------------------------------------------- */

.ham-loadmore {
	margin-top: 28px;
	text-align: center;
}

/**
 * Filled, not outlined. It sits at the bottom of a wall of white product
 * cards, and a white button with a hairline border disappears into them —
 * which is the one place a customer needs to find something to press.
 */
.ham-loadmore__btn {
	padding: 14px 36px;
	border: 0;
	border-radius: 999px;
	background: var(--ham-accent);
	color: var(--ham-accent-text);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .01em;
	cursor: pointer;
	box-shadow: 0 10px 24px -14px var(--ham-accent-glow);
	transition: background-color .18s var(--ham-ease), box-shadow .18s var(--ham-ease), transform .18s var(--ham-ease);
}

.ham-loadmore__btn:hover:not(:disabled) {
	background: var(--ham-accent-hover);
	box-shadow: 0 14px 28px -14px var(--ham-accent-glow);
	transform: translateY(-1px);
}

.ham-loadmore__btn:active:not(:disabled) {
	transform: none;
}

.ham-loadmore__btn:focus-visible {
	outline: 2px solid var(--ham-accent);
	outline-offset: 3px;
}

.ham-loadmore__btn:disabled {
	opacity: .6;
	box-shadow: none;
	cursor: default;
}

@media (prefers-reduced-motion: reduce) {
	.ham-loadmore__btn {
		transition: background-color .18s linear;
	}

	.ham-loadmore__btn:hover:not(:disabled) {
		transform: none;
	}
}

.ham-loadmore[hidden] {
	display: none;
}

.ham-picker__message {
	margin: 10px 0 0;
	font-size: 12.5px;
	color: var(--ham-danger);
}

.ham-picker__message:empty {
	display: none;
}

/* --------------------------------------------------------------------------
   Shared odds and ends
   -------------------------------------------------------------------------- */

.ham-empty {
	padding: 46px 24px;
	text-align: center;
}

.ham-empty__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: var(--ham-accent-soft);
	color: var(--ham-accent-ink);
}

.ham-empty__title {
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 700;
}

.ham-empty__text {
	margin: 0 0 20px;
	font-size: 14px;
	color: var(--ham-ink-soft);
}

.ham-flash {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	margin-bottom: 22px;
	border-radius: var(--ham-radius-sm);
	background: rgba(21, 128, 61, .10);
	color: var(--ham-success);
	font-size: 14px;
	font-weight: 600;
}

.ham-inline-form {
	display: flex;
	gap: 8px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.ham-inline-form input {
	flex: 1;
	min-width: 180px;
}

.ham-search {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 14px;
	border: 1px solid var(--ham-line);
	border-radius: 999px;
	background: var(--ham-surface);
	color: var(--ham-ink-soft);
	min-width: 220px;
}

.ham-search:focus-within {
	border-color: var(--ham-accent);
	box-shadow: 0 0 0 4px var(--ham-accent-soft);
}

.ham-search input {
	border: 0 !important;
	background: transparent;
	box-shadow: none !important;
	padding: 11px 0;
}

.ham-note {
	padding: 26px 4px;
	font-size: 14px;
	color: var(--ham-ink-soft);
	text-align: center;
}

/* --------------------------------------------------------------------------
   Dark mode
   -------------------------------------------------------------------------- */

.ham-mode-dark .ham-folder__actions button {
	background: rgba(31, 26, 43, .94);
	color: #f3f0f7;
}

.ham-mode-dark .ham-save {
	background: rgba(31, 26, 43, .94);
	color: #f3f0f7;
}

.ham-mode-dark .ham-swatch {
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.ham-mode-dark .ham-swatch.is-active {
	box-shadow: 0 0 0 3px var(--ham-surface), 0 0 0 5px var(--swatch);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.ham-checkout__grid {
		grid-template-columns: 1fr;
	}

	.ham-checkout__aside {
		order: -1;
	}

	.ham-dash__layout {
		grid-template-columns: minmax(0, 1fr);
	}

	/**
	 * The nav becomes a horizontal scroller. This has to match the weight of
	 * the theme reset above, which sets `overflow: visible` on the same
	 * element — without it the list expands to its full width and drags the
	 * whole page sideways on a phone.
	 */
	.woocommerce-account .ham-dash .woocommerce-MyAccount-navigation {
		position: static;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
	}

	.ham-nav {
		position: static;
	}

	.ham-nav__list {
		display: flex;
		gap: 4px;
		min-width: max-content;
	}

	.ham-nav__link {
		white-space: nowrap;
	}

	.ham-nav__badge {
		margin-left: 4px;
	}
}

@media (max-width: 640px) {
	.ham-checkout {
		padding-bottom: 96px;
	}

	.ham-checkout__title {
		font-size: 24px;
	}

	.ham-panel,
	.ham-summary,
	.ham-dash__content {
		padding: 18px;
		border-radius: 14px;
	}

	.ham-field--half {
		grid-template-columns: 1fr;
	}

	.ham-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ham-dash__masthead {
		flex-wrap: wrap;
		padding: 16px;
	}

	.ham-dash__shop {
		margin-left: 0;
		width: 100%;
	}

	.ham-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 12px;
	}

	.ham-folders {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
		gap: 12px;
	}

	.ham-folder__actions {
		opacity: 1;
		top: 18px;
		right: 18px;
	}

	.ham-order__foot {
		flex-direction: column;
		align-items: stretch;
	}

	.ham-order__actions .ham-btn {
		flex: 1;
	}

	.ham-modal {
		align-items: flex-end;
		padding: 0;
	}

	.ham-modal__panel {
		max-width: none;
		max-height: 82vh;
		border-radius: 20px 20px 0 0;
		animation: ham-sheet .24s var(--ham-ease);
	}

	@keyframes ham-sheet {
		from { transform: translateY(100%); }
		to   { transform: none; }
	}

	.ham-search {
		width: 100%;
	}

	.ham-dash__head {
		flex-direction: column;
		align-items: stretch;
	}
}

@media (prefers-reduced-motion: reduce) {
.ham-checkout .ham-btn,
.ham-dash .ham-btn,
.ham-modal .ham-btn,
.ham-card,
.ham-folder,
.ham-modal__panel {
		transition: none;
		animation: none;
	}
}
