/* =========================================================================
   Buttons, cards, forms, motion
   ========================================================================= */

/* ---------- buttons ---------- */

.zz-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 15px 30px;
	font-size: 11.5px;
	font-weight: 500;
	letter-spacing: .16em;
	text-transform: uppercase;
	line-height: 1;
	border: 1px solid transparent;
	border-radius: 0;
	cursor: pointer;
	white-space: nowrap;
	transition: background var(--t), color var(--t), border-color var(--t), opacity var(--t-fast);
}

.zz-btn--solid { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.zz-btn--solid:hover { background: transparent; color: var(--ink); }

.zz-btn--outline { background: transparent; color: var(--ink); border-color: var(--line-2); }
.zz-btn--outline:hover { border-color: var(--ink); }

.zz-btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.zz-btn--light:hover { background: transparent; color: #fff; border-color: #fff; }

.zz-btn--block { display: flex; width: 100%; }
.zz-btn--wide { flex: 1; }
.zz-btn[disabled], .zz-btn.is-busy { opacity: .5; pointer-events: none; }
.zz-btn.is-done { background: var(--ink); color: var(--bone); }

/* ---------- section heading ---------- */

.zz-sechead {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: clamp(28px, 4vw, 48px);
}
.zz-sechead__title { font-size: clamp(26px, 3.6vw, 42px); letter-spacing: -.025em; }
@media (max-width: 640px) { .zz-sechead .zz-underline { display: none; } }

/* ---------- grids and rails ---------- */

.zz-grid { display: grid; gap: clamp(16px, 2vw, 32px) clamp(12px, 1.6vw, 24px); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .zz-grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .zz-grid--4 { grid-template-columns: repeat(4, 1fr); } }

.zz-rail {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(230px, 1fr);
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	margin-inline: calc(var(--gut) * -1);
	padding-inline: var(--gut);
	padding-bottom: 6px;
	/* The negative margins run the rail to the screen edges; without this the
	   extra width leaks out of the page on iOS. */
	max-width: 100vw;
	scrollbar-width: none;
}
.zz-rail::-webkit-scrollbar { display: none; }
.zz-rail > * { scroll-snap-align: start; }
@media (min-width: 1100px) {
	.zz-rail {
		grid-auto-flow: row;
		grid-template-columns: repeat(3, 1fr);
		gap: 40px 24px;
		overflow: visible;
		margin-inline: 0;
		padding-inline: 0;
	}
}

/* ---------- product card ---------- */

.zz-card { display: flex; flex-direction: column; }

.zz-card__media {
	position: relative;
	display: block;
	background: var(--paper);
	overflow: hidden;
	aspect-ratio: 3 / 4;
}
.zz-card__img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform 1.2s var(--ease), opacity var(--t);
}
.zz-card__img--b { position: absolute; inset: 0; opacity: 0; }
.zz-card:hover .zz-card__img { transform: scale(1.035); }
.zz-card:hover .zz-card__img--b { opacity: 1; }

.zz-card__flag {
	position: absolute;
	top: 14px; left: 14px;
	background: var(--bone);
	padding: 5px 10px;
	font-size: 10px;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.zz-card__body { padding-top: 16px; display: grid; gap: 4px; }
.zz-card__cat { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.zz-card__name { font-size: 15px; font-weight: 400; letter-spacing: -.01em; }
.zz-card__name a:hover { color: var(--muted); }
.zz-card__price { display: flex; align-items: baseline; gap: 10px; font-size: 14px; margin-top: 2px; }
.zz-card__price del { color: var(--muted); text-decoration: line-through; font-size: 12.5px; }

/* ---------- quantity ---------- */

.zz-qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); }
.zz-qty__btn {
	width: 40px; height: 44px;
	display: grid; place-items: center;
	color: var(--ink-2);
	transition: background var(--t-fast);
}
.zz-qty__btn:hover { background: var(--bone-2); }
/* Scoped so these beat the generic input rules further down. */
.zz-qty input.zz-qty__input {
	width: 40px; height: 44px;
	min-width: 0;
	border: 0;
	padding: 0;
	background: none;
	outline: none;
	box-shadow: none;
	text-align: center;
	font-size: 14px;
	-moz-appearance: textfield;
	appearance: textfield;
}
.zz-qty input.zz-qty__input:focus { box-shadow: none; }
.zz-qty__input::-webkit-outer-spin-button, .zz-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.zz-qty--sm .zz-qty__btn { width: 30px; height: 32px; }
.zz-qty--sm input.zz-qty__input { width: 34px; height: 32px; font-size: 12.5px; }

/* ---------- cart lines in the drawer ---------- */

.zz-cartlist { display: grid; gap: 22px; }
.zz-cartline { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: start; }
.zz-cartline.is-busy { opacity: .4; pointer-events: none; }
.zz-cartline__img { background: var(--paper); overflow: hidden; }
.zz-cartline__img img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.zz-cartline__body { min-width: 0; }
.zz-cartline__cat { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.zz-cartline__name { display: block; font-size: 13.5px; line-height: 1.4; margin: 3px 0 10px; }
.zz-cartline__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.zz-cartline__price { font-size: 13.5px; white-space: nowrap; }
.zz-cartline__x { color: var(--muted-2); padding: 2px; transition: color var(--t-fast); }
.zz-cartline__x:hover { color: var(--ink); }

/* ---------- live search hits ---------- */

.zz-hits { display: grid; gap: 4px; }
.zz-hits a { display: flex; align-items: center; gap: 16px; padding: 8px 0; }
.zz-hits__img { width: 56px; flex: none; background: var(--paper); }
.zz-hits__img img { aspect-ratio: 3 / 4; object-fit: cover; }
.zz-hits__body { display: grid; gap: 2px; min-width: 0; }
.zz-hits__cat { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.zz-hits__name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zz-hits__price { font-size: 13px; color: var(--ink-2); }
.zz-hits__price del { display: none; }
.zz-hits__all { display: inline-block; margin-top: 18px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid currentColor; }
.zz-hits__empty { color: var(--muted); }

/* ---------- forms ---------- */

.woocommerce form .form-row { display: flex; flex-direction: column; gap: 7px; margin: 0 0 20px; }
.woocommerce form .form-row label { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.woocommerce form .form-row .required { color: var(--ink); text-decoration: none; }
.woocommerce form .form-row .optional { display: none; }
.woocommerce form .form-row.zz-hidden-field { display: none !important; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="password"], input[type="search"], input[type="url"], textarea, select,
.woocommerce .input-text {
	width: 100%;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--line-2);
	border-radius: 0;
	padding: 10px 0;
	font-size: 15px;
	color: var(--ink);
	outline: none;
	transition: border-color var(--t-fast);
}
input:focus, textarea:focus, select:focus, .woocommerce .input-text:focus { border-bottom-color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
textarea { min-height: 80px; resize: vertical; }

select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23857b70' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 2px center;
	padding-right: 26px;
}

/* ---------- motion ---------- */

.zz-reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity var(--t-slow), transform var(--t-slow);
}
.zz-reveal.is-in { opacity: 1; transform: none; }
.no-js .zz-reveal { opacity: 1; transform: none; }

/* ---------- empty states, crumbs, toast ---------- */

.zz-empty { text-align: center; padding: clamp(60px, 10vw, 120px) 20px; }
.zz-empty h1, .zz-empty h2 { font-size: clamp(22px, 3.4vw, 30px); margin-bottom: 24px; }

.zz-crumbs { margin-bottom: 16px; }
.zz-crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.zz-crumbs li + li::before { content: "/"; margin-right: 8px; }
.zz-crumbs a:hover { color: var(--ink); }

.zz-toast {
	position: fixed;
	left: 50%; bottom: 28px;
	transform: translate(-50%, 160%);
	z-index: 120;
	background: var(--ink);
	color: var(--bone);
	padding: 14px 26px;
	font-size: 11.5px;
	letter-spacing: .14em;
	text-transform: uppercase;
	transition: transform var(--t);
}
.zz-toast.is-on { transform: translate(-50%, 0); }

/* ---------- modal ---------- */

.zz-modal {
	position: fixed;
	inset: 0;
	z-index: 110;
	display: grid;
	place-items: center;
	padding: var(--gut);
	background: rgba(28, 24, 20, .4);
	opacity: 0;
	transition: opacity var(--t);
}
.zz-modal[hidden] { display: none; }
.zz-modal.is-open { opacity: 1; }

.zz-modal__box {
	background: var(--bone);
	width: min(680px, 100%);
	/* Without this the table's min-width pushes the box wider than the screen. */
	max-width: 100%;
	min-width: 0;
	max-height: calc(100svh - var(--gut) * 2);
	display: flex;
	flex-direction: column;
	transform: translateY(12px);
	transition: transform var(--t);
}
.zz-modal.is-open .zz-modal__box { transform: none; }

.zz-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 14px 14px 24px;
	border-bottom: 1px solid var(--line);
	flex: none;
}
.zz-modal__title { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }

.zz-modal__body { padding: 26px 24px 30px; overflow-y: auto; overscroll-behavior: contain; min-width: 0; }
.zz-modal__lead { font-size: 14px; line-height: 1.7; color: var(--ink-2); max-width: 52ch; }
.zz-modal__sub { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 28px 0 12px; }
.zz-modal__note { font-size: 12.5px; line-height: 1.7; color: var(--muted); margin-top: 22px; }

.zz-table__scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; min-width: 0; }
.zz-table__scroll::-webkit-scrollbar { display: none; }

.zz-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 420px; }
.zz-table th, .zz-table td { text-align: left; padding: 11px 10px 11px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.zz-table thead th { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--ink); }
.zz-table tbody th { font-weight: 500; }

/* ---------- modal on a phone: a sheet, not a dialog ---------- */

@media (max-width: 719px) {
	.zz-modal {
		place-items: end stretch;
		padding: 0;
	}

	.zz-modal__box {
		width: 100%;
		max-height: 88svh;
		transform: translateY(100%);
		transition: transform var(--t);
	}
	.zz-modal.is-open .zz-modal__box { transform: none; }

	/* A grip, so it reads as something you can pull down. */
	.zz-modal__head {
		position: relative;
		padding: 22px 8px 14px 20px;
	}
	.zz-modal__head::before {
		content: "";
		position: absolute;
		top: 8px; left: 50%;
		width: 36px; height: 3px;
		margin-left: -18px;
		border-radius: 2px;
		background: var(--line-2);
	}

	.zz-modal__body { padding: 22px 20px calc(26px + env(safe-area-inset-bottom)); }
	.zz-modal__lead { font-size: 13.5px; }

	/* The tables stay readable by scrolling sideways inside their own box. */
	.zz-table { font-size: 13px; min-width: 380px; }
	.zz-table th, .zz-table td { padding-right: 14px; white-space: nowrap; }

	.zz-table__scroll {
		margin-inline: -20px;
		padding-inline: 20px;
		max-width: 100vw;
	}
}

/* ---------- cookie notice ---------- */

.zz-cookies {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 115;
	background: var(--bone);
	border-top: 1px solid var(--line);
	transform: translateY(100%);
	transition: transform var(--t);
}
.zz-cookies[hidden] { display: none; }
.zz-cookies.is-on { transform: none; }

.zz-cookies__inner {
	max-width: var(--wrap);
	margin-inline: auto;
	padding: 20px var(--gut) calc(20px + env(safe-area-inset-bottom));
	display: flex;
	align-items: center;
	gap: clamp(18px, 3vw, 44px);
}
@media (max-width: 719px) {
	.zz-cookies__inner { flex-direction: column; align-items: stretch; gap: 16px; }
}

.zz-cookies__title { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.zz-cookies__text p { font-size: 13px; line-height: 1.65; color: var(--ink-2); max-width: 78ch; }
.zz-cookies__text a { border-bottom: 1px solid var(--line-2); }
.zz-cookies__text a:hover { border-color: var(--ink); }

.zz-cookies__actions { display: flex; gap: 10px; flex: none; }
.zz-cookies__actions .zz-btn { white-space: nowrap; }
@media (max-width: 719px) {
	.zz-cookies__actions .zz-btn { flex: 1; }
}

.zz-btn--ghost {
	background: none;
	color: var(--ink);
	border: 1px solid var(--line-2);
}
.zz-btn--ghost:hover { border-color: var(--ink); }

.zz-footer__cookies {
	background: none;
	border: 0;
	padding: 0;
	color: inherit;
	font: inherit;
	font-size: 11.5px;
	letter-spacing: .14em;
	text-transform: uppercase;
	cursor: pointer;
	opacity: .7;
	transition: opacity var(--t-fast);
}
.zz-footer__cookies:hover { opacity: 1; }


/* ---------- language dialog ---------- */

/* A first visit only. The backdrop is a link, so clicking away is the same as
   choosing Bulgarian — and the whole dialog works without JavaScript. The
   page behind it is not scroll-locked: this asks a question, it does not hold
   the reader hostage. */
.zz-langmodal {
	position: fixed;
	inset: 0;
	z-index: 120;
	display: grid;
	place-items: center;
	padding: var(--gut);
	animation: zz-fade .5s var(--ease) both;
}
@keyframes zz-fade { from { opacity: 0; } to { opacity: 1; } }

.zz-langmodal__back {
	position: absolute;
	inset: 0;
	background: rgba(28, 24, 20, .52);
	backdrop-filter: blur(2px);
}

.zz-langmodal__card {
	position: relative;
	width: min(420px, 100%);
	background: var(--bone);
	padding: clamp(34px, 5vw, 48px) clamp(26px, 4vw, 40px);
	text-align: center;
	animation: zz-rise-s .6s var(--ease) .08s both;
}
@keyframes zz-rise-s { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.zz-langmodal__mark {
	font-size: 17px;
	font-weight: 500;
	letter-spacing: .34em;
	text-indent: .34em;
	text-transform: uppercase;
}

.zz-langmodal__eyebrow {
	margin-top: 14px;
	font-size: 10.5px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--muted);
}

/* Hairlines between the options, drawn as gaps over a tinted backing. */
.zz-langlist {
	display: grid;
	gap: 1px;
	background: var(--line);
	border-block: 1px solid var(--line);
}
.zz-langlist a {
	display: block;
	padding: 15px 10px;
	background: var(--bone);
	font-size: 14.5px;
	letter-spacing: .02em;
	text-align: center;
	transition: background var(--t-fast), color var(--t-fast);
}
.zz-langlist a:hover { background: var(--ink); color: var(--bone); }
.zz-langlist a.is-on { background: var(--ink); color: var(--bone); }

.zz-langmodal__list,
.zz-langmodal .zz-langlist { margin-top: clamp(26px, 3.4vw, 34px); }

/* The panel is a short list, so it does not need the size guide's width. */
.zz-modal--lang .zz-modal__box { width: min(360px, 100%); }
.zz-modal--lang .zz-modal__body { padding: 22px 22px 26px; }

/* The code of the language in force, where the four codes do not fit. */
.zz-langbtn { font-size: 11px; font-weight: 500; letter-spacing: .1em; }
@media (min-width: 860px) { .zz-langbtn { display: none; } }

@media (prefers-reduced-motion: reduce) {
	.zz-langmodal, .zz-langmodal__card { animation: none; }
}


/* ---------- origin ---------- */

.zz-origin {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-top: 8px;
	font-size: 7.5px;
	font-weight: 400;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--muted-2);
}
.zz-flag { flex: none; display: block; }

.zz-origin--pdp {
	margin-top: 14px;
	font-size: 8px;
	letter-spacing: .16em;
	color: var(--muted);
}

/* Centred under the cards in the rail, with the rest of their captions. */
.zz-arrivals .zz-origin { justify-content: center; }


/* ---------- recently viewed ---------- */

/* Not a fourth row of merchandise: this is the reader's own trail, so it is
   smaller, quieter and centred, and it closes the page rather than selling
   from it. */
.zz-viewed {
	border-top: 1px solid var(--line);
	padding-block: clamp(46px, 6vw, 78px);
}

.zz-viewed .zz-sechead {
	justify-content: center;
	text-align: center;
	margin-bottom: clamp(24px, 3vw, 36px);
}
.zz-viewed .zz-sechead > div { display: grid; justify-items: center; gap: 7px; }
.zz-viewed .zz-sechead__title { font-size: clamp(17px, 1.9vw, 23px); letter-spacing: 0; }

/* A carousel of small frames. `safe center` puts a short row in the middle
   but steps back to the start edge once the row overflows — plain centring
   would push the first frame out of reach on the left. */
.zz-viewed .zz-rail {
	display: flex;
	flex-wrap: nowrap;
	justify-content: safe center;
	gap: clamp(13px, 1.7vw, 22px);
	overflow-x: auto;
	scroll-snap-type: x proximity;
	margin-inline: calc(var(--gut) * -1);
	padding-inline: var(--gut);
	padding-bottom: 4px;
	max-width: 100vw;
	scrollbar-width: none;
}
.zz-viewed .zz-rail::-webkit-scrollbar { display: none; }
.zz-viewed .zz-rail > * {
	flex: 0 0 clamp(102px, 11vw, 130px);
	scroll-snap-align: start;
}

/* The category line, the colour circles and the origin all belong on a card
   being offered, not on one being remembered. */
.zz-viewed .zz-card__cat,
.zz-viewed .zz-dots,
.zz-viewed .zz-origin { display: none; }

.zz-viewed .zz-card__body {
	padding-top: 11px;
	justify-items: center;
	text-align: center;
	gap: 3px;
}
.zz-viewed .zz-card__name { font-size: 11.5px; line-height: 1.4; }
.zz-viewed .zz-card__price { font-size: 11.5px; justify-content: center; gap: 7px; margin-top: 1px; }
.zz-viewed .zz-card__price del { font-size: 11px; }
