/**
 * AP Toko Online: main stylesheet.
 *
 * Colours, fonts and component tokens come from theme.json:
 *   presets  -> var(--wp--preset--color--primary), --font-family--heading ...
 *   custom   -> var(--wp--custom--header--background), --footer--text ...
 * Override them in a child theme's theme.json; add CSS only for real layout changes.
 *
 * Contents
 *  1. Tokens
 *  2. Base and accessibility
 *  3. Forms and buttons
 *  4. Layout
 *  5. Top bar
 *  6. Header and navigation
 *  7. Page header and breadcrumbs
 *  8. Content, posts and pagination
 *  9. Comments
 * 10. Sidebar widgets
 * 11. Footer
 * 12. Utilities
 */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
	--ap-primary: var(--wp--preset--color--primary, #0f766e);
	--ap-primary-dark: var(--wp--preset--color--primary-dark, #115e59);
	--ap-base: var(--wp--preset--color--base, #fff);
	--ap-surface: var(--wp--preset--color--surface, #f6f7f7);
	--ap-border: var(--wp--preset--color--line, #e4e6e7);
	--ap-contrast: var(--wp--preset--color--contrast, #111827);
	--ap-text: var(--wp--preset--color--body-text, #4b5563);
	--ap-muted: var(--wp--preset--color--muted, #8a8f98);
	--ap-input-border: color-mix(in srgb, var(--ap-border) 70%, #000 18%);
	--ap-radius-sm: var(--wp--custom--radius--small, 4px);
	--ap-radius: var(--wp--custom--radius--medium, 8px);
	--ap-radius-lg: var(--wp--custom--radius--large, 16px);
	--ap-transition: var(--wp--custom--transition, 0.2s ease);
	--ap-gutter: var(--wp--style--root--padding-left, clamp(1rem, 4vw, 2rem));
	--ap-content: var(--wp--style--global--content-size, 820px);
	--ap-wide: var(--wp--style--global--wide-size, 1290px);
	--ap-section: var(--wp--custom--layout--section-padding, clamp(2.5rem, 5vw, 4rem));
	--ap-font-ui: var(--wp--preset--font-family--ui, system-ui, sans-serif);
	--ap-font-heading: var(--wp--preset--font-family--heading, system-ui, sans-serif);
}

/* 2. Base and accessibility ------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: 110px;
}

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

body.ap-nav-open {
	overflow: hidden;
}

.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	overflow-x: clip;
}

.site-content {
	flex: 1 0 auto;
}

img,
video {
	max-width: 100%;
	height: auto;
}

figure {
	margin: 0;
}

a {
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
	transition: color var(--ap-transition), background-color var(--ap-transition);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.6em;
}

p {
	margin: 0 0 1em;
}

hr {
	border: 0;
	border-top: 1px solid var(--ap-border);
}

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	padding: 0.6em 0.8em;
	text-align: left;
	border-bottom: 1px solid var(--ap-border);
}

:focus-visible {
	outline: 2px solid var(--ap-primary);
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
	word-wrap: normal !important;
}

.screen-reader-text:focus,
.skip-link:focus {
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100000;
	display: block;
	width: auto;
	height: auto;
	padding: 0.9rem 1.4rem;
	clip: auto !important;
	clip-path: none;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: normal;
	color: var(--ap-contrast);
	text-decoration: none;
	background: var(--ap-base);
	border-radius: var(--ap-radius-sm);
	box-shadow: 0 0 0 2px var(--ap-primary);
}

.ap-icon {
	display: inline-block;
	flex-shrink: 0;
	vertical-align: middle;
}

/* Classic alignments (legacy content and images). */
.alignleft {
	float: left;
	margin: 0.4em 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0.4em 0 1em 1.5em;
}

.aligncenter {
	display: block;
	margin-right: auto;
	margin-left: auto;
}

.wp-caption {
	max-width: 100%;
	margin-bottom: 1.5em;
}

.wp-caption-text,
.gallery-caption {
	margin-top: 0.5em;
	font-size: 0.875rem;
	color: var(--ap-muted);
	text-align: center;
}

/* 3. Forms and buttons ------------------------------------------------------- */
:where(
	input[type="text"],
	input[type="email"],
	input[type="url"],
	input[type="password"],
	input[type="search"],
	input[type="number"],
	input[type="tel"],
	input[type="date"],
	input[type="datetime-local"],
	textarea,
	select
) {
	max-width: 100%;
	padding: 0.7em 0.9em;
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
	color: var(--ap-contrast);
	background-color: var(--ap-base);
	border: 1px solid var(--ap-input-border);
	border-radius: var(--ap-radius-sm);
	transition: border-color var(--ap-transition), box-shadow var(--ap-transition);
}

:where(
	input[type="text"],
	input[type="email"],
	input[type="url"],
	input[type="password"],
	input[type="search"],
	input[type="number"],
	input[type="tel"],
	input[type="date"],
	input[type="datetime-local"],
	textarea,
	select
):focus {
	outline: none;
	border-color: var(--ap-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ap-primary) 20%, transparent);
}

:where(textarea) {
	width: 100%;
	min-height: 8em;
	resize: vertical;
}

:where(select) {
	padding-right: 2.4em;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75em center;
	background-size: 1em;
}

:where(input[type="checkbox"], input[type="radio"]) {
	accent-color: var(--ap-primary);
}

::placeholder {
	color: var(--ap-muted);
	opacity: 1;
}

label {
	color: var(--ap-contrast);
}

/* Buttons that are not blocks get the theme.json button look. */
:where(input[type="submit"], input[type="button"], input[type="reset"], button[type="submit"]:not(.search-submit)) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding: var(--wp--custom--button--padding-block, 0.8em) var(--wp--custom--button--padding-inline, 1.6em);
	font-family: var(--ap-font-ui);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	font-weight: var(--wp--custom--button--font-weight, 600);
	line-height: 1.2;
	letter-spacing: var(--wp--custom--button--letter-spacing, 0);
	color: var(--wp--custom--button--text, #fff);
	text-decoration: none;
	text-transform: var(--wp--custom--button--text-transform, none);
	cursor: pointer;
	background-color: var(--wp--custom--button--background, var(--ap-primary));
	border: 0;
	border-radius: var(--wp--custom--button--radius, var(--ap-radius));
	transition: background-color var(--ap-transition), color var(--ap-transition);
}

:where(input[type="submit"], input[type="button"], input[type="reset"], button[type="submit"]:not(.search-submit)):hover {
	color: var(--wp--custom--button--hover-text, #fff);
	background-color: var(--wp--custom--button--hover-background, var(--ap-primary-dark));
}

.wp-element-button.is-secondary {
	color: var(--ap-contrast);
	background: transparent;
	box-shadow: inset 0 0 0 2px currentColor;
}

/* Outline button block style: keep the theme colours and fill on hover. */
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) {
	color: var(--wp--custom--button--background, var(--ap-primary));
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	padding: calc(var(--wp--custom--button--padding-block, 0.8em) - 2px) calc(var(--wp--custom--button--padding-inline, 1.6em) - 2px);
	border-width: 2px;
	transition: background-color var(--ap-transition), color var(--ap-transition), border-color var(--ap-transition);
}

.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):is(:hover, :focus-visible) {
	color: var(--wp--custom--button--hover-text, #fff);
	background-color: var(--wp--custom--button--hover-background, var(--ap-primary-dark));
	border-color: var(--wp--custom--button--hover-background, var(--ap-primary-dark));
}

/* Coloured buttons (preset classes use !important) darken slightly on hover. */
.wp-block-button__link.has-background {
	transition: filter var(--ap-transition);
}

.wp-block-button__link.has-background:is(:hover, :focus-visible) {
	filter: brightness(0.92);
}

/* Contact Form 7 */
.wpcf7-form p {
	margin: 0 0 1.1rem;
}

.wpcf7-form label {
	display: block;
	font-size: 0.9375rem;
	font-weight: 600;
}

.wpcf7-form .wpcf7-form-control-wrap {
	display: block;
	margin-top: 0.35rem;
}

.wpcf7-form .wpcf7-form-control:not(.wpcf7-submit):not(.wpcf7-checkbox):not(.wpcf7-radio):not(.wpcf7-acceptance) {
	width: 100%;
}

.wpcf7-not-valid-tip {
	margin-top: 0.3rem;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--sale, #be123c);
}

.wpcf7 form .wpcf7-response-output {
	margin: 1rem 0 0;
	padding: 0.75rem 1rem;
	border-radius: var(--ap-radius-sm);
}

/* Search form */
.search-form {
	display: flex;
	width: 100%;
	max-width: 640px;
}

.search-form .search-field {
	flex: 1;
	min-width: 0;
	border-right: 0;
	border-radius: var(--ap-radius-sm) 0 0 var(--ap-radius-sm);
}

.search-form .search-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 1.1rem;
	color: var(--ap-base);
	cursor: pointer;
	background: var(--ap-primary);
	border: 0;
	border-radius: 0 var(--ap-radius-sm) var(--ap-radius-sm) 0;
	transition: background-color var(--ap-transition);
}

.search-form .search-submit:hover {
	background: var(--ap-primary-dark);
}

/* 4. Layout ------------------------------------------------------------------ */
.ap-container {
	width: 100%;
	max-width: calc(var(--ap-wide) + var(--ap-gutter) * 2);
	margin-right: auto;
	margin-left: auto;
	padding-right: var(--ap-gutter);
	padding-left: var(--ap-gutter);
}

.ap-layout {
	padding-block: var(--ap-section);
}

.ap-layout--sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--custom--layout--gap, 3rem);
}

/* The content column already sits inside the container gutter, so width-
   limited (constrained) groups must not add the root padding again. */
.ap-layout--sidebar .entry-content .has-global-padding:not(.alignfull) {
	padding-right: 0;
	padding-left: 0;
}

@media (min-width: 1025px) {
	.layout-sidebar-right .ap-layout--sidebar {
		grid-template-columns: minmax(0, 1fr) var(--wp--custom--layout--sidebar-width, 300px);
	}

	.layout-sidebar-left .ap-layout--sidebar {
		grid-template-columns: var(--wp--custom--layout--sidebar-width, 300px) minmax(0, 1fr);
	}

	.layout-sidebar-left .ap-layout--sidebar #secondary {
		order: -1;
	}
}

/* Full-bleed content (no sidebar): blocks behave like in a block theme. */
.ap-layout--full {
	padding-block: 0;
}

.ap-layout--full .entry-content {
	padding-block: var(--ap-section);
}

.ap-layout--full .entry-content > .alignfull:first-child {
	margin-top: calc(var(--ap-section) * -1);
}

.ap-layout--full .entry-content > .alignfull:last-child {
	margin-bottom: calc(var(--ap-section) * -1);
}

/* Fallback in case layout styles are not printed. */
.entry-content.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: var(--ap-content);
	margin-right: auto;
	margin-left: auto;
}

.entry-content.is-layout-constrained > .alignwide {
	max-width: var(--ap-wide);
}

/* Cart, checkout and account pages (ap-wide-content): their forms use the wide width, not the reading width. */
.entry-content.ap-wide-content.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: var(--ap-wide);
}

.entry-content::after {
	display: table;
	clear: both;
	content: "";
}

.entry-content > :is(h2, h3, h4):not(:first-child) {
	margin-block-start: 1.6em;
}

/* Reading-width blocks (titles, meta, comments) inside full layouts. */
.ap-narrow {
	width: 100%;
	max-width: calc(var(--ap-content) + var(--ap-gutter) * 2);
	margin-right: auto;
	margin-left: auto;
	padding-right: var(--ap-gutter);
	padding-left: var(--ap-gutter);
}

.ap-layout--sidebar .ap-narrow,
.ap-layout--contained .ap-narrow {
	padding-right: 0;
	padding-left: 0;
}

.ap-layout--sidebar .ap-narrow {
	max-width: none;
}

.ap-layout--full .entry-header {
	padding-top: var(--ap-section);
}

.ap-layout--full .entry-header + .entry-content,
.ap-layout--full .entry-header + .post-thumbnail {
	padding-top: 1.5rem;
}

.ap-layout--full .post-thumbnail {
	display: block;
	max-width: calc(var(--ap-wide) + var(--ap-gutter) * 2);
	margin: 2rem auto 0;
	padding-inline: var(--ap-gutter);
}

/* 5. Top bar ----------------------------------------------------------------- */
.ap-topbar {
	font-family: var(--ap-font-ui);
	font-size: var(--wp--custom--topbar--font-size, 0.8125rem);
	color: var(--wp--custom--topbar--text, #fff);
	background: var(--wp--custom--topbar--background, #1f2937);
}

.ap-topbar__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.25rem 1.5rem;
	min-height: 2.25rem;
	padding-block: 0.35rem;
}

.ap-topbar__text > *:last-child {
	margin-bottom: 0;
}

.ap-topbar a {
	color: inherit;
}

/* 6. Header and navigation --------------------------------------------------- */
.site-header {
	position: relative;
	z-index: 100;
	color: var(--wp--custom--header--text, var(--ap-contrast));
	background: var(--wp--custom--header--background, #fff);
	border-bottom: 1px solid var(--wp--custom--header--border, var(--ap-border));
	transition: box-shadow var(--ap-transition);
}

.has-sticky-header .site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
}

@media (max-width: 600px) {
	.admin-bar.has-sticky-header .site-header {
		top: 0;
	}
}

.site-header.is-scrolled {
	box-shadow: var(--wp--custom--header--shadow-scrolled, 0 6px 20px -12px rgba(0, 0, 0, 0.25));
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	/* Set settings.custom.header.maxWidth to "none" for a full-width header. */
	max-width: var(--wp--custom--header--max-width, calc(var(--ap-wide) + var(--ap-gutter) * 2));
	padding-block: var(--wp--custom--header--padding-block, 1rem);
	transition: padding var(--ap-transition);
}

.site-header.is-scrolled .site-header__inner {
	padding-block: calc(var(--wp--custom--header--padding-block, 1rem) * 0.5);
}

.site-branding {
	flex-shrink: 0;
	margin-right: auto;
}

.custom-logo-link {
	display: block;
	line-height: 0;
}

.custom-logo {
	width: auto;
	max-height: var(--wp--custom--header--logo-height, 64px);
	transition: max-height var(--ap-transition);
}

.site-header.is-scrolled .custom-logo {
	max-height: var(--wp--custom--header--logo-height-scrolled, 44px);
}

.site-title {
	margin: 0;
	font-family: var(--ap-font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
}

.site-title a {
	color: inherit;
	text-decoration: none;
}

.site-description {
	margin: 0.15rem 0 0;
	font-size: 0.8125rem;
	color: var(--ap-muted);
}

.main-navigation {
	font-family: var(--wp--custom--navigation--font-family, var(--ap-font-ui));
}

.main-navigation ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.main-navigation a {
	display: block;
	color: var(--wp--custom--navigation--color, inherit);
	font-size: var(--wp--custom--navigation--font-size, 0.9375rem);
	font-weight: var(--wp--custom--navigation--font-weight, 500);
	letter-spacing: var(--wp--custom--navigation--letter-spacing, 0);
	text-decoration: none;
	text-transform: var(--wp--custom--navigation--text-transform, none);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-menu-ancestor > a,
.main-navigation .current-menu-parent > a {
	color: var(--wp--custom--navigation--hover, var(--ap-primary));
}

.ap-submenu-toggle,
.ap-menu-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.25rem;
	color: inherit;
	cursor: pointer;
	background: none;
	border: 0;
}

.ap-submenu-toggle svg {
	transition: transform var(--ap-transition);
}

.is-submenu-open > .ap-submenu-toggle svg {
	transform: rotate(180deg);
}

.ap-menu-empty {
	margin: 0;
	font-size: 0.875rem;
}

/* Header actions (search, account, cart, menu toggle) */
.site-header__actions {
	display: flex;
	align-items: center;
	gap: 0.15rem;
}

.ap-header-action {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	background: none;
	border: 0;
	border-radius: 50%;
	transition: color var(--ap-transition), background-color var(--ap-transition);
}

.ap-header-action:hover,
.ap-header-action[aria-expanded="true"] {
	color: var(--wp--custom--navigation--hover, var(--ap-primary));
	background: color-mix(in srgb, currentColor 8%, transparent);
}

.ap-cart-count {
	position: absolute;
	top: 1px;
	right: -1px;
	min-width: 1.15rem;
	height: 1.15rem;
	padding: 0 0.3rem;
	font-family: var(--ap-font-ui);
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1.15rem;
	color: var(--ap-base);
	text-align: center;
	background: var(--ap-primary);
	border-radius: 999px;
}

.ap-cart-count.is-empty {
	display: none;
}

/* Mini cart dropdown (desktop, hover devices) */
.ap-header-cart {
	position: relative;
}

.ap-mini-cart {
	display: none;
}

@media (hover: hover) and (min-width: 1025px) {
	.ap-header-cart.has-dropdown .ap-mini-cart {
		position: absolute;
		top: calc(100% + 0.75rem);
		right: 0;
		z-index: 60;
		display: block;
		width: 340px;
		padding: 1.25rem;
		color: var(--ap-text);
		visibility: hidden;
		background: var(--ap-base);
		border-top: 3px solid var(--wp--custom--navigation--submenu-border, var(--ap-primary));
		border-radius: 0 0 var(--ap-radius-sm) var(--ap-radius-sm);
		box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.35);
		opacity: 0;
		transform: translateY(6px);
		transition: opacity var(--ap-transition), transform var(--ap-transition), visibility var(--ap-transition);
	}

	.ap-header-cart.has-dropdown .ap-mini-cart::before {
		position: absolute;
		right: 0;
		bottom: 100%;
		left: 0;
		height: 1rem;
		content: "";
	}

	.ap-header-cart.has-dropdown:hover .ap-mini-cart,
	.ap-header-cart.has-dropdown:focus-within .ap-mini-cart {
		visibility: visible;
		opacity: 1;
		transform: none;
	}
}

/* Search panel */
.ap-search-panel {
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	padding-block: 1.25rem;
	background: var(--wp--custom--header--background, #fff);
	border-bottom: 1px solid var(--wp--custom--header--border, var(--ap-border));
	box-shadow: 0 16px 30px -20px rgba(0, 0, 0, 0.3);
}

.ap-search-panel[hidden] {
	display: none;
}

.ap-search-panel .search-form {
	margin-inline: auto;
}

/* Desktop navigation */
@media (min-width: 1025px) {
	.ap-menu-toggle,
	.main-navigation__panel-header,
	.main-navigation__overlay,
	.ap-menu--mobile {
		display: none !important;
	}

	.main-navigation .ap-menu {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 0.25rem 1.6rem;
	}

	.main-navigation li {
		position: relative;
		display: flex;
		align-items: center;
	}

	.main-navigation .ap-menu > li > a {
		padding-block: 0.6rem;
		white-space: nowrap;
	}

	.main-navigation .ap-menu > li > .ap-submenu-toggle {
		margin-left: 0.1rem;
	}

	.main-navigation .sub-menu {
		position: absolute;
		top: 100%;
		left: -1rem;
		z-index: 50;
		min-width: 230px;
		padding: 0.5rem 0;
		visibility: hidden;
		background: var(--wp--custom--navigation--submenu-background, #fff);
		border-top: 3px solid var(--wp--custom--navigation--submenu-border, var(--ap-primary));
		border-radius: 0 0 var(--ap-radius-sm) var(--ap-radius-sm);
		box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.35);
		opacity: 0;
		transform: translateY(6px);
		transition: opacity var(--ap-transition), transform var(--ap-transition), visibility var(--ap-transition);
	}

	.main-navigation li:hover > .sub-menu,
	.main-navigation li:focus-within > .sub-menu,
	.main-navigation li.is-submenu-open > .sub-menu {
		visibility: visible;
		opacity: 1;
		transform: none;
	}

	.main-navigation .sub-menu .sub-menu {
		top: -0.5rem;
		left: 100%;
	}

	.main-navigation .sub-menu li {
		justify-content: space-between;
	}

	.main-navigation .sub-menu a {
		flex: 1;
		padding: 0.55rem 1.25rem;
		font-size: calc(var(--wp--custom--navigation--font-size, 0.9375rem) * 0.93);
	}

	.main-navigation .sub-menu .ap-submenu-toggle svg {
		transform: rotate(-90deg);
	}
}

/* Mobile off-canvas navigation */
@media (max-width: 1024px) {
	.main-navigation__panel {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		z-index: 1001;
		display: flex;
		flex-direction: column;
		width: min(380px, 88vw);
		padding: 1rem 1.25rem 2rem;
		overflow-y: auto;
		color: var(--wp--custom--navigation--mobile-text, var(--ap-contrast));
		visibility: hidden;
		background: var(--wp--custom--navigation--mobile-background, #fff);
		box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
		transform: translateX(100%);
		transition: transform 0.3s ease, visibility 0.3s ease;
	}

	.admin-bar .main-navigation__panel {
		top: var(--wp-admin--admin-bar--height, 0px);
	}

	.main-navigation.is-open .main-navigation__panel {
		visibility: visible;
		transform: none;
	}

	.main-navigation__overlay {
		position: fixed;
		inset: 0;
		z-index: 1000;
		background: rgba(17, 24, 39, 0.5);
	}

	.main-navigation__overlay[hidden] {
		display: none;
	}

	.main-navigation__panel-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-bottom: 0.75rem;
		margin-bottom: 0.5rem;
		border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
	}

	.main-navigation__panel-title {
		font-size: 1.125rem;
		font-weight: 700;
	}

	.ap-menu-close {
		padding: 0.5rem;
	}

	.ap-menu--desktop {
		display: none !important;
	}

	.main-navigation li {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
	}

	.main-navigation a {
		flex: 1;
		padding: 0.85rem 0;
		color: inherit;
		font-size: 1rem;
	}

	.main-navigation a:hover,
	.main-navigation .current-menu-item > a,
	.main-navigation .current_page_item > a,
	.main-navigation .current-menu-ancestor > a,
	.main-navigation .current-menu-parent > a {
		color: inherit;
		font-weight: 700;
	}

	.ap-submenu-toggle {
		width: 2.75rem;
		height: 2.75rem;
	}

	.main-navigation .sub-menu {
		display: none;
		width: 100%;
		padding: 0 0 0.5rem 1rem;
	}

	.main-navigation .is-submenu-open > .sub-menu {
		display: block;
	}

	.main-navigation .sub-menu li {
		border-bottom: 0;
	}

	.main-navigation .sub-menu a {
		padding: 0.5rem 0;
		font-size: 0.9375rem;
	}
}

@media (max-width: 480px) {
	.ap-account-link {
		display: none;
	}
}

/* 7. Page header and breadcrumbs --------------------------------------------- */
.ap-page-header {
	color: var(--wp--custom--page-header--text, var(--ap-contrast));
	background: var(--wp--custom--page-header--background, var(--ap-surface));
	border-bottom: 1px solid var(--wp--custom--page-header--border, var(--ap-border));
}

.ap-page-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.4rem 2rem;
	padding-block: var(--wp--custom--page-header--padding-block, 1.5rem);
}

.ap-page-header .ap-page-header__title {
	margin: 0;
	font-family: var(--ap-font-heading);
	font-size: var(--wp--custom--page-header--title-font-size, 1.75rem);
	line-height: 1.3;
	color: inherit;
}

.ap-page-header__description {
	margin-top: 0.35rem;
	color: var(--ap-muted);
}

.ap-page-header__description p {
	margin: 0;
}

.ap-breadcrumbs {
	font-family: var(--ap-font-ui);
	font-size: 0.8125rem;
	color: var(--ap-muted);
}

.ap-breadcrumbs a {
	color: inherit;
	text-decoration: none;
}

.ap-breadcrumbs a:hover {
	color: var(--ap-primary);
}

.ap-breadcrumbs .sep {
	margin-inline: 0.45em;
	opacity: 0.6;
}

/* 8. Content, posts and pagination ------------------------------------------- */
.entry-header .entry-title {
	margin-bottom: 0.4em;
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	font-family: var(--ap-font-ui);
	font-size: 0.8125rem;
	color: var(--ap-muted);
}

.entry-meta a {
	color: inherit;
	text-decoration: none;
}

.entry-meta .updated:not(.published) {
	display: none;
}

.entry-footer {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin-top: 2rem;
	font-size: 0.875rem;
	color: var(--ap-muted);
}

.ap-layout--full .entry-content + .entry-footer {
	margin-top: 0;
	padding-bottom: var(--ap-section);
}

.page-links {
	clear: both;
	margin-top: 2rem;
}

.ap-archive-header {
	margin-bottom: 2.5rem;
}

.ap-post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 2.5rem 2rem;
}

.ap-card-post {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--ap-base);
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius);
}

.ap-card-post .post-thumbnail img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.ap-card-post__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.5rem;
}

.ap-card-post .entry-header {
	padding: 0;
}

.ap-card-post .entry-title {
	margin: 0.35rem 0 0;
	font-size: var(--wp--preset--font-size--large, 1.25rem);
}

.ap-card-post .entry-title a {
	color: var(--ap-contrast);
	text-decoration: none;
}

.ap-card-post .entry-title a:hover {
	color: var(--ap-primary);
}

.ap-card-post .entry-summary p {
	margin: 0;
}

.ap-read-more {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: auto;
	font-family: var(--ap-font-ui);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
}

.sticky .ap-card-post__body {
	border-top: 3px solid var(--ap-primary);
}

.pagination,
.navigation.pagination {
	margin-top: 3rem;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	font-family: var(--ap-font-ui);
	color: var(--ap-contrast);
	text-decoration: none;
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius-sm);
}

.page-numbers.current,
a.page-numbers:hover {
	color: var(--ap-base);
	background: var(--ap-primary);
	border-color: var(--ap-primary);
}

.post-navigation {
	margin-block: 3rem;
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	gap: 1rem;
}

.post-navigation .nav-next {
	text-align: right;
}

.post-navigation a {
	display: block;
	height: 100%;
	padding: 1rem 1.25rem;
	text-decoration: none;
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius);
}

.post-navigation a:hover {
	border-color: var(--ap-primary);
}

.post-navigation .nav-subtitle {
	display: block;
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	color: var(--ap-muted);
	text-transform: uppercase;
}

.post-navigation .nav-title {
	font-weight: 600;
	color: var(--ap-contrast);
}

.error-404 .search-form {
	margin-block: 1.5rem;
}

.ap-404-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/* 9. Comments ---------------------------------------------------------------- */
.comments-area {
	margin-block: 3rem;
}

.comment-list,
.comment-list .children {
	padding: 0;
	list-style: none;
}

.comment-list .children {
	padding-left: 1.5rem;
}

.comment-body {
	padding-block: 1.25rem;
	border-bottom: 1px solid var(--ap-border);
}

.comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	margin-bottom: 0.75rem;
	font-size: 0.875rem;
}

.comment-author .avatar {
	float: left;
	margin-right: 0.75rem;
	border-radius: 50%;
}

.comment-metadata a {
	color: var(--ap-muted);
	text-decoration: none;
}

.comment-form p {
	margin: 0 0 1rem;
}

.comment-form label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
}

.comment-form-cookies-consent label {
	display: inline;
	font-weight: 400;
}

.comment-form input:not([type="checkbox"]):not([type="submit"]) {
	width: 100%;
}

/* 10. Sidebar widgets -------------------------------------------------------- */
.widget-area .widget + .widget {
	margin-top: 2.5rem;
}

.widget-title {
	margin: 0 0 1rem;
	font-family: var(--ap-font-heading);
	font-size: 1rem;
	color: var(--ap-contrast);
}

.widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

#secondary .widget_nav_menu .menu,
#secondary .widget_pages > ul,
#secondary .widget_categories > ul {
	overflow: hidden;
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius-sm);
}

#secondary .widget_nav_menu .menu li + li,
#secondary .widget_pages li + li,
#secondary .widget_categories li + li {
	border-top: 1px solid var(--ap-border);
}

#secondary .widget_nav_menu .menu a,
#secondary .widget_pages a,
#secondary .widget_categories a {
	display: block;
	padding: 0.6rem 1rem;
	font-size: 0.9375rem;
	color: var(--ap-text);
	text-decoration: none;
}

#secondary .widget_nav_menu .menu a:hover,
#secondary .widget_pages a:hover,
#secondary .widget_categories a:hover {
	color: var(--ap-primary);
	background: var(--ap-surface);
}

#secondary .widget_nav_menu .current-menu-item > a,
#secondary .widget_pages .current_page_item > a {
	color: var(--ap-base);
	background: var(--ap-primary);
}

#secondary .widget_nav_menu .sub-menu {
	padding-left: 1rem;
}

/* 11. Footer ----------------------------------------------------------------- */
.site-footer {
	font-size: 0.9375rem;
	color: var(--wp--custom--footer--text, #b5b9c0);
	background: var(--wp--custom--footer--background, #1f2937);
}

.site-footer a {
	color: var(--wp--custom--footer--link, #d1d5db);
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--wp--custom--footer--link-hover, #fff);
}

.site-footer__widgets {
	padding-block: var(--wp--preset--spacing--60, 4rem);
}

.site-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2.5rem;
}

@media (min-width: 600px) {
	.site-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1025px) {
	.site-footer__grid {
		grid-template-columns: repeat(var(--ap-footer-columns, 4), minmax(0, 1fr));
	}
}

.site-footer .widget + .widget {
	margin-top: 2rem;
}

.site-footer .widget-title {
	margin: 0 0 1.1rem;
	font-size: 1rem;
	color: var(--wp--custom--footer--heading, #fff);
}

.site-footer .widget p:last-child {
	margin-bottom: 0;
}

.site-footer .widget_nav_menu li,
.site-footer .widget_pages li,
.site-footer .widget_categories li,
.site-footer .widget_product_categories li {
	padding-block: 0.45rem;
	border-bottom: 1px solid var(--wp--custom--footer--border, rgba(255, 255, 255, 0.1));
}

.site-footer .widget_nav_menu li:first-child,
.site-footer .widget_pages li:first-child,
.site-footer .widget_categories li:first-child,
.site-footer .widget_product_categories li:first-child {
	border-top: 1px solid var(--wp--custom--footer--border, rgba(255, 255, 255, 0.1));
}

.site-footer__bottom {
	font-size: 0.8125rem;
	color: var(--wp--custom--footer--bottom-text, #9ca3af);
	background: var(--wp--custom--footer--bottom-background, #111827);
}

.site-footer__bottom-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 2rem;
	padding-block: 1.25rem;
}

.site-info p {
	margin: 0;
}

.ap-footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* 12. Utilities -------------------------------------------------------------- */
.ap-back-to-top {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 90;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	color: var(--ap-base);
	text-decoration: none;
	visibility: hidden;
	background: var(--ap-contrast);
	border-radius: 50%;
	box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.45);
	opacity: 0;
	transform: translateY(10px);
	transition: opacity var(--ap-transition), transform var(--ap-transition), visibility var(--ap-transition), background-color var(--ap-transition);
}

.ap-back-to-top.is-visible {
	visibility: visible;
	opacity: 1;
	transform: none;
}

.ap-back-to-top:hover {
	color: var(--ap-base);
	background: var(--ap-primary);
}

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