/*
Theme Name: Asset Partners
Theme URI: https://example.invalid/asset-partners
Description: Light, fast, mobile-first theme for the Asset Partners marketplace. White, card-based layout with a Buy menu of categories, member links, a footer with legal and PPRA details, and a branded login page. Designed to run with the Asset Partners plugin.
Version: 1.2.0
Author: Asset Partners
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: asset-partners-theme
*/

/* Plus Jakarta Sans (SIL Open Font License), served from this theme. If the files are not in fonts/, the system font is used. */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("fonts/plus-jakarta-sans-latin.woff2") format("woff2"); }

:root {
	--apt-amber: #f0a01e;
	--apt-amber-dark: #d98b0c;
	--apt-ink: #0a2a5e;
	--apt-muted: #5b6474;
	--apt-line: #e4e7ec;
	--apt-bg: #ffffff;
	--apt-soft: #f5f6f8;
	--apt-card: #ffffff;
	--apt-max: 1240px;
	--apt-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--apt-bg);
	color: var(--apt-ink);
	font: 16px/1.55 var(--apt-font);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
a:hover { color: #061a3d; }
:focus-visible { outline: 3px solid var(--apt-ink); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }

.apt-wrap { max-width: var(--apt-max); margin: 0 auto; padding: 0 24px; }
.apt-skip { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 12px; z-index: 1000; }
.apt-skip:focus { left: 8px; }

/* Header */
.apt-header { background: #fff; border-bottom: 1px solid var(--apt-line); position: sticky; top: 0; z-index: 50; }
.admin-bar .apt-header { top: 32px; }
.apt-header__in { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.apt-logo img, .custom-logo { height: 46px; width: auto; display: block; }
.apt-nav { display: flex; align-items: center; gap: 20px; flex: 1; }
.apt-menu { list-style: none; display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; flex-wrap: wrap; }
.apt-menu a, .apt-dd summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 8px; text-decoration: none; font-weight: 600; cursor: pointer; }
.apt-menu a:hover, .apt-dd summary:hover, .apt-dd details[open] > summary { background: var(--apt-soft); }
.apt-menu a[aria-current="page"], .apt-menu .current-menu-item > a { box-shadow: inset 0 -3px 0 var(--apt-amber); border-radius: 0; }
.apt-dd { position: relative; }
.apt-dd summary { list-style: none; }
.apt-dd summary::-webkit-details-marker { display: none; }
.apt-dd summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 2px; }
.apt-dd details[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.apt-mega { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; background: #fff; border: 1px solid var(--apt-line); border-radius: 14px; box-shadow: 0 18px 40px rgba(16,24,40,.12); padding: 18px 20px 14px; min-width: 640px; }
.apt-mega--small { min-width: 220px; padding: 10px; }
.apt-mega__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; }
.apt-mega ul { list-style: none; margin: 4px 0 0; padding: 0; }
.apt-mega li a { display: flex; justify-content: space-between; gap: 10px; min-height: 34px; padding: 0 8px; margin: 0 -8px; font-weight: 500; border-radius: 6px; }
.apt-mega__group { display: flex !important; justify-content: space-between; font-weight: 800 !important; min-height: 36px !important; padding: 0 8px !important; margin: 0 -8px; }
.apt-mega__all { display: inline-block !important; margin-top: 12px; font-weight: 700 !important; padding: 0 !important; min-height: 0 !important; text-decoration: underline !important; }
.apt-n { color: var(--apt-muted); font-weight: 500; font-size: 13px; }
.apt-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.apt-act { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; min-height: 44px; }
.apt-act:hover { text-decoration: underline; }
.apt-link { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.apt-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; background: var(--apt-amber); color: var(--apt-ink); border-radius: 8px; font-weight: 700; text-decoration: none; }
.apt-btn:hover { background: var(--apt-amber-dark); color: var(--apt-ink); }
.apt-status { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 4px; background: var(--apt-soft); border: 1px solid var(--apt-line); white-space: nowrap; }
.apt-status.is-ok { background: #e3f4ea; color: #1d7a46; border-color: transparent; }
.apt-burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--apt-line); border-radius: 8px; background: #fff; cursor: pointer; padding: 11px 10px; }
.apt-burger span { display: block; height: 2px; background: var(--apt-ink); margin: 4px 0; border-radius: 2px; }

/* Main */
.apt-main { min-height: 60vh; }
.apt-app { padding-top: 20px; padding-bottom: 40px; }
.apt-content { padding-top: 32px; padding-bottom: 56px; max-width: 820px; }
.apt-content article { background: #fff; border: 1px solid var(--apt-line); border-radius: 14px; padding: 28px; }
.apt-title { font-size: clamp(28px, 4vw, 40px); margin: 0 0 16px; }
.apt-404 p { font-size: 18px; }

/* Footer */
.apt-footer { background: var(--apt-ink); color: #cdd2da; margin-top: 48px; font-size: 14px; }
.apt-footer__in { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; padding-top: 36px; padding-bottom: 24px; }
.apt-footer__brand { display: flex; flex-direction: column; gap: 4px; max-width: 420px; }
.apt-footer__brand strong { color: #fff; font-size: 17px; }
.apt-footer h2 { color: #fff; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 10px; }
.apt-footer a { color: #fff; text-decoration: none; }
.apt-footer a:hover { text-decoration: underline; color: #fff; }
.apt-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.apt-legal-link { margin: 6px 0 0; }
.apt-wa { margin-top: 6px; font-weight: 700; color: #7ee2a8 !important; }
.apt-footer__base { border-top: 1px solid #2a3242; padding-top: 14px; padding-bottom: 20px; color: #98a2b3; font-size: 13px; }

/* Plugin pages sit flush inside the theme */
.apt-app .ap { max-width: none; }

/* Tablets and phones */
@media (max-width: 960px) {
	.apt-header__in { min-height: 60px; gap: 12px; }
	.apt-logo img, .custom-logo { height: 38px; }
	.apt-burger { display: block; }
	.apt-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--apt-line); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; gap: 8px; box-shadow: 0 12px 24px rgba(0,0,0,.08); max-height: calc(100vh - 60px); overflow: auto; }
	.apt-nav.is-open { display: flex; }
	.apt-menu { flex-direction: column; align-items: stretch; }
	.apt-menu a, .apt-dd summary { width: 100%; justify-content: space-between; }
	.apt-menu a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--apt-amber); }
	.apt-mega { position: static; min-width: 0; box-shadow: none; border: 0; padding: 4px 12px 10px; }
	.apt-mega__cols { grid-template-columns: 1fr; gap: 8px; }
	.apt-actions { margin-left: 0; flex-wrap: wrap; justify-content: space-between; border-top: 1px solid var(--apt-line); padding-top: 10px; }
	.apt-wrap { padding: 0 16px; }
	.apt-app { padding-top: 12px; }
	.apt-content article { padding: 20px; }
	.apt-footer__in { grid-template-columns: 1fr 1fr; }
	.apt-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 782px) { .admin-bar .apt-header { top: 46px; } }
@media (max-width: 480px) { .apt-footer__in { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print { .apt-header, .apt-footer { display: none; } }
