diff --git a/assets/css/frontend/nav/base.css b/assets/css/frontend/nav/base.css
index af8529ce..11691006 100644
--- a/assets/css/frontend/nav/base.css
+++ b/assets/css/frontend/nav/base.css
@@ -195,7 +195,23 @@ body.dark-theme .site-nav--blur.is-scrolled {
white-space: nowrap;
}
-/* Light/dark logo toggle */
+/* Light/dark logo: single adaptive img (white-src/dark-src via theme.js) */
+.navbar-logo > img,
+.navbar-logo .site-brand__logo-img,
+.site-brand .site-brand__logo-img,
+.site-brand__logo-img,
+.site-brand .navbar-logo img {
+ height: 36px !important;
+ width: auto !important;
+ max-width: min(180px, 40vw) !important;
+ max-height: 36px !important;
+ padding: 0 !important;
+ object-fit: contain !important;
+ display: inline-block;
+ vertical-align: middle;
+}
+
+/* Legacy dual-img classes (if any remain elsewhere) */
.site-brand__logo-img--dark {
display: none;
}
diff --git a/header.php b/header.php
index e239b1d6..ff1477a9 100644
--- a/header.php
+++ b/header.php
@@ -170,15 +170,17 @@ if (!empty($aksrt_bg_styles)) {
$aksrt_nav_styles[] = '--nav-max-width:' . (int) $aksrt_header_settings['max_width'] . 'px';
}
$aksrt_logo_parts = [];
- if ($aksrt_logo_url !== '') {
- $aksrt_logo_parts[] = '
0 ? ' style="height:36px;width:auto;max-width:' . max(36, (int) $aksrt_logo_width) . 'px"' : '') . '>';
- $aksrt_brand_logo_src = $aksrt_logo_url;
- }
- if ($aksrt_logo_dark_url !== '') {
- $aksrt_logo_parts[] = '
0 ? ' style="height:36px;width:auto;max-width:' . max(36, (int) $aksrt_logo_width) . 'px"' : '') . '>';
- if ($aksrt_brand_logo_src === '') {
- $aksrt_brand_logo_src = $aksrt_logo_dark_url;
+ if ($aksrt_logo_url !== '' || $aksrt_logo_dark_url !== '') {
+ $aksrt_logo_more = $aksrt_logo_width > 0
+ ? 'style="height:36px;width:auto;max-width:' . max(36, (int) $aksrt_logo_width) . 'px"'
+ : 'style="height:36px;width:auto"';
+ $aksrt_logo_html = function_exists('aksrt_get_adaptive_theme_img')
+ ? aksrt_get_adaptive_theme_img($aksrt_logo_url, $aksrt_logo_dark_url, $aksrt_brand_name, $aksrt_logo_more)
+ : '';
+ if ($aksrt_logo_html !== '') {
+ $aksrt_logo_parts[] = $aksrt_logo_html;
}
+ $aksrt_brand_logo_src = $aksrt_logo_url !== '' ? $aksrt_logo_url : $aksrt_logo_dark_url;
}
$aksrt_has_brand_logo = !empty($aksrt_logo_parts);
if ($aksrt_has_brand_logo) {