/*
 * Ari Vo: styles theme.json cannot express.
 * Clean retail look: white and light grey surfaces, near-black text, one sans (Manrope + Anek Bangla),
 * square-cornered controls, red only for sale prices and badges.
 * Every colour is a preset variable, so dark mode only redefines the palette below.
 */

/* ---------- Tokens ---------- */

:root {
	--arivo-focus: var(--wp--preset--color--contrast);
	--arivo-button-hover: #3a3a3a;
	/* Product and category tiles stay light in dark mode: the cleaned covers sit on this exact grey. */
	--arivo-tile: #f4f4f2;
	--arivo-utility-h: 2.25rem;
	--arivo-header-h: 4rem;
	--arivo-tabbar-h: 3.75rem;
	--arivo-ease: cubic-bezier(0.2, 0, 0, 1);
}

:root[data-theme="dark"] {
	color-scheme: dark;
	--wp--preset--color--base: #111111;
	--wp--preset--color--surface: #1a1a1a;
	--wp--preset--color--surface-strong: #262626;
	--wp--preset--color--contrast: #f2f2f2;
	--wp--preset--color--muted: #a3a3a3;
	--wp--preset--color--accent: #f26363;
	--wp--preset--color--on-accent: #111111;
	--wp--preset--color--success: #4cc38a;
	--wp--preset--color--line: #2c2c2c;
	--arivo-button-hover: #cfcfcf;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--wp--preset--color--base: #111111;
		--wp--preset--color--surface: #1a1a1a;
		--wp--preset--color--surface-strong: #262626;
		--wp--preset--color--contrast: #f2f2f2;
		--wp--preset--color--muted: #a3a3a3;
		--wp--preset--color--accent: #f26363;
		--wp--preset--color--on-accent: #111111;
		--wp--preset--color--success: #4cc38a;
		--wp--preset--color--line: #2c2c2c;
		--arivo-button-hover: #cfcfcf;
	}
}

/* ---------- Base ---------- */

/*
 * Top-level sections (offer bar, header, page content, footer) set their own spacing; WordPress's default
 * block gap between them left a white strip under the header, above the full-bleed hero.
 */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

:where(h1, h2, h3, h4, h5, h6) {
	font-synthesis-weight: none;
	text-wrap: balance;
}

/* Bengali conjuncts and vowel signs reach above and below the Latin line box; Anek has no 700/800. */
:where(h1, h2, h3, h4):lang(bn),
:lang(bn) :where(h1, h2, h3, h4) {
	letter-spacing: 0;
	line-height: 1.3;
}

:where(p) {
	text-wrap: pretty;
}

:where(a) {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

::selection {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--arivo-focus);
	outline-offset: 2px;
}

/* Prices change in the cart and filters; equal-width digits keep columns from shifting. */
.woocommerce-Price-amount,
.wc-block-components-product-price,
.wc-block-formatted-money-amount {
	font-variant-numeric: tabular-nums;
}

.arivo-eyebrow {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* Outline buttons: transparent with a hairline, filled on hover. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1px solid currentColor;
	background: transparent;
	color: var(--wp--preset--color--contrast);
}

@media (prefers-reduced-motion: no-preference) {
	.wp-element-button,
	.wp-block-button__link {
		transition: background-color 180ms var(--arivo-ease), color 180ms var(--arivo-ease), scale 120ms var(--arivo-ease);
	}

	.wp-element-button:active,
	.wp-block-button__link:active {
		scale: 0.98;
	}
}

@media (hover: hover) {
	.wp-block-button.is-style-outline > .wp-block-button__link:hover {
		border-color: var(--wp--preset--color--contrast);
		background: var(--wp--preset--color--contrast);
		color: var(--wp--preset--color--base);
	}
}

/* ---------- Utility bar and header ---------- */

/*
 * The header part holds the utility bar and the main bar. The wrapper sticks with a negative top, so the
 * utility bar scrolls away and the main bar stays.
 */
.wp-block-template-part:has(> .arivo-header) {
	position: sticky;
	top: calc(-1 * var(--arivo-utility-h));
	z-index: 50;
}

.admin-bar .wp-block-template-part:has(> .arivo-header) {
	top: calc(var(--wp-admin--admin-bar--height, 32px) - var(--arivo-utility-h));
}

/* Always a dark strip: inverting it with the palette would put a light bar on top of the dark theme. */
.arivo-utility {
	--arivo-focus: #fff;
	background: #141414;
	color: #f2f2f2;
	font-size: var(--wp--preset--font-size--x-small);
}

:root[data-theme="dark"] .arivo-utility {
	border-bottom: 1px solid var(--wp--preset--color--line);
	background: #1c1c1c;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .arivo-utility {
		border-bottom: 1px solid var(--wp--preset--color--line);
		background: #1c1c1c;
	}
}

.arivo-utility__bar {
	gap: 1rem;
	height: var(--arivo-utility-h);
}

.arivo-utility__note {
	margin: 0;
	overflow: hidden;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.arivo-utility__links {
	display: flex;
	flex: none;
	gap: 1.25rem;
	align-items: center;
}

.arivo-utility__links a {
	color: inherit;
	text-decoration: none;
}

.arivo-lang {
	font-weight: 700;
}

.arivo-theme-toggle {
	display: grid;
	place-items: center;
	width: 1.75rem;
	height: 1.75rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

/* Outline at rest, filled while dark mode is on: the icon shows the state, not just the colour. */
.arivo-theme-toggle svg path {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.75;
}

.arivo-theme-toggle[aria-pressed="true"] svg path {
	fill: currentColor;
}

@media (hover: hover) {
	.arivo-utility__links a:hover {
		text-decoration: underline;
	}
}

.arivo-header {
	border-bottom: 1px solid var(--wp--preset--color--line);
	background: color-mix(in srgb, var(--wp--preset--color--base) 94%, transparent);
	backdrop-filter: saturate(1.4) blur(12px);
}

/* Three columns: logo | nav | icons on desktop; menu | logo | icons on phones. */
.arivo-header__bar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 1rem;
	align-items: center;
	min-height: var(--arivo-header-h);
}

/* The bar uses the default layout, whose block gap would push the nav and icons 8px below the logo. */
.arivo-header__bar > * {
	margin-block: 0;
}

.arivo-wordmark {
	grid-column: 1;
	justify-self: start;
	display: block;
	margin: 0;
	color: var(--wp--preset--color--contrast);
	line-height: 0;
}

/* The ΛRI VO logo (inline SVG, currentColor). */
.arivo-wordmark svg {
	display: block;
	width: auto;
	height: 1.25rem;
}

@media (hover: hover) {
	.arivo-wordmark:hover {
		opacity: 0.7;
	}
}

/* Beats the muted colour the footer gives its brand paragraph. */
.arivo-footer__brand .arivo-footer__logo {
	margin: 0 0 1rem;
	color: var(--wp--preset--color--contrast);
	line-height: 0;
}

.arivo-footer__logo svg {
	width: auto;
	height: 1.375rem;
}

/* WooCommerce's slim checkout header, with the logo instead of the site title. */
.arivo-checkout-header {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.arivo-checkout-header__bar {
	min-height: var(--arivo-header-h);
}

.arivo-checkout-header .arivo-wordmark {
	margin: 0;
}

.arivo-nav {
	grid-column: 2;
}

.arivo-header__tools {
	grid-column: 3;
	justify-self: end;
	gap: 0.125rem;
}

.arivo-nav .wp-block-navigation__container {
	gap: 0.25rem 1.75rem;
}

.arivo-nav .wp-block-navigation-item__content {
	position: relative;
	padding-block: 0.625rem;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* Underline the current section; grows in on hover. */
.arivo-nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	bottom: 0.25rem;
	height: 2px;
	background: currentColor;
	scale: 0 1;
	transform-origin: left;
}

.arivo-nav .current-menu-item > .wp-block-navigation-item__content::after,
.arivo-nav .current-menu-ancestor > .wp-block-navigation-item__content::after {
	scale: 1 1;
}

.arivo-nav .wp-block-navigation__submenu-container {
	min-width: 15rem !important;
	padding: 0.75rem 0;
	border: 1px solid var(--wp--preset--color--line) !important;
	background: var(--wp--preset--color--base) !important;
	box-shadow: var(--wp--preset--shadow--lift);
	color: var(--wp--preset--color--contrast) !important;
}

.arivo-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.5rem 1.25rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
}

/* The last submenu link is "All …": set apart as the way into the whole category. */
.arivo-nav .wp-block-navigation__submenu-container > li:last-child {
	margin-top: 0.375rem;
	padding-top: 0.375rem;
	border-top: 1px solid var(--wp--preset--color--line);
}

.arivo-nav .wp-block-navigation__submenu-container > li:last-child .wp-block-navigation-item__content {
	font-weight: 700;
}

.arivo-header__tools .wp-block-search__button,
.arivo-header__tools .wc-block-mini-cart__button,
.arivo-header__tools .wc-block-customer-account__link,
.arivo-wish-link {
	position: relative;
	display: grid;
	place-items: center;
	min-width: 2.5rem;
	height: 2.5rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
}

.arivo-header__tools .wp-block-search__button svg,
.arivo-header__tools .wc-block-mini-cart__icon,
.arivo-header__tools .wc-block-customer-account__account-icon {
	width: 1.375rem;
	height: 1.375rem;
}

.arivo-wish-link svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
}

/* Count bubbles on the wishlist, the bag and the phone tab bar. */
.arivo-count,
.wc-block-mini-cart__badge {
	position: absolute;
	top: 0.125rem;
	inset-inline-end: 0;
	display: grid;
	place-items: center;
	min-width: 1.125rem;
	height: 1.125rem;
	padding: 0 0.25rem;
	border: 0 !important;
	border-radius: 999px;
	background: var(--wp--preset--color--contrast) !important;
	color: var(--wp--preset--color--base) !important;
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1;
}

.arivo-count[hidden] {
	display: none;
}

.arivo-search .wp-block-search__inside-wrapper {
	border: 0;
}

.arivo-search .wp-block-search__input {
	min-height: 2.5rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 0;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	font-size: 1rem;
	padding-inline: 0.875rem;
}

/* WooCommerce only fades the closed cart drawer out; hide it once the slide-out ends so Tab skips its links. */
.wc-block-components-drawer__screen-overlay--is-hidden {
	visibility: hidden;
	transition: opacity 0.3s, visibility 0s 0.3s;
}

@media (hover: hover) {
	.arivo-nav .wp-block-navigation__container > .wp-block-navigation-item:hover > .wp-block-navigation-item__content::after {
		scale: 1 1;
	}

	.arivo-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
		background: var(--wp--preset--color--surface);
	}

	.arivo-header__tools .wp-block-search__button:hover,
	.arivo-header__tools .wc-block-mini-cart__button:hover,
	.arivo-header__tools .wc-block-customer-account__link:hover,
	.arivo-wish-link:hover {
		opacity: 0.65;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.arivo-nav .wp-block-navigation-item__content::after {
		transition: scale 220ms var(--arivo-ease);
	}
}

/* Core navigation switches to its hamburger below 600px. */
@media (max-width: 599px) {
	.arivo-header__bar {
		grid-template-columns: 1fr auto 1fr;
		gap: 0.5rem;
		min-height: 3.5rem;
	}

	.arivo-nav {
		grid-column: 1;
		grid-row: 1;
		justify-self: start;
	}

	.arivo-wordmark {
		grid-column: 2;
		grid-row: 1;
		justify-self: center;
	}

	.arivo-wordmark svg {
		height: 1rem;
	}

	.arivo-header__tools {
		grid-row: 1;
	}

	/* Wishlist, account and bag live in the phone tab bar. */
	.arivo-header__wishlist,
	.arivo-header__account,
	.arivo-header__cart {
		display: none !important;
	}

	.arivo-utility__extra {
		display: none;
	}
}

/* Menu overlay on phones: large, plain list with the submenus open. */
.arivo-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.25rem var(--wp--preset--spacing--40) 6rem;
	background: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--contrast) !important;
}

.arivo-nav .is-menu-open .wp-block-navigation__container {
	gap: 1.25rem;
}

.arivo-nav .is-menu-open .wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--medium);
}

.arivo-nav .is-menu-open .wp-block-navigation__submenu-container {
	padding: 0.25rem 0 0 !important;
	border: 0 !important;
	box-shadow: none;
}

.arivo-nav .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.375rem 0;
	color: var(--wp--preset--color--muted);
}

/* ---------- Phone tab bar ---------- */

.arivo-tabbar {
	display: none;
}

@media (max-width: 47.99rem) {
	body {
		padding-bottom: calc(var(--arivo-tabbar-h) + env(safe-area-inset-bottom));
	}

	.arivo-tabbar {
		position: fixed;
		inset-inline: 0;
		bottom: 0;
		z-index: 60;
		display: grid;
		grid-template-columns: repeat(5, 1fr);
		height: calc(var(--arivo-tabbar-h) + env(safe-area-inset-bottom));
		padding-bottom: env(safe-area-inset-bottom);
		border-top: 1px solid var(--wp--preset--color--line);
		background: var(--wp--preset--color--base);
	}

	.arivo-tabbar a {
		position: relative;
		display: grid;
		place-content: center;
		justify-items: center;
		gap: 0.125rem;
		color: var(--wp--preset--color--muted);
		font-size: 0.6875rem;
		font-weight: 600;
		text-decoration: none;
	}

	.arivo-tabbar a[aria-current="page"] {
		color: var(--wp--preset--color--contrast);
	}

	.arivo-tabbar a[aria-current="page"] svg {
		stroke-width: 2;
	}

	.arivo-tabbar .arivo-count {
		top: 0.375rem;
		inset-inline-end: calc(50% - 1.25rem);
	}

	/* Keep WooCommerce's drawer and notices above the bar. */
	.wc-block-components-drawer__screen-overlay {
		z-index: 70;
	}
}

/* ---------- Sections ---------- */

.arivo-section-head {
	gap: 1rem;
	margin-bottom: 1.25rem;
}

.arivo-section-head h2 {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-large);
}

.arivo-section-head__link {
	flex: none;
	margin: 0;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.arivo-section-head__link a {
	text-underline-offset: 0.35em;
}

.arivo-section-intro__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 800;
	letter-spacing: -0.03em;
}

.arivo-section-intro__text {
	max-width: 52ch;
	margin-top: 0.5rem;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--medium);
}

.arivo-empty {
	color: var(--wp--preset--color--muted);
}

/* ---------- Category tiles ---------- */

.arivo-tiles {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.arivo-tile {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	background: var(--arivo-tile);
	color: #fff;
	text-decoration: none;
}

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

.arivo-tile__label {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	padding: 3rem 1rem 1rem;
	background: linear-gradient(transparent, rgb(10 10 10 / 0.62));
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.2;
}

.arivo-tile__label::after {
	content: " \2192";
	opacity: 0;
}

/* Book tiles: covers on light grey, so the label is dark text on the empty lower part, no shade. */
.arivo-tiles--light .arivo-tile {
	color: #141414;
}

.arivo-tiles--light .arivo-tile__label {
	padding-top: 1rem;
	background: none;
}

@media (prefers-reduced-motion: no-preference) {
	.arivo-tile img {
		transition: scale 600ms var(--arivo-ease);
	}

	.arivo-tile__label::after {
		transition: opacity 200ms var(--arivo-ease);
	}
}

@media (hover: hover) {
	.arivo-tile:hover img {
		scale: 1.04;
	}

	.arivo-tile:hover .arivo-tile__label::after {
		opacity: 1;
	}
}

.arivo-tile:focus-visible {
	outline-offset: 3px;
}

@media (max-width: 47.99rem) {
	.arivo-tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.625rem;
	}

	.arivo-tile__label {
		padding: 2.5rem 0.75rem 0.75rem;
		font-size: var(--wp--preset--font-size--medium);
	}
}

/* ---------- Promo banner (media & text) ---------- */

.arivo-promo {
	background: var(--wp--preset--color--surface);
}

.arivo-promo .wp-block-media-text__content {
	display: grid;
	gap: 1rem;
	justify-items: start;
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--50);
}

.arivo-promo h2 {
	margin: 0;
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 800;
	letter-spacing: -0.03em;
}

.arivo-promo p:not(.arivo-eyebrow) {
	max-width: 36ch;
	margin: 0;
	color: var(--wp--preset--color--muted);
}

.arivo-promo .wp-block-buttons {
	margin-top: 0.5rem;
}

.arivo-promo .wp-block-media-text__media {
	min-height: 22rem;
}

/* ---------- Product cards ---------- */

.arivo-products .wc-block-product-template {
	gap: 2rem 1rem;
}

/*
 * min-width: 0 lets a card be narrower than its content. Without it a long one-line author name set the
 * card's minimum width, so cards in the same row came out wider and their images bigger.
 */
.arivo-products .wc-block-product {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
}

/* A fixed 4:5 frame: whatever the photo's size or shape, the box does not change; the image fits inside. */
.arivo-card__media {
	position: relative;
	width: 100%;
	margin: 0 0 0.625rem;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	background: var(--arivo-tile);
}

.arivo-card__media > a {
	display: block;
	height: 100%;
}

.arivo-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.arivo-products--fashion .arivo-card__media img {
	object-fit: cover;
}

@media (prefers-reduced-motion: no-preference) {
	.arivo-card__media img {
		transition: scale 500ms var(--arivo-ease);
	}
}

@media (hover: hover) {
	.arivo-products .wc-block-product:hover .arivo-card__media img {
		scale: 1.03;
	}
}

/* Sale badge: square red flag in the image corner. */
.arivo-products .wc-block-components-product-sale-badge,
.arivo-product .wc-block-components-product-sale-badge {
	margin: 0;
	padding: 0.3rem 0.5rem;
	border: 0;
	border-radius: 0;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
}

.arivo-card__media .wc-block-components-product-sale-badge--align-left {
	top: 0.625rem;
	left: 0.625rem;
}

/* Wishlist heart: top-right of the image. */
.arivo-wish {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgb(255 255 255 / 0.92);
	color: #141414;
	cursor: pointer;
}

.arivo-wish svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
}

.arivo-wish[aria-pressed="true"] svg {
	fill: #c0262d;
	stroke: #c0262d;
}

.arivo-card__wish {
	position: absolute;
	top: 0.5rem;
	inset-inline-end: 0.5rem;
	z-index: 2;
}

@media (prefers-reduced-motion: no-preference) {
	.arivo-wish svg {
		transition: fill 150ms var(--arivo-ease), scale 200ms var(--arivo-ease);
	}

	.arivo-wish:active svg {
		scale: 0.85;
	}
}

/* Statute titles run long: two lines on cards; the full title is on the product page. */
.arivo-products .arivo-card__title {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.45;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

/*
 * WooCommerce makes the title link inline-block, one unbreakable box that no line clamp can cut; and core gives
 * the author separator pre-wrap, which breaks the one-line author row at the comma.
 */
.arivo-products .arivo-card__title a,
.arivo-products .arivo-card__author > * {
	display: inline;
}

.arivo-products .arivo-card__author > * {
	white-space: nowrap;
}

/* Inline padding grows the tap area to 24px without moving the line. */
.arivo-products .arivo-card__author > a {
	padding-block: 0.25rem;
}

.arivo-card__title a {
	color: inherit;
}

/* 24px line: author links are tap targets next to the title link (WCAG 2.5.8 minimum size). */
.arivo-products .arivo-card__author {
	display: block;
	overflow: hidden;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.5rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.arivo-card__author a {
	color: inherit;
	text-decoration: none;
}

.arivo-card__price {
	margin-top: 0.125rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
}

:where(.arivo-card__price, .arivo-product__price, .arivo-wishlist__price) ins {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

:where(.arivo-card__price, .arivo-product__price, .arivo-wishlist__price) del {
	margin-inline-end: 0.375rem;
	color: var(--wp--preset--color--muted);
	font-weight: 400;
}

/* Cards only announce stock when it is a problem; "in stock" on every card is noise. */
.arivo-products .wc-block-components-product-stock-indicator {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
}

.arivo-products .wc-block-components-product-stock-indicator--in-stock {
	display: none;
}

.arivo-products .wc-block-components-product-stock-indicator--out-of-stock {
	color: var(--wp--preset--color--muted);
}

/* Push the button to the bottom so a row of cards lines up. */
.arivo-card__button {
	margin-top: auto;
	padding-top: 0.625rem;
}

.arivo-card__button.wc-block-components-product-button {
	width: 100%;
}

.arivo-products .arivo-card__button .wc-block-components-product-button__button.wp-element-button {
	width: 100%;
	min-height: 2.5rem;
	padding: 0.5rem;
	border: 1px solid var(--wp--preset--color--contrast);
	background: transparent;
	color: var(--wp--preset--color--contrast);
	font-size: 0.6875rem;
}

@media (hover: hover) {
	.arivo-card__title a:hover {
		text-decoration: underline;
	}

	.arivo-products .arivo-card__button .wc-block-components-product-button__button.wp-element-button:hover {
		background: var(--wp--preset--color--contrast);
		color: var(--wp--preset--color--base);
	}
}

/* Phones: two-up grids, and home rails become a swipeable row. */
@media (max-width: 47.99rem) {
	.arivo-products .wc-block-product-template {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 1.5rem 0.625rem;
	}

	.arivo-rail .arivo-products .wc-block-product-template {
		display: flex !important;
		gap: 0.625rem;
		margin-inline: calc(-1 * var(--wp--style--root--padding-left, 1rem));
		padding-inline: var(--wp--style--root--padding-left, 1rem);
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-padding-inline: var(--wp--style--root--padding-left, 1rem);
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.arivo-rail .arivo-products .wc-block-product-template::-webkit-scrollbar {
		display: none;
	}

	.arivo-rail .arivo-products .wc-block-product {
		flex: 0 0 44%;
		width: 44%;
		max-width: 44%;
		scroll-snap-align: start;
	}

	.arivo-card__wish {
		width: 2rem;
		height: 2rem;
	}
}

/* ---------- Chips (publishers) ---------- */

.arivo-chips,
.arivo-chips.wp-block-tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.arivo-chips a,
.arivo-chips.wp-block-tag-cloud a {
	display: inline-grid;
	place-items: center;
	min-height: 2.5rem;
	margin: 0;
	padding: 0 1rem;
	border: 1px solid var(--wp--preset--color--line);
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 600;
	text-decoration: none;
}

@media (hover: hover) {
	.arivo-chips a:hover,
	.arivo-chips.wp-block-tag-cloud a:hover {
		border-color: var(--wp--preset--color--contrast);
	}
}

/* ---------- Archives ---------- */

.wc-block-breadcrumbs,
.woocommerce-breadcrumb {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small) !important;
}

.woocommerce-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.arivo-archive__intro {
	margin-block: 0.5rem var(--wp--preset--spacing--40);
}

.arivo-archive__intro h1 {
	margin: 0 0 0.25rem;
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 800;
	letter-spacing: -0.03em;
}

.arivo-archive__intro .wp-block-term-description {
	max-width: 60ch;
	color: var(--wp--preset--color--muted);
}

.arivo-archive__toolbar {
	align-items: center;
	margin-bottom: 1.25rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.arivo-archive__toolbar :where(p, form) {
	margin: 0;
}

.wc-block-catalog-sorting select,
.woocommerce-ordering select {
	min-height: 2.5rem;
	padding: 0.5rem 2rem 0.5rem 0.875rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 0;
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-size: 1rem;
}

.arivo-filters {
	display: grid;
	gap: 1.75rem;
}

.arivo-filters__heading {
	margin: 0 0 0.75rem;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* ---------- Single product ---------- */

.arivo-product__media .wc-block-product-gallery-large-image,
.arivo-product__media .wc-block-components-product-image {
	background: var(--arivo-tile);
}

/* Compilation titles run to 150 characters, so the heading scales with the screen. */
.arivo-product__title {
	margin: 0;
	font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.2;
	text-wrap: balance;
}

.arivo-product__author {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.arivo-product__price {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 700;
}

.arivo-product__excerpt {
	max-width: 60ch;
	color: var(--wp--preset--color--muted);
}

/* Buy row: quantity, a full-width Add to cart and the wishlist heart. */
.arivo-product__buy {
	gap: 0.625rem;
	padding-block: 1rem;
	border-block: 1px solid var(--wp--preset--color--line);
}

.arivo-product__buy > :first-child {
	flex: 1;
	min-width: 0;
}

.arivo-product__buy form > .wp-block-group {
	flex-wrap: nowrap;
	gap: 0.625rem;
}

.arivo-product__buy .wc-block-components-product-button {
	flex: 1;
}

.arivo-product__buy .wc-block-components-product-button .wp-element-button {
	width: 100%;
	min-height: 3rem;
}

.arivo-product__wish {
	flex: none;
	width: 3rem;
	height: 3rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 0;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

.arivo-product__summary .wc-block-components-quantity-selector {
	min-height: 3rem;
	border-radius: 0 !important;
}

.arivo-product__summary .wc-block-components-quantity-selector::after {
	border-radius: 0 !important;
	border-color: var(--wp--preset--color--line) !important;
}

.arivo-product__promises {
	display: grid;
	gap: 0.5rem;
	margin: 1rem 0;
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--small);
}

.arivo-product__promises li {
	padding-inline-start: 1.75rem;
	background: no-repeat 0 0.15em / 1.125rem url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E7A46' stroke-width='2'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.arivo-product .wp-block-woocommerce-product-details,
.arivo-product__details {
	margin-top: var(--wp--preset--spacing--50);
}

/* Classic tabs as a plain underline bar. */
.woocommerce-tabs ul.tabs {
	display: flex;
	gap: 1.75rem;
	margin: 0 0 1.5rem !important;
	padding: 0 !important;
	border-bottom: 1px solid var(--wp--preset--color--line);
	list-style: none;
}

.woocommerce-tabs ul.tabs::before,
.woocommerce-tabs ul.tabs li::before,
.woocommerce-tabs ul.tabs li::after {
	display: none !important;
}

.woocommerce-tabs ul.tabs li {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
}

.woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 0.75rem 0 !important;
	color: var(--wp--preset--color--muted) !important;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700 !important;
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
}

.woocommerce-tabs ul.tabs li.active a {
	box-shadow: inset 0 -2px 0 var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--contrast) !important;
}

.woocommerce-Tabs-panel h2 {
	font-size: var(--wp--preset--font-size--large);
}

.woocommerce-product-attributes {
	width: 100%;
	border: 0 !important;
	border-collapse: collapse;
}

.woocommerce-product-attributes :is(th, td) {
	padding: 0.75rem 0 !important;
	border: 0 !important;
	border-bottom: 1px solid var(--wp--preset--color--line) !important;
	background: none !important;
	font-style: normal !important;
	text-align: start;
	vertical-align: top;
}

.woocommerce-product-attributes th {
	width: 12rem;
	color: var(--wp--preset--color--muted);
	font-weight: 500 !important;
}

.woocommerce-product-attributes td p {
	margin: 0 !important;
	padding: 0 !important;
}

.wc-block-components-product-stock-indicator--in-stock,
.stock.in-stock {
	color: var(--wp--preset--color--success);
}

/* ---------- Footer ---------- */

.arivo-footer {
	margin-top: var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--line);
	font-size: var(--wp--preset--font-size--small);
}

.arivo-promises {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
	margin: 0 auto;
	padding: var(--wp--preset--spacing--40) 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	list-style: none;
}

.arivo-promises li {
	display: flex;
	gap: 0.875rem;
	align-items: flex-start;
	color: var(--wp--preset--color--muted);
}

.arivo-promises svg {
	flex: none;
	width: 1.75rem;
	height: 1.75rem;
	color: var(--wp--preset--color--contrast);
}

.arivo-promises strong {
	display: block;
	color: var(--wp--preset--color--contrast);
}

.arivo-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
	gap: 2rem;
	padding-top: var(--wp--preset--spacing--50);
}

.arivo-footer__brand p {
	max-width: 38ch;
	color: var(--wp--preset--color--muted);
}

.arivo-footer__heading {
	margin: 0 0 1rem;
	color: var(--wp--preset--color--muted);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.arivo-footer__links {
	display: grid;
	gap: 0.625rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.arivo-footer a {
	color: inherit;
	text-decoration: none;
}

.arivo-footer__base {
	align-items: center;
	margin-top: var(--wp--preset--spacing--50);
	padding-top: 1.25rem;
	border-top: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
}

.arivo-footer__base p {
	margin: 0;
}

.arivo-footer__pay {
	display: flex;
	gap: 0.75rem;
	align-items: center;
}

.arivo-pay-badge {
	display: inline-flex;
	gap: 0.5rem;
	align-items: center;
	min-height: 2rem;
	padding: 0 0.75rem;
	border: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--contrast);
	font-weight: 700;
}

.arivo-pay-badge svg {
	width: 1.125rem;
	height: 1.125rem;
}

@media (hover: hover) {
	.arivo-footer a:hover {
		text-decoration: underline;
	}
}

@media (max-width: 59.99rem) {
	.arivo-footer__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.arivo-footer__brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 47.99rem) {
	.arivo-promises {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.arivo-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ---------- WooCommerce form controls, notices, cart ---------- */

.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-blocks-components-select__select,
.wc-block-components-textarea {
	border-color: var(--wp--preset--color--line) !important;
	border-radius: 0 !important;
	background-color: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--contrast) !important;
}

.wc-block-components-button:not(.is-link),
.wc-block-components-radio-control__option,
.wc-block-components-radio-control-accordion-option,
.wc-block-components-checkout-step__container .wc-block-components-radio-control {
	border-radius: 0 !important;
}

.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button {
	min-height: 3.25rem;
}

/* Notices in the palette instead of WooCommerce's blue, green and red. */
.wc-block-components-notice-banner {
	border-radius: 0 !important;
	color: var(--wp--preset--color--contrast) !important;
}

.wc-block-components-notice-banner.is-info {
	border-color: var(--wp--preset--color--line) !important;
	background: var(--wp--preset--color--surface) !important;
}

.wc-block-components-notice-banner.is-info > svg {
	background-color: var(--wp--preset--color--contrast) !important;
	fill: var(--wp--preset--color--base) !important;
}

.wc-block-components-notice-banner.is-success {
	border-color: var(--wp--preset--color--success) !important;
	background: color-mix(in srgb, var(--wp--preset--color--success) 7%, var(--wp--preset--color--base)) !important;
}

.wc-block-components-notice-banner.is-success > svg {
	background-color: var(--wp--preset--color--success) !important;
}

.wc-block-components-notice-banner.is-error {
	border-color: var(--wp--preset--color--accent) !important;
	background: color-mix(in srgb, var(--wp--preset--color--accent) 6%, var(--wp--preset--color--base)) !important;
}

.wc-block-components-notice-banner.is-error > svg {
	background-color: var(--wp--preset--color--accent) !important;
}

/* The cart's "Save ৳365" badge never wraps by default; in Bangla it pushes the price column off a 375px screen. */
.wc-block-cart-item__total .wc-block-components-sale-badge {
	white-space: normal;
	text-align: end;
}

.wc-block-components-sale-badge {
	border-radius: 0 !important;
}

/* ---------- Wishlist page ---------- */

.arivo-wishlist__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(15rem, 44%), 1fr));
	gap: 2rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.arivo-wishlist__item {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.arivo-wishlist__media {
	display: block;
	margin-bottom: 0.625rem;
	background: var(--arivo-tile);
}

.arivo-wishlist__media img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: contain;
}

.arivo-wishlist__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.45;
}

.arivo-wishlist__title a {
	color: inherit;
	text-decoration: none;
}

.arivo-wishlist__price {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
}

.arivo-wishlist__actions {
	display: grid;
	gap: 0.5rem;
	margin-top: auto;
	padding-top: 0.625rem;
}

.arivo-wishlist__actions .wp-element-button {
	text-align: center;
	text-decoration: none;
}

.arivo-wishlist__remove {
	justify-self: start;
	padding: 0.25rem 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--muted);
	font: inherit;
	font-size: var(--wp--preset--font-size--x-small);
	text-decoration: underline;
	cursor: pointer;
}

.arivo-wishlist__stock {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
}

.arivo-wishlist__empty {
	padding: var(--wp--preset--spacing--50) 0;
	color: var(--wp--preset--color--muted);
	text-align: center;
}

/* ---------- My Account (classic WooCommerce templates) ---------- */

.arivo-account .woocommerce {
	display: grid;
	gap: var(--wp--preset--spacing--40);
}

/* Inputs at 16px: smaller text makes iOS zoom the page on focus. */
.woocommerce form .form-row .input-text,
.woocommerce form .form-row select,
.woocommerce-account .woocommerce-Input {
	min-height: 2.875rem;
	padding: 0.625rem 0.75rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 0;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-family: inherit;
	font-size: 1rem;
}

.woocommerce form .form-row label {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.woocommerce form .form-row em,
.woocommerce-account fieldset em {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
	font-style: normal;
}

.woocommerce-account fieldset {
	margin: var(--wp--preset--spacing--30) 0;
	padding: var(--wp--preset--spacing--30);
	border: 1px solid var(--wp--preset--color--line);
}

.woocommerce-account fieldset legend {
	padding: 0 0.5rem;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
}

.woocommerce-account address {
	font-style: normal;
	line-height: 1.7;
}

.woocommerce-account .woocommerce-form-login,
.woocommerce-account .woocommerce-form-register {
	border-color: var(--wp--preset--color--line) !important;
	border-radius: 0 !important;
}

/* Account menu: a chip row on phones, a side list from tablet up. */
.woocommerce-MyAccount-navigation ul {
	display: flex;
	gap: 0.5rem;
	margin: 0;
	padding: 0 0 0.25rem;
	overflow-x: auto;
	list-style: none;
	scrollbar-width: thin;
}

.woocommerce-MyAccount-navigation li {
	flex: none;
	margin: 0;
	padding: 0 !important;
}

.woocommerce-MyAccount-navigation a {
	display: flex;
	align-items: center;
	min-height: 2.5rem;
	padding: 0 1rem;
	border: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none !important;
	white-space: nowrap;
}

.woocommerce-MyAccount-navigation .is-active a {
	border-color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font-weight: 700;
}

@media (min-width: 48rem) {
	.arivo-account .woocommerce {
		grid-template-columns: 13rem minmax(0, 1fr);
		align-items: start;
	}

	.arivo-account .woocommerce > :not(.woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content) {
		grid-column: 1 / -1;
	}

	/* WooCommerce's clearfix pseudo-elements would take the first grid cell. */
	.arivo-account .woocommerce::before,
	.arivo-account .woocommerce::after {
		content: none;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation,
	.woocommerce-account .woocommerce-MyAccount-content {
		width: auto !important;
		float: none !important;
	}

	.woocommerce-MyAccount-navigation ul {
		flex-direction: column;
		gap: 0;
		padding: 0;
		border-top: 1px solid var(--wp--preset--color--line);
	}

	.woocommerce-MyAccount-navigation a {
		min-height: 2.75rem;
		padding: 0 0.75rem;
		border: 0;
		border-bottom: 1px solid var(--wp--preset--color--line);
	}

	.woocommerce-MyAccount-navigation .is-active a {
		border-color: var(--wp--preset--color--line);
		background: var(--wp--preset--color--surface);
		color: var(--wp--preset--color--contrast);
		box-shadow: inset 2px 0 0 var(--wp--preset--color--contrast);
	}
}

@media (hover: hover) {
	.woocommerce-MyAccount-navigation li:not(.is-active) a:hover {
		background: var(--wp--preset--color--surface);
	}
}

/* WooCommerce hides every th in responsive tables on phones, which drops the order number. */
@media (max-width: 768px) {
	.woocommerce table.woocommerce-orders-table tbody th.woocommerce-orders-table__cell-order-number {
		display: block;
		text-align: right;
	}

	.woocommerce table.woocommerce-orders-table tbody th.woocommerce-orders-table__cell-order-number::before {
		content: attr(data-title) ": ";
		float: left;
		font-weight: 700;
	}
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
