/* Phone tidy 1.0.1. Phone only: every rule is inside max-width 767.98px, so 768px and up is not touched.
   Same spacing standard as the My account area (account-nav 1.0.1): 16px above the page title,
   16px between the title and the first content. Dead space elsewhere is tightened and the page
   titles, product block and search cards are made consistent. Brand colours and fonts come from
   the theme (teal #00818D, Bricolage Grotesque, Barlow). Does not rely on the Christmas plugin.
   Never touches: the update banner (.aa-update), the header, prices, options, checkout fields or
   payment boxes. The page frame padding and the .hero-section bottom margin do apply to every public
   page on phones (home, about, contact, new to ants, 404 included), so check those by eye. */
@media (max-width: 767.98px) {

	/* ---- Breadcrumb bar: one line, 44px, scrolls sideways if a trail is long ---- */
	.aa-breadcrumbs ol {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.aa-breadcrumbs ol::-webkit-scrollbar {
		display: none;
	}

	.aa-breadcrumbs li,
	.aa-breadcrumbs a {
		min-height: 44px;
		flex-shrink: 0;
		white-space: nowrap;
	}

	.aa-breadcrumbs li:last-child {
		flex-shrink: 1;
		min-width: 0;
	}

	.aa-breadcrumbs li:last-child > span {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	/* ---- Page frame: 16px above the title, less dead space under the content ---- */
	body .site-main > .ct-container-full[data-vertical-spacing],
	body .site-main > .ct-container[data-vertical-spacing] {
		padding-top: 16px;
		padding-bottom: 32px;
	}

	/* 16px between the title and the first content */
	body .site-main .hero-section {
		margin-bottom: 16px;
	}

	/* ---- One title style for every page title (not the home, about, contact, new to ants hero) ---- */
	body .site-main h1.page-title,
	body .site-main .product_title,
	body.woocommerce-cart .site-main h1,
	body.woocommerce-checkout .site-main h1,
	body.search-results .site-main h1,
	body .aa-loyalty-intro h1 {
		font-family: "Bricolage Grotesque", "Bricolage Fallback", Barlow, "Barlow Fallback", sans-serif;
		font-weight: 700;
		font-size: 1.75rem;
		line-height: 1.2;
		letter-spacing: -0.01em;
		color: var(--aa-ink, #111414);
	}

	/* ---- Login (My account logged out) and other Woo pages: no extra top margin ---- */
	body.woocommerce-account .site-main .woocommerce {
		margin-top: 0;
	}

	body.woocommerce-account .site-main .woocommerce.ct-woo-unauthorized {
		margin-bottom: 24px;
	}

	/* ---- Antics Colony public page: lines up with the other pages ---- */
	.site-main > article.aa-loyalty-public {
		margin-top: 0;
		padding-top: 16px;
		margin-bottom: 32px;
	}

	/* ---- Single product ---- */
	body.single-product .hero-section {
		margin-bottom: 0;
	}

	body.single-product div.product {
		margin-top: 0;
		margin-bottom: 24px;
	}

	body.single-product .product_title {
		margin-bottom: 4px;
	}

	body.single-product .woocommerce-product-gallery {
		margin-bottom: 0;
	}

	/* thumbnails: one neat row that scrolls sideways, instead of three big tiles per row */
	body.single-product .flexy-pills ol {
		flex-wrap: nowrap;
		gap: 8px;
		margin: 0;
		overflow-x: auto;
		scrollbar-width: none;
	}

	body.single-product .flexy-pills ol::-webkit-scrollbar {
		display: none;
	}

	body.single-product .flexy-pills li {
		flex: 0 0 72px;
		width: 72px;
		max-width: 72px;
		padding: 8px 0 0;
	}

	body.single-product .ct-product-divider {
		margin-bottom: 0;
	}

	body.single-product .ct-product-add-to-cart {
		margin-bottom: 0;
	}

	body.single-product form.cart {
		margin: 0 0 12px;
	}

	body.single-product .product_meta {
		margin-bottom: 0;
	}

	/* tabs */
	body.single-product .woocommerce-tabs {
		padding-top: 24px;
	}

	body.single-product .woocommerce-tabs ul.tabs {
		margin: 0 0 8px;
	}

	body.single-product .woocommerce-tabs .woocommerce-Tabs-panel {
		padding-top: 20px;
	}

	body.single-product p.aa-product-cats {
		margin-top: 0;
	}

	/* stock line as a small tidy label */
	body.single-product .summary p.stock,
	body.single-product .entry-summary p.stock {
		display: inline-block;
		align-self: flex-start;
		margin: 0;
		padding: 4px 12px;
		border-radius: 999px;
		background: var(--aa-mist, #E5F8FA);
		color: #00767F; /* 4.91:1 on the mist pill (brand teal #00818D is 4.23:1, under AA) */
		font-size: 0.875rem;
		font-weight: 600;
		line-height: 1.4;
	}

	body.single-product .summary p.stock.out-of-stock,
	body.single-product .entry-summary p.stock.out-of-stock {
		background: #EEF1F1;
		color: var(--aa-grey, #5B6566);
	}

	/* ---- Empty cart: balanced, on brand ---- */
	body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .with-empty-cart-icon::before {
		width: 56px;
		height: 56px;
		-webkit-mask-size: 56px auto;
		mask-size: 56px auto;
		margin-bottom: 12px;
	}

	body.woocommerce-cart .wp-block-woocommerce-empty-cart-block h2.wp-block-heading:not(.with-empty-cart-icon) {
		font-size: 1.5rem;
		line-height: 1.2;
		margin-bottom: 12px;
	}

	body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .wp-block-button__link {
		min-height: 44px;
		padding: 0 24px;
		border-radius: 999px;
		background: var(--aa-teal-deep, #00818D);
		color: var(--aa-white, #fff);
		font-size: 0.9375rem;
		font-weight: 600;
	}

	/* ---- Search results: tidier cards ---- */
	body.search-results .entries {
		--grid-columns-gap: 16px;
	}

	body.search-results article.entry-card {
		--card-inner-spacing: 16px;
		padding-top: 16px;
		padding-bottom: 16px;
		border-radius: 12px;
	}

	body.search-results article.entry-card .entry-meta {
		margin-bottom: 8px;
	}

	body.search-results article.entry-card .entry-title {
		margin-bottom: 12px;
	}

	body.search-results article.entry-card .ct-media-container {
		margin-bottom: 12px;
	}

	body.search-results article.entry-card .entry-excerpt {
		margin-bottom: 12px;
	}
}
