/assets/css/brand.php"> // ============================================================ require_once __DIR__ . '/../../includes/db.php'; header('Content-Type: text/css'); header('Cache-Control: no-cache'); // disable caching so color changes apply instantly $primary = DB::getSetting('primary_color', '#E6A817'); $primaryDark = DB::getSetting('primary_dark_color', '#C68A00'); // Derive related shades from the primary color // We compute glow and bg in CSS using the raw hex function hexToRgb(string $hex): string { $hex = ltrim($hex, '#'); if (strlen($hex) === 3) { $hex = $hex[0].$hex[0].$hex[1].$hex[1].$hex[2].$hex[2]; } $r = hexdec(substr($hex,0,2)); $g = hexdec(substr($hex,2,2)); $b = hexdec(substr($hex,4,2)); return "$r,$g,$b"; } $rgb = hexToRgb($primary); echo ":root { --primary: {$primary}; --primary-dark: {$primaryDark}; --primary-light: {$primary}cc; --primary-glow: rgba({$rgb},0.25); --primary-bg: rgba({$rgb},0.08); /* sidebar active color (admin) */ --sidebar-active: {$primary}; } /* Override hardcoded color references */ .btn-primary, [class*='btn-primary'] { background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important; } .header-bar, .product-detail-header, .team-header { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important; } .nav-item.active .nav-icon, .nav-item.active .nav-label { color: var(--primary) !important; } a[style*='E6A817'], span[style*='E6A817'], div[style*='E6A817'] { /* Cannot override inline styles broadly - handled via PHP output */ } ";