/* ==========================================================================
   Zivara v2 — refinement layer
   Loaded after main.css. Same tokens, same palette, same hero: this file only
   changes arrangement, spacing and feedback.

     1. Fixes for rules that never matched
     2. Header: wordmark left, navigation centre, actions right
     3. Announcement bar on a phone
     4. Page headings and breadcrumbs
     5. Catalogue quick-add
     6. Bag drawer and count
     7. Cart page
     8. Checkout
     9. Front page category rail
    10. Small polish
   ========================================================================== */

/* ==========================================================================
   1. FIXES
   main.js marks the overlay `.is-visible`; main.css only styled `.is-open`,
   so drawers opened with nothing dimmed behind them and no click-away.
   ========================================================================== */

.z-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

/* The WhatsApp button must sit under an open drawer, not on top of it. */
.z-wa-float {
	z-index: calc(var(--z-z-overlay) - 20);
}

/* ==========================================================================
   2. HEADER
   Wordmark first, so it is the first thing read and the first thing focused.
   The seven-link navigation only fits beside it from 1280px; below that the
   menu button takes over, on tablets as well as phones.
   ========================================================================== */

.z-header__bar {
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: clamp(0.75rem, 0.2rem + 1.8vw, 2.5rem);
}

.z-header__brand {
	grid-column: 1;
	justify-content: flex-start;
}

.z-nav {
	grid-column: 2;
	justify-self: center;
	min-inline-size: 0;
}

.z-header__right {
	grid-column: 3;
	justify-self: end;
}

.z-logo {
	align-items: flex-start;
}

.z-logo__sub {
	padding-inline-start: 0.12em;
}

.z-header.is-stuck {
	background: color-mix(in srgb, var(--z-bg) 90%, transparent);
	-webkit-backdrop-filter: saturate(1.3) blur(14px);
	backdrop-filter: saturate(1.3) blur(14px);
}

@media (min-width: 1024px) and (max-width: 1279.98px) {
	.z-nav {
		display: none;
	}

	.z-menu-toggle {
		display: inline-flex;
	}
}

@media (min-width: 1280px) {
	.z-nav__list,
	.z-nav > ul {
		gap: clamp(0.9rem, -0.9rem + 2.25vw, 2rem);
	}
}

/* ==========================================================================
   3. ANNOUNCEMENT BAR ON A PHONE
   Three messages do not fit on one line at 360px. They take turns instead.
   ========================================================================== */

@media (max-width: 639.98px) {
	.z-announce__inner {
		position: relative;
		display: block;
		min-block-size: 36px;
		padding: 0;
		overflow: hidden;
	}

	.z-announce__sep {
		display: none;
	}

	.z-announce__item {
		position: absolute;
		inset: 0;
		display: flex;
		align-items: center;
		justify-content: center;
		padding-inline: 0.5rem;
		white-space: nowrap;
		opacity: 0;
	}

	/* Without the rotation, the first message is the one that stays. */
	.z-announce__item:first-child {
		opacity: 1;
	}

	.z-announce__inner[data-n="3"] .z-announce__item {
		opacity: 0;
		animation: z-announce-3 12s var(--z-ease) infinite;
		animation-delay: calc(var(--z-i, 0) * 4s);
	}

	.z-announce__inner[data-n="2"] .z-announce__item {
		opacity: 0;
		animation: z-announce-2 9s var(--z-ease) infinite;
		animation-delay: calc(var(--z-i, 0) * 4.5s);
	}
}

@keyframes z-announce-3 {
	0%        { opacity: 0; transform: translateY(45%); }
	4%, 30%   { opacity: 1; transform: none; }
	34%, 100% { opacity: 0; transform: translateY(-45%); }
}

@keyframes z-announce-2 {
	0%        { opacity: 0; transform: translateY(45%); }
	5%, 46%   { opacity: 1; transform: none; }
	51%, 100% { opacity: 0; transform: translateY(-45%); }
}

@media (max-width: 639.98px) and (prefers-reduced-motion: reduce) {
	.z-announce__inner[data-n] .z-announce__item {
		animation: none;
		opacity: 0;
	}

	.z-announce__inner[data-n] .z-announce__item:first-child {
		opacity: 1;
	}
}

/* ==========================================================================
   4. PAGE HEADINGS
   `.z-pagehead` had no rules at all, so Cart, Checkout and every page title
   sat directly under the header.
   ========================================================================== */

.z-pagehead {
	padding-block-start: clamp(2rem, 1.3rem + 3vw, 4rem);
}

.z-pagehead .z-title-lg {
	margin: 0;
}

.z-pagehead .z-lede {
	margin-block-start: var(--z-sp-sm);
	max-inline-size: 60ch;
}

.z-crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.55em;
	margin: 0 0 0.9rem;
	font-size: var(--z-fs-2xs);
	font-weight: 700;
	letter-spacing: var(--z-track-caps);
	text-transform: uppercase;
	color: var(--z-text-faint);
}

.z-crumbs a {
	color: var(--z-text-muted);
	text-decoration: none;
}

.z-crumbs a:hover {
	color: var(--z-accent-text);
}

.z-crumbs [aria-current] {
	color: var(--z-accent-text);
}

/* The body follows its heading closely; the full band gap belongs between
   sections, not between a title and the thing it titles. */
.z-pagehead + .z-wrap.z-band--tight {
	padding-block-start: clamp(1.5rem, 1rem + 2vw, 2.75rem);
}

/* ==========================================================================
   5. CATALOGUE QUICK-ADD
   One control on every screen: a 44px round button in the corner of the
   photograph. The glyph is drawn with a mask, so it is centred by geometry
   rather than by font metrics, and WooCommerce's own loading/added glyphs
   and "View cart" link are switched off — the bag drawer is the feedback.
   ========================================================================== */

.woocommerce .z-product .z-product__quick,
.z-product .z-product__quick {
	inset-block-end: 0.6rem;
	inset-inline: auto 0.6rem;
	opacity: 1;
	transform: none;
}

.woocommerce ul.products li.product .z-product__quick a.button,
.woocommerce .z-product__quick a.button,
.z-product__quick a.button {
	display: grid;
	place-items: center;
	flex: none;
	inline-size: 44px;
	block-size: 44px;
	min-block-size: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--z-quick-bg, var(--z-surface));
	color: var(--z-quick-fg, var(--z-text));
	box-shadow: var(--z-shadow-md);
	font-size: 0;
	line-height: 0;
	letter-spacing: 0;
	text-indent: 0;
	overflow: hidden;
	opacity: 1;
	transform: scale(var(--z-quick-scale, 1));
	transition: background-color var(--z-dur-fast) var(--z-ease),
	            color var(--z-dur-fast) var(--z-ease),
	            transform var(--z-dur) var(--z-ease-spring);
}

.woocommerce .z-product__quick a.button::before,
.z-product__quick a.button::before {
	content: "";
	display: block;
	inline-size: 18px;
	block-size: 18px;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: currentColor;
	-webkit-mask: var(--z-quick-icon, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")) center / contain no-repeat;
	mask: var(--z-quick-icon, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")) center / contain no-repeat;
	animation: none;
	font-size: 0;
}

.woocommerce .z-product__quick a.button::after,
.z-product__quick a.button::after {
	content: none;
	display: none;
}

.woocommerce .z-product__quick a.button:hover,
.woocommerce .z-product__quick a.button:focus-visible,
.z-product__quick a.button:hover,
.z-product__quick a.button:focus-visible {
	--z-quick-bg: var(--z-accent);
	--z-quick-fg: var(--z-on-accent);
	--z-quick-scale: 1.08;
}

.woocommerce .z-product__quick a.button.loading,
.z-product__quick a.button.loading {
	--z-quick-bg: var(--z-accent);
	--z-quick-fg: var(--z-on-accent);
	--z-quick-scale: 1;
	padding: 0;
	opacity: 1;
	pointer-events: none;
}

.woocommerce .z-product__quick a.button.loading::before,
.z-product__quick a.button.loading::before {
	inline-size: 16px;
	block-size: 16px;
	border: 2px solid currentColor;
	border-block-start-color: transparent;
	border-radius: 50%;
	background: none;
	-webkit-mask: none;
	mask: none;
	animation: z-spin 0.7s linear infinite;
}

.woocommerce .z-product__quick a.button.added,
.z-product__quick a.button.added {
	--z-quick-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
	--z-quick-bg: var(--z-emerald);
	--z-quick-fg: #fff;
}

.woocommerce .z-product__quick a.added_to_cart,
.z-product__quick a.added_to_cart {
	display: none;
}

/* A sold-out piece links to its page; a plus there would promise an add. */
.z-product__quick a.button:not(.add_to_cart_button) {
	display: none;
}

/* ==========================================================================
   6. BAG DRAWER AND COUNT
   ========================================================================== */

.z-cartcount {
	inset-block-start: 3px;
	inset-inline-end: 1px;
	min-inline-size: 19px;
	block-size: 19px;
	line-height: 19px;
	font-size: 0.6875rem;
	box-shadow: 0 0 0 2px var(--z-bg);
}

.z-cartcount.is-bumped {
	transform: none;
	animation: z-bump 0.6s var(--z-ease-spring);
}

@keyframes z-bump {
	0%   { transform: scale(1); }
	35%  { transform: scale(1.6); }
	100% { transform: scale(1); }
}

.z-bag {
	inline-size: min(94vw, 440px);
}

.z-bag__titlecount {
	color: var(--z-text-muted);
	font-family: var(--z-font-body);
	font-size: var(--z-fs-base);
	font-weight: 600;
}

.z-bag__added {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	flex: none;
	margin: 0;
	padding: 0.7rem var(--z-sp-md);
	background: var(--z-success-soft);
	color: var(--z-success);
	font-size: var(--z-fs-sm);
	font-weight: 700;
}

.z-bag__added[hidden] {
	display: none;
}

.z-bag__added svg {
	flex: none;
	inline-size: 20px;
	block-size: 20px;
	padding: 3px;
	border-radius: 50%;
	background: var(--z-success);
	color: #fff;
	stroke-width: 2.6;
}

.z-bag__added.is-in {
	animation: z-bag-added 0.5s var(--z-ease) both;
}

@keyframes z-bag-added {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: none; }
}

.z-bag__content {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-block-size: 0;
}

/* Two classes: main.css resets padding on every classed list. */
.z-bag .z-bag__items {
	flex: 1;
	min-block-size: 0;
	margin: 0;
	padding: 0 var(--z-sp-md);
	list-style: none;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.z-bag__item {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr) auto;
	gap: var(--z-sp-sm);
	align-items: start;
	padding-block: var(--z-sp-sm);
	border-block-end: 1px solid var(--z-line);
	transition: opacity var(--z-dur) var(--z-ease);
}

.z-bag__item:last-child {
	border-block-end: 0;
}

.z-bag__item.is-busy {
	opacity: 0.4;
	pointer-events: none;
}

.z-bag__thumb {
	display: block;
	aspect-ratio: var(--z-ratio-product);
	border-radius: var(--z-r-sm);
	overflow: hidden;
	background: var(--z-surface-2);
}

.z-bag__thumb img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
}

.z-bag__info {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	min-inline-size: 0;
	padding-block-start: 0.1rem;
}

.z-bag__name {
	font-family: var(--z-font-display);
	font-size: var(--z-fs-md);
	font-weight: 500;
	line-height: var(--z-lh-snug);
	color: var(--z-text);
	text-decoration: none;
}

a.z-bag__name:hover {
	color: var(--z-accent-text);
}

.z-bag__meta,
.z-bag__info .variation {
	margin: 0;
	font-size: var(--z-fs-sm);
	color: var(--z-text-muted);
}

.z-bag__side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.5rem;
	padding-block-start: 0.1rem;
}

.z-bag__line {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* Small type, full-size target: the padding is the tap area. */
.z-bag__remove {
	min-block-size: 44px;
	margin-block: -0.6rem;
	padding: 0.35rem 0 0.35rem 0.75rem;
	border: 0;
	background: none;
	color: var(--z-text-muted);
	font: inherit;
	font-size: var(--z-fs-xs);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.z-bag__remove:hover {
	color: var(--z-error);
}

.z-bag__foot {
	flex: none;
	display: grid;
	gap: 0.6rem;
	padding: var(--z-sp-md);
	padding-block-end: calc(var(--z-sp-md) + env(safe-area-inset-bottom, 0px));
	border-block-start: 1px solid var(--z-line);
	background: var(--z-surface);
	box-shadow: 0 -10px 24px rgba(36, 23, 18, 0.05);
}

.z-bag__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--z-sp-sm);
	font-size: var(--z-fs-md);
}

.z-bag__row strong {
	font-family: var(--z-font-display);
	font-size: var(--z-fs-xl);
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

.z-bag__hint {
	margin: 0 0 0.3rem;
	font-size: var(--z-fs-sm);
	color: var(--z-text-muted);
}

.z-bag__empty {
	display: grid;
	justify-items: center;
	align-content: center;
	gap: 0.5rem;
	flex: 1;
	padding: var(--z-sp-xl) var(--z-sp-md);
	text-align: center;
	color: var(--z-text-muted);
}

.z-bag__empty svg {
	inline-size: 44px;
	block-size: 44px;
	stroke-width: 1.2;
	color: var(--z-line-strong);
}

.z-bag__empty p {
	margin: 0;
}

.z-bag__emptytitle {
	font-family: var(--z-font-display);
	font-size: var(--z-fs-lg);
	font-weight: 500;
	color: var(--z-text);
}

.z-bag__empty .z-btn {
	margin-block-start: var(--z-sp-sm);
}

/* The product page's own button while its add is in flight. */
.single_add_to_cart_button.is-loading {
	opacity: 0.75;
	pointer-events: none;
}

/* ==========================================================================
   7. CART PAGE
   Pieces on the left, totals beside them and in view while you scroll.
   ========================================================================== */

@media (min-width: 1024px) {
	.woocommerce-cart .z-page .woocommerce:has(> .woocommerce-cart-form) {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
		gap: var(--z-sp-xl);
		align-items: start;
	}

	.woocommerce-cart .z-page .woocommerce:has(> .woocommerce-cart-form) > .woocommerce-notices-wrapper {
		grid-column: 1 / -1;
	}

	.woocommerce-cart .z-page .woocommerce:has(> .woocommerce-cart-form) > .cart-collaterals {
		display: block;
		position: sticky;
		inset-block-start: calc(var(--z-header-h) + var(--z-sp-md));
		inline-size: auto;
		margin: 0;
	}

	.woocommerce-cart .z-page .woocommerce:has(> .woocommerce-cart-form) .cart_totals {
		float: none;
		inline-size: 100%;
	}

	.woocommerce-cart .z-page .woocommerce:has(> .woocommerce-cart-form) .cart_totals > h2 {
		margin-block-start: 0;
	}
}

/* ==========================================================================
   8. CHECKOUT
   The details form spans both rows of the left column, so the order summary
   starts level with it instead of underneath its full height. WooCommerce's
   two floated half-width columns inside the form become one full-width stack.
   ========================================================================== */

.woocommerce-checkout #customer_details.col2-set {
	display: grid;
	gap: var(--z-sp-lg);
	inline-size: auto;
	float: none;
}

.woocommerce-checkout #customer_details.col2-set::before,
.woocommerce-checkout #customer_details.col2-set::after {
	content: none;
}

.woocommerce-checkout #customer_details.col2-set > .col-1,
.woocommerce-checkout #customer_details.col2-set > .col-2 {
	float: none;
	inline-size: 100%;
	max-inline-size: none;
	padding: 0;
}

@media (min-width: 960px) {
	.woocommerce-checkout .woocommerce form.checkout {
		grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
		grid-template-rows: auto 1fr;
		column-gap: clamp(2rem, 0.5rem + 3.2vw, 4.5rem);
		row-gap: 0;
	}

	.woocommerce-checkout .woocommerce form.checkout > .woocommerce-NoticeGroup,
	.woocommerce-checkout .woocommerce form.checkout > .woocommerce-notices-wrapper {
		grid-column: 1 / -1;
	}

	.woocommerce-checkout #customer_details {
		grid-column: 1;
		grid-row: 1 / span 2;
	}

	.woocommerce-checkout #order_review_heading {
		grid-column: 2;
		grid-row: 1;
		margin-block-start: 0;
	}

	.woocommerce-checkout #order_review {
		grid-column: 2;
		grid-row: 2;
		align-self: start;
		inset-block-start: calc(var(--z-header-h) + var(--z-sp-md));
	}
}

/* ==========================================================================
   9. FRONT PAGE CATEGORY RAIL
   The grid was fixed at four columns, so three categories left a hole.
   ========================================================================== */

@media (min-width: 960px) {
	.z-cats {
		grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	}
}

@media (max-width: 959.98px) {
	.z-cats > .z-cat:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}

	.z-cats > .z-cat:last-child:nth-child(odd) .z-cat__media {
		aspect-ratio: 16 / 10;
	}
}

/* ==========================================================================
   10. SMALL POLISH
   ========================================================================== */

/* Photographs settle rather than snap when a card is hovered. */
@media (hover: hover) {
	.z-product__frame {
		transition: box-shadow var(--z-dur) var(--z-ease);
	}

	.z-product:hover .z-product__frame {
		box-shadow: var(--z-shadow-md);
	}
}

@media (prefers-reduced-motion: reduce) {
	.z-cartcount.is-bumped,
	.z-bag__added.is-in {
		animation: none;
	}

	.woocommerce .z-product__quick a.button,
	.z-product__quick a.button {
		transition: none;
	}

	.z-product__quick a.button {
		--z-quick-scale: 1 !important;
	}
}

/* ==========================================================================
   11. PHONE
   Most customers shop on a phone, so the phone layout is the product.
   ========================================================================== */

/* Nothing may ever scroll sideways, not even for a frame while it loads. */
body {
	overflow-x: clip;
}

/* iOS zooms into any field whose text is under 16px. */
@media (max-width: 767.98px) {
	.woocommerce select,
	.woocommerce input[type="text"],
	.woocommerce input[type="tel"],
	.woocommerce input[type="email"],
	.woocommerce input[type="number"],
	.woocommerce input[type="search"],
	.woocommerce input[type="password"],
	.woocommerce textarea,
	.z-main select,
	.z-main input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
	.z-main textarea,
	.z-searchpanel input {
		font-size: 16px;
	}
}

/* Text links that act as buttons get a thumb-sized target. */
.z-link {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	justify-self: start;
	inline-size: fit-content;
	min-block-size: 44px;
}

.woocommerce div.product div.images .woocommerce-product-gallery__trigger {
	inline-size: 44px;
	block-size: 44px;
}

/* The theme switch in the menu sits on one line like the links beside it. */
.z-drawer__links button {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	inline-size: 100%;
	min-block-size: 44px;
	padding: 0.7rem 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.z-drawer__links button svg {
	flex: none;
}

/* --- Product page -------------------------------------------------------- */

/* Quantity and Add to cart share one row; the gap under them was three
   margins stacked. */
.woocommerce div.product form.cart:not(.variations_form):not(.grouped_form) {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	margin-block-end: 0;
}

.woocommerce div.product form.cart:not(.variations_form):not(.grouped_form) .single_add_to_cart_button {
	flex: 1 1 12rem;
	min-inline-size: 0;
}

/* --- The chat button must never cover a total, a field or a button. The
   product page has its own WhatsApp button; the bag and checkout get the
   WhatsApp prompt on the order-received page. */
@media (max-width: 767.98px) {
	.woocommerce-cart .z-wa-float,
	.woocommerce-checkout .z-wa-float,
	.single-product .z-wa-float {
		display: none;
	}
}

/* --- Cart rows as cards with the photograph ------------------------------ */

@media (max-width: 768px) {
	/* As a table it will not shrink below its content width in Firefox and
	   Safari, which pushed the page sideways. As blocks it obeys the screen. */
	.woocommerce-cart table.cart,
	.woocommerce-cart table.cart tbody,
	.woocommerce-cart table.cart tr,
	.woocommerce-cart table.cart td.actions {
		display: block;
		inline-size: 100%;
		max-inline-size: 100%;
		box-sizing: border-box;
	}

	.woocommerce-cart table.cart tr.cart_item {
		display: grid;
		grid-template-columns: 84px minmax(0, 1fr) auto;
		grid-template-areas:
			"thumb name     remove"
			"thumb price    price"
			"thumb quantity subtotal";
		column-gap: 0.9rem;
		row-gap: 0.3rem;
		align-items: center;
		padding: var(--z-sp-sm);
	}

	.woocommerce-cart table.cart tr.cart_item > td {
		display: block;
		inline-size: auto;
		min-inline-size: 0;
		max-inline-size: none;
		padding: 0;
		border: 0;
		background: none;
		text-align: start !important;
	}

	.woocommerce-cart table.cart tr.cart_item > td::before {
		content: none;
		display: none;
	}

	.woocommerce-cart table.cart tr.cart_item > td.product-thumbnail {
		display: block;
		grid-area: thumb;
		align-self: start;
	}

	.woocommerce-cart table.cart td.product-thumbnail img {
		display: block;
		inline-size: 84px;
		block-size: auto;
		aspect-ratio: var(--z-ratio-product);
		object-fit: cover;
		border-radius: var(--z-r-sm);
	}

	.woocommerce-cart table.cart tr.cart_item > td.product-name {
		grid-area: name;
		align-self: start;
		font-family: var(--z-font-display);
		font-size: var(--z-fs-md);
		font-weight: 500;
		line-height: var(--z-lh-snug);
	}

	.woocommerce-cart table.cart tr.cart_item > td.product-remove {
		grid-area: remove;
		align-self: start;
		justify-self: end;
		margin: -0.5rem -0.5rem 0 0;
	}

	.woocommerce-cart table.cart tr.cart_item > td.product-price {
		grid-area: price;
		align-self: start;
		color: var(--z-text-muted);
		font-size: var(--z-fs-sm);
	}

	.woocommerce-cart table.cart tr.cart_item > td.product-quantity {
		grid-area: quantity;
		align-self: end;
	}

	.woocommerce-cart table.cart tr.cart_item > td.product-subtotal {
		grid-area: subtotal;
		align-self: end;
		justify-self: end;
		font-weight: 700;
		font-variant-numeric: tabular-nums;
	}
}

/* --- Checkout ------------------------------------------------------------- */

.woocommerce-checkout #ship-to-different-address label,
.woocommerce-checkout .woocommerce-form__label-for-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-block-size: 44px;
	cursor: pointer;
}

.woocommerce-checkout #ship-to-different-address label input,
.woocommerce-checkout .woocommerce-form__label-for-checkbox input {
	flex: none;
	margin: 0;
}

/* The primary action is never a small target. */
@media (max-width: 767.98px) {
	.woocommerce-checkout #payment #place_order,
	.woocommerce .wc-proceed-to-checkout .checkout-button {
		min-block-size: 56px;
		font-size: var(--z-fs-base);
	}
}

/* --- The narrowest phones (320–359px) ------------------------------------- */

@media (max-width: 359.98px) {
	.z-header__bar {
		gap: 0.25rem;
	}

	.z-logo__name {
		font-size: 1.0625rem;
	}

	.z-logo__sub {
		font-size: 0.5rem;
		letter-spacing: 0.26em;
	}

	.z-header__right .z-iconbtn {
		inline-size: 40px;
	}
}

/* The coupon field and its button share a row only while both fit. */
@media (max-width: 768px) {
	.woocommerce-cart table.cart td.actions .coupon {
		display: flex;
		flex-wrap: wrap;
		gap: 0.6rem;
		float: none;
		inline-size: 100%;
	}

	.woocommerce-cart table.cart td.actions .coupon .input-text {
		flex: 1 1 9rem;
		inline-size: auto;
		min-inline-size: 0;
		margin: 0;
		float: none;
	}

	.woocommerce-cart table.cart td.actions .coupon .button {
		flex: 1 1 auto;
		inline-size: auto;
		float: none;
		white-space: nowrap;
	}
}

/* On small phones the bag line gives the name the whole row; price and Remove
   move underneath, so a long name wraps between words, never inside one. */
@media (max-width: 419.98px) {
	.z-bag__item {
		grid-template-columns: 68px minmax(0, 1fr);
		column-gap: 0.85rem;
		row-gap: 0.2rem;
	}

	.z-bag__thumb {
		grid-row: 1 / span 2;
	}

	.z-bag__side {
		grid-column: 2;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 0;
	}
}

.z-bag__name,
.woocommerce-cart table.cart td.product-name a {
	overflow-wrap: break-word;
	word-break: normal;
	hyphens: none;
}

@media (max-width: 359.98px) {
	.z-bag .z-bag__items,
	.z-bag .z-drawer__head,
	.z-bag__added,
	.z-bag__foot {
		padding-inline: var(--z-sp-sm);
	}

	.woocommerce-cart table.cart tr.cart_item {
		grid-template-columns: 72px minmax(0, 1fr) auto;
		column-gap: 0.7rem;
	}

	.woocommerce-cart table.cart td.product-thumbnail img {
		inline-size: 72px;
	}

	.woocommerce-cart table.cart tr.cart_item > td.product-name {
		font-size: var(--z-fs-base);
	}
}

/* ==========================================================================
   12. BANGLA LINES AND PRODUCT DESCRIPTIONS
   The site fonts have no Bangla glyphs; name the ones phones and PCs carry so
   the fallback is a deliberate choice, with room for the taller script.
   ========================================================================== */

.z-bn,
[lang="bn"] {
	font-family: "Hind Siliguri", "Noto Sans Bengali", "Kohinoor Bangla", "Nirmala UI", var(--z-font-body);
	line-height: 1.75;
}

.z-shophead__bn,
.z-home__bn {
	margin: var(--z-sp-sm) 0 0;
	max-inline-size: 62ch;
	color: var(--z-text-muted);
	font-size: var(--z-fs-md);
}

.z-home__bn {
	margin-block: 0 var(--z-sp-md);
}

.woocommerce-Tabs-panel--description ul {
	display: grid;
	gap: 0.45rem;
	margin: var(--z-sp-sm) 0;
	padding: 0;
	list-style: none;
}

.woocommerce-Tabs-panel--description li {
	padding-inline-start: 1.1rem;
	position: relative;
}

.woocommerce-Tabs-panel--description li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: 0.62em;
	inline-size: 6px;
	block-size: 6px;
	border-radius: 50%;
	background: var(--z-accent);
}

.woocommerce-Tabs-panel--description p[lang="bn"] {
	margin-block-start: var(--z-sp-sm);
	color: var(--z-text-muted);
}

.z-pdp__note {
	margin-block-start: var(--z-sp-md);
	padding-block-start: var(--z-sp-sm);
	border-block-start: 1px solid var(--z-line);
	color: var(--z-text-muted);
	font-size: var(--z-fs-sm);
}

/* The longer category text sits under the grid, at a reading measure. */
.z-catnote {
	padding-block: var(--z-sp-lg) var(--z-sp-xl);
}

.z-catnote__text {
	max-inline-size: 68ch;
	color: var(--z-text-muted);
}

.z-catnote__text p {
	margin: 0;
}

.z-shophead__desc p + p {
	margin-block-start: 0.8em;
}

/* ==========================================================================
   13. FIRST PAINT
   The largest thing on a page must not wait for scripts before it shows.
   ========================================================================== */

/* The hero faded and zoomed in only after main.js had run. It is the first
   thing painted, so it simply appears; the zoom also made it briefly wider
   than the screen. */
.js .z-hero[data-reveal],
.js .z-hero[data-reveal].is-revealed {
	opacity: 1;
	transform: none;
	transition: none;
}

/* WooCommerce hides the product photograph until its gallery script loads.
   Before the slider wraps the list, show the first photograph only. */
.woocommerce div.product div.images.woocommerce-product-gallery {
	opacity: 1 !important;
}

.woocommerce-product-gallery > .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:nth-child(n+2) {
	display: none;
}

/* A second photograph that only shows on hover is never fetched by a phone. */
@media (hover: none), (max-width: 767.98px) {
	.z-product__img--alt {
		display: none;
	}
}

/* ==========================================================================
   14. PAGE NOT FOUND
   ========================================================================== */

.z-404 {
	display: grid;
	gap: var(--z-sp-md);
	max-inline-size: 44rem;
}

.z-404__search {
	display: flex;
	gap: 0.6rem;
}

.z-404__search input[type="search"] {
	flex: 1 1 auto;
	min-inline-size: 0;
	min-block-size: 52px;
	padding-inline: 1rem;
	border: 1px solid var(--z-line-strong);
	border-radius: var(--z-r-md);
	background: var(--z-surface);
	color: var(--z-text);
	font: inherit;
	font-size: 16px;
}

.z-404__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.z-404__help {
	margin: 0;
	color: var(--z-text-muted);
}

.z-404__help a {
	color: var(--z-accent-text);
	font-weight: 700;
}
