/* ============================================================
   Apps Garage Pro — Frontend
   Palette: indigo→violet brand, amber rating, platform brand
   colours for download actions. Light + dark.
   ============================================================ */

:root {
	--agp-bg: #f7f8fc;
	--agp-card: #ffffff;
	--agp-soft: #f1f3f9;
	--agp-text: #3f4760;
	--agp-muted: #6b7390;
	--agp-heading: #111527;
	--agp-border: #e6e8f0;
	--agp-brand: #4f46e5;
	--agp-brand-2: #7c3aed;
	--agp-amber: #f59e0b;
	--agp-shadow: 0 1px 3px rgba(17,21,39,.06), 0 8px 24px -12px rgba(17,21,39,.10);
	--agp-radius: 18px;
}

/* Dark palette applied automatically by system preference, UNLESS the visitor
   has forced light via the toggle (data-agp-theme="light"). */
@media (prefers-color-scheme: dark) {
	:root:not([data-agp-theme="light"]) {
		--agp-bg: #0c0e16;
		--agp-card: #151826;
		--agp-soft: #1c2030;
		--agp-text: #c2c8de;
		--agp-muted: #8b91ab;
		--agp-heading: #f2f4fb;
		--agp-border: #262b3d;
		--agp-shadow: 0 1px 3px rgba(0,0,0,.4), 0 12px 30px -14px rgba(0,0,0,.6);
	}
}

/* Dark forced on by the toggle (overrides a light system preference). */
:root[data-agp-theme="dark"] {
	--agp-bg: #0c0e16;
	--agp-card: #151826;
	--agp-soft: #1c2030;
	--agp-text: #c2c8de;
	--agp-muted: #8b91ab;
	--agp-heading: #f2f4fb;
	--agp-border: #262b3d;
	--agp-shadow: 0 1px 3px rgba(0,0,0,.4), 0 12px 30px -14px rgba(0,0,0,.6);
}

.agp-smart-wrap {
	width: 100%; max-width: 1180px; margin: 36px auto 80px; padding: 0 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--agp-text); line-height: 1.65; box-sizing: border-box;
}
.agp-smart-wrap * { box-sizing: border-box; }
.agp-smart-wrap a { color: var(--agp-brand); }

/* ---------- Breadcrumbs ---------- */
.agp-breadcrumb { font-size: 13px; color: var(--agp-muted); margin-bottom: 18px; }
.agp-breadcrumb a { color: var(--agp-muted); text-decoration: none; }
.agp-breadcrumb a:hover { color: var(--agp-brand); }
.agp-breadcrumb span { margin: 0 8px; opacity: .5; }

/* ---------- App header card (signature) ---------- */
.agp-header-card {
	position: relative; background: var(--agp-card); border: 1px solid var(--agp-border);
	border-radius: var(--agp-radius); box-shadow: var(--agp-shadow); margin-bottom: 28px; overflow: hidden;
}
.agp-header-card::before {
	content: ""; position: absolute; inset: 0 0 auto 0; height: 96px;
	background: linear-gradient(120deg, var(--agp-brand), var(--agp-brand-2));
	opacity: .14;
}
.agp-header-inner { position: relative; display: flex; gap: 26px; align-items: flex-end; padding: 30px; }
.agp-brand-logo {
	width: 116px; height: 116px; border-radius: 26px; object-fit: cover; flex-shrink: 0;
	border: 4px solid var(--agp-card); box-shadow: 0 12px 26px -10px rgba(17,21,39,.4);
	background: var(--agp-soft);
}
.agp-brand-info { flex: 1; padding-bottom: 4px; }
.agp-brand-info h1 { margin: 0 0 4px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--agp-heading); }
.agp-dev { font-size: 14px; color: var(--agp-brand); font-weight: 600; text-decoration: none; }
.agp-dev:hover { text-decoration: underline; }
.agp-brand-tagline { margin: 10px 0 0; font-size: 15px; color: var(--agp-muted); }

/* Platform availability chips */
.agp-platforms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.agp-plt-chip {
	display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
	padding: 5px 11px; border-radius: 999px; background: var(--agp-soft); color: var(--agp-text);
	border: 1px solid var(--agp-border);
}
.agp-plt-chip svg { width: 14px; height: 14px; }

/* ---------- Meta stat bar ---------- */
.agp-statbar {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 0; background: var(--agp-card); border: 1px solid var(--agp-border);
	border-radius: 14px; overflow: hidden; margin-bottom: 30px; box-shadow: var(--agp-shadow);
}
.agp-stat { padding: 16px 18px; text-align: center; border-right: 1px solid var(--agp-border); }
.agp-stat:last-child { border-right: 0; }
.agp-stat-val { font-size: 17px; font-weight: 700; color: var(--agp-heading); display: flex; gap: 5px; align-items: center; justify-content: center; }
.agp-stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--agp-muted); margin-top: 3px; }

/* Stars */
.agp-stars { position: relative; display: inline-block; font-size: 15px; line-height: 1; letter-spacing: 1px; }
.agp-stars-bg { color: var(--agp-border); }
.agp-stars-fg { color: var(--agp-amber); position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; }

/* ---------- Layout ---------- */
.agp-layout-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	grid-template-rows: auto 1fr;
	grid-template-areas:
		"body download"
		"body sidebar";
	gap: 36px;
	align-items: start;
}
.agp-layout-grid > main { grid-area: body; min-width: 0; }
.agp-layout-grid > .agp-dl-widget { grid-area: download; }
.agp-layout-grid > .agp-sticky-sidebar { grid-area: sidebar; }
.agp-content-block { margin-bottom: 36px; }
.agp-content-block h2 {
	font-size: 21px; font-weight: 700; color: var(--agp-heading); margin: 0 0 18px;
	padding-bottom: 12px; border-bottom: 1px solid var(--agp-border); letter-spacing: -.01em;
}

/* ---------- Screenshots ---------- */
.agp-shots { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.agp-shot {
	height: 380px; border-radius: 16px; border: 1px solid var(--agp-border); cursor: zoom-in;
	scroll-snap-align: start; flex-shrink: 0; object-fit: cover; transition: transform .2s ease;
}
.agp-shot:hover { transform: translateY(-3px); }

/* ---------- Features ---------- */
.agp-feature-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.agp-f-box {
	background: var(--agp-card); padding: 20px; border-radius: 14px; border: 1px solid var(--agp-border);
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.agp-f-box:hover { transform: translateY(-5px); box-shadow: var(--agp-shadow); border-color: var(--agp-brand); }
.agp-f-box h4 { margin: 0 0 6px; font-size: 15px; color: var(--agp-heading); font-weight: 700; }
.agp-f-box p { margin: 0; font-size: 14px; color: var(--agp-muted); }

/* ---------- Steps ---------- */
.agp-dynamic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.agp-step-list { padding: 0; margin: 0; list-style: none; counter-reset: agp-step; }
.agp-step-list li { position: relative; padding-left: 42px; margin-bottom: 14px; font-size: 15px; }
.agp-step-list li::before {
	counter-increment: agp-step; content: counter(agp-step); position: absolute; left: 0; top: -1px;
	width: 28px; height: 28px; background: linear-gradient(135deg, var(--agp-brand), var(--agp-brand-2));
	color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: 13px;
}

/* ---------- Version history ---------- */
.agp-versions { border: 1px solid var(--agp-border); border-radius: 14px; overflow: hidden; background: var(--agp-card); }
.agp-ver-row { padding: 16px 20px; border-bottom: 1px solid var(--agp-border); }
.agp-ver-row:last-child { border-bottom: 0; }
.agp-ver-row.is-hidden { display: none; }
.agp-ver-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.agp-ver-num { font-weight: 700; color: var(--agp-heading); font-size: 15px; }
.agp-ver-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: #ecfdf5; color: #059669; padding: 2px 8px; border-radius: 5px; }
.agp-ver-meta { font-size: 12.5px; color: var(--agp-muted); margin-left: auto; }
.agp-ver-log { font-size: 13.5px; color: var(--agp-muted); margin: 8px 0 0; }
.agp-ver-dls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.agp-ver-dl {
	font-size: 12.5px; font-weight: 600; text-decoration: none; padding: 6px 12px; border-radius: 8px;
	background: var(--agp-soft); color: var(--agp-text); border: 1px solid var(--agp-border);
}
.agp-ver-dl:hover { border-color: var(--agp-brand); color: var(--agp-brand); }
.agp-ver-toggle {
	width: 100%; padding: 14px; background: var(--agp-soft); border: 0; color: var(--agp-brand);
	font-weight: 600; cursor: pointer; font-size: 14px;
}
.agp-ver-toggle:hover { background: var(--agp-border); }

/* ---------- Troubleshooting ---------- */
.agp-ts-grid { display: flex; flex-direction: column; gap: 14px; }
.agp-ts-card { border: 1px solid var(--agp-border); border-radius: 14px; overflow: hidden; }
.agp-ts-issue { background: rgba(239,68,68,.06); padding: 15px 20px; border-bottom: 1px solid var(--agp-border); display: flex; flex-direction: column; gap: 6px; }
.agp-ts-solution { background: rgba(34,197,94,.06); padding: 15px 20px; display: flex; flex-direction: column; gap: 6px; color: var(--agp-text); }
.agp-badge { display: inline-block; padding: 3px 9px; border-radius: 5px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; width: max-content; }
.agp-badge-red { background: #ef4444; color: #fff; }
.agp-badge-green { background: #22c55e; color: #fff; }
.agp-ts-issue strong { color: var(--agp-heading); }

/* ---------- FAQ ---------- */
.agp-faq-wrapper { border: 1px solid var(--agp-border); border-radius: 14px; overflow: hidden; background: var(--agp-card); }
.agp-faq-item { border-bottom: 1px solid var(--agp-border); }
.agp-faq-item:last-child { border-bottom: none; }
.agp-faq-item summary {
	padding: 17px 20px; font-weight: 600; cursor: pointer; list-style: none; outline: none;
	color: var(--agp-heading); display: flex; justify-content: space-between; align-items: center; gap: 12px; transition: background .2s;
}
.agp-faq-item summary:hover { background: var(--agp-soft); }
.agp-faq-item summary::-webkit-details-marker { display: none; }
.agp-faq-item summary::after { content: "+"; font-size: 20px; color: var(--agp-brand); font-weight: 400; transition: transform .2s; }
.agp-faq-item[open] summary::after { transform: rotate(45deg); }
.agp-faq-ans { padding: 0 20px 18px; color: var(--agp-muted); font-size: 14.5px; }

/* ---------- Sidebar ---------- */
.agp-sticky-sidebar { display: flex; flex-direction: column; gap: 18px; }
.agp-dl-widget, .agp-safety-widget {
	background: var(--agp-card); padding: 22px; border-radius: var(--agp-radius);
	border: 1px solid var(--agp-border); box-shadow: var(--agp-shadow);
}
.agp-dl-widget h3, .agp-safety-widget h3 { margin: 0 0 16px; font-size: 17px; color: var(--agp-heading); font-weight: 700; }
.agp-dl-list { display: flex; flex-direction: column; gap: 10px; }
.agp-dl-btn {
	display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 12px;
	text-decoration: none; color: #fff !important; font-weight: 600; font-size: 14.5px;
	transition: transform .15s ease, box-shadow .15s ease;
}
.agp-dl-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.agp-dl-btn span { flex: 1; }
.agp-dl-btn small { font-size: 11px; opacity: .85; font-weight: 500; }
.agp-dl-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -6px rgba(0,0,0,.4); }
.agp-dl-apk { background: #2f9e44; }
.agp-dl-android { background: #00875a; }
.agp-dl-ios { background: #0b0b0f; }
.agp-dl-windows { background: #0067c0; }
.agp-dl-huawei { background: #c4122f; }
.agp-safety-widget p { margin: 0; font-size: 14px; color: var(--agp-muted); }

/* ---------- Reading text ---------- */
.agp-reading-text { font-size: 15px; color: var(--agp-text); }
.agp-reading-text p { margin: 0 0 12px; }

/* ============================================================
   ARCHIVE / STORE
   ============================================================ */
.agp-discover-header { text-align: center; margin-bottom: 36px; padding: 14px 0 0; }
.agp-discover-header h1 {
	font-size: 38px; color: var(--agp-heading); margin: 0 0 8px; font-weight: 800; letter-spacing: -.025em;
}
.agp-discover-sub { font-size: 16px; color: var(--agp-muted); margin: 0 0 26px; }
.agp-search-box {
	max-width: 580px; margin: 0 auto; display: flex; align-items: center; gap: 8px;
	background: var(--agp-card); border: 1px solid var(--agp-border); border-radius: 999px;
	box-shadow: var(--agp-shadow); padding: 6px 6px 6px 18px; transition: border-color .15s, box-shadow .15s;
}
.agp-search-box:focus-within { border-color: var(--agp-brand); box-shadow: 0 0 0 3px rgba(79,70,229,.12), var(--agp-shadow); }
.agp-search-ic { width: 18px; height: 18px; color: var(--agp-muted); flex-shrink: 0; }
.agp-search-box input {
	flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
	font-size: 15px; color: var(--agp-heading); padding: 10px 4px;
}
.agp-search-box input::placeholder { color: var(--agp-muted); }
.agp-search-btn {
	flex-shrink: 0; border: 0; cursor: pointer; color: #fff; font-weight: 600; font-size: 14px;
	padding: 10px 22px; border-radius: 999px;
	background: linear-gradient(120deg, var(--agp-brand), var(--agp-brand-2));
	transition: transform .15s, box-shadow .15s;
}
.agp-search-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(79,70,229,.6); }

/* Category filter */
.agp-cat-filter { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 24px 0 36px; }
.agp-cat-pill {
	font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 999px; text-decoration: none;
	background: var(--agp-card); color: var(--agp-text); border: 1px solid var(--agp-border); transition: .2s;
}
.agp-cat-pill:hover { border-color: var(--agp-brand); color: var(--agp-brand); }
.agp-cat-pill.is-active { background: var(--agp-brand); color: #fff; border-color: var(--agp-brand); }

/* Grid */
.agp-store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 22px; }
.agp-store-card {
	display: block; text-decoration: none; background: var(--agp-card); border-radius: 16px; padding: 16px;
	border: 1px solid var(--agp-border); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; text-align: center;
}
.agp-store-card:hover { transform: translateY(-6px); box-shadow: var(--agp-shadow); border-color: var(--agp-brand); }
.agp-store-card img {
	width: 80px; height: 80px; object-fit: cover; border-radius: 22px; margin: 0 auto 12px;
	border: 1px solid var(--agp-border); display: block;
}
.agp-card-body h3 { margin: 0 0 5px; font-size: 14.5px; color: var(--agp-heading); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agp-card-meta { font-size: 11.5px; color: var(--agp-muted); display: flex; gap: 6px; justify-content: center; align-items: center; }
.agp-card-rating { color: var(--agp-amber); font-weight: 700; }

/* Pagination */
.agp-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.agp-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px;
	border-radius: 10px; border: 1px solid var(--agp-border); background: var(--agp-card); color: var(--agp-text);
	text-decoration: none; font-weight: 600; font-size: 14px;
}
.agp-pagination .page-numbers.current { background: var(--agp-brand); color: #fff; border-color: var(--agp-brand); }
.agp-pagination .page-numbers:hover:not(.current) { border-color: var(--agp-brand); color: var(--agp-brand); }

.agp-empty { text-align: center; width: 100%; color: var(--agp-muted); padding: 60px 0; grid-column: 1 / -1; }

/* ---------- Lightbox ---------- */
.agp-lightbox {
	position: fixed; inset: 0; background: rgba(8,10,16,.88); display: none; align-items: center; justify-content: center;
	z-index: 99999; padding: 30px;
}
.agp-lightbox.is-open { display: flex; }
.agp-lightbox img { max-width: 95%; max-height: 90vh; border-radius: 12px; }
.agp-lightbox-close { position: absolute; top: 20px; right: 26px; background: none; border: 0; color: #fff; font-size: 38px; cursor: pointer; line-height: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.agp-layout-grid {
		grid-template-columns: 1fr;
		grid-template-rows: auto;
		grid-template-areas:
			"download"
			"body"
			"sidebar";
	}
	.agp-header-inner { flex-direction: column; align-items: center; text-align: center; }
	.agp-platforms { justify-content: center; }
	.agp-sticky-sidebar { position: static; }
	.agp-discover-header h1 { font-size: 30px; }
}

/* Accessibility */
.agp-smart-wrap :focus-visible { outline: 2px solid var(--agp-brand); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
	.agp-smart-wrap * { transition: none !important; animation: none !important; }
}

/* ---------- Related apps ---------- */
.agp-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 16px; }
.agp-related-card { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; }
.agp-related-card img {
	width: 72px; height: 72px; border-radius: 18px; object-fit: cover; border: 1px solid var(--agp-border);
	transition: transform .2s ease, box-shadow .2s ease;
}
.agp-related-card:hover img { transform: translateY(-4px); box-shadow: var(--agp-shadow); }
.agp-related-card span {
	font-size: 12px; color: var(--agp-text); text-align: center; line-height: 1.3;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Ad slots ---------- */
.agp-ad { margin: 0 0 28px; text-align: center; overflow: hidden; }
.agp-ad-sidebar { margin: 18px 0 0; }
.agp-ad:empty { display: none; }

/* ============================================================
   STANDALONE MODE — site header & footer
   ============================================================ */
.agp-skip-link {
	position: absolute; left: -9999px; top: 0; background: var(--agp-brand); color: #fff;
	padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100000;
}
.agp-skip-link:focus { left: 0; }

body.agp-standalone { margin: 0; background: var(--agp-bg); }

.agp-site-header {
	position: sticky; top: 0; z-index: 999; background: var(--agp-card);
	border-bottom: 1px solid var(--agp-border);
	box-shadow: 0 1px 3px rgba(17,21,39,.04);
}
.agp-site-bar {
	max-width: 1180px; margin: 0 auto; padding: 0 20px; min-height: 66px;
	display: flex; align-items: center; gap: 24px;
}
.agp-site-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.agp-site-logo { height: 38px; width: auto; max-width: 190px; object-fit: contain; display: block; }
.agp-site-name {
	font-size: 20px; font-weight: 800; letter-spacing: -.02em;
	background: linear-gradient(120deg, var(--agp-brand), var(--agp-brand-2));
	-webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--agp-brand);
}
.agp-site-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.agp-site-nav a {
	color: var(--agp-text); text-decoration: none; font-weight: 600; font-size: 14px;
	padding: 8px 12px; border-radius: 8px; transition: background .15s, color .15s;
}
.agp-site-nav a:hover { background: var(--agp-soft); color: var(--agp-brand); }
.agp-header-search {
	display: flex; align-items: center; gap: 8px; flex-shrink: 0;
	width: 230px; max-width: 40vw; padding: 0 14px; border-radius: 999px;
	border: 1px solid var(--agp-border); background: var(--agp-soft); transition: border-color .15s, background .15s;
}
.agp-header-search:focus-within { border-color: var(--agp-brand); background: var(--agp-card); }
.agp-header-search svg { width: 15px; height: 15px; color: var(--agp-muted); flex-shrink: 0; }
.agp-header-search input {
	flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
	font-size: 13.5px; color: var(--agp-heading); padding: 9px 0;
}
.agp-nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto; }
.agp-nav-toggle span { width: 22px; height: 2px; background: var(--agp-heading); border-radius: 2px; }

.agp-site-main { min-height: 60vh; }

.agp-site-footer { background: var(--agp-card); border-top: 1px solid var(--agp-border); margin-top: 60px; }
.agp-footer-inner {
	max-width: 1180px; margin: 0 auto; padding: 44px 20px 28px;
	display: flex; gap: 40px; justify-content: space-between; flex-wrap: wrap;
}
.agp-footer-brand { max-width: 360px; }
.agp-footer-logo { height: 34px; width: auto; margin-bottom: 12px; }
.agp-footer-name { font-size: 18px; font-weight: 800; color: var(--agp-heading); display: block; margin-bottom: 10px; }
.agp-footer-text { font-size: 14px; color: var(--agp-muted); margin: 0 0 12px; }
.agp-footer-social { display: flex; gap: 14px; flex-wrap: wrap; }
.agp-footer-social a { font-size: 13px; color: var(--agp-brand); text-decoration: none; font-weight: 600; }
.agp-footer-links { display: flex; flex-direction: column; gap: 10px; }
.agp-footer-links a { font-size: 14px; color: var(--agp-text); text-decoration: none; }
.agp-footer-links a:hover { color: var(--agp-brand); }
.agp-footer-bottom {
	border-top: 1px solid var(--agp-border); text-align: center; padding: 18px 20px;
	font-size: 13px; color: var(--agp-muted);
}

@media (max-width: 782px) {
	.agp-nav-toggle { display: flex; }
	.agp-site-nav {
		display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column;
		background: var(--agp-card); border-bottom: 1px solid var(--agp-border); padding: 10px 16px; gap: 2px; margin: 0;
	}
	.agp-site-nav.is-open { display: flex; }
	.agp-site-nav a { padding: 12px; border-radius: 8px; }
	.agp-header-search { display: none; }
	.agp-footer-inner { flex-direction: column; gap: 28px; }
}

/* Logo + site-name combination */
.agp-site-name--with-logo { font-size: 17px; }
.agp-footer-brand .agp-footer-logo + .agp-footer-name { display: inline-block; margin-left: 10px; vertical-align: middle; font-size: 16px; }

/* ---------- Dark/light toggle (floating) ---------- */
.agp-theme-toggle {
	position: fixed; left: 18px; bottom: 18px; z-index: 9998;
	width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--agp-border);
	background: var(--agp-card); color: var(--agp-heading); cursor: pointer;
	display: flex; align-items: center; justify-content: center; box-shadow: var(--agp-shadow);
	transition: transform .15s, box-shadow .15s;
}
.agp-theme-toggle:hover { transform: translateY(-2px) scale(1.05); }
.agp-theme-toggle svg { width: 20px; height: 20px; }

/* ---------- Share / copy buttons ---------- */
.agp-share-row { display: flex; gap: 8px; margin-top: 16px; }
.agp-share-btn, .agp-copy-btn {
	flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	padding: 9px 10px; border-radius: 10px; border: 1px solid var(--agp-border);
	background: var(--agp-soft); color: var(--agp-text); font-size: 13px; font-weight: 600; cursor: pointer;
	transition: border-color .15s, color .15s, background .15s;
}
.agp-share-btn:hover, .agp-copy-btn:hover { border-color: var(--agp-brand); color: var(--agp-brand); }
.agp-share-btn svg, .agp-copy-btn svg { width: 16px; height: 16px; }
.agp-share-btn.is-copied, .agp-copy-btn.is-copied { border-color: #22c55e; color: #16a34a; background: rgba(34,197,94,.08); }

/* ---------- Featured / Trending rows ---------- */
.agp-row { margin: 0 0 30px; }
.agp-row-title { font-size: 18px; font-weight: 800; color: var(--agp-heading); margin: 0 0 14px; letter-spacing: -.01em; }
.agp-row-scroll {
	display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 16px;
	overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity;
}
.agp-row-scroll .agp-store-card { scroll-snap-align: start; }
.agp-row-scroll::-webkit-scrollbar { height: 8px; }
.agp-row-scroll::-webkit-scrollbar-thumb { background: var(--agp-border); border-radius: 8px; }

/* ---------- Grid head + sort ---------- */
.agp-grid-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 4px 0 18px; flex-wrap: wrap; }
.agp-grid-head .agp-row-title { margin: 0; }
.agp-sort { display: flex; align-items: center; gap: 8px; }
.agp-sort label { font-size: 13px; color: var(--agp-muted); font-weight: 600; }
.agp-sort select {
	padding: 8px 30px 8px 12px; border-radius: 10px; border: 1px solid var(--agp-border);
	background: var(--agp-card); color: var(--agp-heading); font-size: 13.5px; font-weight: 600; cursor: pointer;
	appearance: none; -webkit-appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7390' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
	background-repeat: no-repeat; background-position: right 10px center;
}
.agp-sort select:focus { border-color: var(--agp-brand); outline: none; }

/* ---------- QR widget ---------- */
.agp-qr-widget {
	background: var(--agp-card); padding: 22px; border-radius: var(--agp-radius);
	border: 1px solid var(--agp-border); box-shadow: var(--agp-shadow); text-align: center;
}
.agp-qr-widget h3 { margin: 0 0 14px; font-size: 16px; color: var(--agp-heading); font-weight: 700; }
.agp-qr {
	width: 180px; height: 180px; border-radius: 12px; background: #fff;
	border: 1px solid var(--agp-border); padding: 6px; display: inline-block;
}
.agp-qr-widget p { margin: 12px 0 0; font-size: 12.5px; color: var(--agp-muted); }
