/* ==========================================================================
   Avemed base – shared components used by several blocks/templates.
   Tokens come from theme.json (--wp--preset--*); short aliases below.
   Breakpoints (Figma handoff): mobile <768, tablet 768–1023, laptop 1024–1279, desktop ≥1280.
   ========================================================================== */

:root {
	--av-navy: #0a3261;
	--av-navy-700: #133963;
	--av-slate: #4a678a;
	--av-muted: #6c84a0;
	--av-border-strong: #bac6d3;
	--av-border: #dae0e7;
	--av-divider: #eef1f4;
	--av-surface: #f8f9fa;
	--av-canvas: #f5f7fa;
	--av-accent: #0068ff;
	--av-accent-hover: #0056d6;
	--av-accent-400: #6699ff;
	--av-accent-200: #c5d8ff;
	--av-accent-100: #e3edff;
	--av-accent-75: #f2f7ff;
	--av-accent-50: #f4f8ff;
	--av-success: #0b7a46;
	--av-success-50: #e8f6ee;
	--av-danger: #d92d20;
	--av-star: #f5a524;
	--av-container: 1280px;
	--av-side: 32px;
	--av-section-y: 104px;
	--av-head-gap: 48px;
	--av-r-chip: 8px;
	--av-r-input: 12px;
	--av-r-card: 16px;
	--av-r-large: 20px;
	--av-r-media: 28px;
	--av-shadow: 0 12px 32px rgba(10, 50, 97, .12);
	--av-shadow-card: 0 8px 24px rgba(10, 50, 97, .08);
	--av-header-h: 188px;
	--av-ease: cubic-bezier(.2, .7, .2, 1);
}
@media (max-width: 1023px) {
	:root { --av-side: 24px; --av-section-y: 80px; --av-head-gap: 40px; }
}
@media (max-width: 767px) {
	:root { --av-side: 16px; --av-section-y: 56px; --av-head-gap: 24px; --av-header-h: 145px; }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body { margin: 0; color: var(--av-navy); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; overflow-x: clip; }
img, svg, video { max-width: 100%; height: auto; }
.av-icon { flex: none; display: inline-block; vertical-align: middle; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.wp-site-blocks { padding: 0; }
main.wp-block-group { margin-top: 0 !important; }
:focus-visible { outline: 2px solid var(--av-accent); outline-offset: 2px; }
.screen-reader-text, .av-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ---------- layout ---------- */
.av-container { width: 100%; max-width: calc(var(--av-container) + 2 * var(--av-side)); margin-inline: auto; padding-inline: var(--av-side); }
.av-section { position: relative; padding-block: var(--av-section-y); margin: 0 !important; max-width: none !important; }
.av-section.av-space-no-top { padding-top: 0; }
.av-section.av-space-no-bottom { padding-bottom: 0; }
.av-section.av-space-compact { padding-block: calc(var(--av-section-y) * .55); }
.av-section.av-space-none { padding-block: 0; }
.av-bg-white { background: #fff; }
.av-bg-surface { background: var(--av-surface); }
.av-bg-tint { background: var(--av-accent-50); }
.av-bg-canvas { background: var(--av-canvas); }
.av-bg-navy { background: var(--av-navy); color: #fff; }
/* content area in templates: let full-width sections touch edges */
.av-main > .wp-block-post-content > .av-section, .av-main > .av-section { margin-inline: 0; }
.av-main .is-layout-constrained > .av-section { max-width: none; }

/* ---------- typography helpers ---------- */
.av-eyebrow { margin: 0 0 8px; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--av-accent); }
.av-bg-navy .av-eyebrow { color: var(--av-accent-200); }
.av-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: var(--av-head-gap); }
.av-heading__text { max-width: 720px; }
.av-heading__title { margin: 0; font-size: var(--wp--preset--font-size--h-2, 40px); line-height: 1.2; letter-spacing: -.01em; font-weight: 600; color: var(--av-navy); }
.av-heading__lead { margin: 12px 0 0; font-size: 18px; line-height: 28px; color: var(--av-slate); }
.av-heading__link { flex: none; margin-bottom: 4px; }
.av-heading--center { text-align: center; justify-content: center; }
.av-heading--center .av-heading__text { margin-inline: auto; }
.av-heading--stack { display: block; }
.av-heading--stack .av-heading__link { display: inline-flex; margin-top: 16px; }
@media (max-width: 767px) {
	.av-heading { display: block; }
	.av-heading__lead { font-size: 16px; line-height: 24px; margin-top: 8px; }
	.av-heading__link { display: inline-flex; margin-top: 12px; }
}

.av-link { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; line-height: 24px; font-weight: 500; color: var(--av-accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.av-link .av-icon { color: var(--av-accent-400); transition: transform .2s var(--av-ease); }
.av-link:hover { color: var(--av-navy); }
.av-link:hover .av-icon { transform: translateX(3px); }
.av-link--small { font-size: 14px; line-height: 20px; }
.av-link--plain { text-decoration: none; }

.av-note { display: flex; gap: 8px; align-items: flex-start; margin: 32px 0 0; font-size: 12px; line-height: 16px; color: var(--av-muted); }
.av-note .av-icon { margin-top: 1px; }

/* ---------- buttons ---------- */
.av-btn { --h: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--h); padding: 0 28px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-size: 16px; line-height: 24px; font-weight: 500; text-decoration: none; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s; white-space: nowrap; }
.av-btn--m { --h: 44px; padding: 0 20px; font-size: 14px; line-height: 20px; }
.av-btn--s { --h: 36px; padding: 0 16px; font-size: 14px; line-height: 20px; }
.av-btn--block { display: flex; width: 100%; }
.av-btn--primary { background: var(--av-accent); color: #fff; }
.av-btn--primary:hover { background: var(--av-accent-hover); color: #fff; }
.av-btn--secondary { background: #fff; color: var(--av-navy); border-color: var(--av-border-strong); }
.av-btn--secondary:hover { border-color: var(--av-navy); color: var(--av-navy); }
.av-btn--outline-light { background: transparent; color: #fff; border-color: var(--av-accent-400); }
.av-btn--outline-light:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }
.av-btn--white { background: #fff; color: var(--av-navy); }
.av-btn--white:hover { background: var(--av-accent-75); color: var(--av-navy); }
.av-btn--navy { background: var(--av-navy); color: #fff; }
.av-btn--navy:hover { background: var(--av-navy-700); color: #fff; }
.av-btn[disabled], .av-btn.is-disabled { opacity: .5; pointer-events: none; }
.av-btn.is-loading { position: relative; color: transparent !important; }
.av-btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid currentColor; border-color: #fff #fff transparent transparent; border-radius: 50%; animation: av-spin .7s linear infinite; }
.av-btn--secondary.is-loading::after { border-color: var(--av-navy) var(--av-navy) transparent transparent; }
@keyframes av-spin { to { transform: rotate(360deg); } }
.av-icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--av-accent); color: #fff; cursor: pointer; flex: none; }
.av-icon-btn:hover { background: var(--av-accent-hover); }
.av-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 767px) { .av-buttons--stack-mobile { flex-direction: column; } .av-buttons--stack-mobile .av-btn { width: 100%; } }

/* ---------- badges & chips ---------- */
.av-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 6px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; background: var(--av-accent-100); color: var(--av-navy); white-space: nowrap; }
.av-badge--sale { background: var(--av-danger); color: #fff; }
.av-badge--new { background: var(--av-accent-75); color: var(--av-accent); }
.av-badge--popular { background: var(--av-navy); color: #fff; }
.av-badge--saving { background: var(--av-success-50); color: var(--av-success); }
.av-badge--oos { background: var(--av-divider); color: var(--av-slate); }
.av-badge--info { background: var(--av-accent-100); color: var(--av-navy); }
.av-badge--plain { background: #fff; color: var(--av-navy); }

.av-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.av-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--av-border); background: #fff; color: var(--av-navy); font: inherit; font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; transition: border-color .2s, background-color .2s, color .2s; }
.av-chip:hover { border-color: var(--av-accent-400); }
.av-chip.is-active, .av-chip[aria-pressed="true"], .av-chip[aria-selected="true"], input:checked + .av-chip { background: var(--av-accent-75); border-color: var(--av-accent); color: var(--av-accent); }
.av-chip--dark.is-active, .av-chip--dark[aria-selected="true"] { background: var(--av-navy); border-color: var(--av-navy); color: #fff; }
@media (max-width: 767px) { .av-chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--av-side) * -1); padding-inline: var(--av-side); } .av-chips--scroll::-webkit-scrollbar { display: none; } }

/* ---------- rating ---------- */
.av-stars { display: inline-flex; gap: 2px; color: var(--av-star); vertical-align: middle; }
.av-star.is-empty { color: var(--av-border); }
.av-star.is-half { background: linear-gradient(90deg, var(--av-star) 50%, var(--av-border) 50%); -webkit-background-clip: text; color: transparent; }
.av-star.is-half svg path { fill: url(#none); }
.av-rating { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; line-height: 20px; color: var(--av-slate); }
.av-rating strong { color: var(--av-navy); font-weight: 500; }
.av-rating .av-icon--star { color: var(--av-star); }

/* ---------- price ---------- */
.av-price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-weight: 600; font-size: 20px; line-height: 28px; color: var(--av-navy); }
.av-price ins { text-decoration: none; }
.av-price del, .av-price .av-price__old { font-size: 14px; line-height: 20px; font-weight: 400; color: var(--av-muted); text-decoration: line-through; }
.av-price.is-sale > :first-child, .av-price.is-sale ins { color: var(--av-danger); }
.av-price--l { font-size: 32px; line-height: 40px; letter-spacing: -.005em; }
.av-price--s { font-size: 16px; line-height: 24px; }
.av-price .woocommerce-Price-currencySymbol { margin-left: .15em; }

/* ---------- cards ---------- */
.av-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--av-divider); border-radius: var(--av-r-large); overflow: hidden; transition: box-shadow .25s var(--av-ease), transform .25s var(--av-ease); }
a.av-card, .av-card--hover { text-decoration: none; color: inherit; }
a.av-card:hover, .av-card--hover:hover { box-shadow: var(--av-shadow-card); }
.av-card__media { position: relative; overflow: hidden; background: var(--av-canvas); }
.av-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--av-ease); }
a.av-card:hover .av-card__media img, .av-card--hover:hover .av-card__media img { transform: scale(1.03); }
.av-card__body { display: flex; flex-direction: column; flex: 1; padding: 20px 24px 24px; }
.av-card__foot { margin-top: auto; }
.av-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.av-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* grids */
.av-grid { display: grid; gap: 24px; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.av-grid--2 { --cols: 2; } .av-grid--3 { --cols: 3; } .av-grid--4 { --cols: 4; } .av-grid--5 { --cols: 5; }
@media (max-width: 1279px) { .av-grid--5 { --cols: 4; } }
@media (max-width: 1023px) { .av-grid--4, .av-grid--5 { --cols: 3; } .av-grid--3 { --cols: 2; } }
@media (max-width: 767px) { .av-grid--2, .av-grid--3, .av-grid--4, .av-grid--5 { --cols: 1; } .av-grid--m2 { --cols: 2 !important; gap: 12px 12px; } }

/* swipe carousel on mobile ("card rows become swipe carousels with peeking next card") */
@media (max-width: 767px) {
	.av-swipe { display: grid !important; grid-auto-flow: column; grid-auto-columns: var(--swipe-w, 82%); grid-template-columns: none !important; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--av-side) * -1); padding-inline: var(--av-side); scroll-padding-inline: var(--av-side); }
	.av-swipe::-webkit-scrollbar { display: none; }
	.av-swipe > * { scroll-snap-align: start; }
}
.av-dots { display: none; justify-content: center; gap: 6px; margin-top: 20px; }
.av-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: var(--av-border); cursor: pointer; transition: width .2s, background-color .2s; }
.av-dots button.is-active { width: 24px; background: var(--av-accent); }
@media (max-width: 767px) { .av-dots { display: flex; } }

/* ---------- product card (Figma "Product card" L / S / Compact) ---------- */
.av-pcard { position: relative; display: flex; flex-direction: column; min-width: 0; }
.av-pcard__media { position: relative; display: block; aspect-ratio: 1; border-radius: var(--av-r-card); background: var(--av-canvas); overflow: hidden; }
.av-pcard__media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .5s var(--av-ease); }
.av-pcard:hover .av-pcard__media img { transform: scale(1.04); }
.av-pcard__badges { position: absolute; top: 12px; left: 12px; right: 52px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; z-index: 1; pointer-events: none; }
.av-pcard__badges .av-badge { max-width: 100%; white-space: normal; text-align: left; }
.av-pcard__wish { position: absolute; top: 12px; right: 12px; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 0; background: #fff; color: var(--av-navy); cursor: pointer; box-shadow: 0 1px 2px rgba(10,50,97,.08); }
.av-pcard__wish:hover, .av-pcard__wish[aria-pressed="true"] { color: var(--av-accent); }
.av-pcard__wish[aria-pressed="true"] svg path { fill: currentColor; }
.av-pcard__body { display: flex; flex-direction: column; flex: 1; padding-top: 14px; }
.av-pcard__brand { margin: 0 0 4px; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--av-muted); }
.av-pcard__title { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; color: var(--av-navy); }
.av-pcard__title a { color: inherit; text-decoration: none; }
.av-pcard__title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.av-pcard__meta { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--av-muted); }
.av-pcard__rating { margin-top: 6px; }
.av-pcard__foot { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 16px; margin-top: auto; padding-top: 16px; }
.av-pcard__foot .av-btn { width: 100%; }
.av-pcard__cart-icon { display: none; }
@media (max-width: 767px) {
	.av-pcard__badges { top: 8px; left: 8px; right: 44px; gap: 4px; }
	.av-pcard__wish { top: 8px; right: 8px; }
	.av-pcard__title { font-size: 14px; line-height: 20px; }
	.av-pcard__meta { font-size: 12px; line-height: 16px; }
	.av-pcard__foot { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 8px; }
	.av-pcard__foot .av-price { flex-direction: column; gap: 0; font-size: 16px; line-height: 24px; }
	.av-pcard__foot .av-btn { display: none; }
	.av-pcard__cart-icon { display: inline-grid; }
}

/* ---------- accordion (Figma "Accordion item") ---------- */
.av-acc { border-top: 1px solid var(--av-divider); }
.av-acc__item { border-bottom: 1px solid var(--av-divider); }
.av-acc__item > summary, .av-acc__btn { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 20px 0; background: none; border: 0; font: inherit; font-size: 18px; line-height: 26px; font-weight: 500; color: var(--av-navy); text-align: left; cursor: pointer; list-style: none; }
.av-acc__item > summary::-webkit-details-marker { display: none; }
.av-acc__icon { position: relative; flex: none; width: 20px; height: 20px; color: var(--av-accent-400); }
.av-acc__icon::before, .av-acc__icon::after { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 1.5px; margin-top: -.75px; background: currentColor; border-radius: 2px; transition: transform .25s var(--av-ease); }
.av-acc__icon::after { transform: rotate(90deg); }
.av-acc__item[open] > summary .av-acc__icon::after { transform: rotate(0); }
.av-acc__panel { padding: 0 40px 20px 0; color: var(--av-slate); font-size: 16px; line-height: 24px; }
.av-acc__panel > :first-child { margin-top: 0; } .av-acc__panel > :last-child { margin-bottom: 0; }
.av-acc--chevron .av-acc__icon::before, .av-acc--chevron .av-acc__icon::after { display: none; }
.av-acc--chevron .av-acc__chev { transition: transform .25s var(--av-ease); color: var(--av-muted); }
.av-acc--chevron .av-acc__item[open] > summary .av-acc__chev { transform: rotate(180deg); }
.av-acc--small .av-acc__item > summary { font-size: 16px; line-height: 24px; padding: 14px 0; }
@media (max-width: 767px) { .av-acc__item > summary { font-size: 16px; line-height: 24px; padding: 16px 0; } .av-acc__panel { padding-right: 0; } }

/* ---------- forms ---------- */
.av-input, .av-form input[type=text], .av-form input[type=email], .av-form input[type=tel], .av-form input[type=search], .av-form input[type=number], .av-form textarea, .av-form select { width: 100%; min-height: 52px; padding: 13px 16px; border: 1px solid var(--av-border-strong); border-radius: var(--av-r-input); background: #fff; font: inherit; font-size: 16px; line-height: 24px; color: var(--av-navy); transition: border-color .2s, box-shadow .2s; }
.av-form textarea { min-height: 140px; resize: vertical; }
.av-input:focus, .av-form :is(input, textarea, select):focus { outline: none; border-color: var(--av-accent); box-shadow: 0 0 0 3px var(--av-accent-100); }
.av-input::placeholder, .av-form ::placeholder { color: var(--av-muted); }
.av-label, .av-form label { display: block; margin-bottom: 6px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--av-navy); }
.av-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 20px; color: var(--av-slate); cursor: pointer; }
.av-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--av-accent); flex: none; }

/* qty stepper (Figma "Quantity stepper") */
.av-qty { display: inline-flex; align-items: center; height: 48px; border: 1px solid var(--av-border-strong); border-radius: 999px; background: #fff; }
.av-qty button { display: grid; place-items: center; width: 44px; height: 100%; padding: 0; border: 0; background: none; color: var(--av-navy); cursor: pointer; border-radius: 999px; }
.av-qty button:hover { color: var(--av-accent); }
.av-qty input { width: 40px; border: 0; background: none; text-align: center; font: inherit; font-weight: 500; color: var(--av-navy); -moz-appearance: textfield; }
.av-qty input::-webkit-outer-spin-button, .av-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.av-qty--s { height: 36px; } .av-qty--s button { width: 32px; } .av-qty--s input { width: 30px; font-size: 14px; }

/* icon tile (Figma "Trust item" icon) */
.av-tile { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--av-accent-100); color: var(--av-accent); flex: none; }
.av-tile--round { border-radius: 50%; }
.av-tile--s { width: 32px; height: 32px; border-radius: 8px; }
.av-tile--white { background: #fff; }

/* avatar */
.av-avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--av-accent-100); color: var(--av-navy); font-size: 14px; font-weight: 500; flex: none; overflow: hidden; }
.av-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* toast (add to cart feedback) */
.av-toast { position: fixed; left: 50%; bottom: 24px; z-index: 10000; transform: translate(-50%, 140%); display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 20px; border-radius: 14px; background: var(--av-navy); color: #fff; box-shadow: var(--av-shadow); font-size: 14px; transition: transform .35s var(--av-ease); max-width: calc(100vw - 32px); }
.av-toast.is-visible { transform: translate(-50%, 0); }
.av-toast a { color: #fff; font-weight: 500; }
.av-toast.is-error { background: var(--av-danger); }

/* generic prose (core blocks inside info pages / posts) */
.av-prose { color: var(--av-slate); font-size: 18px; line-height: 28px; }
.av-prose :is(h2, h3, h4) { color: var(--av-navy); margin: 1.6em 0 .6em; }
.av-prose h2 { font-size: 32px; line-height: 40px; }
.av-prose h3 { font-size: 24px; line-height: 32px; }
.av-prose a { color: var(--av-accent); }
.av-prose table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--av-divider); border-radius: var(--av-r-card); overflow: hidden; font-size: 14px; line-height: 20px; }
.av-prose th { background: var(--av-surface); color: var(--av-slate); font-weight: 500; text-align: left; }
.av-prose :is(th, td) { padding: 14px 16px; border-bottom: 1px solid var(--av-divider); }
.av-prose tr:last-child td { border-bottom: 0; }
.av-prose td:first-child { color: var(--av-navy); font-weight: 500; }
@media (max-width: 767px) { .av-prose { font-size: 16px; line-height: 24px; } .av-prose h2 { font-size: 24px; line-height: 32px; } .av-prose .wp-block-table { overflow-x: auto; } }

/* WooCommerce notices inside theme */
.woocommerce-notices-wrapper:empty { display: none; }

/* ---------- article card (Figma "Article card") ---------- */
.av-acard { position: relative; display: flex; flex-direction: column; min-width: 0; }
.av-acard__media { display: block; aspect-ratio: 410 / 260; border-radius: var(--av-r-card); overflow: hidden; background: var(--av-canvas); }
.av-acard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--av-ease); }
.av-acard:hover .av-acard__media img { transform: scale(1.03); }
.av-acard__ph { display: block; width: 100%; height: 100%; background: var(--av-accent-50); }
.av-acard__meta { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.av-acard__time { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 16px; color: var(--av-muted); }
.av-acard__title { margin: 12px 0 0; font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: 0; }
.av-acard__title a { color: var(--av-navy); text-decoration: none; }
.av-acard__title a:hover { color: var(--av-accent); }
.av-acard__excerpt { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: var(--av-slate); }
.av-acard__more { margin-top: 12px; align-self: flex-start; }
@media (max-width: 767px) { .av-acard__title { font-size: 18px; line-height: 26px; } }

/* ---------- page shell ---------- */
.av-page__head { padding-top: 32px; padding-bottom: 32px; }
.av-page__title { margin: 0; font-size: var(--wp--preset--font-size--h-1); line-height: 1.17; letter-spacing: -.015em; }
.av-page__content { padding-bottom: var(--av-section-y); }
.av-single__wrap { padding-bottom: var(--av-section-y); }
.av-single__image { border-radius: var(--av-r-large); overflow: hidden; margin: 24px 0 32px; }
.av-pagination { margin-top: 48px; gap: 8px; }
.av-pagination .page-numbers { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--av-border); color: var(--av-navy); text-decoration: none; font-weight: 500; }
.av-pagination .page-numbers.current { background: var(--av-navy); border-color: var(--av-navy); color: #fff; }
.av-landing-content > * { margin-block: 0; }
@media (max-width: 767px) { .av-page__head { padding-top: 16px; padding-bottom: 16px; } }

/* ==========================================================================
   Motion — THEME RULE: anything that appears, disappears, moves, expands or
   collapses is animated (see docs/README.md). JS uses avemed.show()/hide()
   which toggle .av-anim-out around `hidden`; <details> are height-animated in JS.
   ========================================================================== */
.av-anim { transition: opacity .22s var(--av-ease), transform .22s var(--av-ease), visibility .22s; }
.av-anim.av-anim-out { opacity: 0; transform: translateY(-6px); }
.av-mega.av-anim.av-anim-out { transform: translateY(-8px); }
.av-mega-backdrop.av-anim.av-anim-out, .av-mega-backdrop.av-anim { transform: none; }
.av-drawer__level.av-anim.av-anim-out { transform: translateX(24px); }
.av-drawer__level.is-back.av-anim.av-anim-out { transform: translateX(-24px); }
[role="tabpanel"].av-anim.av-anim-out { transform: translateY(4px); }
.av-count { transition: transform .25s var(--av-ease), opacity .25s; }
.av-count.is-empty { transform: scale(0); opacity: 0; }
details > summary ~ * { transition: opacity .26s var(--av-ease); }
details.is-closing > summary ~ * { opacity: 0; }
details[open]:not(.is-closing) > summary ~ * { animation: av-fade-in .3s var(--av-ease); }
@keyframes av-fade-in { from { opacity: 0; } }
.av-lang ul { animation: av-drop-in .2s var(--av-ease); }
@keyframes av-drop-in { from { opacity: 0; transform: translateY(-4px); } }
.av-drawer-overlay { animation: av-fade-in .3s var(--av-ease); }
.av-search__results.av-anim.av-anim-out { transform: translateY(-4px); }
@media (prefers-reduced-motion: reduce) { .av-anim, .av-anim.av-anim-out { transform: none !important; } }

/* ---------- video facade ---------- */
.av-video { position: relative; overflow: hidden; background: var(--av-navy); }
.av-video__poster { display: block; width: 100%; height: 100%; object-fit: cover; }
.av-video__play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 72px; height: 72px; margin: -36px 0 0 -36px; padding: 0 0 0 4px; border: 0; border-radius: 50%; background: #fff; color: var(--av-accent); cursor: pointer; box-shadow: var(--av-shadow); transition: transform .25s var(--av-ease); }
.av-video__play:hover { transform: scale(1.08); }
.av-video__dur { position: absolute; left: 12px; bottom: 12px; padding: 2px 8px; border-radius: 6px; background: var(--av-navy); color: #fff; font-size: 12px; line-height: 18px; font-weight: 500; }
.av-video iframe, .av-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; animation: av-fade-in .4s var(--av-ease); }
.av-thumb-ph { display: grid; place-items: center; width: 100%; height: 100%; background: var(--av-canvas); color: var(--av-border-strong); }

/* contact page body (core columns inside landing template) */
.av-contact__body { padding-bottom: 64px; }
.av-contact__cols { gap: 32px !important; align-items: flex-start !important; margin: 0 !important; }
@media (max-width: 781px) { .av-contact__cols { gap: 16px !important; } }

/* form helpers shared by newsletter + contact form (must live here: blocks load CSS only when present) */
.av-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; }
.av-newsletter__msg, .av-msg { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--av-success-50); color: var(--av-success); font-size: 14px; font-weight: 500; }
.av-newsletter__msg.is-error, .av-msg.is-error { background: #fdecea; color: var(--av-danger); }
.av-form .av-check { display: flex; margin-bottom: 0; font-weight: 400; color: var(--av-slate); }

/* core table inside prose (info pages): no vertical rules, design header */
.av-prose .wp-block-table { margin: 0 0 24px; }
.av-prose .wp-block-table table { border: 1px solid var(--av-divider); border-radius: var(--av-r-card); border-collapse: separate; overflow: hidden; }
.av-prose .wp-block-table :is(th, td) { border: 0; border-bottom: 1px solid var(--av-divider); }
.av-prose .wp-block-table thead { border: 0; }
.av-prose .wp-block-table tbody tr:last-child td { border-bottom: 0; }
@keyframes av-card-in { from { opacity: 0; transform: translateY(8px); } }

/* on-scroll reveal (see inc/setup.php) – opacity/transform only */
.av-reveal-on .av-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--av-ease), transform .6s var(--av-ease); }
.av-reveal-on .av-reveal.av-in { opacity: 1; transform: none; }

/* checkout steps (cart page + checkout header) */
.av-steps-bar { display: flex; align-items: center; gap: 12px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--av-slate); }
.av-steps-bar li { display: inline-flex; align-items: center; gap: 8px; }
.av-steps-bar li + li::before { content: ""; width: 40px; height: 1px; margin-right: 4px; background: var(--av-border); }
.av-steps-bar__n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--av-divider); font-size: 11px; font-weight: 600; color: var(--av-slate); }
.av-steps-bar .is-current { color: var(--av-navy); font-weight: 600; }
.av-steps-bar .is-current .av-steps-bar__n, .av-steps-bar .is-done .av-steps-bar__n { background: var(--av-accent); color: #fff; }
@media (max-width: 767px) { .av-steps-bar { font-size: 12px; gap: 6px; } .av-steps-bar li + li::before { width: 16px; } }

/* author byline (blog list + article) */
.av-byline { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.av-byline > span:last-child { display: grid; }
.av-byline strong { font-size: 14px; font-weight: 500; color: var(--av-navy); }
.av-byline span span { font-size: 12px; color: var(--av-muted); }

/* Legacy content compat (old Unyson/medactive markup baked into posts/pages – QA AV-039) */
.av-prose .d-none { display: none !important; }
.av-prose .row { display: flex; flex-wrap: wrap; gap: 16px; margin: 16px 0; }
.av-prose .row > [class*="col-"] { flex: 1 1 0; min-width: 0; }
.av-prose .row > [class*="col-"]:empty { display: none; }
.av-prose a.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--av-accent); color: #fff !important; font-weight: 500; text-decoration: none; transition: background-color .2s; }
.av-prose a.btn:hover { background: var(--av-accent-hover); }
.av-prose section[class*="s-pt-"], .av-prose section[class*="s-pb-"] { padding: 0 !important; }
.av-prose .container { max-width: none; padding: 0; }
@media (max-width: 767px) { .av-prose .row { flex-direction: column; } }

/* `hidden` must always win over component display values (QA AV-041). The mobile drawer is the
   only exception: it keeps display:flex while hidden so it can slide out. */
[hidden]:not(.av-drawer) { display: none !important; }
